diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/disk_config.py | 3 | ||||
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/disk_config.py b/nova/api/openstack/compute/contrib/disk_config.py index 293be7415..903f930fc 100644 --- a/nova/api/openstack/compute/contrib/disk_config.py +++ b/nova/api/openstack/compute/contrib/disk_config.py @@ -148,7 +148,8 @@ class ServerDiskConfigController(wsgi.Controller): def update(self, req, id, body): context = req.environ['nova.context'] if authorize(context): - self._set_disk_config(body['server']) + if 'server' in body: + self._set_disk_config(body['server']) resp_obj = (yield) self._show(req, resp_obj) diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index a7baf62d7..104f6ab99 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -813,6 +813,9 @@ class Controller(wsgi.Controller): if not body: raise exc.HTTPUnprocessableEntity() + if not 'server' in body: + raise exc.HTTPUnprocessableEntity() + ctxt = req.environ['nova.context'] update_dict = {} |
