Update 'Member' with option 'operator_role' in tempest.conf
In function _get_object_storage_client(), it is better to use the
option 'operator_role' in tempest.conf than hard code the role
to 'Member' here.
Change-Id: Id1de7ee55159f6583a0a93ee87e26a5deaacfd6e
Closes-Bug: #1267857
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 04882f3..d98fd44 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -128,15 +128,16 @@
def _get_object_storage_client(self, username, password, tenant_name):
auth_url = self.config.identity.uri
- # add current tenant to Member group.
+ # add current tenant to swift operator role group.
keystone_admin = self._get_identity_client(
self.config.identity.admin_username,
self.config.identity.admin_password,
self.config.identity.admin_tenant_name)
- # enable test user to operate swift by adding Member role to him.
+ # enable test user to operate swift by adding operator role to him.
roles = keystone_admin.roles.list()
- member_role = [role for role in roles if role.name == 'Member'][0]
+ operator_role = self.config.object_storage.operator_role
+ member_role = [role for role in roles if role.name == operator_role][0]
# NOTE(maurosr): This is surrounded in the try-except block cause
# neutron tests doesn't have tenant isolation.
try: