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

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

    LOG.info('ScaleIO    copy_image_to_volume    volume:    %(vol)s    image    service:    %(service)s    image    id:    %(id)s.', {'vol': volume, 'service': six.text_type(image_service), 'id': six.text_type(image_id)})
    try:
        image_utils.fetch_to_raw(context, image_service, image_id, self._sio_attach_volume(volume), BLOCK_SIZE, size=volume['size'])
    finally:
        self._sio_detach_volume(volume)
