summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-08 19:44:53 +0000
committerGerrit Code Review <review@openstack.org>2013-01-08 19:44:53 +0000
commit8a812a75ce0e72fd79d6c73d94943bfe30eb3977 (patch)
tree36f90560ee5c5184962045e6649f07098b89743e /nova/api
parent885271e06e7860cca05d06d9f49ac0a2646684a8 (diff)
parent4e02fa1964f5de3a6ba345d858623f35b24beafd (diff)
downloadnova-8a812a75ce0e72fd79d6c73d94943bfe30eb3977.tar.gz
nova-8a812a75ce0e72fd79d6c73d94943bfe30eb3977.tar.xz
nova-8a812a75ce0e72fd79d6c73d94943bfe30eb3977.zip
Merge "Add exception handler for previous deleted flavor."
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index f992dc445..ff616a2e8 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -1028,6 +1028,9 @@ class Controller(wsgi.Controller):
except exception.MigrationNotFound:
msg = _("Instance has not been resized.")
raise exc.HTTPBadRequest(explanation=msg)
+ except exception.InstanceTypeNotFound:
+ msg = _("Flavor used by the instance could not be found.")
+ raise exc.HTTPBadRequest(explanation=msg)
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'revertResize')