mgr/orchestrator_cli: sort host list

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2020-02-17 08:59:38 -06:00
parent ae5d2c6ab2
commit de1a7b93cd

View File

@ -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)