From d7be74e6dee301327dfd6e8be2171b811648d919 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Wed, 22 Nov 2017 03:45:45 +0000 Subject: Remove openstack utils calls in rally and tempest Mainly, update "rally deployment create --file=rally_conf.json" to "rally deployment create --fromenv" Change-Id: I6dd4c7ea2d9d6f47dee49a4fd416e62bd557f45e Signed-off-by: Linda Wang --- functest/utils/openstack_utils.py | 43 --------------------------------------- 1 file changed, 43 deletions(-) (limited to 'functest/utils') diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index ef32a7e6..b479198d 100644 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py @@ -129,49 +129,6 @@ def source_credentials(rc_file): os.environ[key] = value -def get_credentials_for_rally(): - creds = get_credentials() - env_cred_dict = get_env_cred_dict() - rally_conf = {"admin": {}} - for key in creds: - if key == 'auth_url': - rally_conf[key] = creds[key] - else: - rally_conf['admin'][key] = creds[key] - - endpoint_types = [('internalURL', 'internal'), - ('publicURL', 'public'), ('adminURL', 'admin')] - - endpoint_type = get_endpoint_type_from_env() - if endpoint_type is not None: - cred_key = env_cred_dict.get('OS_ENDPOINT_TYPE') - for k, v in endpoint_types: - if endpoint_type == v: - rally_conf[cred_key] = v - - region_name = os.getenv('OS_REGION_NAME') - if region_name is not None: - cred_key = env_cred_dict.get('OS_REGION_NAME') - rally_conf[cred_key] = region_name - - cred_key = env_cred_dict.get('OS_CACERT') - rally_conf[cred_key] = os.getenv('OS_CACERT', '') - - insecure_key = env_cred_dict.get('OS_INSECURE') - rally_conf[insecure_key] = os.getenv('OS_INSECURE', '').lower() == 'true' - rally_conf = {"openstack": rally_conf} - - return rally_conf - - -def get_endpoint_type_from_env(): - endpoint_type = os.environ.get("OS_ENDPOINT_TYPE", - os.environ.get("OS_INTERFACE")) - if endpoint_type and "URL" in endpoint_type: - endpoint_type = endpoint_type.replace("URL", "") - return endpoint_type - - def get_session_auth(other_creds={}): loader = loading.get_plugin_loader('password') creds = get_credentials(other_creds) -- cgit 1.2.3-korg