aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest/conf_utils.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-29 15:56:33 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-30 00:34:19 +0200
commit9fb702111ae63824a2e293d327437d0486a565d2 (patch)
tree12ec50cad8ce5bd26be41b04b29447bede9aafc4 /functest/opnfv_tests/openstack/tempest/conf_utils.py
parentf1fbaabcc46dafe4b9937af600294f042cab31e0 (diff)
Rewrite TempestResourcesManager
It now leverages on OpenStack Shade to allow gating OpenStack master as asked by TSC. Switching to OpenStack master (OpenStack SDK Rocky) requires to change only one line. It stops dedicating the network to the user possibly created because the support is incomplete (the users have to be registed in tempest.conf and the multiprocessing has to be enforced). It also writes the second image and the second flavor in tempest.conf. Change-Id: I9fe2c90a6073ebc240e9aa8fdf2ef93d5dd5f15f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/conf_utils.py')
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 6a3d2d6e8..36ff77f55 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -23,8 +23,6 @@ from functest.utils import config
from functest.utils import env
-IMAGE_ID_ALT = None
-FLAVOR_ID_ALT = None
RALLY_CONF_PATH = "/etc/rally/rally.conf"
RALLY_AARCH64_PATCH_PATH = pkg_resources.resource_filename(
'functest', 'ci/rally_aarch64_patch.conf')
@@ -183,9 +181,9 @@ def update_tempest_conf_file(conf_file, rconfig):
rconfig.write(config_file)
-def configure_tempest_update_params(tempest_conf_file,
- network_name=None, 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, image_alt_id=None, flavor_alt_id=None):
# pylint: disable=too-many-branches, too-many-arguments
"""
Add/update needed parameters into tempest.conf file
@@ -197,13 +195,12 @@ def configure_tempest_update_params(tempest_conf_file,
rconfig.set('compute', 'volume_device_name', env.get('VOLUME_DEVICE_NAME'))
if image_id is not None:
rconfig.set('compute', 'image_ref', image_id)
- if IMAGE_ID_ALT is not None:
- rconfig.set('compute', 'image_ref_alt', IMAGE_ID_ALT)
- if getattr(config.CONF, 'tempest_use_custom_flavors'):
- if flavor_id is not None:
- rconfig.set('compute', 'flavor_ref', flavor_id)
- if FLAVOR_ID_ALT is not None:
- rconfig.set('compute', 'flavor_ref_alt', FLAVOR_ID_ALT)
+ if image_alt_id is not None:
+ rconfig.set('compute', 'image_ref_alt', image_alt_id)
+ if flavor_id is not None:
+ rconfig.set('compute', 'flavor_ref', flavor_id)
+ if flavor_alt_id is not None:
+ rconfig.set('compute', 'flavor_ref_alt', flavor_alt_id)
if compute_cnt > 1:
# enable multinode tests
rconfig.set('compute', 'min_compute_nodes', compute_cnt)