Merge "Don't use swift roles when no swift"
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index f711f2f..d5e49db 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -162,9 +162,11 @@
email = data_utils.rand_name(root) + suffix + "@example.com"
user = self._create_user(username, self.password,
tenant, email)
- # NOTE(andrey-mp): user needs this role to create containers in swift
- swift_operator_role = CONF.object_storage.operator_role
- self._assign_user_role(tenant, user, swift_operator_role)
+ if CONF.service_available.swift:
+ # NOTE(andrey-mp): user needs this role to create containers
+ # in swift
+ swift_operator_role = CONF.object_storage.operator_role
+ self._assign_user_role(tenant, user, swift_operator_role)
if admin:
self._assign_user_role(tenant, user, CONF.identity.admin_role)
return self._get_credentials(user, tenant)