'Creates a volume from a snapshot.'

def create_volume_from_snapshot(self, volume, snapshot):

    volume_update = self._clone(volume, self.configuration.rbd_pool, snapshot.volume_name, snapshot.name)
    if self.configuration.rbd_flatten_volume_from_snapshot:
        self._flatten(self.configuration.rbd_pool, volume.name)
    if int(volume.size):
        self._resize(volume)
    return volume_update
