diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-10 01:49:24 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-10 01:49:24 +0000 |
| commit | b5077015ceebfb038f3da6e47d8a64f117e00060 (patch) | |
| tree | b5781ee22bb261b3b4608ea53fc8580497548292 | |
| parent | a8f92deedc296a4b979b0036d4141462166b8072 (diff) | |
| parent | 4de76f8a57554f56c799befdca9489d864f33761 (diff) | |
| download | nova-b5077015ceebfb038f3da6e47d8a64f117e00060.tar.gz nova-b5077015ceebfb038f3da6e47d8a64f117e00060.tar.xz nova-b5077015ceebfb038f3da6e47d8a64f117e00060.zip | |
Merge "Fetch kernel/ramdisk images directly"
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 241b0da68..738886b07 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -606,11 +606,11 @@ def create_kernel_image(context, session, instance, image_id, user_id, args = {} args['cached-image'] = image_id args['new-image-uuid'] = str(uuid.uuid4()) - filename = session.call_plugin( - 'kernel', 'create_kernel_ramdisk', args) + filename = session.call_plugin('kernel', 'create_kernel_ramdisk', args) if filename == "": - return _fetch_image(context, session, instance, image_id, image_type) + return _fetch_disk_image(context, session, instance, image_id, + image_type) else: vdi_type = ImageType.to_string(image_type) return {vdi_type: dict(uuid=None, file=filename)} @@ -638,8 +638,7 @@ def _create_cached_image(context, session, instance, image_id, image_type): root_vdi_ref = find_cached_image(session, image_id, sr_ref) if root_vdi_ref is None: - vdis = _fetch_image(context, session, instance, image_id, - image_type) + vdis = _fetch_image(context, session, instance, image_id, image_type) root_vdi = vdis['root'] root_vdi_ref = session.call_xenapi('VDI.get_by_uuid', root_vdi['uuid']) @@ -750,7 +749,7 @@ def _fetch_image(context, session, instance, image_id, image_type): for vdi_type, vdi in vdis.iteritems(): vdi_uuid = vdi['uuid'] LOG.debug(_("Fetched VDIs of type '%(vdi_type)s' with UUID" - " '%(vdi_uuid)s'"), + " '%(vdi_uuid)s'"), locals(), instance=instance) return vdis |
