From: Ricardo Marques Date: Fri, 20 Nov 2020 11:52:02 +0000 (+0000) Subject: mgr/orchestrator: Sort 'ceph orch device ls' by host X-Git-Tag: v15.2.9~88^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=def2f946d13bdce8c6a6ee25f0e218a1c277993a;p=ceph.git mgr/orchestrator: Sort 'ceph orch device ls' by host Signed-off-by: Ricardo Marques (cherry picked from commit c6e6eb5ef53278b9d0cc0198bc32a441ab8f9a81) --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 7b86e397daa6..bef69bcbe4f1 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -407,7 +407,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): table._align['SIZE'] = 'r' table.left_padding_width = 0 table.right_padding_width = 2 - for host_ in completion.result: # type: InventoryHost + for host_ in sorted(completion.result, key=lambda h: h.name): # type: InventoryHost for d in host_.devices.devices: # type: Device led_ident = 'N/A'