diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-06-02 13:00:17 -0400 |
|---|---|---|
| committer | Dan Prince <dan.prince@rackspace.com> | 2011-06-02 13:00:17 -0400 |
| commit | 9034bb2fcd5f03df2b25d6114adc4e7d5f3549fe (patch) | |
| tree | ef5646c99a4de800196bfed8382e68b2fe178caa /nova/api | |
| parent | 052f08256d2be2dda5ed792be48aa4f97cb93a93 (diff) | |
Remove some of the extra image service calls from the OS API images controller.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/images.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index 87cbef791..59d9e3082 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -94,8 +94,7 @@ class Controller(object): context = req.environ['nova.context'] try: - (image_service, image_id) = nova.image.get_image_service(id) - image = image_service.show(context, image_id) + image = self._image_service.show(context, id) except (exception.NotFound, exception.InvalidImageRef): explanation = _("Image not found.") raise faults.Fault(webob.exc.HTTPNotFound(explanation=explanation)) @@ -109,8 +108,7 @@ class Controller(object): :param id: Image identifier (integer) """ context = req.environ['nova.context'] - (image_service, image_id) = nova.image.get_image_service(id) - image_service.delete(context, image_id) + self._image_service.delete(context, id) return webob.exc.HTTPNoContent() def create(self, req, body): |
