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: v16.1.0~462^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6e6eb5ef53278b9d0cc0198bc32a441ab8f9a81;p=ceph.git mgr/orchestrator: Sort 'ceph orch device ls' by host Signed-off-by: Ricardo Marques --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index ea27c762a08d..c3f31ba663c6 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -405,7 +405,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'