diff options
| author | Eoghan Glynn <eglynn@redhat.com> | 2012-07-19 17:14:00 +0100 |
|---|---|---|
| committer | Eoghan Glynn <eglynn@redhat.com> | 2012-07-19 17:21:09 +0100 |
| commit | 39146d2e2e36ad96e8cf8b4f4bc9c426f1b80efb (patch) | |
| tree | 564d595ee72d7625c4ba58d785f5a36395dd9895 /nova/exception.py | |
| parent | 5f45eadbf2c1ea4a4cf6c9358aac269ca3f2cff6 (diff) | |
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/exception.py')
| -rw-r--r-- | nova/exception.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index f70cbe48e..cdad0edd5 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1039,6 +1039,10 @@ class KeypairLimitExceeded(QuotaError): message = _("Maximum number of key pairs exceeded") +class SecurityGroupLimitExceeded(QuotaError): + message = _("Maximum number of security groups or rules exceeded") + + class AggregateError(NovaException): message = _("Aggregate %(aggregate_id)s: action '%(action)s' " "caused an error: %(reason)s.") |
