mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
ceph-volume: api.lvm.remove_lv should return True when successful
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
parent
1d083a2191
commit
7f055aa6de
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user