]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerJan Fajerski <jfajerski@suse.com>
Wed, 12 Feb 2020 11:33:07 +0000 (12:33 +0100)
commit65f830e44fd542cd26b0cedb96ff31195e48986a
tree6b57cd1186f489701d946ebb6a6c4738c78d571f
parent136a0feaa8afb021bf151d146354b720b829916f
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>
(cherry picked from commit 17957d9beb42a04b8f180ccb7ba07d43179a41d3)
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/devices/lvm/listing.py