]> git-server-git.apps.pok.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>
Mon, 29 Nov 2021 10:26:37 +0000 (11:26 +0100)
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
src/pybind/mgr/cephadm/inventory.py

index 366b9011b9187b101a4b95d2b4475c838270d851..f881ee3bfebce867d5deb8f6cdc58d856e9c9cb9 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(