]> git.apps.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>
Fri, 28 Feb 2020 10:42:39 +0000 (11:42 +0100)
commita0cf11b0baedcb20afdb30f5b7e4b6799b64eba8
treee4ca59dc349690d0e0c883880d51ea18512d631e
parentee3396149a4dbde4fe9df5ccd6c3d79e6dbaaf2b
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