Commit Graph

14 Commits (1c2e10f8595d2286bd9bec513bc5a346a84a6f7c)

Author SHA1 Message Date
Andrii Ostapenko 7a20b1293a Switch test cases to sudo dependent
KeepalivedManagerTestCase and BridgeMonitorTestCase both depend on sudo

Change-Id: I5de14f3e2f969ab6bd5882b2c740afaba11eb957
4 years ago
Terry Wilson 5dd2bc0a3c Remove polling from test_create_bridges
It is possible to use ovsdbapp Events to wait for bridges to be
created instead of polling until they exist.

Change-Id: I97f1c15a13a3bb90d774066a9933f3a4d39f50e2
5 years ago
Rodolfo Alonso Hernandez 22c9cf3d95 Add native OVSDB implementation for bridge monitor
This patch implements an OVS bridge monitor based in the OVSDB
native implementation (OVSDB IDL, Open vSwitch Database Interface
Definition Language). This new implementation supersedes the CLI
OVSDB monitor.

Partial-Bug: #1789592

Change-Id: I9c512d4cbd4cebf94c339231f83bbe89b37650ba
5 years ago
Jakub Libosvar db4eddf0b1 functional: Remove ovsdb tests
There are tests that exercise ovsdbapp internals and should be part of
ovsdbapp project. We keep test_ovs_lib which exercises the real things.

Change-Id: I0375caef25d6ea6c58832fc39f7acc915793ffd0
Related-bug: #1712594
6 years ago
Jakub Libosvar 594d8b8b3a functional: Fix reference to ovsdb connection
Change I379448fd135a3bb2ac99709812b9f476c73923a7 replaced connection
attribute of IDL to ovsdb_connection. After updating upper constraints
to newer ovsdbapp version, we no longer have connection attribute.

Change-Id: I6f060fff4df7323a3877f56cb1fa586a22d16670
Closes-bug: #1712594
6 years ago
Terry Wilson 7dac3345ee Fix functional test for ovsdbapp 0.4.0
The table_name_list argument went away and the functionality is
tested in another test which isn't broken.

Change-Id: I05ec39ac1d741ebae97344aea5035832e2ff2e9e
6 years ago
Terry Wilson 1eec265ad0 Update to support the ovdsbapp 0.4.0 API
idl_factory was removed in favor of just passing in an Idl instance
as an Idl doesn't start a connection until its .run() is called.

The try/excepts will be removed when the ovsdbapp 0.4.0 constraint
changes are merged.

Change-Id: Id22faa1f6179c2fdf8a136972d65f10749c9fc2e
6 years ago
Terry Wilson e6333593ae Use the ovsdbapp library
This patch uses the ovsdbapp Python library, which is the new
project based on the Neutron OVSDB API.

The CLI implementation of the OVSDB API remains in the Neutron

Neutron continues providing the (deprecated) ability to allow
the OVSDB API to be imported from Neutron.

The deleted tests exist in the ovsdbapp project. More will be
moved later, but many of the tests in the Neutron tree use
ovs_lib, which doesn't exist in ovsdbapp so those tests will
probably stay in the Neutron tree.

Closes-Bug: #1684277
Depends-On: I3d3535b1d6fe37c78a9399903b65bbd688b1c4b9
Change-Id: Ic8c7db0e80d0ad104242322d3f1f70cab8caab92
6 years ago
Terry Wilson 2013058e13 Refactor OVSDB native lib to be more customizable
This change, in a backward-compatible way, allows users of the
native OVSDB library to pass in their own Idl factory function
where they can return any subclass of the Idl, any schema, and
and register whatever tables/columns they want. This way, we
do not have to keep up with changes to the upstream OVSDB Idl

The Connection connection, schema_name, and idl_class arguments
are deprecated in favor of the idl_factory function.

Change-Id: I8133da63caa8937c4fce68eb2fbb73d36b894043
7 years ago
Omer Anson f7a2d4eb44 Add functional tests for OVSDB Connection
Add functional tests for the class:

Change-Id: I92ab574f04efb5e09802fc1d97c2a5715b4ae48d
Related-Bug: 1612403
Co-Authored-By: Terry Wilson <>
7 years ago
Jenkins 65a3b89116 Merge "Use more specific asserts in tests" 7 years ago
Ihar Hrachyshka 31e1aeb66b Forbid importing neutron.tests.* from outside tests subtree
neutron-sanity-check tool was importing neutron.tests.base module, which
may be not present on some systems (f.e. RDO splits neutron/tests/
subtree in a separate python-neutron-tests package). It made the tool
not usable in some setups.

This is not the first time when we by mistake import from
neutron.tests.* and break distributions. It's time to stop it by
proactively forbidding that pattern via a new hacking check.

Some functions were moved from neutron.tests.base to
neutron.common.utils to fulfill the need requirement. They were moved
using debtcollector, no current consumers should be affected.

Closes-Bug: #1621782
Change-Id: I790777ddcbd1b02218b3db54ae3d5c931d72d4fa
7 years ago
Béla Vancsics 7deba33bf3 Use more specific asserts in tests
Instead of assertTrue and assertFalse use more specific asserts.
They are compatible with Python 2.7[1] and 3.4[2]


Change-Id: I0e6cc33a54e35fe663e5cdf2b947053528a8775f
7 years ago
Terry Wilson 11dc21d3a6 Wait for vswitchd to add interfaces in native ovsdb
ovs-vsctl, unless --no-wait is passed, will wait until ovs-vswitchd
has reacted to a successful transaction. This patch implements
the same logic, waiting for next_cfg to be incremented and checking
that any added interfaces have actually been assigned ofports.

Closes-Bug: #1604816
Closes-Bug: #1604370
Related-Bug: #1604115
Change-Id: I638b82c13394f150c0bd23301285bd3375e66139
7 years ago