Change manila_tempest_tests to use credentials_factory
With the merge of 'Factor up config dependent credential classes' in tempest,
(Change-Id: I351f86f0570070105bbf24f2d904e917feea6e57)
helper methods related to credentials have been moved to
common.credentials_factory module.
manila_tempest_tests need to change accordingly.
Change-Id: I9e5c72279638e07f509a4bfe0174b5ad5ee70b45
Closes-Bug: #1519612
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index b2da080..1fe3a4d 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -21,6 +21,7 @@
from oslo_concurrency import lockutils
from oslo_log import log
import six
+from tempest.common import credentials_factory as common_creds
from tempest.common import dynamic_creds
from tempest import config
from tempest import test
@@ -132,7 +133,9 @@
ic = dynamic_creds.DynamicCredentialProvider(
identity_version=CONF.identity.auth_version,
name=name,
- admin_role=CONF.identity.admin_role)
+ admin_role=CONF.identity.admin_role,
+ admin_creds=common_creds.get_configured_credentials(
+ 'identity_admin'))
if "admin" in type_of_creds:
creds = ic.get_admin_creds()
elif "alt" in type_of_creds:
@@ -269,7 +272,8 @@
identity_version=CONF.identity.auth_version,
name=service_net_name,
admin_role=CONF.identity.admin_role,
- )
+ admin_creds=common_creds.get_configured_credentials(
+ 'identity_admin'))
net_data = ic._create_network_resources(sc.tenant_id)
network, subnet, router = net_data
net_id = network["id"]