'Revert an RBD volume to its contents at a snapshot.
:volume: Name of RBD object
:name: Name of snapshot'

def rollback_to_snap(self, volume, name):

    with RBDVolumeProxy(self, volume) as vol:
        if (name in [snap.get('name', '') for snap in vol.list_snaps()]):
            LOG.debug('rolling    back    rbd    image(%(img)s)    to    snapshot(%(snap)s)', {'snap': name, 'img': volume})
            vol.rollback_to_snap(name)
        else:
            raise exception.SnapshotNotFound(snapshot_id=name)
