tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~
According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: Ib73364b71234d25d50920495f91e1a3e18c96bcd
* removed skipdist=True to make sure os-vif is available in the virtual
env
* removed basepython = python3 as we assume all developer switched to
python3 in their env already
* removed ignore_basepython_conflict = True as without the basepython
definition generative targets now work without conflict
Also squashed in the commit fixing the functional target as both fix is
needed to unblock the gate:
add CAP_DAC_OVERRIDE to test privsep contexts
This change modifes the privsep contexts used by the test
code to create inteface without using the os-vif plugins.
The os-vif functional tests actully create ovs and linux
brdiges and dummy netdevs. to ensure the drier work correctly
the functional tests have a simpler test only version of the
port/brige management commands that are used to prepare
and validate the test env. The simpler implementation uses
standard linux commandline tools like "ip" or "ovs-vsctl"
which on ubuntu 22.04 require the addtion of CAP_DAC_OVERRIDE
to work around socket/file ownership issues.
To avoid adding capablities at runtime that are not required
this change modifes the existing test only context in
the os_vif.tests.functional.privsep module and add a new test
context for the vif_plug_ovs plugin
Change-Id: Ide357cb64a8d128ff8ad978abae6a039e814d8a9
This change removes usage of --black-regex which is no longer supported
as of stestr 4.0.0. The min version of stestr is increased to 3.1.0
which adds --exclude-regex as a replacement.
Change-Id: I24424aeeb178fd9ab1b736cb689a73f7bd8bd572
This is totally broken with the pip 20.3 resolver. Attempts to fix the
lower-constraints file manually didn't work out, so start specifying
only the direct dependencies here, relying on upper-constraints for the
given release to restrict everything else.
Two dependencies, python-subunit and testrepository, are removed as
these are no longer necessary. Another, hacking, is moved to 'tox.ini'
since we're not managing this via the u-c system and don't need this
here.
Change-Id: I4bdc0d422813ecee1566256ec237d34f200406ee
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is the new name recommended by the base zuul jobs [1]:
Path to a pip constraints file. Will be provided to tox via
``TOX_CONSTRAINTS_FILE`` (deprecated but currently still supported
name is ``UPPER_CONSTRAINTS_FILE``) environment variable if it exists.
While we're here, we remove a wholly unnecessary layer of environment
variable-based indirection.
[1] https://opendev.org/zuul/zuul-jobs/raw/branch/master/roles/tox/README.rst
Change-Id: Ic82672f5376988ef6c40d2aaebf1a9e59d3538ad
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
- adds support for building PDF docs.
- adds a bindep.txt file with required deps for pdf docs
- groups the tox envs into logicaly related sections.
- This change updates the default set of jobs so that
runing tox with out any arguments should run the
default set of jobs that should pass before pushing
changes for review.
Change-Id: Id5df8afe576881cba58b3288acd79501ef1de511
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).
Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.
Also adding bindep file for libffi packages.
Story: #2007865
Task: #40200
Change-Id: I8d9b8d9e19ca7b94f1ce1f2b95aeafc9f7127ea3
Most of these were either unnecessary or trivial to resolve.
Change-Id: I2952e4906a511f6ffc6c53dc1c582464000e22de
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Change-Id: I8d4a0fc1b7c4e0c1e474a707aa900d09181ba11f
os-vif sets the base python version globally in the
base testenv and relies on tox to pick up the
correct python version form the env name for standard
envs like py27.
This behavior only work reliably if
ignore_basepython_conflict = True is set.
Change-Id: I458cf6cf88d9ee672d6cce59e1d86ed888957042
Closes-Bug: #1832652
- This change updates sanitize_log_path to
use replace instead of string.translate so that
it works across both python 2.7 and python 3.
- This change modifies the functional tests to run under
python 3 by default. A new functional-py27 env is
also added.
Change-Id: Id8127ae68cb5aeebdba73bd14fc0481cd9b773d9
python3.5 was the only supported python3 version on Xenial, now that we have
Bionic Beaver nodes that support python3.7, lets switch to testing with
python3.7 in addition with python3.6 in Stein and beyond.
See ML discussion here [1] for context.
[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135632.html
Change-Id: If1c57e2e13b6a5af5a0e05f1299e013a8c5386b8
Signed-off-by: Charles Short <chucks@redhat.com>
Story: #2004073
Task: #27433
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: Ie0972eb2f0aa9aceb93b9dc4fbe0919a67556697
Closes-Bug: #1801485
In some environments, if the upper-constraints file is not joined to the
"-c" option in tox, an error is raised when executing tox.
Change-Id: I715fe6dd91d3b860212b2368fdb2b9f610926908
Closes-Bug: #1793562
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Fix tox.ini docs environment to build html and push to correct output
paths so that openstack-tox-docs jobs works.
Change-Id: Ib957e03d6b16d5fdb945e2be02ed75f0c7fa160b
Story: #2002586
Task: #24315
- This change converts os-vif to use
sphinx-build and doc/requirements.txt to
be inline with new PTI requirements.
- This change tests docs requirements as part
of the lower-constraints env.
Change-Id: Ic136941a17f90d6a6a8432fec96f8612c4bca8a2
According to [1], the pyNN factors automatically set basepython
unless explicitly requested otherwise.
This patch moves 'commands' attribute up into the 'testenv' section,
"testenv:pyNN" sections are unnecessary and also should be removed.
[1] https://github.com/tox-dev/tox/issues/477
Change-Id: I535188debcf89c91c887d0026bbf2157333ae2a4
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I7150a260a3b423b138a710edf71efaa8762cd849
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
- The current py27 tox env only runs the
unit tests for core os-vif lib.
- This change removes --test-path="os_vif/tests"
to renable the unit tests for all in tree plugins.
Change-Id: Ife09b596d7bb009e623c8b9edbd424b8fc6f2556
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I4e0053c833d821bb7086c8feb9e44eb927c23fab
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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
Looks like this was copied from Glance's config, and retains a lot of
unnecessary config for same. Remove it all.
Change-Id: I559c9615f0243290d1eb7c410afc0d7d3b705e28
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
Change-Id: Ib252f1efafddcf7d90ad67b85877285df06f044d
The H803 rule have been removed from hacking since v0.10.0.
we can remove H803 from the ignore list.
Change-Id: Ib3de9f9e30eef33338f3c784d4b9ac81faeb45a5
The flake8 E126, E127, E128 checks are all checking various
aspects of indentation, but they are mutually inconsistent
with each other - ie fixing one causes a violation in the
other. They are all counter to normal Nova coding style and
ignored in Nova, so kill them in os-vif too.
Change-Id: Ib28652de17329141d437a3354e60f3b0f5f53968
- To resove a known issue with .testrepository where
the db type cannont be determined if the 2.7 enviorment
is run first. This change reorders the envlist to prevent
this error.
Change-Id: I44bd372db7e944210e93d258fd4712e346b06619
Closes-Bug: #1534277
Initial commit using code imported from
https://github.com/jaypipes/os_vif
This patch also includes the following fixes to make the import pass all
jenkins jobs:
- add doc/source/conf.py and index.rst
- sync with global requirements
Change-Id: Iac6a9d45ea799eaa71f895af115e966c28246a22