'Fetch the image from image_service and write it to the volume.'

def copy_image_to_volume(self, context, volume, image_service, image_id):

    volume_format = self.get_volume_format(volume)
    image_path = self.local_path(volume)
    if (volume_format == DISK_FORMAT_PLOOP):
        image_path = os.path.join(image_path, PLOOP_BASE_DELTA_NAME)
    image_utils.fetch_to_volume_format(context, image_service, image_id, image_path, _to_qemu_format(volume_format), self.configuration.volume_dd_blocksize)
    if (volume_format == DISK_FORMAT_PLOOP):
        self._recreate_ploop_desc(self.local_path(volume), image_path)
    self._do_extend_volume(self.local_path(volume), volume.size, volume_format)
    self._qemu_img_info(self.local_path(volume), volume.name)
