]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator_cli: sort host list 33370/head
authorSage Weil <sage@redhat.com>
Mon, 17 Feb 2020 14:59:38 +0000 (08:59 -0600)
committerSage Weil <sage@redhat.com>
Tue, 18 Feb 2020 14:01:30 +0000 (08:01 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator/module.py

index 7dd39931973caf5f1e005ef3475f02070afa8e75..c0773687c4d3d7618634148b9d9435e4cb7a364f 100644 (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)