From c8a6da4e1bb645ca5ee8cb8f5d861584fe70210d Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 7 Feb 2018 09:06:45 -0600 Subject: [PATCH] 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 --- src/ceph-volume/ceph_volume/devices/lvm/zap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/zap.py b/src/ceph-volume/ceph_volume/devices/lvm/zap.py index 0cadc10765e..43899e1cd5e 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']) -- 2.39.5