]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ssh: populate labels
authorSage Weil <sage@redhat.com>
Mon, 25 Nov 2019 14:44:41 +0000 (08:44 -0600)
committerSage Weil <sage@redhat.com>
Tue, 26 Nov 2019 14:01:26 +0000 (08:01 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/ssh/module.py

index f5e47bffc6655f2136a8988a24a88db888c76fff..46805d7a6569112006a5fe5b6b5dd40263e89f88 100644 (file)
@@ -572,11 +572,12 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
 
         Notes:
           - skip async: manager reads from cache.
-
-        TODO:
-          - InventoryNode probably needs to be able to report labels
         """
-        nodes = [orchestrator.InventoryNode(host_name, inventory.Devices([])) for host_name in self.inventory_cache]
+        nodes = [
+            orchestrator.InventoryNode(h,
+                                       inventory.Devices([]),
+                                       i.get('labels', []))
+            for h, i in self.inventory.items()]
         return orchestrator.TrivialReadCompletion(nodes)
 
     def add_host_label(self, host, label):