aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/openstack_utils.py
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-11-22 03:45:45 +0000
committerLinda Wang <wangwulin@huawei.com>2017-11-23 02:38:45 +0000
commitd7be74e6dee301327dfd6e8be2171b811648d919 (patch)
tree1e7bfda87d1ae05d5f92050909f19e1a88517bee /functest/utils/openstack_utils.py
parent01a5192428eb99afcb94047e6faa54e1d57114d1 (diff)
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 <wangwulin@huawei.com>
Diffstat (limited to 'functest/utils/openstack_utils.py')
-rw-r--r--functest/utils/openstack_utils.py43
1 files changed, 0 insertions, 43 deletions
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)