From: Andrew Schoen Date: Wed, 7 Feb 2018 15:06:45 +0000 (-0600) Subject: ceph-volume: use api helper methods for pvs and lvs in lvm zap X-Git-Tag: v12.2.3~5^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec84f39a0573887e005fdb0bfe7d4e5e9457c51b;p=ceph.git ceph-volume: use api helper methods for pvs and lvs in lvm zap This is just a cleaner way of doing this instead of using PVolumes and Volumes directly. Signed-off-by: Andrew Schoen (cherry picked from commit c8a6da4e1bb645ca5ee8cb8f5d861584fe70210d) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/zap.py b/src/ceph-volume/ceph_volume/devices/lvm/zap.py index 0cadc10765ed..43899e1cd5ee 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/zap.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/zap.py @@ -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'])