diff options
| author | Naveed Massjouni <naveedm9@gmail.com> | 2012-01-18 19:31:01 +0000 |
|---|---|---|
| committer | Naveed Massjouni <naveedm9@gmail.com> | 2012-01-19 19:49:29 +0000 |
| commit | 942f0404a3d7052830cdc52c17c85de7cd3bc0da (patch) | |
| tree | f412e624e42d0bcf307c74116563b151bd1425b0 /nova/api | |
| parent | 4672ec7c95845ddd1df29ffa88848c22df512a42 (diff) | |
| download | nova-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.py | 3 |
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) |
