diff --git a/defaults/main.yml b/defaults/main.yml index b9f51183..d1131131 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -44,15 +44,17 @@ tempest_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/tempest.tgz tempest_log_dir: "/var/log/tempest" ## Tempest Plugins -# By default, no tempest plugins are installed. Override ``tempest_plugins`` -# as follows: -# tempest_plugins: -# - name: designate-tempest-plugin -# repo: https://git.openstack.org/openstack/designate-tempest-plugin -# branch: master +# By default, the following tempest plugins are installed. +# Override ``tempest_plugins`` variable with your own plugins, depending +# on your installation. +# The structure of each item of the list is the following: +# - name: designate-tempest-plugin #name of the plugin +# repo: https://git.openstack.org/openstack/designate-tempest-plugin #for installing the plugin from sources +# branch: master #for installing the plugin from sources +# install_test_requirements: True #for installing the plugin with its test_requirements (default: True) # - name: ironic-tempest-plugin -# package: ironic -tempest_plugins: [] +# package: ironic #for installing the plugin from packages +tempest_plugins: "{{ _tempest_plugins['keystone'] + _tempest_plugins['cinder'] + _tempest_plugins['heat'] + _tempest_plugins['neutron'] }}" # The location where the test whitelist will be placed tempest_test_whitelist_file_path: "{{ tempest_venv_bin | dirname }}/workspace/etc/tempest_whitelist.txt" diff --git a/tasks/tempest_install.yml b/tasks/tempest_install.yml index f7515537..51297053 100644 --- a/tasks/tempest_install.yml +++ b/tasks/tempest_install.yml @@ -145,10 +145,12 @@ {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} + --isolated with_items: "{{ _test_requirements_stat.results }}" when: - "item.item.repo is defined" - "item.stat.exists" + - "(item.item.install_test_requirements | default(True)) | bool" register: install_tempest_plugin_requirements until: install_tempest_plugin_requirements | success retries: 5 @@ -164,6 +166,7 @@ {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} + --isolated with_items: "{{ tempest_plugins }}" when: item.repo is defined register: install_tempest_plugins @@ -181,6 +184,7 @@ {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} + --isolated with_items: "{{ tempest_plugins }}" when: item.package is defined register: install_tempest_plugins_packages diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 00000000..790a7a5a --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,91 @@ +--- +# 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. + +# Each tempest plugin could take the following arguments: +# - name: +# repo: # when installing from a repo +# branch: # when installing from a repo +# install_test_requirements: # when installing from a repo +# package: # when installing from a pip package + +_tempest_plugins: + barbican: + - name: barbican-tempest-plugin + repo: git://git.openstack.org/openstack/barbican-tempest-plugin + branch: master + cinder: + - name: cinder-tempest-plugin + repo: git://git.openstack.org/openstack/cinder-tempest-plugin + branch: master + cloudkitty: + - name: cloudkitty-tempest-plugin + repo: git://git.openstack.org/openstack/cloudkitty-tempest-plugin + branch: master + congress: + - name: congress-tempest-plugin + repo: git://git.openstack.org/openstack/congress-tempest-plugin + branch: master + install_test_requirements: false + designate: + - name: designate-tempest-plugin + repo: git://git.openstack.org/openstack/designate-tempest-plugin + branch: master + heat: + - name: heat-tempest-plugin + repo: git://git.openstack.org/openstack/heat-tempest-plugin + branch: master + ironic: + - name: ironic-tempest-plugin + repo: git://git.openstack.org/openstack/ironic-tempest-plugin + branch: master + keystone: + - name: keystone-tempest-plugin + repo: git://git.openstack.org/openstack/keystone-tempest-plugin + branch: master + magnum: + - name: magnum-tempest-plugin + repo: git://git.openstack.org/openstack/magnum-tempest-plugin + branch: master + networking-bgpvpn: + - name: networking-bgpvpn + repo: git://git.openstack.org/openstack/networking-bgpvpn + branch: master + neutron-fwaas: + - name: neutron-fwaas + repo: git://git.openstack.org/openstack/neutron-fwaas + branch: master + neutron-vpnaas: + - name: neutron-vpnaas + repo: git://git.openstack.org/openstack/neutron-vpnaas + branch: master + neutron: + - name: neutron-tempest-plugin + repo: git://git.openstack.org/openstack/neutron-tempest-plugin + branch: master + nova-lxd: + - name: nova-lxd + repo: git://git.openstack.org/openstack/nova-lxd + branch: master + octavia: + - name: octavia-tempest-plugin + repo: git://git.openstack.org/openstack/octavia-tempest-plugin + branch: master + - name: octavia + repo: git://git.openstack.org/openstack/octavia + branch: master + telemetry: + - name: telemetry-tempest-plugin + repo: git://git.openstack.org/openstack/telemetry-tempest-plugin + branch: master