Move tempest logics in tempest_conf.yaml 11/64111/1 opnfv-7.0.0
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 26 Oct 2018 11:08:23 +0000 (13:08 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 27 Oct 2018 09:13:44 +0000 (11:13 +0200)
It allows removing OPNFV logics out of Functest (releng) and then
simplifies conf_utils.

tempest.conf is filled by the current default values.

functest-alpine.sh will be updated to allow modifying the default
values without breaking the OPNFV installers.

It deprecates the only tempest-related env var (STORAGE_PROTOCOL)

Change-Id: I14bcb715826ef2d85af87e7af600261a3c08e72c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 3872290bb673513459588bbe83e65efc631615f7)

functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
functest/utils/env.py
tox.ini

index e9443d6..6d301a6 100644 (file)
@@ -195,7 +195,6 @@ def configure_tempest_update_params(
         # enable multinode tests
         rconfig.set('compute', 'min_compute_nodes', compute_cnt)
         rconfig.set('compute-feature-enabled', 'live_migration', True)
-    rconfig.set('compute-feature-enabled', 'shelve', False)
     filters = ['RetryFilter', 'AvailabilityZoneFilter', 'ComputeFilter',
                'ComputeCapabilitiesFilter', 'ImagePropertiesFilter',
                'ServerGroupAntiAffinityFilter', 'ServerGroupAffinityFilter']
@@ -219,18 +218,6 @@ def configure_tempest_update_params(
     rconfig.set('identity', 'admin_role', admin_role_name)
     rconfig.set('identity', 'admin_domain_scope', True)
     rconfig.set('identity', 'default_domain_id', domain_id)
-    rconfig.set('identity-feature-enabled', 'api_v2', False)
-    rconfig.set('identity-feature-enabled', 'api_v2_admin', False)
-    if not rconfig.has_section('compute-feature-enabled'):
-        rconfig.add_section('compute-feature-enabled')
-    rconfig.set('compute-feature-enabled', 'vnc_console', False)
-    if not rconfig.has_section('image-feature-enabled'):
-        rconfig.add_section('image-feature-enabled')
-    rconfig.set('image-feature-enabled', 'api_v2', True)
-    rconfig.set('image-feature-enabled', 'api_v1', False)
-    if not rconfig.has_section('volume-feature-enabled'):
-        rconfig.add_section('volume-feature-enabled')
-    rconfig.set('volume-feature-enabled', 'backup', False)
     if not rconfig.has_section('network'):
         rconfig.add_section('network')
     rconfig.set('network', 'default_network', cidr)
@@ -241,9 +228,6 @@ 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 b47a973..baf7db6 100644 (file)
@@ -1,13 +1,14 @@
-# This is an empty configuration file to be filled up with the desired options
-# to generate a custom tempest.conf
-# Examples:
-# network-feature-enabled:
-#     port_security: True
-
-# volume-feature-enabled:
-#     api_v1: False
-
-# validation:
-#     image_ssh_user: root
-#     ssh_timeout: 300
-
+---
+compute-feature-enabled:
+    shelve: false
+    vnc_console: false
+identity-feature-enabled:
+    api_v2: false
+    api_v2_admin: false
+image-feature-enabled:
+    api_v2: true
+    api_v1: false
+volume:
+    storage_protocol: iSCSI
+volume-feature-enabled:
+    backup: false
index 41d1a4d..e202f45 100644 (file)
@@ -36,8 +36,7 @@ INPUTS = {
     'FLAVOR_EXTRA_SPECS': '',
     'NAMESERVER': '8.8.8.8',
     'NEW_USER_ROLE': 'Member',
-    'USE_DYNAMIC_CREDENTIALS': 'True',
-    'STORAGE_PROTOCOL': 'iSCSI'
+    'USE_DYNAMIC_CREDENTIALS': 'True'
 }
 
 
diff --git a/tox.ini b/tox.ini
index d56377f..3748ee0 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -81,6 +81,7 @@ files =
   docker
   functest/ci
   functest/opnfv_tests/openstack/rally/rally_jobs.yaml
+  functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
   functest/opnfv_tests/vnf
 commands =
   yamllint -s {[testenv:yamllint]files}