'Create new volume from other\'s snapshot on appliance.
:param volume: reference of volume to be created
:param snapshot: reference of source snapshot'

def create_volume_from_snapshot(self, volume, snapshot):

    snapshot_vol = self._get_snapshot_volume(snapshot)
    volume['provider_location'] = snapshot_vol['provider_location']
    (pool, fs) = self._get_share_datasets(self.share)
    dataset_path = ('%s/%s' % (pool, fs))
    url = ('storage/pools/%(pool)s/filesystems/%(fs)s/snapshots/%(snap)s/clone' % {'pool': pool, 'fs': self._escape_path('/'.join([fs, snapshot_vol['name']])), 'snap': snapshot['name']})
    path = '/'.join([pool, fs, volume['name']])
    data = {'targetPath': path}
    self.nef.post(url, data)
    try:
        self._share_folder(fs, volume['name'])
    except exception.NexentaException:
        try:
            url = ('storage/pools/%(pool)s/filesystems/%(fs)s' % {'pool': pool, 'fs': self._escape_path('/'.join([fs, volume['name']]))})
            self.nef.delete(url)
        except exception.NexentaException:
            LOG.warning('Cannot    destroy    cloned    filesystem:    %(vol)s/%(filesystem)s', {'vol': dataset_path, 'filesystem': volume['name']})
        raise
    if (volume['size'] > snapshot['volume_size']):
        new_size = volume['size']
        volume['size'] = snapshot['volume_size']
        self.extend_volume(volume, new_size)
        volume['size'] = new_size
    return {'provider_location': volume['provider_location']}
