From def2f946d13bdce8c6a6ee25f0e218a1c277993a 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 (cherry picked from commit c6e6eb5ef53278b9d0cc0198bc32a441ab8f9a81) --- 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 7b86e397daa67..bef69bcbe4f1a 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' -- 2.39.5