'Creates a clone of the specified volume.'

def create_cloned_volume(self, volume, src_vref):

    vol = self.client.req('volumes', name=src_vref['id'])['content']
    ctxt = context.get_admin_context()
    cache = self.db.image_volume_cache_get_by_volume_id(ctxt, src_vref['id'])
    limit = self.configuration.safe_get('xtremio_volumes_per_glance_cache')
    if (cache and limit and (limit > 0) and (limit <= vol['num-of-dest-snaps'])):
        raise exception.CinderException(('Exceeded    the    configured    limit    of    %d    snapshots    per    volume' % limit))
    try:
        self.client.create_snapshot(src_vref['id'], volume['id'])
    except exception.XtremIOSnapshotsLimitExceeded as e:
        raise exception.CinderException(e.message)
    if (volume['size'] > src_vref['size']):
        try:
            self.extend_volume(volume, volume['size'])
        except Exception:
            LOG.error('failes    to    extend    volume    %s,    reverting    clone    operation', volume['id'])
            self.delete_volume(volume)
            raise
    if (volume.get('consistencygroup_id') and (self.client is XtremIOClient4)):
        self.client.add_vol_to_cg(volume['id'], volume['consistencygroup_id'])
