]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-volume/ceph_volume/exceptions.py
update sources to 12.2.8
[ceph.git] / ceph / src / ceph-volume / ceph_volume / exceptions.py
index 211d9d09b9e04d01e8a4006b1e2df34c7dee50a1..f40b7b11d37a9811a94ea2bc64cb9a8a0a717429 100644 (file)
@@ -79,3 +79,16 @@ class MultipleVGsError(Exception):
     def __str__(self):
         msg = "Got more than 1 result looking for volume group: %s" % self.vg_name
         return msg
+
+
+class SizeAllocationError(Exception):
+
+    def __init__(self, requested, available):
+        self.requested = requested
+        self.available = available
+
+    def __str__(self):
+        msg = 'Unable to allocate size (%s), not enough free space (%s)' % (
+            self.requested, self.available
+        )
+        return msg