'Delete snapshot.
If the volume does not have a backing or the snapshot does not exist
then simply pass, else delete the snapshot. Snapshot deletion of only
available volume is supported.
:param snapshot: Snapshot object'

def _delete_snapshot(self, snapshot):

    backing = self.volumeops.get_backing(snapshot.volume_name)
    if (not backing):
        LOG.debug('Backing    does    not    exist    for    volume.', resource=snapshot.volume)
    elif (not self.volumeops.get_snapshot(backing, snapshot.name)):
        LOG.debug('Snapshot    does    not    exist    in    backend.', resource=snapshot)
    elif self._in_use(snapshot.volume):
        msg = (_('Delete    snapshot    of    volume    not    supported    in    state:    %s.') % snapshot.volume.status)
        LOG.error(msg)
        raise exception.InvalidSnapshot(reason=msg)
    else:
        self.volumeops.delete_snapshot(backing, snapshot.name)
