]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: refactor device path handling for LVM lookups 58140/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 6 Aug 2024 13:37:30 +0000 (13:37 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 12 Aug 2024 08:43:59 +0000 (08:43 +0000)
commitfec896b301f0e72b7085e3b164bab48c4140603a
tree9f1597280412d0bc1b89c8e24209684d2f1e4b58
parent88836135fd03d28131c58a7440f51de244076166
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>
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