Use centralised Ansible test scripts

This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: If42c1f2d26d0fda8e120898832a64809f4ce5819
This commit is contained in:
Jesse Pretorius 2016-10-05 12:16:04 +01:00
parent 1f1d7b7a80
commit d1c0549e21
5 changed files with 31 additions and 44 deletions

View File

@ -54,17 +54,19 @@ be used to manage the OpenStack-Ansible management nodes.
Compute driver compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This role supports multiple nova compute driver types. The following
This role supports multiple nova compute driver types. The following
compute drivers are supported:
- libvirt (default)
- ironic
- lxd (via nova-lxd)
- powervm (via nova-powervm)
- libvirt (default)
- ironic
- lxd (via nova-lxd)
- powervm (via nova-powervm)
The driver type is automatically detected by the OpenStack Ansible Nova role
for the following compute driver types:
- libvirt (kvm / qemu)
- powervm
- libvirt (kvm / qemu)
- powervm
Any mix and match of compute node types can be used for those platforms,
except for ironic.

View File

@ -11,4 +11,5 @@ ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD
# this is required for the docs build jobs
sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
oslosphinx>=4.7.0 # Apache-2.0
doc8 # Apache-2.0
reno>=1.8.0 # Apache2

58
tox.ini
View File

@ -25,6 +25,7 @@ whitelist_externals =
setenv =
PYTHONUNBUFFERED=1
ROLE_NAME=os_nova
TEST_IDEMPOTENCE=false
VIRTUAL_ENV={envdir}
WORKING_DIR={toxinidir}
@ -32,9 +33,15 @@ setenv =
[testenv:docs]
commands=
bash -c "rm -rf doc/build"
doc8 doc
python setup.py build_sphinx
[doc8]
# Settings for doc8:
extensions = .rst
[testenv:releasenotes]
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -77,28 +84,22 @@ commands =
deps =
{[testenv]deps}
-rhttp://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
[testenv:ansible-syntax]
deps =
{[testenv:ansible]deps}
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
--syntax-check \
--list-tasks \
{toxinidir}/tests/test.yml
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
[testenv:ansible-lint]
deps =
{[testenv:ansible]deps}
commands =
{[testenv:ansible]commands}
ansible-lint {toxinidir}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
[testenv:func_base]
@ -109,17 +110,7 @@ install_command =
pip install -U --force-reinstall {opts} {packages}
[testenv:func_logs]
commands =
bash -c "{toxinidir}/tests/common/test-log-collect.sh"
[testenv:functional]
# Ignore_errors is set to true so that the logs are collected at the
# end of the run. This will not produce a false positive. Any
# exception will be mark the run as failed and exit 1 after all of
# the commands have been iterated through.
ignore_errors = True
# NOTE(odyssey4me): this target does not use constraints because
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
# drop the install_command.
@ -128,31 +119,24 @@ install_command =
deps =
{[testenv:ansible]deps}
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e @{toxinidir}/tests/nova-overrides.yml \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:func_lxd]
# Ignore_errors is set to true so that the logs are collected at the
# end of the run. This will not produce a false positive. Any
# exception will be mark the run as failed and exit 1 after all of
# the commands have been iterated through.
ignore_errors = True
# NOTE(michaelgugino): this target tests nova with lxd
# NOTE(odyssey4me): this target does not use constraints because
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
# drop the install_command.
install_command =
{[testenv:func_base]install_command}
deps =
{[testenv:ansible]deps}
setenv =
{[testenv]setenv}
ANSIBLE_OVERRIDES={toxinidir}/tests/os_nova-overrides-lxd.yml
commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e @{toxinidir}/tests/nova-overrides.yml \
-e @{toxinidir}/tests/nova-overrides-lxd.yml \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]