diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-06-22 17:14:58 -0400 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-06-22 17:14:58 -0400 |
| commit | 1f9cd3e7c97034408b5afe3fc3720c48040dea97 (patch) | |
| tree | 18bc1b1c72f34135db27ca5ce3882deaeb923d0a /nova/api | |
| parent | 781f3f07ebc3236404e33189e0a76cbb877dff18 (diff) | |
reverting non-xml changes
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/image_metadata.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/api/openstack/image_metadata.py b/nova/api/openstack/image_metadata.py index 77028be28..399cd2637 100644 --- a/nova/api/openstack/image_metadata.py +++ b/nova/api/openstack/image_metadata.py @@ -60,7 +60,7 @@ class Controller(object): context = req.environ['nova.context'] metadata = self._get_metadata(context, image_id) if id in metadata: - return {'meta': {id: metadata[id]}} + return {id: metadata[id]} else: return faults.Fault(exc.HTTPNotFound()) @@ -78,15 +78,15 @@ class Controller(object): def update(self, req, image_id, id, body): context = req.environ['nova.context'] - if not id in body['meta']: + if not id in body: expl = _('Request body and URI mismatch') raise exc.HTTPBadRequest(explanation=expl) - if len(body['meta']) > 1: + if len(body) > 1: expl = _('Request body contains too many items') raise exc.HTTPBadRequest(explanation=expl) img = self.image_service.show(context, image_id) metadata = self._get_metadata(context, image_id, img) - metadata[id] = body['meta'][id] + metadata[id] = body[id] self._check_quota_limit(context, metadata) img['properties'] = metadata self.image_service.update(context, image_id, img, None) |
