From c6e6eb5ef53278b9d0cc0198bc32a441ab8f9a81 Mon Sep 17 00:00:00 2001 From: Ricardo Marques Date: Fri, 20 Nov 2020 11:52:02 +0000 Subject: [PATCH] mgr/orchestrator: Sort 'ceph orch device ls' by host Signed-off-by: Ricardo Marques --- src/pybind/mgr/orchestrator/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- 2.47.3