ceph-volume: adds lv_name property to Device class
authorAndrew Schoen <aschoen@redhat.com>
Tue, 13 Nov 2018 18:40:45 +0000 (12:40 -0600)
committerAlfredo Deza <adeza@redhat.com>
Wed, 14 Nov 2018 20:07:07 +0000 (15:07 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Resolves: rm#27062
(cherry picked from commit cc0317efac5a3a25edcdb48af2a63a969c2ac43a)

src/ceph-volume/ceph_volume/util/device.py

index f5362bc1f3784c7740b0cb3f1830ae1d25c990ab..a020598c14f88b96b657567066d57ff9a7624df1 100644 (file)
@@ -70,6 +70,7 @@ class Device(object):
         self.lv_api = None
         self.lvs = []
         self.vg_name = None
+        self.lv_name = None
         self.pvs_api = []
         self.disk_api = {}
         self.blkid_api = {}
@@ -108,6 +109,7 @@ class Device(object):
             self.lvs = [lv]
             self.abspath = lv.lv_path
             self.vg_name = lv.vg_name
+            self.lv_name = lv.name
         else:
             dev = disk.lsblk(self.path)
             self.blkid_api = disk.blkid(self.path)