]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: use api helper methods for pvs and lvs in lvm zap
authorAndrew Schoen <aschoen@redhat.com>
Wed, 7 Feb 2018 15:06:45 +0000 (09:06 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 13 Feb 2018 22:58:05 +0000 (16:58 -0600)
This is just a cleaner way of doing this instead of using PVolumes
and Volumes directly.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/zap.py

index 0cadc10765edf254cb352e71a107a634ac169b9a..43899e1cd5eefe6e3f531bb60acef9dd23681171 100644 (file)
@@ -62,10 +62,10 @@ class Zap(object):
 
         # check if there was a pv created with the
         # name of device
-        pv = api.PVolumes().get(pv_name=device)
+        pv = api.get_pv(pv_name=device)
         if pv:
             vg_name = pv.vg_name
-            lv = api.Volumes().get(vg_name=vg_name)
+            lv = api.get_lv(vg_name=vg_name)
 
         if lv:
             osd_path = "/var/lib/ceph/osd/{}-{}".format(lv.tags['ceph.cluster_name'], lv.tags['ceph.osd_id'])