Add doc templating to validate-tempest role
Change-Id: I0b2797f1df3f840d8041cf94a946cc0e78cbadc9
This commit is contained in:
parent
270a9f6786
commit
ff864cf9bd
|
@ -1,13 +1,20 @@
|
||||||
#
|
### --start_docs
|
||||||
# configure-tempest
|
|
||||||
#
|
## Configure tempest
|
||||||
|
## -----------------
|
||||||
|
|
||||||
{% if tempest_overcloud %}
|
{% if tempest_overcloud %}
|
||||||
|
## ::
|
||||||
source {{ working_dir }}/overcloudrc
|
source {{ working_dir }}/overcloudrc
|
||||||
|
|
||||||
# Clean up from any previous tempest run.
|
## * Clean up from any previous tempest run
|
||||||
|
## ::
|
||||||
|
|
||||||
rm -rf {{ working_dir }}/tempest
|
rm -rf {{ working_dir }}/tempest
|
||||||
|
|
||||||
# clean up network if it exists from previous run
|
## * Clean up network if it exists from previous run
|
||||||
|
## ::
|
||||||
|
|
||||||
for i in $(neutron router-list -c id -f value); do neutron router-gateway-clear $i; done
|
for i in $(neutron router-list -c id -f value); do neutron router-gateway-clear $i; done
|
||||||
for r in $(neutron router-list -c id -f value); do
|
for r in $(neutron router-list -c id -f value); do
|
||||||
for p in $(neutron router-port-list $r -c id -f value); do
|
for p in $(neutron router-port-list $r -c id -f value); do
|
||||||
|
@ -38,7 +45,9 @@ source {{ working_dir }}/stackrc
|
||||||
public_net_id=$(neutron net-show {{ undercloud_public_net_name }} -f value -c id)
|
public_net_id=$(neutron net-show {{ undercloud_public_net_name }} -f value -c id)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Generate a tempest configuration.
|
## * Generate a tempest configuration
|
||||||
|
## ::
|
||||||
|
|
||||||
sudo yum install -y libffi-devel openssl-devel python-virtualenv gcc
|
sudo yum install -y libffi-devel openssl-devel python-virtualenv gcc
|
||||||
|
|
||||||
{% if tempest_source == "rdo" %}
|
{% if tempest_source == "rdo" %}
|
||||||
|
@ -68,9 +77,12 @@ cp /usr/share/openstack-tempest-*/etc/default-overrides.conf ./etc/
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if tempest_undercloud %}
|
{% if tempest_undercloud %}
|
||||||
# config_tempest assumes that Cinder is installed and accessible. Cinder is
|
|
||||||
# not installed on the undercloud. Remove unneeded lines to prevent the tool
|
## .. note:: config_tempest assumes that Cinder is installed and accessible. Cinder is
|
||||||
# from bawking upon execution
|
## not installed on the undercloud. Remove unneeded lines to prevent the tool
|
||||||
|
## from bawking upon execution
|
||||||
|
## ::
|
||||||
|
|
||||||
sed --in-place "/'volume'\: 'cinder',/d" tools/config_tempest.py
|
sed --in-place "/'volume'\: 'cinder',/d" tools/config_tempest.py
|
||||||
sed --in-place "/'volume'\: \['v1', 'v2'\]/d" tools/config_tempest.py
|
sed --in-place "/'volume'\: \['v1', 'v2'\]/d" tools/config_tempest.py
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -91,3 +103,6 @@ sed --in-place "/'volume'\: \['v1', 'v2'\]/d" tools/config_tempest.py
|
||||||
volume.build_timeout 500 \
|
volume.build_timeout 500 \
|
||||||
scenario.ssh_user cirros \
|
scenario.ssh_user cirros \
|
||||||
orchestration.stack_owner_role heat_stack_owner
|
orchestration.stack_owner_role heat_stack_owner
|
||||||
|
|
||||||
|
### --stop_docs
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
# Run tempest.
|
### --start_docs
|
||||||
|
|
||||||
|
## Run tempest
|
||||||
|
## -----------
|
||||||
|
|
||||||
|
## ::
|
||||||
|
|
||||||
{% if tempest_format == "venv" %}./tools/with_venv.sh {% endif %}
|
{% if tempest_format == "venv" %}./tools/with_venv.sh {% endif %}
|
||||||
./tools/run-tests.sh {{ test_regex }} {% if skip_file_src != '' %}--skip-file {{ working_dir }}/{{ skip_file }}{% endif %}
|
./tools/run-tests.sh {{ test_regex }} {% if skip_file_src != '' %}--skip-file {{ working_dir }}/{{ skip_file }}{% endif %}
|
||||||
|
@ -7,3 +12,6 @@
|
||||||
{% if tempest_tests_file is defined %} --load-list={{ tempest_tests_file }} {% endif %}
|
{% if tempest_tests_file is defined %} --load-list={{ tempest_tests_file }} {% endif %}
|
||||||
{% if tempest_until_failure|bool %} --until-failure {% endif %}
|
{% if tempest_until_failure|bool %} --until-failure {% endif %}
|
||||||
{% if tempest_failing|bool %} --failing {% endif %}
|
{% if tempest_failing|bool %} --failing {% endif %}
|
||||||
|
|
||||||
|
### --stop_docs
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Validate the overcloud deployment
|
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
{% if configure_tempest|bool %}
|
{% if configure_tempest|bool %}
|
||||||
|
### --start_docs
|
||||||
|
|
||||||
|
## Validate the overcloud deployment with tempest
|
||||||
|
## ==============================================
|
||||||
|
|
||||||
{% include 'configure-tempest.sh.j2' %}
|
{% include 'configure-tempest.sh.j2' %}
|
||||||
|
|
||||||
{% include 'run-tempest.sh.j2' %}
|
{% include 'run-tempest.sh.j2' %}
|
||||||
|
|
||||||
|
### --stop_docs
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue