Add role_ids, role_names to v3 fixture
Commit 6950527 in python-keystoneclient added role_ids and role_names properties to fixtures.v3.Token, and they're used in keystoneclient unit tests, so adding these will allow keystoneclient to switch to using keystoneauth fixtures. Change-Id: Ic5fa6a427a7b52d3c50b8022ac98a87f3cb630a1
This commit is contained in:
parent
ac6c043b47
commit
64ccd3c500
@ -327,6 +327,14 @@ class Token(dict):
|
||||
def audit_chain_id(self, value):
|
||||
self.root['audit_ids'] = [self.audit_id, value]
|
||||
|
||||
@property
|
||||
def role_ids(self):
|
||||
return [r['id'] for r in self.root.get('roles', [])]
|
||||
|
||||
@property
|
||||
def role_names(self):
|
||||
return [r['name'] for r in self.root.get('roles', [])]
|
||||
|
||||
def validate(self):
|
||||
project = self.root.get('project')
|
||||
domain = self.root.get('domain')
|
||||
|
Loading…
Reference in New Issue
Block a user