From 259d4d4179f708969c200e00729b4b15e741ed73 Mon Sep 17 00:00:00 2001 From: Richard Avelar Date: Wed, 22 Mar 2017 14:35:14 +0000 Subject: [PATCH] Remove unused revoke_by_project_role_assignment This patch removes a method that wasn't being used anymore anywhere except for a single unit test. In addition, we no longer need to store the revocation event when the token provider API will rebuild the token context at validation time, and this revocation method isn't being exposed to an external API. Among some of the test coverage for this can be found here: https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_auth.py#L2030-L2060 Change-Id: Ie92b238b0968a23bca3f0f57879369ea74298b8d partial-bug: 1671887 --- keystone/revoke/core.py | 4 ---- keystone/tests/unit/test_revoke.py | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/keystone/revoke/core.py b/keystone/revoke/core.py index 29f70b7996..021a410476 100644 --- a/keystone/revoke/core.py +++ b/keystone/revoke/core.py @@ -154,10 +154,6 @@ class Manager(manager.Manager): self.revoke( revoke_model.RevokeEvent(project_id=project_id, user_id=user_id)) - def revoke_by_project_role_assignment(self, project_id, role_id): - self.revoke(revoke_model.RevokeEvent(project_id=project_id, - role_id=role_id)) - def revoke_by_domain_role_assignment(self, domain_id, role_id): self.revoke(revoke_model.RevokeEvent(domain_id=domain_id, role_id=role_id)) diff --git a/keystone/tests/unit/test_revoke.py b/keystone/tests/unit/test_revoke.py index caea6c4f8b..8725c30ed2 100644 --- a/keystone/tests/unit/test_revoke.py +++ b/keystone/tests/unit/test_revoke.py @@ -586,13 +586,6 @@ class RevokeListTests(unit.TestCase): self.events.append(event) return event - def _revoke_by_project_role_assignment(self, project_id, role_id): - event = add_event(self.revoke_events, - revoke_model.RevokeEvent(project_id=project_id, - role_id=role_id)) - self.events.append(event) - return event - def _revoke_by_domain_role_assignment(self, domain_id, role_id): event = add_event(self.revoke_events, revoke_model.RevokeEvent(domain_id=domain_id, @@ -699,9 +692,6 @@ class RevokeListTests(unit.TestCase): events = self.events self._assertEmpty(self.revoke_events) for i in range(0, 10): - events.append( - self._revoke_by_project_role_assignment(uuid.uuid4().hex, - uuid.uuid4().hex)) events.append( self._revoke_by_domain_role_assignment(uuid.uuid4().hex, uuid.uuid4().hex))