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
This commit is contained in:
Richard Avelar 2017-03-22 14:35:14 +00:00 committed by Ubuntu
parent 07966bbee4
commit 259d4d4179
2 changed files with 0 additions and 14 deletions

View File

@ -154,10 +154,6 @@ class Manager(manager.Manager):
self.revoke( self.revoke(
revoke_model.RevokeEvent(project_id=project_id, user_id=user_id)) 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): def revoke_by_domain_role_assignment(self, domain_id, role_id):
self.revoke(revoke_model.RevokeEvent(domain_id=domain_id, self.revoke(revoke_model.RevokeEvent(domain_id=domain_id,
role_id=role_id)) role_id=role_id))

View File

@ -586,13 +586,6 @@ class RevokeListTests(unit.TestCase):
self.events.append(event) self.events.append(event)
return 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): def _revoke_by_domain_role_assignment(self, domain_id, role_id):
event = add_event(self.revoke_events, event = add_event(self.revoke_events,
revoke_model.RevokeEvent(domain_id=domain_id, revoke_model.RevokeEvent(domain_id=domain_id,
@ -699,9 +692,6 @@ class RevokeListTests(unit.TestCase):
events = self.events events = self.events
self._assertEmpty(self.revoke_events) self._assertEmpty(self.revoke_events)
for i in range(0, 10): for i in range(0, 10):
events.append(
self._revoke_by_project_role_assignment(uuid.uuid4().hex,
uuid.uuid4().hex))
events.append( events.append(
self._revoke_by_domain_role_assignment(uuid.uuid4().hex, self._revoke_by_domain_role_assignment(uuid.uuid4().hex,
uuid.uuid4().hex)) uuid.uuid4().hex))