diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-11-22 03:45:45 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-11-23 02:38:45 +0000 |
commit | d7be74e6dee301327dfd6e8be2171b811648d919 (patch) | |
tree | 1e7bfda87d1ae05d5f92050909f19e1a88517bee /functest/opnfv_tests/openstack | |
parent | 01a5192428eb99afcb94047e6faa54e1d57114d1 (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/opnfv_tests/openstack')
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index a361c506..b4026def 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -8,7 +8,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 # import ConfigParser -import json import logging import fileinput import os @@ -20,7 +19,6 @@ import yaml from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils -import functest.utils.openstack_utils as os_utils IMAGE_ID_ALT = None @@ -80,11 +78,7 @@ def create_rally_deployment(): % CONST.__getattribute__('rally_deployment_name')), verbose=False) - rally_conf = os_utils.get_credentials_for_rally() - with open('rally_conf.json', 'w') as fp: - json.dump(rally_conf, fp) - cmd = ("rally deployment create " - "--file=rally_conf.json --name={0}" + cmd = ("rally deployment create --fromenv --name={0}" .format(CONST.__getattribute__('rally_deployment_name'))) error_msg = "Problem while creating Rally deployment" ft_utils.execute_command_raise(cmd, error_msg=error_msg) @@ -279,7 +273,9 @@ def configure_tempest_update_params(tempest_conf_file, image_id=None, config.set('compute-feature-enabled', 'live_migration', True) config.set('identity', 'region', 'RegionOne') - if os_utils.is_keystone_v3(): + identity_api_version = os.getenv( + "OS_IDENTITY_API_VERSION", os.getenv("IDENTITY_API_VERSION")) + if (identity_api_version == '3'): auth_version = 'v3' else: auth_version = 'v2' @@ -292,7 +288,7 @@ def configure_tempest_update_params(tempest_conf_file, image_id=None, if CONST.__getattribute__('OS_ENDPOINT_TYPE') is not None: sections = config.sections() - if os_utils.is_keystone_v3(): + if (identity_api_version == '3'): config.set('identity', 'v3_endpoint_type', CONST.__getattribute__('OS_ENDPOINT_TYPE')) if 'identity-feature-enabled' not in sections: |