From fc643af21d49d6c95ac5d70f9f2c4e8612678c61 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Sat, 24 Jun 2017 09:15:56 +0000 Subject: Make rally support https insecure deployment When running in https environment, rally should support insecure deployment if no cacert file is provided. JIRA: FUNCTEST-828 Change-Id: I29b0fc8c2e1b74a1ce08293706cd9f11f975b6d5 Signed-off-by: Linda Wang --- functest/utils/openstack_utils.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'functest/utils') diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index a8966264..0b9f8b8d 100644 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py @@ -82,7 +82,8 @@ def get_env_cred_dict(): 'OS_PROJECT_NAME': 'project_name', 'OS_ENDPOINT_TYPE': 'endpoint_type', 'OS_REGION_NAME': 'region_name', - 'OS_CACERT': 'https_cacert' + 'OS_CACERT': 'https_cacert', + 'OS_INSECURE': 'https_insecure' } return env_cred_dict @@ -150,10 +151,12 @@ def get_credentials_for_rally(): cred_key = env_cred_dict.get('OS_REGION_NAME') rally_conf[cred_key] = region_name - cacert = os.getenv('OS_CACERT') - if cacert is not None: - cred_key = env_cred_dict.get('OS_CACERT') - rally_conf[cred_key] = cacert + 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' + return rally_conf -- cgit 1.2.3-korg