diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2011-03-23 11:52:43 -0400 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2011-03-23 11:52:43 -0400 |
| commit | 572b6d30c809af6e117d96de9a5a2d845c1eeda0 (patch) | |
| tree | 57dfe988562273265eda8dcbad36aa5995b2c54d /nova/api | |
| parent | e9800364853078115cfb205bae263c3a55410b02 (diff) | |
Testing of XML and JSON for show(), and conformance to API spec for JSON.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/images.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index d8606e3c2..38c8a7306 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -21,6 +21,7 @@ from nova import flags from nova import utils from nova import wsgi from nova.api.openstack import common +from nova.api.openstack import faults from nova.api.openstack.views import images as images_view @@ -87,9 +88,10 @@ class Controller(wsgi.Controller): try: image = self.__image.show(context, image_id) except exception.NotFound: - raise webob.exc.HTTPNotFound + ex = webob.exc.HTTPNotFound(explanation="Image not found.") + raise faults.Fault(ex) - return self.get_builder(req).build(image, True) + return dict(image=self.get_builder(req).build(image, True)) def delete(self, req, id): """ |
