]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume exceptions create a specifc error for multiple pvs
authorAlfredo Deza <adeza@redhat.com>
Mon, 28 Aug 2017 21:33:39 +0000 (17:33 -0400)
committerAlfredo Deza <adeza@redhat.com>
Thu, 31 Aug 2017 19:56:15 +0000 (15:56 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 73315c49115dbb45f3bb6c9e46955b333602cec2)

src/ceph-volume/ceph_volume/exceptions.py

index 75c6b6c64053697bfa86f042eb6072fbab9c419e..211d9d09b9e04d01e8a4006b1e2df34c7dee50a1 100644 (file)
@@ -50,6 +50,16 @@ class SuperUserError(Exception):
         return 'This command needs to be executed with sudo or as root'
 
 
+class MultiplePVsError(Exception):
+
+    def __init__(self, pv_name):
+        self.pv_name = pv_name
+
+    def __str__(self):
+        msg = "Got more than 1 result looking for physical volume: %s" % self.pv_name
+        return msg
+
+
 class MultipleLVsError(Exception):
 
     def __init__(self, lv_name, lv_path):