summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorNaveed Massjouni <naveedm9@gmail.com>2012-01-18 19:31:01 +0000
committerNaveed Massjouni <naveedm9@gmail.com>2012-01-19 19:49:29 +0000
commit942f0404a3d7052830cdc52c17c85de7cd3bc0da (patch)
treef412e624e42d0bcf307c74116563b151bd1425b0 /nova/api
parent4672ec7c95845ddd1df29ffa88848c22df512a42 (diff)
downloadnova-942f0404a3d7052830cdc52c17c85de7cd3bc0da.tar.gz
nova-942f0404a3d7052830cdc52c17c85de7cd3bc0da.tar.xz
nova-942f0404a3d7052830cdc52c17c85de7cd3bc0da.zip
Validating image id for rebuild.
bug: 886701 Change-Id: I20ad03edca390af9203569e02ae0c1af5bb7beaf
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 0d8165784..988b403b1 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -1081,6 +1081,9 @@ class Controller(wsgi.Controller):
except exception.InstanceNotFound:
msg = _("Instance could not be found")
raise exc.HTTPNotFound(explanation=msg)
+ except exception.ImageNotFound as error:
+ msg = _("Cannot find image for rebuild")
+ raise exc.HTTPBadRequest(explanation=msg)
instance = self._get_server(context, id)