Remove unused revoke_by_domain_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. Some of the test coverage for this
behavior can be located here:
https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_assignment.py#L1175-L1177
https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_assignment.py#L1191-L1193
https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_v3_assignment.py#L1311

Change-Id: I1ee53f15ec6b2dae10bfbd0fc3435e018f26f04b
partial-bug: 1671887
This commit is contained in:
Richard Avelar 2017-03-22 14:46:25 +00:00 committed by Ubuntu
parent 259d4d4179
commit 14ff6e467e
2 changed files with 0 additions and 17 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_domain_role_assignment(self, domain_id, role_id):
self.revoke(revoke_model.RevokeEvent(domain_id=domain_id,
role_id=role_id))
def check_token(self, token): def check_token(self, token):
"""Check the values from a token against the revocation list. """Check the values from a token against the revocation list.

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_domain_role_assignment(self, domain_id, role_id):
event = add_event(self.revoke_events,
revoke_model.RevokeEvent(domain_id=domain_id,
role_id=role_id))
self.events.append(event)
return event
def _revoke_by_domain(self, domain_id): def _revoke_by_domain(self, domain_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))
@ -692,12 +685,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_domain_role_assignment(uuid.uuid4().hex,
uuid.uuid4().hex))
events.append(
self._revoke_by_domain_role_assignment(uuid.uuid4().hex,
uuid.uuid4().hex))
events.append( events.append(
self._revoke_by_user_and_project(uuid.uuid4().hex, self._revoke_by_user_and_project(uuid.uuid4().hex,
uuid.uuid4().hex)) uuid.uuid4().hex))