]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: allow creating empty PVolumes objects
authorRishabh Dave <ridave@redhat.com>
Thu, 3 Oct 2019 11:14:35 +0000 (16:44 +0530)
committerJan Fajerski <jfajerski@suse.com>
Wed, 9 Oct 2019 11:50:20 +0000 (13:50 +0200)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 384aaee8fd2b0de7120e58efc3ebbd2a520d709f)

src/ceph-volume/ceph_volume/api/lvm.py

index 92ac2c2283db0b87ce405a9ee5243e04594f13f0..7f96771cb040c3993101db56c95c9119c04f8668 100644 (file)
@@ -911,8 +911,9 @@ class PVolumes(list):
     to filter them via keyword arguments.
     """
 
-    def __init__(self):
-        self._populate()
+    def __init__(self, populate=True):
+        if populate:
+            self._populate()
 
     def _populate(self):
         # get all the pvs in the current system