'Clone a sheepdog volume from another volume.'

def create_cloned_volume(self, volume, src_vref):

    snapshot_name = ('tmp-snap-%s-%s' % (src_vref['name'], volume.id))
    snapshot = {'name': snapshot_name, 'volume_name': src_vref['name'], 'volume_size': src_vref['size']}
    self.client.create_snapshot(snapshot['volume_name'], snapshot_name)
    try:
        self.client.clone(snapshot['volume_name'], snapshot_name, volume.name, volume.size)
    except Exception:
        with excutils.save_and_reraise_exception():
            LOG.error('Failed    to    create    cloned    volume    %s.', volume.name)
    finally:
        self.client.delete_snapshot(snapshot['volume_name'], snapshot_name)
