From de1a7b93cd12dd4a800d25e575c199abcf184bc9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 Feb 2020 08:59:38 -0600 Subject: [PATCH] mgr/orchestrator_cli: sort host list Signed-off-by: Sage Weil --- 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 7dd39931973..c0773687c4d 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -213,7 +213,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): table.align = 'l' table.left_padding_width = 0 table.right_padding_width = 1 - for node in completion.result: + for node in sorted(completion.result, key=lambda h: h.name): table.add_row((node.name, node.addr, ' '.join(node.labels))) output = table.get_string() return HandleCommandResult(stdout=output)