Update location of dynamic creds in tempest tests
Tempest is migrating their dynamic credentials interface to tempest
lib as part of the effort to create stable interfaces. [0] We will
need to update its location in our code to conform with it.
[0] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119934.html
Depends-On: Id8d60e4d7c22bc72c3e48bc768509ff0cc0c89d5
Change-Id: Iaa6bf908ff5d63cbbfddc7060594818c66ce607c
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 764a852..65f1b30 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -23,8 +23,9 @@
import six
from tempest import clients
from tempest.common import credentials_factory as common_creds
-from tempest.common import dynamic_creds
+
from tempest import config
+from tempest.lib.common import dynamic_creds
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions
from tempest import test
@@ -151,8 +152,16 @@
@classmethod
def _get_dynamic_creds(cls, name, network_resources=None):
+ identity_version = CONF.identity.auth_version
+ if identity_version == 'v3':
+ identity_uri = CONF.identity.uri_v3
+ identity_admin_endpoint_type = CONF.identity.v3_endpoint_type
+ elif identity_version == 'v2':
+ identity_uri = CONF.identity.uri
+ identity_admin_endpoint_type = CONF.identity.v2_admin_endpoint_type
+
return dynamic_creds.DynamicCredentialProvider(
- identity_version=CONF.identity.auth_version,
+ identity_version=identity_version,
name=name,
network_resources=network_resources,
credentials_domain=CONF.auth.default_credentials_domain_name,
@@ -167,7 +176,9 @@
project_network_cidr=CONF.network.project_network_cidr,
project_network_mask_bits=CONF.network.project_network_mask_bits,
public_network_id=CONF.network.public_network_id,
- resource_prefix=CONF.resources_prefix)
+ resource_prefix=CONF.resources_prefix,
+ identity_admin_endpoint_type=identity_admin_endpoint_type,
+ identity_uri=identity_uri)
@classmethod
def get_client_with_isolated_creds(cls,