diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-08-16 01:37:18 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-08-16 01:37:18 +0000 |
| commit | 46d7641466f9eb6313f2d45494a66d581a66407e (patch) | |
| tree | a4e0d429e0c0c0c2a43394e24153a918aef4a182 /nova/api | |
| parent | bc115f003ddf7b8a825f0303bdf290a19c39f134 (diff) | |
| parent | 00f0b170ec15299b20c345fa1f66f21185c2dc79 (diff) | |
Merge "Update disk config to check for 'server' in req."
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/disk_config.py | 3 | ||||
| -rw-r--r-- | nova/api/openstack/compute/contrib/scheduler_hints.py | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/nova/api/openstack/compute/contrib/disk_config.py b/nova/api/openstack/compute/contrib/disk_config.py index 961457c46..293be7415 100644 --- a/nova/api/openstack/compute/contrib/disk_config.py +++ b/nova/api/openstack/compute/contrib/disk_config.py @@ -139,7 +139,8 @@ class ServerDiskConfigController(wsgi.Controller): def create(self, req, 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/contrib/scheduler_hints.py b/nova/api/openstack/compute/contrib/scheduler_hints.py index 4bff779a5..e8d65a741 100644 --- a/nova/api/openstack/compute/contrib/scheduler_hints.py +++ b/nova/api/openstack/compute/contrib/scheduler_hints.py @@ -49,10 +49,7 @@ class SchedulerHintsController(wsgi.Controller): if 'server' in body: body['server']['scheduler_hints'] = hints - yield - else: - msg = _("Missing server attribute") - raise webob.exc.HTTPBadRequest(reason=msg) + yield class Scheduler_hints(extensions.ExtensionDescriptor): |
