diff options
| author | Rohit Karajgi <rohit.karajgi@nttdata.com> | 2012-12-28 04:43:14 -0800 |
|---|---|---|
| committer | Rohit Karajgi <rohit.karajgi@nttdata.com> | 2013-01-14 05:29:47 -0800 |
| commit | e34d5d9e3d416fc40f147a5914f7dceee26f5ba4 (patch) | |
| tree | e7de3414527f2351dbe942af8698d1fa634246b1 /nova/api | |
| parent | aa18fca87fd4655c47e473639a30a6b61ed88fce (diff) | |
| download | nova-e34d5d9e3d416fc40f147a5914f7dceee26f5ba4.tar.gz nova-e34d5d9e3d416fc40f147a5914f7dceee26f5ba4.tar.xz nova-e34d5d9e3d416fc40f147a5914f7dceee26f5ba4.zip | |
Add Compute API validations for block device map
This patch adds validations to return 400 BadRequest to
Create server(s) with block device mappings where appropriate
and related unit tests
Fixes bug 1094244
Change-Id: I778d3ed4b0871561774594e950ce98b6a1ecfcb9
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index d3a6fc8a9..82eae442c 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -890,6 +890,8 @@ class Controller(wsgi.Controller): raise exc.HTTPBadRequest(explanation=unicode(error)) except exception.InvalidMetadataSize as error: raise exc.HTTPRequestEntityTooLarge(explanation=unicode(error)) + except exception.InvalidRequest as error: + raise exc.HTTPBadRequest(explanation=unicode(error)) except exception.ImageNotFound as error: msg = _("Can not find requested image") raise exc.HTTPBadRequest(explanation=msg) |
