'Creates a volume from a snapshot.
Snapshot must not be the active snapshot. (offline)'

def _create_volume_from_snapshot(self, volume, snapshot):

    LOG.debug('Creating    volume    %(vol)s    from    snapshot    %(snap)s', {'vol': volume.id, 'snap': snapshot.id})
    if (snapshot.status != 'available'):
        msg = (_('Snapshot    status    must    be    "available"    to    clone.    But    is:    %(status)s') % {'status': snapshot.status})
        raise exception.InvalidSnapshot(msg)
    self._ensure_shares_mounted()
    volume.provider_location = self._find_share(volume)
    self._do_create_volume(volume)
    self._copy_volume_from_snapshot(snapshot, volume, volume.size)
    return {'provider_location': volume.provider_location}
