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
This commit is contained in:
parent
1b6ba7dc62
commit
07fb60155f
@ -1,6 +1,6 @@
|
||||
# Environment variables
|
||||
|
||||
export MANILA_TEMPEST_COMMIT="827493a" # 7 June, 2017
|
||||
export MANILA_TEMPEST_COMMIT="30bbd2d" # 24 July, 2017
|
||||
# ----------------------------------------------
|
||||
|
||||
# Functions
|
||||
|
@ -23,8 +23,9 @@ from oslo_log import log
|
||||
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 @@ class BaseSharesTest(test.BaseTestCase):
|
||||
|
||||
@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 @@ class BaseSharesTest(test.BaseTestCase):
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user