aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest')
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py13
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py5
2 files changed, 13 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 6c3e820f..72ea5ce7 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -137,13 +137,14 @@ def backup_tempest_config(conf_file):
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,
@@ -199,8 +200,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
"""
@@ -223,6 +224,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'
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index b8a4e9ad..c204d52b 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -20,6 +20,7 @@ import time
import yaml
from functest.core import testcase
+from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.opnfv_tests.openstack.tempest import conf_utils
from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
@@ -234,11 +235,13 @@ class TempestCommon(testcase.TestCase):
if not os.path.exists(conf_utils.TEMPEST_RESULTS_DIR):
os.makedirs(conf_utils.TEMPEST_RESULTS_DIR)
resources = self.resources.create()
+ compute_cnt = snaps_utils.get_active_compute_cnt(
+ self.resources.os_creds)
conf_utils.configure_tempest(
self.DEPLOYMENT_DIR,
image_id=resources.get("image_id"),
flavor_id=resources.get("flavor_id"),
- mode=self.MODE)
+ compute_cnt=compute_cnt)
self.generate_test_list(self.VERIFIER_REPO_DIR)
self.apply_tempest_blacklist()
self.run_verifier_tests()