diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-03-07 02:15:20 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-03-07 03:36:23 +0100 |
commit | 8ea8434a1d02d57f61c34113b676d9f8f2530dde (patch) | |
tree | 744e3e3a4696808a53a4eeb1937760cd4804ae6e | |
parent | deb36ab8bd9e5f477ee2c0a098ce44567c496e5e (diff) |
Define a new env var for volume device name
It eases modifying the volume device name written in tempest config.
Fuel jobs should be adapted to set the right value (vdc) which
differs from default (vdb).
Change-Id: I09212018f94daa800ede815bd3586cceed0d54e7
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/ci/config_functest.yaml | 1 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 9 | ||||
-rw-r--r-- | functest/utils/env.py | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 48e866ea7..172153059 100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -129,7 +129,6 @@ tempest: private_subnet_cidr: 192.168.150.0/24 router_name: tempest-router use_custom_flavors: 'False' - volume_device_name: vdb rally: deployment_name: opnfv-rally diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index e50c61af9..fbf9c739b 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -238,10 +238,11 @@ def configure_tempest_update_params(tempest_conf_file, network_name=None, rconfig.read(tempest_conf_file) rconfig.set('compute', 'fixed_network_name', network_name) if CI_INSTALLER_TYPE == 'fuel': - setattr(config.CONF, 'tempest_volume_device_name', 'vdc') - rconfig.set('compute', 'volume_device_name', - getattr(config.CONF, 'tempest_volume_device_name')) - + # backward compatibility till Fuel jobs set the right env var + rconfig.set('compute', 'volume_device_name', 'vdc') + else: + 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: diff --git a/functest/utils/env.py b/functest/utils/env.py index dc50a2daf..44bd9e0de 100644 --- a/functest/utils/env.py +++ b/functest/utils/env.py @@ -26,7 +26,8 @@ INPUTS = { 'TEST_DB_URL': env.INPUTS['TEST_DB_URL'], 'ENERGY_RECORDER_API_URL': env.INPUTS['ENERGY_RECORDER_API_URL'], 'ENERGY_RECORDER_API_USER': env.INPUTS['ENERGY_RECORDER_API_USER'], - 'ENERGY_RECORDER_API_PASSWORD': env.INPUTS['ENERGY_RECORDER_API_PASSWORD'] + 'ENERGY_RECORDER_API_PASSWORD': env.INPUTS['ENERGY_RECORDER_API_PASSWORD'], + 'VOLUME_DEVICE_NAME': 'vdb' } |