Merge "keystone roles are case insensitive"

This commit is contained in:
Jenkins 2017-03-21 17:53:39 +00:00 committed by Gerrit Code Review
commit 05efdd1265
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