'Attempt to create the volume using the image cache.
Best case this will simply clone the existing volume in the cache.
Worst case the image is out of date and will be evicted. In that case
a clone will not be created and the image must be downloaded again.'

def _create_from_image_cache(self, context, internal_context, volume, image_id, image_meta):

    LOG.debug('Attempting    to    retrieve    cache    entry    for    image    =    %(image_id)s    on    host    %(host)s.', {'image_id': image_id, 'host': volume.host})
    if volume.encryption_key_id:
        return (None, False)
    try:
        cache_entry = self.image_volume_cache.get_entry(internal_context, volume, image_id, image_meta)
        if cache_entry:
            LOG.debug('Creating    from    source    image-volume    %(volume_id)s', {'volume_id': cache_entry['volume_id']})
            model_update = self._create_from_source_volume(context, volume, cache_entry['volume_id'])
            return (model_update, True)
    except NotImplementedError:
        LOG.warning('Backend    does    not    support    creating    image-volume    clone.    Image    will    be    downloaded    from    Glance.')
    except exception.CinderException as e:
        LOG.warning('Failed    to    create    volume    from    image-volume    cache,    image    will    be    downloaded    from    Glance.    Error:    %(exception)s', {'exception': e})
    return (None, False)
