summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorEoghan Glynn <eglynn@redhat.com>2012-07-19 17:14:00 +0100
committerEoghan Glynn <eglynn@redhat.com>2012-07-19 17:21:09 +0100
commit39146d2e2e36ad96e8cf8b4f4bc9c426f1b80efb (patch)
tree564d595ee72d7625c4ba58d785f5a36395dd9895 /nova/api
parent5f45eadbf2c1ea4a4cf6c9358aac269ca3f2cff6 (diff)
downloadnova-39146d2e2e36ad96e8cf8b4f4bc9c426f1b80efb.tar.gz
nova-39146d2e2e36ad96e8cf8b4f4bc9c426f1b80efb.tar.xz
nova-39146d2e2e36ad96e8cf8b4f4bc9c426f1b80efb.zip
Ensure 413 response for security group over-quota
Fixes LP 1021748 Instead of raising the relevant webob.exc exception directly, we now follow the usual pattern of mapping in the FaultWrapper middleware from an internal exception type to the corresponding HTTP error. Change-Id: Ifb43685e4f9b0b5bd53e74747d1f87aa5e119fb5
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/security_groups.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/security_groups.py b/nova/api/openstack/compute/contrib/security_groups.py
index 004df4e73..1705bdd26 100644
--- a/nova/api/openstack/compute/contrib/security_groups.py
+++ b/nova/api/openstack/compute/contrib/security_groups.py
@@ -509,7 +509,7 @@ class NativeSecurityGroupAPI(compute.api.SecurityGroupAPI):
@staticmethod
def raise_over_quota(msg):
- raise exc.HTTPBadRequest(explanation=msg)
+ raise exception.SecurityGroupLimitExceeded(msg)
@staticmethod
def raise_not_found(msg):