Merge "[Tempest context]Ignore case of role names"

This commit is contained in:
Zuul 2019-03-20 13:23:04 +00:00 committed by Gerrit Code Review
commit 8222a4e611
1 changed files with 3 additions and 2 deletions

View File

@ -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))