Files
openstack-ansible-os_tempest/vars/main.yml
Jonathan Rosser 242203bafa Allow include/exclude lists to be defined in many variables
Previously the os_tempest role had a single variable for
defining the include and exclude lists in order to select the
tempest tests to run.

This works for simple scenarios, where a single service
is deployed and the tests for that service are enabled through
the necessary variables set in user_variables. This approach is
used in openstack-ansible CI / AIO.

More complicated scenarios such as magnum+barbican+octavia, would
create several user_variables files each with conflicting settings
for the test settings. It is possible in this scenario for there to
be no valid tempest tests to run and tempest to fail immediately.

This patch adds the possibility to have many variables defining
the include/exclude lists which have names using a common prefix.
Any variable names matching the prefix are gathered and combined
with the original role default to make extending the test lists
easy to do in an incremental/distibuted way in the ansible variables
instead of having to maintain a single point defining all necessary
tests.

Change-Id: Ie3a9a7be849171af042567ba8a152e5df5d2cb53
2023-08-17 11:20:14 +00:00

146 lines
7.3 KiB
YAML

---
# Copyright 2018, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The list of images for tempest to download for different architectures
# url: where to download from (required)
# checksum: the checksum of the downloaded file to validate against, format: <algorithm>:<checksum> (optional)
# format: format to use when uploading to glance (required)
# name: name to use when uploading to glance - default is to use the downloaded file's name (optional)
# properties: a dict of custom properties to attach to the image in glance
tempest_images_map:
x86_64:
- url: "https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img"
checksum: "sha256:cc704ab14342c1c8a8d91b66a7fc611d921c8b8f1aaf4695f9d6463d913fa8d1"
format: "qcow2"
name: "cirros"
- url: "https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img"
checksum: "sha256:cc704ab14342c1c8a8d91b66a7fc611d921c8b8f1aaf4695f9d6463d913fa8d1"
format: "qcow2"
name: "cirros"
aarch64:
- url: "https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-aarch64-disk.img"
checksum: "sha256:db9420c481c11dee17860aa46fb1a3efa05fa4fb152726d6344e24da03cb0ccf"
format: "qcow2"
name: "cirros"
- url: "https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-aarch64-disk.img"
checksum: "sha256:db9420c481c11dee17860aa46fb1a3efa05fa4fb152726d6344e24da03cb0ccf"
format: "qcow2"
name: "cirros"
# Each tempest plugin could take the following arguments:
# - name:
# repo: # when installing from a repo
# branch: # when installing from a repo
# package: # when installing from a pip package
# install: # boolean to enable/disable the installation of this item
_tempest_plugins:
- name: barbican-tempest-plugin
repo: "{{ tempest_plugin_barbican_git_repo }}"
branch: "{{ tempest_plugin_barbican_git_install_branch }}"
install: "{{ tempest_service_available_barbican | bool }}"
- name: cinder-tempest-plugin
repo: "{{ tempest_plugin_cinder_git_repo }}"
branch: "{{ tempest_plugin_cinder_git_install_branch }}"
install: "{{ tempest_service_available_cinder | bool }}"
- name: cloudkitty-tempest-plugin
repo: "{{ tempest_plugin_cloudkitty_git_repo }}"
branch: "{{ tempest_plugin_cloudkitty_git_install_branch }}"
install: "{{ tempest_service_available_cloudkitty | bool }}"
- name: designate-tempest-plugin
repo: "{{ tempest_plugin_designate_git_repo }}"
branch: "{{ tempest_plugin_designate_git_install_branch }}"
install: "{{ tempest_service_available_designate | bool }}"
- name: glance-tempest-plugin
repo: "{{ tempest_plugin_glance_git_repo }}"
branch: "{{ tempest_plugin_glance_git_install_branch }}"
install: "{{ tempest_service_available_glance | bool }}"
- name: heat-tempest-plugin
repo: "{{ tempest_plugin_heat_git_repo }}"
branch: "{{ tempest_plugin_heat_git_install_branch }}"
install: "{{ tempest_service_available_heat | bool }}"
- name: ironic-tempest-plugin
repo: "{{ tempest_plugin_ironic_git_repo }}"
branch: "{{ tempest_plugin_ironic_git_install_branch }}"
install: "{{ tempest_service_available_ironic | bool }}"
- name: keystone-tempest-plugin
repo: "{{ tempest_plugin_keystone_git_repo }}"
branch: "{{ tempest_plugin_keystone_git_install_branch }}"
install: yes
- name: magnum-tempest-plugin
repo: "{{ tempest_plugin_magnum_git_repo }}"
branch: "{{ tempest_plugin_magnum_git_install_branch }}"
install: "{{ tempest_service_available_magnum | bool }}"
- name: manila-tempest-plugin
repo: "{{ tempest_plugin_manila_git_repo }}"
branch: "{{ tempest_plugin_manila_git_install_branch }}"
install: "{{ tempest_service_available_manila | bool }}"
- name: murano-tempest-plugin
repo: "{{ tempest_plugin_murano_git_repo }}"
branch: "{{ tempest_plugin_murano_git_install_branch }}"
install: "{{ tempest_service_available_murano | bool }}"
- name: neutron-tempest-plugin
repo: "{{ tempest_plugin_neutron_git_repo }}"
branch: "{{ tempest_plugin_neutron_git_install_branch }}"
install: "{{ tempest_service_available_neutron or tempest_service_available_neutron_bgpvpn or tempest_service_available_neutron_vpnaas }}"
- name: novajoin-tempest-plugin
repo: "{{ tempest_plugin_novajoin_git_repo }}"
branch: "{{ tempest_plugin_novajoin_git_install_branch }}"
install: "{{ tempest_service_available_novajoin | bool }}"
- name: octavia-tempest-plugin
repo: "{{ tempest_plugin_octavia_git_repo }}"
branch: "{{ tempest_plugin_octavia_git_install_branch }}"
install: "{{ tempest_service_available_octavia | bool }}"
- name: senlin-tempest-plugin
repo: "{{ tempest_plugin_senlin_git_repo }}"
branch: "{{ tempest_plugin_senlin_git_install_branch }}"
install: "{{ tempest_service_available_senlin | bool }}"
- name: sahara-tests
repo: "{{ tempest_plugin_sahara_git_repo }}"
branch: "{{ tempest_plugin_sahara_git_install_branch }}"
install: "{{ tempest_service_available_sahara | bool }}"
- name: telemetry-tempest-plugin
repo: "{{ tempest_plugin_telemetry_git_repo }}"
branch: "{{ tempest_plugin_telemetry_git_install_branch }}"
install: >-
{{
(tempest_service_available_aodh | bool) or
(tempest_service_available_ceilometer | bool) or
(tempest_service_available_gnocchi | bool) or
(tempest_service_available_panko | bool)
}}
- name: trove-tempest-plugin
repo: "{{ tempest_plugin_trove_git_repo }}"
branch: "{{ tempest_plugin_trove_git_install_branch }}"
install: "{{ tempest_service_available_trove | bool }}"
- name: zaqar-tempest-plugin
repo: "{{ tempest_plugin_zaqar_git_repo }}"
branch: "{{ tempest_plugin_zaqar_git_install_branch }}"
install: "{{ tempest_service_available_zaqar | bool }}"
- name: zun-tempest-plugin
repo: "{{ tempest_plugin_zun_git_repo }}"
branch: "{{ tempest_plugin_zun_git_install_branch }}"
install: "{{ tempest_service_available_zun | bool }}"
# gather include/exclude lists from any variables starting with the defined search pattern
# allows many different ansible vars to be combined easily to make a single include/exclude list
_tempest_test_gathered_includelist: "{{ query('vars', *query('varnames', '^' ~ tempest_test_search_includelist_pattern)) | flatten(levels=1) }}"
_tempest_test_gathered_excludelist: "{{ query('vars', *query('varnames', '^' ~ tempest_test_search_excludelist_pattern)) | flatten(levels=1) }}"
# maintain backward compatibility by combining the original role default
# with any dynamically gathered variables
_tempest_test_includelist: "{{ tempest_test_includelist | union(_tempest_test_gathered_includelist) }}"
_tempest_test_excludelist: "{{ tempest_test_excludelist | union(_tempest_test_gathered_excludelist) }}"