summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorKevin L. Mitchell <kevin.mitchell@rackspace.com>2012-05-04 19:27:43 -0500
committerKevin L. Mitchell <kevin.mitchell@rackspace.com>2012-05-16 08:58:53 -0500
commit406ff304bb09f144a59448e0e9d2d01160c7d553 (patch)
treefc43d88a568100c552a20cda9b2c6168024ad057 /nova/exception.py
parent823a114727e514f153b500a16c7cad98253300f5 (diff)
Rearchitect quota checking to partially fix bug 938317.
This is a rearchitecting/rewriting of quota handling to correct the quota atomicity issues highlighted by bug 938317. Partially implements blueprint quota-refactor as well. This change is fairly substantial. To make it easier to review, it has been broken up into 3 parts. This is the first part. Change-Id: I805f5750c08de17487e59fe33fad0bed203188a6
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index af4850367..bcca2a6dc 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -689,10 +689,23 @@ class AccessKeyNotFound(NotFound):
message = _("Access Key %(access_key)s could not be found.")
+class InvalidReservationExpiration(Invalid):
+ message = _("Invalid reservation expiration %(expire)s.")
+
+
+class InvalidQuotaValue(Invalid):
+ message = _("Change would make usage less than 0 for the following "
+ "resources: %(unders)s")
+
+
class QuotaNotFound(NotFound):
message = _("Quota could not be found")
+class QuotaResourceUnknown(QuotaNotFound):
+ message = _("Unknown quota resources %(unknown)s.")
+
+
class ProjectQuotaNotFound(QuotaNotFound):
message = _("Quota for project %(project_id)s could not be found.")
@@ -701,6 +714,18 @@ class QuotaClassNotFound(QuotaNotFound):
message = _("Quota class %(class_name)s could not be found.")
+class QuotaUsageNotFound(QuotaNotFound):
+ message = _("Quota usage for project %(project_id)s could not be found.")
+
+
+class ReservationNotFound(QuotaNotFound):
+ message = _("Quota reservation %(uuid)s could not be found.")
+
+
+class OverQuota(NovaException):
+ message = _("Quota exceeded for resources: %(overs)s")
+
+
class SecurityGroupNotFound(NotFound):
message = _("Security group %(security_group_id)s not found.")