]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/inventory: remove unused `filter_by_label`
authorSebastian Wagner <sewagner@redhat.com>
Mon, 13 Sep 2021 07:56:06 +0000 (09:56 +0200)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 18 Jan 2022 10:20:47 +0000 (11:20 +0100)
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit 8de88a1d0ac4f4747fa15d45d2a82b34d6b35a95)

src/pybind/mgr/cephadm/inventory.py

index f6920764fcb947317b4ebd1e4ba16467cad8edd3..22a9bf05326761327ed02eb0013c1fdf827a5760 100644 (file)
@@ -142,14 +142,6 @@ class Inventory:
         self.assert_host(host)
         return self._inventory[host].get('addr', host)
 
-    def filter_by_label(self, label: Optional[str] = '', as_hostspec: bool = False) -> Iterator:
-        for h, hostspec in self._inventory.items():
-            if not label or label in hostspec.get('labels', []):
-                if as_hostspec:
-                    yield self.spec_from_dict(hostspec)
-                else:
-                    yield h
-
     def spec_from_dict(self, info: dict) -> HostSpec:
         hostname = info['hostname']
         return HostSpec(