summaryrefslogtreecommitdiffstats
path: root/src/ceph-volume/ceph_volume/devices/lvm/prepare.py
diff options
context:
space:
mode:
authorRishabh Dave <ridave@redhat.com>2019-12-30 15:56:22 +0100
committerRishabh Dave <ridave@redhat.com>2020-06-30 10:51:12 +0200
commitb2254050c01d872ebc906708a3b4c8d4fa2105d7 (patch)
tree8b5ebf07b104c946214e6ca038036a6199fa162a /src/ceph-volume/ceph_volume/devices/lvm/prepare.py
parentceph-volume: don't use api.lvm.get_lv_from_argument (diff)
downloadceph-b2254050c01d872ebc906708a3b4c8d4fa2105d7.tar.xz
ceph-b2254050c01d872ebc906708a3b4c8d4fa2105d7.zip
ceph-volume: don't use api.lvm.get_lv
Use api.lvm.get_lvs() and api.lvm.get_first_lv() instead and update the tests. Signed-off-by: Rishabh Dave <ridave@redhat.com>
Diffstat (limited to 'src/ceph-volume/ceph_volume/devices/lvm/prepare.py')
-rw-r--r--src/ceph-volume/ceph_volume/devices/lvm/prepare.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py
index 284f3c43ac1..2e07d15ec0a 100644
--- a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py
+++ b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py
@@ -135,6 +135,7 @@ class Prepare(object):
raise RuntimeError('unable to use device')
return uuid
+ # TODO: get rid of this method?
def get_lv(self, argument):
"""
Perform some parsing of the command-line value so that the process
@@ -148,7 +149,8 @@ class Prepare(object):
vg_name, lv_name = argument.split('/')
except (ValueError, AttributeError):
return None
- return api.get_lv(lv_name=lv_name, vg_name=vg_name)
+ return api.get_first_lv(filters={'lv_name': lv_name, 'vg_name':
+ vg_name})
def setup_device(self, device_type, device_name, tags, size):
"""