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: I63264b8c11ceea4b312b251c9a28f4a246592733
... because hacking 3.0.x is too old. pylint is also bumped to resolve
conflicting dependencies. The new version is currently used in neutron.
The pylint setting is imported from neutron with one additional
disablement to ignore the following error.
ovsdbapp/schema/open_vswitch/helpers.py:47:14: R1732: Consider using
'with' for resource-allocating operations (consider-using-with)
Change-Id: I41b4524ff13b8d46d2e0c76f09b5ec47601bd955
If OVN and OVS are not installed on the system, but cloned into '.venv',
the 'OvsVtepVenvFixture' class is not instantiated correctly and all
unit tests fail.
Closes-bug: 2037568
Change-Id: Id26004b57cb02900faed5dabeee8956ff9c66b54
The OVN tree for several years has had an OVS submodule that pulls
in the version of OVS it is guaranteed to work with. There is
currently a patch in OVS master that breaks the build of OVN main
so switch to using the submodule.
Change-Id: I61195cd3ebf8a5015890d3ba3988c3d9795ee817
Set the default OS_TEST_PATH in the stestr configuration file. Any
other test environment can overwrite this variable in the "setenv"
section.
Change-Id: I51564920cec916031aaebf8151b015a3d87e9471
Added support for the "hardware_vtep" schema. The ``HwVtepApiIdlImpl`` class provides interaction with "hw_vtep.db".
Closes-Bug: 1960513
Change-Id: I37138e91f9dd3e42908ac1e7e7c123323177a8e8
That fixes some dependency clashes in py36 job when installing
"pylint" with "astroid" library.
Closes-Bug: #1955724
Change-Id: I7cc4b779c68fe21d6ca50b6c76cdd2b6edaa7ea2
Sphinx 4.0.0 added a new dependency [0] which is causing the job to fail
at the moment.
This patch fix the problem by adding UC to the docs jobs.
[0] https://www.sphinx-doc.org/en/master/changes.html (LaTeX: add
tex-gyre font dependency)
Change-Id: I501659d48b1cf2d64cea8dc80ade7a068e37e904
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fixed related code warnings and updated .pylintrc.
Change-Id: I5e82d29e0d6f09b98bebdd5dbcc34b01512b28ef
Change tools/setup-ovs.sh to take an OVS_BRANCH env
variable to use a specific branch.
Also, make OvsOvnVenvFixture work with an ovndir before
or after OVN repository split.
Change-Id: I9994c6e914bdb1deb5952c193e521f83ad74363d
Closes-Bug: 1856676
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
Switch functional to use python3 to install python3-based
dependencies, which the OVS build checks for. Also, remove
the py36 test
Change-Id: I2d9599d7050a15f459e6845a112ffc9948b2a7bd
This is the bare minimum to run against ovs/ovn master after the
split. It should be updated to handle running against system-
installed OVN.
Change-Id: I264200ae016e3928fb4aff3bdcc7c1a94f91cae4
README.rst and doc/source/index.rst are modified a bit
to fit both HTML and PDF docs.
Change-Id: I128a45eddfe9de06c4961555ddd79a62723338c1
Story: 2006099
Task: 35138
Start publishing docs with using the proper template.
For this, add also a doc/requirements.txt file and move docs
requirements there. Update tox.ini for this and use the modern way to
invoke sphinx-build for building.
Remove obsolete sectoins from setup.cfg.
Update the conf.py files and remove unused lines
with newer openstackdocstheme - and require newer theme.
Fix indents in CONTRIBUTING.rst so that the formatting works nicely.
Also, use lower-constraints template instead of individual jobs.
Change-Id: Ia1a7030878f12ca0b8184363173eada929ece3bd
Occasionally oslo library usage sneaks in, so add a coding check
that checks for ^oslo\. in requirements.txt. We currently still
use oslo.test, so don't check test-requirements.txt. This should
fail to pass tests until I34357d5a594330d07f5cad372859d98efb5d3fde
merges.
Change-Id: I53108584ee47a7f1b6c7df90c49f95725cec69f9
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: I2a995f93b7e2a4a3ad40856773ce3ba7c6666720
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Signed-off-by: Chuck Short <chucks@redhat.com>
Depends-on: Ia7412f8ec97cae2e0c8eda84eb38822a110c1a65
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I32db99af179412f46b02ced9eaf61049cbffcdb0
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: Ic1f4de4b5f36cfe5bd5e578507e320918d1078f9
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The toos/debug_venv.py does not work well with PY3, this patch is
modifying the tox "pep8" job to enforce the use of python2 instead of
the default interpreter in the host OS.
Related error:
./tools/debug_venv.py:41:24: E901 SyntaxError: invalid syntax
raise e.args[0][0], e.args[0][1], e.args[0][2]
Change-Id: I9b7e8110bf14df9448c7d0f731a605daa2fa864b
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
tox_install.sh was also building ovs for functional test. Move this into
tools/setup-ovs.sh and call it from functional tox environment.
Change-Id: I5857c8ae3e945328c0f24bda37629ce7e0faefa7
When writing tests, it is useful to be able to look at the database
being modified. Since we use OVS virtual environments and delete
them when the test ends, this is difficult to do.
This patch adds the ability to pass KEEP_ENV=1 when running tox to
keep the virtual environment around and adds tools/debug_venv to
launch an OVS sandbox using the OVS virtual environment.
Change-Id: Idbec2d544d913ffa8888a050b8a53d016c0315f2
This patch implments the ovn-nbctl API for the Logical_Switch,
Logical_Switch_Port, and DHCP_Options commands. Additional patches
will implement logical router and load balancer functionality.
As a convenience, the add/list/get commands return a special
read-only version of an ovs.db.idl.Row object called a RowView.
This object can be compared to a Row for equality and hashing. This
saves having to return uuids and then look them up. This behavior
differs from the Open_vSwitch schema implementation. This wrapper
serves both to keep people from modifying returned values outside of
a transaction and as an interface for any future backend to implement.
In addition, an ovs virtual environment fixture based on ovs-sandbox
is added to set up a sandboxed ovs/ovn install for running functional
tests.
Change-Id: I93689158467ff73a1b02588510d168b50ed6292a
In setup.cfg file the python 3.4 support is removed and added 3.5
In tox.ini the python 3.5 is added
Change-Id: I0dd1992369bc7eef4d78876f34df76a74b5de843
This patch enables pylint 1.4.5 checking in ovsdbapp.
Script tools/coding-checks.sh is copied from neutron and adapted for
ovsdbapp.
.pylintrc is also copied from neutron, message options that do not
need to be suppressed have been removed.
This patch also adjusts code to fit pylint 1.7.1
Change-Id: If27c9a13798f20f3c22ca62a38cb93e7ad602a18
This patch consists of two squashed patches:
First patch copies in tox_install.sh from oslo libraries. The script
removes ovsdbapp from upper-constraints.txt as we want to install
code from the repository and not from pip.
Second patch is squashed from abandoned Iff59bbf41d166a0918a217cb72a37c547c6506b9.
Issue there was that code uses 'sudo' for running ovs-vsctl but the tests
user is not member of sudoers. It sets the Manager prior to executing
the tests. As ovsdbapp isn't supposed to depend on oslo, there is not
guaranteed way running process with ovsdbapp code will have root
privileges. Hence the Manager should be configured before application
using ovsdbapp is started.
Closes-bug: #1674937
Change-Id: I634ae2eeab7b68a81cb7208f0650705ac5a9a9ef