]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: refactor device path handling for LVM lookups 59196/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 6 Aug 2024 13:37:30 +0000 (13:37 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 13 Aug 2024 13:12:47 +0000 (15:12 +0200)
commitea37482d28ef91ac6dacbac1b1239b9b02399bf9
tree9ddf79e4f49506137a323953c50321fe4f926f26
parent73e9c6ce45be1b1d990b530e5639e0aa2c003e01
ceph-volume: refactor device path handling for LVM lookups

This consolidates the conditional checks for device paths to
reduce redundancy and improve readability and adds logic to
handle both '/dev/mapper' and '/dev/dm-' paths uniformly by
introducing a utility function `get_lvm_mapper_path_from_dm()`.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit fec896b301f0e72b7085e3b164bab48c4140603a)
src/ceph-volume/ceph_volume/tests/util/test_disk.py
src/ceph-volume/ceph_volume/util/arg_validators.py
src/ceph-volume/ceph_volume/util/device.py
src/ceph-volume/ceph_volume/util/disk.py