'Creates a volume efficiently from an existing image.
image_location is a string whose format depends on the
image service backend in use. The driver should use it
to determine whether cloning is possible.
Returns a dict of volume properties eg. provider_location,
boolean indicating whether cloning occurred.'

def clone_image(self, context, volume, image_location, image_meta, image_service):

    image_name = image_meta['name']
    image_id = image_meta['id']
    if ('properties' in image_meta):
        provider_location = image_meta['properties'].get('provider_location')
        if provider_location:
            image_location = (provider_location, None)
    cloned = False
    post_clone = False
    try:
        snapshot_id = self._find_image_snapshot(image_id)
        if snapshot_id:
            cloned = self._clone_from_snapshot(volume, image_id, snapshot_id)
        else:
            cloned = self._direct_clone(volume, image_location, image_id, image_name)
        if cloned:
            post_clone = self._post_clone_image(volume)
    except Exception as e:
        LOG.info('Image    cloning    unsuccessful    for    image    %(image_id)s.    Message:    %(msg)s', {'image_id': image_id, 'msg': e})
        vol_path = self.local_path(volume)
        volume['provider_location'] = None
        if os.path.exists(vol_path):
            self._delete_file(vol_path)
    finally:
        cloned = (cloned and post_clone)
        share = (volume['provider_location'] if cloned else None)
        bootable = (True if cloned else False)
        return ({'provider_location': share, 'bootable': bootable}, cloned)
