os-vif/tox.ini
Rodolfo Alonso Hernandez dff9093ab6 Migrate from 'ip' commands to 'pyroute2'
This patch migrates the use of command line 'ip' commands
to pyroute2 library. A new class, 'IpCommand', is created
to wrap the use of the library, implementing the functionalities
needed in this project.

The new wrapper class is defined in 'os_vif' and is used in
'vif_plug_linux_bridge' and 'vif_plug_ovs'.

This patch also adds functional tests in 'os_vif'. The aim
of these functional tests is to check 'pyroute2' implementation
works correctly, by creating, modifying and deleting network
interfaces. 'ip' commands are used to execute additional actions,
not relying on the tested library to check its own results.

Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>

Closes-Bug: #1677238
Change-Id: I18f7b3424a6c447ee89df1f0326ece75f2333bf2
2018-01-08 10:17:42 +00:00

81 lines
2.0 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
minversion = 1.6
envlist = py35,py27,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:py27]
commands =
stestr run --black-regex ".tests.functional" --test-path="os_vif/tests" '{posargs}'
[testenv:py35]
commands =
stestr run --black-regex ".tests.functional" '{posargs}'
[testenv:functional]
basepython = python2.7
setenv =
{[testenv]setenv}
commands =
stestr run --black-regex ".tests.unit" '{posargs}'
[testenv:cover]
commands =
coverage erase
python setup.py testr --coverage --testr-args='--concurrency=1 {posargs}'
coverage combine
coverage html --include='os_vif/*' -d covhtml -i
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# Following checks are ignored on purpose.
#
# E251 unexpected spaces around keyword / parameter equals
# reason: no improvement in readability
#
# E265 block comment should start with '# '
# reason: no improvement in readability
#
# H904 wrap long lines in parentheses instead of a backslash
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
#
# H404 skipped on purpose per jay pipes discussion.
#
# Due to the upgrade to hacking 0.9.2 the following checking are
# ignored on purpose for the moment and should be re-enabled.
# H106: Dont put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
show-source = True
ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404
enable-extensions=H106,H203
builtins = _
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
max-complexity=30
[hacking]
import_exceptions = os_vif.i18n