def _fetch_instance_kernel_ramdisk(self, context, instance):
    'Download kernel and ramdisk for instance in instance directory.'
    instance_dir = libvirt_utils.get_instance_path(instance)
    if instance['kernel_id']:
        libvirt_utils.fetch_image(context, os.path.join(instance_dir, 'kernel'), instance['kernel_id'], instance['user_id'], instance['project_id'])
        if instance['ramdisk_id']:
            libvirt_utils.fetch_image(context, os.path.join(instance_dir, 'ramdisk'), instance['ramdisk_id'], instance['user_id'], instance['project_id'])
Download kernel and ramdisk for instance in instance directory.
def _fetch_instance_kernel_ramdisk(self, context, instance):
    
    instance_dir = libvirt_utils.get_instance_path(instance)
    if instance['kernel_id']:
        libvirt_utils.fetch_image(context, os.path.join(instance_dir, 'kernel'), instance['kernel_id'], instance['user_id'], instance['project_id'])
        if instance['ramdisk_id']:
            libvirt_utils.fetch_image(context, os.path.join(instance_dir, 'ramdisk'), instance['ramdisk_id'], instance['user_id'], instance['project_id'])