]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: allow creating empty VolumeGroup objects
authorRishabh Dave <ridave@redhat.com>
Thu, 3 Oct 2019 12:10:37 +0000 (17:40 +0530)
committerJan Fajerski <jfajerski@suse.com>
Wed, 9 Oct 2019 11:51:39 +0000 (13:51 +0200)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 2dc4f7de96e51c8117b719640ec4c09388a1412e)

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

index 949d614252bfb2782fb1b8be307e312fe1a45cb3..48d5e5bf47ae97f72c965ab1ec6ec2edd799c618 100644 (file)
@@ -680,8 +680,9 @@ class VolumeGroups(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 vgs in the current system