'Delete a snapshot.'

@kaminario_logger
def delete_snapshot(self, snapshot):

    snap_name = self.get_snap_name(snapshot.id)
    try:
        LOG.debug('Searching    and    deleting    snapshot:    %s    in    K2.', snap_name)
        snap_rs = self.client.search('snapshots', short_name=snap_name)
        if (snap_rs.total != 0):
            snap_rs.hits[0].delete()
    except Exception as ex:
        LOG.exception('Deletion    of    snapshot:    %s    failed.', snap_name)
        raise exception.KaminarioCinderDriverException(reason=ex)
