![Gregory Thiemonge](/assets/img/avatar_default.png)
python-neutronclient has been deprecated and Octavia has already removed it in the dependend change below. These are the respective changes on ovn-octavia-provider side and they are in line with changes in Octavia itself: - Replaced code that uses the deprecated `python-neutronclient` library with code that uses `openstacksdk` and removed `python-neutronclient` as a dependency. - Marked certain configuration options that were related to Keystone authentication as deprecated for removal. In future releases authentication options options need to be added to the [neutron] section of the configuration. Note: After [1] some calls to neutron test_db_base_plugin_v2 had added a new param 'as_admin' that need to be included in the calls from ovn-provider functional tests. Squashed with patch [2] to solve cross dependency. [1] https://review.opendev.org/c/openstack/neutron/+/879827 [2] https://review.opendev.org/c/openstack/ovn-octavia-provider/+/882715 Depends-On: https://review.opendev.org/c/openstack/octavia/+/866327 Change-Id: I985b24e4a6db962b1e73eeae69a8c96f4b0760ae
175 lines
5.5 KiB
INI
175 lines
5.5 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = docs,py38,pep8
|
|
skipsdist = False
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
allowlist_externals = bash
|
|
{toxinidir}/tools/pip_install_src_modules.sh
|
|
passenv = http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
TOX_ENV_SRC_MODULES
|
|
commands =
|
|
{toxinidir}/tools/pip_install_src_modules.sh "{toxinidir}"
|
|
stestr run {posargs}
|
|
|
|
[testenv:pep8]
|
|
envdir = {toxworkdir}/shared
|
|
commands = flake8
|
|
{toxinidir}/tools/check_unit_test_structure.sh
|
|
{toxinidir}/tools/coding-checks.sh --pylint '{posargs}'
|
|
{[testenv:bandit]commands}
|
|
{[testenv:genconfig]commands}
|
|
allowlist_externals =
|
|
{toxinidir}/tools/check_unit_test_structure.sh
|
|
{toxinidir}/tools/coding-checks.sh
|
|
{toxinidir}/tools/generate_config_file_samples.sh
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
OS_TEST_PATH=./ovn_octavia_provider/tests/functional
|
|
OS_TEST_TIMEOUT=240
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/ovn_octavia_provider/tests/functional/requirements.txt
|
|
|
|
[testenv:dsvm]
|
|
# Fake job to define environment variables shared between dsvm jobs
|
|
setenv = OS_TEST_TIMEOUT=240
|
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
|
commands = false
|
|
|
|
[testenv:dsvm-functional]
|
|
setenv = {[testenv:functional]setenv}
|
|
{[testenv:dsvm]setenv}
|
|
deps = {[testenv:functional]deps}
|
|
commands =
|
|
stestr run {posargs}
|
|
|
|
[testenv:cover]
|
|
envdir = {toxworkdir}/shared
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source ovn_octavia_provider --parallel-mode
|
|
commands =
|
|
stestr run --no-subunit-trace {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report --fail-under=92 --skip-covered
|
|
|
|
[testenv:docs]
|
|
envdir = {toxworkdir}/docs
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
envdir = {toxworkdir}/docs
|
|
deps = {[testenv:docs]deps}
|
|
allowlist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:debug]
|
|
envdir = {toxworkdir}/shared
|
|
commands = oslo_debug_helper -t ovn_octavia_provider/tests {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
envdir = {toxworkdir}/docs
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
# W504 line break after binary operator
|
|
ignore = W504
|
|
# H106: Don't put vim configuration in source files
|
|
# H203: Use assertIs(Not)None to check for None
|
|
# H204: Use assert(Not)Equal to check for equality
|
|
# H205: Use assert(Greater|Less)(Equal) for comparison
|
|
# H904: Delay string interpolations at logging calls
|
|
enable-extensions=H106,H203,H204,H205,H904
|
|
show-source = True
|
|
exclude=./.*,dist,doc,*egg*,build,releasenotes
|
|
import-order-style = pep8
|
|
|
|
[hacking]
|
|
import_exceptions = ovn_octavia_provider.i18n
|
|
|
|
[flake8:local-plugins]
|
|
extension =
|
|
N322 = checks:check_assert_called_once_with
|
|
N328 = checks:check_asserttruefalse
|
|
N330 = checks:check_assertempty
|
|
N331 = checks:check_assertisinstance
|
|
N332 = checks:check_assertequal_for_httpcode
|
|
N343 = checks:check_no_imports_from_tests
|
|
N344 = checks:check_python3_no_filter
|
|
N347 = checks:check_no_import_mock
|
|
N348 = checks:check_assertcountequal
|
|
paths =./ovn_octavia_provider/hacking
|
|
|
|
[testenv:genconfig]
|
|
envdir = {toxworkdir}/shared
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
|
allowlist_externals =
|
|
{toxinidir}/tools/generate_config_file_samples.sh
|
|
|
|
# This environment can be used to quickly validate that all needed system
|
|
# packages required to successfully execute test targets are installed
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
deps = bindep
|
|
commands = bindep test
|
|
|
|
[testenv:requirements]
|
|
deps =
|
|
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
|
|
allowlist_externals = bash
|
|
commands =
|
|
bash -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'
|
|
|
|
[testenv:bandit]
|
|
envdir = {toxworkdir}/shared
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r ovn_octavia_provider -x tests -n5
|
|
|
|
[testenv:dev]
|
|
# run locally (not in the gate) using editable mode
|
|
# https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
|
|
commands =
|
|
pip install -q -e "git+https://git.openstack.org/openstack/neutron#egg=neutron"
|
|
{[testenv]commands}
|
|
|
|
[testenv:pep8-dev]
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
{[testenv:dev]commands}
|
|
{[testenv:pep8]commands}
|