From ba0c3014205b5c1ce2414ef280c83aa2f4894dac Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Thu, 17 Aug 2017 11:59:53 +0530 Subject: [PATCH] Introduced tempest_extra_config flag for tempest.conf * tempest_extra_config will contains a dict with section.option as a key followed by values like that tempest_extra_config: identity.admin_v2_api: True * The above defined values will be overriden in tempest.conf with the help of discover-tempest-config tool * With this flag we can have more control over tempest.conf while using it in featureset files. Change-Id: If787aaf2de0f5a243aceb510f91915db32dc48c1 --- roles/validate-tempest/README.md | 2 ++ roles/validate-tempest/defaults/main.yml | 1 + roles/validate-tempest/templates/configure-tempest.sh.j2 | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/validate-tempest/README.md b/roles/validate-tempest/README.md index 52ef0501c..b05d74651 100644 --- a/roles/validate-tempest/README.md +++ b/roles/validate-tempest/README.md @@ -32,6 +32,8 @@ Role Variables * `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file * `tempest_plugins`: list - List of openstack services tempest plugins to be installed +* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf, + It should be like section.key: value. Skip tests file --------------- diff --git a/roles/validate-tempest/defaults/main.yml b/roles/validate-tempest/defaults/main.yml index 1a988c80f..6741b5ccd 100644 --- a/roles/validate-tempest/defaults/main.yml +++ b/roles/validate-tempest/defaults/main.yml @@ -27,6 +27,7 @@ tempest_whitelist_file_src: "whitelist_file.j2" tempest_whitelist_file: "whitelist_file.conf" tempest_whitelist: [] tempest_plugins: [] +tempest_extra_config: {}# A dict containing values which needs to be overridden in tempest.conf skip_file_src: "skip_file.j2" skip_file: skip_file tempest_until_failure: false diff --git a/roles/validate-tempest/templates/configure-tempest.sh.j2 b/roles/validate-tempest/templates/configure-tempest.sh.j2 index 41dc75b7e..8bec70868 100644 --- a/roles/validate-tempest/templates/configure-tempest.sh.j2 +++ b/roles/validate-tempest/templates/configure-tempest.sh.j2 @@ -152,7 +152,6 @@ ${TEMPESTCONF} --out etc/tempest.conf \ {% endif %} compute-feature-enabled.attach_encrypted_volume False \ network.tenant_network_cidr {{ tenant_network_cidr }} \ - object-storage.operator_role swiftoperator \ compute.build_timeout 500 \ volume-feature-enabled.api_v1 False \ validation.image_ssh_user cirros \ @@ -162,6 +161,11 @@ ${TEMPESTCONF} --out etc/tempest.conf \ {% if 'disable-telemetry.yaml' in telemetry_args|default('') %} service_available.aodh_plugin False \ {% endif %} + {% if tempest_extra_config %} + {% for key, value in tempest_extra_config.iteritems() %} + {{ key }} {{ value }} \ + {% endfor %} + {% endif %} orchestration.stack_owner_role heat_stack_owner ### --stop_docs