Added tempest_tempestconf_profile_ specific vars

Added tempest_tempestconf_profile_extras and
tempest_tempestconf_profile_overrides variables

tempest_tempestconf_profile_extras is designed to extend basic
tempest_tempestconf_profile dictionary when required. New var has
presedence in case of having same keys defined. It can be used
to define image or other extra params without need of overriding
defult things

tempest_tempestconf_profile_overrides var is a replacement for
tempest_tempest_conf_overrides which was used in inapropriate way
as tempestconf profile overrides have pretty different format from what
is used by config_template.

[1] https://docs.openstack.org/python-tempestconf/latest/user/profile.html

Related-Bug: #1868938

Change-Id: Ib1e78a6ce2085df82d2a22db6817e800432f2f05
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Co-authored-by: Dmitriy Rabotyagov (noonedeadpunk) <noonedeadpunk@ya.ru>
This commit is contained in:
Dmitriy Rabotyagov 2020-03-26 13:35:48 +02:00 committed by Chandan Kumar (raukadah)
parent ea8a547148
commit 1003438006
3 changed files with 18 additions and 2 deletions

View File

@ -322,7 +322,9 @@ tempest_tempestconf_profile:
os-cloud: "{{ tempest_cloud_name }}" os-cloud: "{{ tempest_cloud_name }}"
out: "{{ tempest_workspace }}/etc/tempest.conf" out: "{{ tempest_workspace }}/etc/tempest.conf"
network-id: "{{ tempest_neutron_public_network_id }}" network-id: "{{ tempest_neutron_public_network_id }}"
overrides: "{{ tempest_tempest_conf_overrides | default('omit') }}" overrides: "{{ tempest_tempestconf_profile_overrides }}"
tempest_tempestconf_profile_extras: {}
tempest_tempestconf_profile_overrides: "{{ tempest_tempest_conf_overrides }}"
# Stackviz tarball url # Stackviz tarball url
stackviz_pip_install_args: "{{ pip_install_options | default('--isolated') }}" stackviz_pip_install_args: "{{ pip_install_options | default('--isolated') }}"

View File

@ -0,0 +1,14 @@
---
features:
- |
Adds new variable `tempest_tempestconf_profile_extras` which allows
to extend `tempest_tempestconf_profile` dictionary without need to
override all existing keys. `tempest_tempestconf_profile_extras` has
presedence over `tempest_tempestconf_profile`. For example, it may be
used to define extra image or it's format.
fixes:
- |
Usage of tempest_tempest_conf_overrides, where it could have 2 different
formats. one for config_template and another one for tempestconf.profile
Now for tempestconf.profile overrides `tempest_tempestconf_profile_overrides`
variable should be used.

View File

@ -25,7 +25,7 @@
- name: Override tempestconf profile - name: Override tempestconf profile
copy: copy:
content: "{{ tempest_tempestconf_profile | to_nice_yaml }}" content: "{{ tempest_tempestconf_profile | combine(tempest_tempestconf_profile_extras) | to_nice_yaml }}"
dest: "{{ tempest_workspace }}/etc/profile.yaml" dest: "{{ tempest_workspace }}/etc/profile.yaml"
- name: Executing python-tempestconf - name: Executing python-tempestconf