]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: api.lvm.remove_lv should return True when successful
authorAndrew Schoen <aschoen@redhat.com>
Thu, 19 Oct 2017 15:35:10 +0000 (10:35 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 27 Oct 2017 16:15:42 +0000 (11:15 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py

index 8b824f5da586f21bcd313d63cf70633edb0b2c7d..9c384ce09ca3468ecaa1d7cde989c67654b7b555 100644 (file)
@@ -216,6 +216,9 @@ def create_vg(name, *devices):
 def remove_lv(path):
     """
     Removes a logical volume given it's absolute path.
+
+    Will return True if the lv is successfully removed or
+    raises a RuntimeError if the removal fails.
     """
     stdout, stderr, returncode = process.call(
         [
@@ -230,6 +233,7 @@ def remove_lv(path):
     )
     if returncode != 0:
         raise RuntimeError("Unable to remove %s".format(path))
+    return True
 
 
 def create_lv(name, group, size=None, tags=None):