]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: add helper methods to get only first LVM devs
authorRishabh Dave <ridave@redhat.com>
Fri, 3 Jan 2020 10:14:04 +0000 (15:44 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 28 Jan 2020 15:25:57 +0000 (20:55 +0530)
commit17957d9beb42a04b8f180ccb7ba07d43179a41d3
treefd93cd9e103aea0808a18f97fd8f862dfdf2fd55
parentfb1390964fdfd10815ab4a4302ad454169bc0d5f
ceph-volume: add helper methods to get only first LVM devs

These convenience methods shortens following phrase to
"lv = get_first_lv()" -

lvs = get_lvs()
if len(lvs) >= 1:
lvs = lv[0]

These methods do the same things as above phrase internall. Rewrite
listing.py to use these new helper methods.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/devices/lvm/listing.py