'Removes a snapshot from an RBD volume.
:volume: Name of RBD object
:name: Name of snapshot
:ignore_errors: whether or not to log warnings on failures
:pool: Name of pool
:force: Remove snapshot even if it is protected'

def remove_snap(self, volume, name, ignore_errors=False, pool=None, force=False):

    with RBDVolumeProxy(self, str(volume), pool=pool) as vol:
        if (name in [snap.get('name', '') for snap in vol.list_snaps()]):
            if vol.is_protected_snap(name):
                if force:
                    vol.unprotect_snap(name)
                elif (not ignore_errors):
                    LOG.warning('snapshot(%(name)s)    on    rbd    image(%(img)s)    is    protected,    skipping', {'name': name, 'img': volume})
                    return
            LOG.debug('removing    snapshot(%(name)s)    on    rbd    image(%(img)s)', {'name': name, 'img': volume})
            vol.remove_snap(name)
        elif (not ignore_errors):
            LOG.warning('no    snapshot(%(name)s)    found    on    rbd    image(%(img)s)', {'name': name, 'img': volume})
