'Download kernel and ramdisk for instance in instance directory.'

def _fetch_instance_kernel_ramdisk(self, context, instance, fallback_from_host=None):

    instance_dir = libvirt_utils.get_instance_path(instance)
    if instance.kernel_id:
        kernel_path = os.path.join(instance_dir, 'kernel')
        if (not os.path.exists(kernel_path)):
            self._try_fetch_image(context, kernel_path, instance.kernel_id, instance, fallback_from_host)
        if instance.ramdisk_id:
            ramdisk_path = os.path.join(instance_dir, 'ramdisk')
            if (not os.path.exists(ramdisk_path)):
                self._try_fetch_image(context, ramdisk_path, instance.ramdisk_id, instance, fallback_from_host)
