keystone roles are case insensitive

keystone does not distinquises the role cases,
so tempest should not do it either.

Change-Id: Ic3ddd568ce64c1dcea7713ef023b70c445e309b1
This commit is contained in:
Attila Fazekas 2017-02-23 09:08:19 +01:00
parent b88c0df7b5
commit a8a4492187
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class CredsClient(object):
def _check_role_exists(self, role_name):
try:
roles = self._list_roles()
role = next(r for r in roles if r['name'] == role_name)
lc_role_name = role_name.lower()
role = next(r for r in roles if r['name'].lower() == lc_role_name)
except StopIteration:
return None
return role