summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-07 07:43:46 +0000
committerGerrit Code Review <review@openstack.org>2012-11-07 07:43:46 +0000
commitd01ac15a63e7a23bd53c543ac55ef94404422c23 (patch)
tree96b850771e3ae44a742e462f9a9cef2357c574ca /nova/api
parentee3d2a190844b7b0493545c6e6967cfdf520a67d (diff)
parentb84b7daaf83b8280d4a80ca00c4d5e3783a162db (diff)
downloadnova-d01ac15a63e7a23bd53c543ac55ef94404422c23.tar.gz
nova-d01ac15a63e7a23bd53c543ac55ef94404422c23.tar.xz
nova-d01ac15a63e7a23bd53c543ac55ef94404422c23.zip
Merge "Fix quota updating during soft delete and restore"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/deferred_delete.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/contrib/deferred_delete.py b/nova/api/openstack/compute/contrib/deferred_delete.py
index 8eaea04bb..ea7ac00f9 100644
--- a/nova/api/openstack/compute/contrib/deferred_delete.py
+++ b/nova/api/openstack/compute/contrib/deferred_delete.py
@@ -42,6 +42,9 @@ class DeferredDeleteController(wsgi.Controller):
instance = self.compute_api.get(context, id)
try:
self.compute_api.restore(context, instance)
+ except exception.QuotaError as error:
+ raise exc.HTTPRequestEntityTooLarge(explanation=unicode(error),
+ headers={'Retry-After': 0})
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'restore')