From a8a44921879c2a111b7f41ed8695a6983a65538b Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Thu, 23 Feb 2017 09:08:19 +0100 Subject: [PATCH] keystone roles are case insensitive keystone does not distinquises the role cases, so tempest should not do it either. Change-Id: Ic3ddd568ce64c1dcea7713ef023b70c445e309b1 --- tempest/lib/common/cred_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tempest/lib/common/cred_client.py b/tempest/lib/common/cred_client.py index ea060115f1..a81f53c9cd 100644 --- a/tempest/lib/common/cred_client.py +++ b/tempest/lib/common/cred_client.py @@ -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