From 84638866af81cd63ad77c31b306606203434a2f4 Mon Sep 17 00:00:00 2001 From: chenhb Date: Thu, 14 Mar 2019 20:39:40 +0800 Subject: [PATCH] [Tempest context]Ignore case of role names Change all names to lower case while matching them. Change-Id: I5bebd29db1530acb7eefe044359d249b774493c5 --- rally_openstack/verification/tempest/context.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rally_openstack/verification/tempest/context.py b/rally_openstack/verification/tempest/context.py index 2fdd09e7..ed774ced 100644 --- a/rally_openstack/verification/tempest/context.py +++ b/rally_openstack/verification/tempest/context.py @@ -125,10 +125,11 @@ class TempestContext(context.VerifierContext): conf.CONF.openstack.swift_reseller_admin_role, conf.CONF.openstack.heat_stack_owner_role, conf.CONF.openstack.heat_stack_user_role] - existing_roles = set(role.name for role in keystoneclient.roles.list()) + existing_roles = set(role.name.lower() + for role in keystoneclient.roles.list()) for role in roles: - if role not in existing_roles: + if role.lower() not in existing_roles: LOG.debug("Creating role '%s'." % role) self._created_roles.append(keystoneclient.roles.create(role))