diff --git a/doc/source/index.rst b/doc/source/index.rst index e84348a9..0a79e46e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -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. diff --git a/test-requirements.txt b/test-requirements.txt index 04a478aa..672f6153 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tests/nova-overrides-lxd.yml b/tests/os_nova-overrides-lxd.yml similarity index 100% rename from tests/nova-overrides-lxd.yml rename to tests/os_nova-overrides-lxd.yml diff --git a/tests/nova-overrides.yml b/tests/os_nova-overrides.yml similarity index 100% rename from tests/nova-overrides.yml rename to tests/os_nova-overrides.yml diff --git a/tox.ini b/tox.ini index 40491071..149e5a40 100644 --- a/tox.ini +++ b/tox.ini @@ -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]