X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fopnfv_tests%2Fopenstack%2Ftempest%2Fconf_utils.py;h=88d96ebd6d5ac6782691a31b934bd4f7498ed4c3;hb=12ba273fdbe74493123ceb73ab6d179e36b27dff;hp=fccfebcef6835140bb68eece967de40abfca6c08;hpb=c67c6687976a486af880ece2e6831d7ef7fbbdcc;p=functest.git diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index fccfebcef..88d96ebd6 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -130,21 +130,19 @@ def backup_tempest_config(conf_file): """ Copy config file to tempest results directory """ - if not os.path.exists(TEMPEST_RESULTS_DIR): - os.makedirs(TEMPEST_RESULTS_DIR) - shutil.copyfile(conf_file, os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf')) def configure_tempest(deployment_dir, image_id=None, flavor_id=None, - mode=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) + configure_tempest_update_params(conf_file, image_id, flavor_id, + compute_cnt) def configure_tempest_defcore(deployment_dir, image_id, flavor_id, @@ -200,8 +198,8 @@ def generate_test_accounts_file(tenant_id): yaml.dump(accounts_list, f, default_flow_style=False) -def configure_tempest_update_params(tempest_conf_file, - image_id=None, flavor_id=None): +def configure_tempest_update_params(tempest_conf_file, image_id=None, + flavor_id=None, compute_cnt=1): """ Add/update needed parameters into tempest.conf file """ @@ -224,6 +222,10 @@ def configure_tempest_update_params(tempest_conf_file, config.set('compute', 'flavor_ref', flavor_id) if FLAVOR_ID_ALT is not None: config.set('compute', 'flavor_ref_alt', FLAVOR_ID_ALT) + if compute_cnt > 1: + # enable multinode tests + config.set('compute', 'min_compute_nodes', compute_cnt) + config.set('identity', 'region', 'RegionOne') if os_utils.is_keystone_v3(): auth_version = 'v3'