diff options
author | 2018-01-31 02:43:44 +0000 | |
---|---|---|
committer | 2018-02-13 02:51:12 +0000 | |
commit | e3cf205556fcddcf84fada86533a45aed7774133 (patch) | |
tree | 5e76b967a5c28bb16aa874a3062ae59e5cfa6f02 /functest/opnfv_tests/openstack/tempest/conf_utils.py | |
parent | 7598ab763d31ca4f901043722c19635b73f00d3f (diff) |
Fix the config of fixed_network_name in tempest
Change-Id: I58726d0fec5b2da4ea8ac1f9925fe56d2f9d7ce0
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/conf_utils.py')
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 6b35b96e..efcbe7fd 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -184,25 +184,27 @@ def backup_tempest_config(conf_file): os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf')) -def configure_tempest(deployment_dir, image_id=None, flavor_id=None, - compute_cnt=None): +def configure_tempest(deployment_dir, network_name=None, image_id=None, + flavor_id=None, compute_cnt=None): """ Calls rally verify and updates the generated tempest.conf with given parameters """ conf_file = configure_verifier(deployment_dir) - configure_tempest_update_params(conf_file, image_id, flavor_id, - compute_cnt) + configure_tempest_update_params(conf_file, network_name, image_id, + flavor_id, compute_cnt) -def configure_tempest_defcore(deployment_dir, image_id, flavor_id, - image_id_alt, flavor_id_alt, tenant_id): +def configure_tempest_defcore(deployment_dir, network_name, image_id, + flavor_id, image_id_alt, flavor_id_alt, + tenant_id): # pylint: disable=too-many-arguments """ Add/update needed parameters into tempest.conf file """ conf_file = configure_verifier(deployment_dir) - configure_tempest_update_params(conf_file, image_id, flavor_id) + configure_tempest_update_params(conf_file, network_name, image_id, + flavor_id) LOGGER.debug("Updating selected tempest.conf parameters for defcore...") config = ConfigParser.RawConfigParser() @@ -266,18 +268,16 @@ def update_tempest_conf_file(conf_file, config): config.write(config_file) -def configure_tempest_update_params(tempest_conf_file, image_id=None, - flavor_id=None, compute_cnt=1): +def configure_tempest_update_params(tempest_conf_file, network_name=None, + image_id=None, flavor_id=None, + compute_cnt=1): """ Add/update needed parameters into tempest.conf file """ LOGGER.debug("Updating selected tempest.conf parameters...") config = ConfigParser.RawConfigParser() config.read(tempest_conf_file) - config.set( - 'compute', - 'fixed_network_name', - CONST.__getattribute__('tempest_private_net_name')) + config.set('compute', 'fixed_network_name', network_name) config.set('compute', 'volume_device_name', CONST.__getattribute__('tempest_volume_device_name')) |