'Create a snapshot of an RBD volume.
:volume: Name of RBD object
:name: Name of snapshot
:pool: Name of pool
:protect: Set the snapshot to "protected"'

def create_snap(self, volume, name, pool=None, protect=False):

    LOG.debug('creating    snapshot(%(snap)s)    on    rbd    image(%(img)s)', {'snap': name, 'img': volume})
    with RBDVolumeProxy(self, str(volume), pool=pool) as vol:
        vol.create_snap(name)
        if (protect and (not vol.is_protected_snap(name))):
            vol.protect_snap(name)
