Allow overriding default storage protocol 55/62655/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Thu, 20 Sep 2018 11:39:56 +0000 (13:39 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Thu, 20 Sep 2018 14:38:23 +0000 (16:38 +0200)
It adds a new env var STORAGE_PROTOCOL to override storage_protocol
in tempest. The default value is unchanged [1].

[1] https://docs.openstack.org/tempest/latest/sampleconf.html

Co-Authored-By: Viktor Tikkanen <viktor.tikkanen@nokia.com>
Change-Id: I19e4e25212b6f6176e3b967e01eb634c15e4d474
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit a561c6ca316feb1a203327aa729ac0317f70df48)

ci/globals.yaml
ci/run.yaml
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/utils/env.py

index 31083e6..98b3f63 100644 (file)
@@ -10,3 +10,4 @@
     prefix: '/home/opnfv/functest'
     nameserver: '8.8.8.8'
     external_network: 'ext-net'
+    storage_protocol: 'iSCSI'
index dffd2bb..dfc0bbc 100644 (file)
@@ -7,6 +7,7 @@
           docker run \
             -e NAMESERVER={nameserver} \
             -e EXTERNAL_NETWORK={external_network} \
+            -e STORAGE_PROTOCOL={storage_protocol} \
             -v \
             {prefix}/results/$JOB_NAME-$BUILD_ID:/home/opnfv/functest/results \
             -v {prefix}/openstack.creds:/home/opnfv/functest/conf/env_file \
index d82b70c..8ba3cca 100644 (file)
@@ -229,7 +229,9 @@ def configure_tempest_update_params(
         getattr(config.CONF, 'tempest_validation_ssh_timeout'))
     rconfig.set('object-storage', 'operator_role',
                 getattr(config.CONF, 'tempest_object_storage_operator_role'))
-
+    if not rconfig.has_section('volume'):
+        rconfig.add_section('volume')
+    rconfig.set('volume', 'storage_protocol', env.get('STORAGE_PROTOCOL'))
     rconfig.set(
         'identity', 'v3_endpoint_type',
         os.environ.get('OS_INTERFACE', 'public'))
index 29ff6a8..07398b8 100644 (file)
@@ -30,7 +30,8 @@ INPUTS = {
     'VOLUME_DEVICE_NAME': 'vdb',
     'NAMESERVER': '8.8.8.8',
     'NEW_USER_ROLE': 'Member',
-    'USE_DYNAMIC_CREDENTIALS': 'True'
+    'USE_DYNAMIC_CREDENTIALS': 'True',
+    'STORAGE_PROTOCOL': 'iSCSI'
 }