def delete(self, request, obj_id): try: manila.share_snapshot_deny( request, self.table.kwargs['snapshot_id'], obj_id) except Exception: msg = _('Unable to delete snapshot rule "%s".') % obj_id exceptions.handle(request, msg)
def test_deny_snapshot(self): api.share_snapshot_deny(self.request, self.id, self.id) client = self.manilaclient client.share_snapshots.deny.assert_called_once_with(self.id, self.id)