diff options
| author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-09-01 22:31:54 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-09-01 22:31:54 +0000 |
| commit | d80dc5bbbd1781bd33d9f69b608014e9cc2e41a3 (patch) | |
| tree | b1fdf33780308eac9ed579d171c7a537dafd6a39 /nova/api | |
| parent | ce6f55b4bd889d9e873598bb23ed37327d75252e (diff) | |
| parent | 83a56a247cf026e4782b430c611adc2fc4158835 (diff) | |
| download | nova-d80dc5bbbd1781bd33d9f69b608014e9cc2e41a3.tar.gz nova-d80dc5bbbd1781bd33d9f69b608014e9cc2e41a3.tar.xz nova-d80dc5bbbd1781bd33d9f69b608014e9cc2e41a3.zip | |
Glance can now perform its own authentication/authorization checks when we're using keystone.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/create_instance_helper.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py index fd9247f79..29e071609 100644 --- a/nova/api/openstack/create_instance_helper.py +++ b/nova/api/openstack/create_instance_helper.py @@ -94,7 +94,7 @@ class CreateInstanceHelper(object): try: image_service, image_id = nova.image.get_image_service(image_href) kernel_id, ramdisk_id = self._get_kernel_ramdisk_from_image( - req, image_id) + req, image_service, image_id) images = set([str(x['id']) for x in image_service.index(context)]) assert str(image_id) in images except Exception, e: @@ -247,12 +247,12 @@ class CreateInstanceHelper(object): msg = _("Server name is an empty string") raise exc.HTTPBadRequest(explanation=msg) - def _get_kernel_ramdisk_from_image(self, req, image_id): + def _get_kernel_ramdisk_from_image(self, req, image_service, image_id): """Fetch an image from the ImageService, then if present, return the associated kernel and ramdisk image IDs. """ context = req.environ['nova.context'] - image_meta = self._image_service.show(context, image_id) + image_meta = image_service.show(context, image_id) # NOTE(sirp): extracted to a separate method to aid unit-testing, the # new method doesn't need a request obj or an ImageService stub kernel_id, ramdisk_id = self._do_get_kernel_ramdisk_from_image( |
