Commit Graph

18 Commits

Author SHA1 Message Date
Terry Wilson ee28e381fb Use OVN's OVS submodule for functional tests
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
2023-04-03 15:46:39 -05:00
Terry Wilson 7d1f3180bd github no longer accepts git:// connections
Change-Id: I30781ca6c72ec53c087e382e7138545e8483ff54
2022-03-21 21:24:10 +00:00
Anton Vazhnetsov c43f8a00a7 tools: run functional tests against ovn/main branch
According to https://mail.openvswitch.org/pipermail/ovs-dev/2021-October/388309.html

Closes-Bug: #1946362
Change-Id: I64fe61678d90de59f5a94c49e1959165ac3646c9
2021-10-07 15:41:22 +03:00
Anton Vazhnetsov 3a5927938b tools: fix OvsOvnVenvFixture init
To initialize OvsOvnVenvFixture need to pass 'ovsdir' as the keyword
argument, otherwise an TypeError will occur.

Change-Id: I0172d773f1ac92f1101311560b70fd001270140a
2021-09-28 15:11:27 +03:00
Hervé Beraud d215e4cbb9 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I7287480720d21c99e3a59d412f7be2db20bff9c6
2020-08-31 13:20:02 +00:00
zhouxinyong 7ced5efa15 Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

Change-Id: I8721dedf8d77073225ebeec9525776bce15bd002
2020-04-02 13:06:11 -04:00
Flavio Fernandes 5d70d45f2d Make ovndir configurable
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>
2020-01-16 06:13:59 -05:00
Terry Wilson 0bd24c269d Fix debug_venv for ovn split
Change-Id: Ia710b8f394e9446f0da83221e314d73d2edcfb08
2019-11-05 18:07:14 -06:00
Terry Wilson 54ee85113a Handle the ovs/ovn split
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
2019-09-20 13:24:05 -05:00
Terry Wilson f4855dd66f Check for oslo library usage
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
2018-08-23 09:03:54 -05:00
Terry Wilson 2ee22a5484 Fix python3 compat with debug_venv.py
Change-Id: Ia7412f8ec97cae2e0c8eda84eb38822a110c1a65
2018-07-02 12:53:26 +00:00
Andreas Jaeger 163ee83ce8 Avoid tox_install.sh for constraints support
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
2017-12-20 21:25:28 +01:00
Terry Wilson a9bf5c98f0 Have debug_venv use OVN venv
The change separating ovs and ovn venv classes requires debug_venv
to be updated to debug OVN tests.

Change-Id: Ie5ced4a499e5921636f726533bcab1e4bb52c77b
2017-09-01 10:45:09 -05:00
Terry Wilson ed2184fad8 Add ability to debug OVS virtual environments
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
2017-07-13 19:51:31 +00:00
Terry Wilson 4bde2d5237 Add OVN Northbound API for LS, LSP, and DHCP
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
2017-07-03 23:19:46 -05:00
Dong Jun 15d956380b Enable pylint 1.4.5
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
2017-06-30 09:54:53 +08:00
Terry Wilson a4bcd2f0b5 Use neutron-lib's tox_install.sh
This will fix up upper-constraints for users of the library.

Change-Id: Ie1b0d9089776a9d00d5264e7b58b453011672b6a
2017-04-19 12:09:17 -05:00
Jakub Libosvar f03b87e66a Fix all broken jobs
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
2017-03-23 08:52:07 +00:00