]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume api.lvm allow full paths to detect lv from arguments
authorAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 12:10:51 +0000 (08:10 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 16:10:07 +0000 (12:10 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py

index 2fb5138cfcedd8a1bfa88b931e66fbd95cd0cc71..110e990071f85518f55f867a813c55994cfba6d3 100644 (file)
@@ -137,6 +137,10 @@ def get_lv_from_argument(argument):
     in the form of `vg/lv`, but with some validation so that an argument that is a full
     path to a device can be ignored
     """
+    if argument.startswith('/'):
+        lv = get_lv(lv_path=argument)
+        if lv:
+            return lv
     try:
         vg_name, lv_name = argument.split('/')
     except (ValueError, AttributeError):