Use tempest_tempestconf_profile for handling named args

https://review.openstack.org/#/c/621567/ adds --profile and
--generate-profile option.An user can override the values
in profile.yaml file and pass it to discover-tempest-config
to generate the tempest.conf.

By using tempest_tempestconf_profile var, we can add the named
args within that, then it will be copied to profile.yaml file
and --profile arg will be used to generate the tempest.conf.

Change-Id: If14bcfe2a7ffbef08786e001d0dee2f9143eea04
This commit is contained in:
Chandan Kumar 2018-12-06 16:35:00 +05:30
parent 5dc277278a
commit e1d2177898
2 changed files with 13 additions and 9 deletions

View File

@ -287,8 +287,13 @@ tempest_tempestconf_developer_constraints:
- "git+{{ tempest_tempestconf_git_repo }}@{{ tempest_tempestconf_git_install_branch }}#egg=python_tempestconf"
tempest_tempestconf_pip_packages:
- python-tempestconf
tempest_tempestconf_extra_cli_call_overrides:
auth.use_dynamic_credentials: true
tempest_tempestconf_profile:
debug: true
create: true
out: "{{ tempest_workspace }}/etc/tempest.conf"
network-id: "{{ tempest_neutron_public_network_id }}"
overrides:
auth.use_dynamic_credentials: true
# Stackviz tarball url
stackviz_tarball: "https://tarballs.openstack.org/package-stackviz-element/stackviz-latest.tar.gz"

View File

@ -31,6 +31,11 @@
venv_pip_packages: "{{ tempest_tempestconf_pip_packages }}"
when: tempest_install_method == 'source'
- name: Override tempestconf profile
copy:
content: "{{ tempest_tempestconf_profile | to_nice_yaml }}"
dest: "{{ tempest_workspace }}/etc/profile.yaml"
- name: Executing python-tempestconf
shell: |
set -e
@ -41,13 +46,7 @@
export OS_IDENTITY_API_VERSION="3"
export OS_USERNAME="{{ keystone_admin_user_name }}"
export OS_PROJECT_NAME="{{ keystone_admin_tenant_name }}"
discover-tempest-config --out etc/tempest.conf \
--network-id "{{ tempest_neutron_public_network_id }}" \
--create \
{% for key, value in tempest_tempestconf_extra_cli_call_overrides.items() %}
{{ key }} {{ value }} \
{% endfor %}
--debug
discover-tempest-config --profile "{{ tempest_workspace }}/etc/profile.yaml"
environment:
OS_PASSWORD: "{{ keystone_auth_admin_password }}"
args: