72 Commits

Author SHA1 Message Date
Brian Haley
90cd9ba1e6 Re-home ovsdb event classes
Placing in a separate file allows the agent code to no
longer import any driver code.

Change-Id: Ibccf64cb77902d39f286f00a35875a50b41bab3e
2020-05-12 11:06:36 +00:00
Brian Haley
b1a457f35f Re-home unit tests
Move them to their respective test_*.py files.

Created base.py to hold the parent class common to all
sub-tests.

Change-Id: I4f8466ceb36356e0d80cdcfe1e6e2c5884c1f567
2020-05-12 11:06:14 +00:00
Brian Haley
178dbd3fee Re-home OvnProviderHelper class
Put it in a separate file from the driver class.

Change-Id: I32eda38d212b7b5a1434d9130a1b4e268d2c3aa9
2020-05-12 11:06:05 +00:00
Brian Haley
bf68be1cca Fix E741 pep8 errors
E741 ambiguous variable name 'l'

Change 'l' to 'listener' in affected code.

Change-Id: Ifcef2ad4b40641766383431b0043be491ed20ecb
2020-05-11 17:25:41 -04:00
Brian Haley
fd460cd0fa Re-home get_neutron_client() into common/clients.py
Move in preparation for re-homing OvnProviderHelper class.

Change-Id: Idc627fd1c74637d59c47f1e8989cf0bdfa3bb75f
2020-05-06 16:47:37 -04:00
Brian Haley
5685895a1a Re-home constants to common/constants.py
Move in preparation for re-homing OvnProviderHelper class.

Change-Id: If972469964ae907b048446bd15ba2661aa50f266
2020-04-30 18:23:48 +00:00
Brian Haley
21701b03d0 Re-home OvnNbIdlForLb class
Seems like it should live with the other ovsdb code in
ovsdb/impl_idl_ovn.py

Change-Id: Idee498bc0104533dd58b9b9a82523986a241ec05
2020-04-30 14:20:20 -04:00
Brian Haley
d6f65325a0 Use more octavia-lib constants
Octavia has a pretty extensive definition of constants,
start using them where possible.  Had to tweak a lot of
lines due to wrapping, but functionally nothing should
have changed.

Removed some extra parens where found and other misc
cleanups.

Also bumped neutron-lib to >= 2.1.0 since that is py3-only.

Change-Id: If400730cb759130192966bacf3c6edb9faa18899
2020-04-28 13:06:34 -04:00
Zuul
eff9150ed9 Merge "Re-home exceptions to common/exceptions.py" 2020-04-28 16:52:51 +00:00
Zuul
d0cb02115d Merge "Re-home MockedLB to tests.unit.fakes" 2020-04-28 16:47:45 +00:00
Zuul
8b3978aad3 Merge "Add release note README file" 2020-04-28 16:43:39 +00:00
Zuul
d575f17c85 Merge "Update requirements and constraints" 2020-04-28 16:43:38 +00:00
Brian Haley
94daec2d4a Re-home MockedLB to tests.unit.fakes
Renamed to tests.unit.fakes.FakeLB

Change-Id: I1d18634f48c29ab3c07c244cc8826bdb987afdc4
2020-04-27 16:39:40 -04:00
Brian Haley
aca9eab6f7 Re-home exceptions to common/exceptions.py
Change-Id: I2db28dc025f256b5b818ddbfd88a818388d09af0
2020-04-27 15:05:00 -04:00
Zuul
c8116dd640 Merge "Bump default tox env from py37 to py38" 2020-04-27 14:58:33 +00:00
Brian Haley
0f57bf525c Add release note README file
Has instructions on how to run reno, and a link to the
openstack.org docs.  Copied from neutron.

Change-Id: Id38f6bb963cb04c7ba9ae0a0c10fac7b69b2613d
2020-04-24 14:07:27 -04:00
Sean McGinnis
c54c192bf3
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I4b2fe2b193afde8c2eaf4e704ba21231fab93361
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:53 -05:00
Sean McGinnis
3ae6e75202
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I57f5d0faf886bc0d2ca50f848cb666c6f47fe947
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:15 -05:00
Zuul
6802e14ac2 Merge "Spawn long-running processes in the driver agent" 2020-04-24 09:08:35 +00:00
Brian Haley
c6cee92073 Spawn long-running processes in the driver agent
The OVN Octavia provider driver in the OvnProviderHelper
class caches these attributes:

    ovn_nbdb_api_for_events
    ovn_nb_idl_for_events
    ovn_nbdb_api

to not re-create things each time OVN IDL that is used for
handling events is called.

We should be using the Octavia Driver Provider Agent framework
instead to not have those long-running IDLs in the API process.

This change:
- Creates driver provider agent and registers its entry point
- While setting up the driver agent instance, start IDL that
  will handle events
- Stop caching ovn_nbdb_api, ovn_nb_idl_for_events and
  ovn_nbdb_api_for_events in the OvnProviderHelper class

Change-Id: I0034a48997bd6b95e1b51bfcbd56e8372b35e62f
Closes-bug: #1871355
2020-04-23 11:03:36 -04:00
Brian Haley
2efb86b361 Update requirements and constraints
There were a number of carry-over constraints and
requirements from neutron and networking-ovn that
are not needed for the OVN provider, remove them.

Update tenacity to version 5.0.2 to match octavia-lib,
else running 'tox -e lower-constraints' will fail with
an error locally.

Also removed the install_command directive from
tox.ini since that could lead to requirements
tests not running properly, it is handled internally
by tox versions > 3.0 and we are using 3.1.0.

Change-Id: I72d1ac0294e22ead8d9f38e09bdefc62a3ce50ff
2020-04-21 19:41:35 -04:00
Maciej Józefczyk
5cebb58c1d Make ovn-octavia-provider-v2-dsvm-scenario voting
We still have scenario tests failing and it needs further work
in Octavia tempest plugin [1] and Core-OVN [2].
However, scenario tests are not the only ones that we expect to pass, so
for now ignore those test cases:

octavia_tempest_plugin.tests.scenario.v2.test_traffic_ops.TrafficOperationsScenarioTest.test_basic_traffic
octavia_tempest_plugin.tests.scenario.v2.test_traffic_ops.TrafficOperationsScenarioTest.test_basic_udp_traffic

and set this job to voting.

[1] https://review.opendev.org/#/c/714004/
[2] https://bugs.launchpad.net/neutron/+bug/1871239

Change-Id: I388438133e9028e7805aba017334d94a11aeda5f
2020-04-21 12:11:26 +02:00
Zuul
96c83ea224 Merge "Improve test coverage" 2020-04-17 14:05:43 +00:00
Zuul
8d48096fff Merge "Update the devstack local.conf sample file" 2020-04-17 13:57:38 +00:00
6023e0f5e3 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Iba12558451f940d88d6d095df435133525b92471
2020-04-11 18:46:51 +00:00
782a48df3d Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: I7945635c080a56526b62849e25556693de48c0ae
Sem-Ver: feature
2020-04-11 18:46:45 +00:00
Brian Haley
3a5deb7ce9 Update the devstack local.conf sample file
local.conf.sample was a little out-dated and failed
stacking.  Update to be more like the neutron sample
file with the added Octavia and OVN provider sections.

Change-Id: I38df77012d63efd1e8769c13ed35a017d4cb6141
2020-04-09 14:25:01 -04:00
Brian Haley
eb1e24ac46 Improve test coverage
Added a number of unit tests based on coverage report
data, it's up to 79% now.

Fixed test_pool_create_exception() to call pool_create()
instead of pool_update().

Also fixed a bug in the driver.pool_update() exception code
path found when adding a new test, status['pools'] is the
correct element.

Change-Id: Ic72aad21e0ecf5b0334b321b18515d909daa3ba4
2020-04-03 12:48:46 -04:00
Zuul
bbb1755176 Merge "Remove the dependency on the "mock" package" 2020-04-03 11:13:07 +00:00
Zuul
838f9d6d34 Merge "Remove backwards-compatibility check" 2020-04-03 10:59:11 +00:00
Brian Haley
88ea5cf828 Remove the dependency on the "mock" package
This repo is python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock".

Fixed one related functional test failure.

Change-Id: I4f7568b1af254488cbc75aefac2a1708e70eaf31
2020-04-02 17:36:25 -04:00
Zuul
5311a4bcf5 Merge "Fix incorrect os-testr test requirement" 2020-04-02 11:14:33 +00:00
Brian Haley
89cbf56d96 Fix incorrect os-testr test requirement
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I9b1935be325bfd2bcc51d9f1ee1d3c4229b75403
2020-04-01 15:25:46 -04:00
Brian Haley
c78aa81e7d Update hacking for Python3
The repo is Python 3, so update hacking to version 3.0 which
supports Python 3.

Update local hacking checks for new flake8.

Change-Id: I37851c466ac14f41506f3d0d7cee75db84580756
2020-03-31 19:44:32 -04:00
Maciej Józefczyk
6e7f454ccd Add missing requirements
Those requirements were missing.

Change-Id: I65d8a3d7601872bda65e3aa17380a4c342970aa3
0.1.0
2020-03-31 09:56:59 +00:00
Zuul
d7b58f3dd2 Merge "Stop using Octavia network driver" 2020-03-31 09:55:09 +00:00
Maciej Józefczyk
40545dc9b5 Stop using Octavia network driver
We shouldn't be using Octavia components except octavia-lib
in provider driver.
For now we only use Neutron client methods from Octavia Neutron network
driver, so this patch removes use of Octavia network driver
in favor of direct use of Neutron Client.

Change-Id: I77802ff65f975f8136daddfe897ae1993bd9c5e9
2020-03-31 08:15:38 +00:00
Maciej Józefczyk
a0c194624f Respect SSL devstack configuration
If devstack is spawned with SSL, that means we need
to configure OVN databases connectors to use TLS.

Change-Id: I4f95a6ea0f299700281e3dde26ebcaba77a1b1fc
2020-03-27 13:57:27 +00:00
Brian Haley
0db5ab4e9e Remove backwards-compatibility check
The unit test setup has a try/except to support octavia-lib
< 1.3.1, but since that is the version in lower-constraints
it can never be triggered.  Remove it.

Change-Id: Ia28ecf4ffd1a0aaf7c7b28af9d6ec75b313d8abf
2020-03-23 17:16:42 -04:00
Brian Haley
2e4b7e5aa9 Add unit tests for hacking/checks.py
This also increases the coverage numbers a couple percent.

Change-Id: I8259868295a113093c1e7c1f7d11bd6759ca081c
2020-03-20 14:57:57 -04:00
Maciej Józefczyk
654cf42e8f Add tempest gate, devstack plugin and sample devstack config
This patch adds:
 * ovn-octavia-provider-driver tempest job
 * devstack plugin


Change-Id: I42878326c3654db7a1be83f5889457c8c85117b6
2020-03-19 11:04:14 +00:00
Zuul
5b8d86ab37 Merge "Add configuration page to docs" 2020-03-18 15:10:11 +00:00
Maciej Józefczyk
e81342ae10 Add configuration page to docs
This page was missing. Added also tox env to generate config.

Change-Id: I8d8ed95ec603ea143a24d28dc92fa55600e0274e
2020-03-18 14:26:32 +00:00
Brian Haley
5d86a8c15b Use queue library directly
As the driver is python3-only there's no need to use six
to load the queue library.

Change-Id: I4b12a0281bd56bc83a81ba334ef82521f1e99881
2020-03-18 10:00:54 -04:00
Maciej JJózefczyk
af2b26afe6 Do not try to refresh vips on OVN LB that will be deleted
When there are multiple listeners with different protocols
configured on OVN LB, and one of listeners needs to be deleted,
there is no need to refresh vips on given OVN LB.
If there are no listners withing same protocol left the given OVN
LB could be deleted and there is no need to refresh vips then.

Change-Id: If15f817617facade10005878c8dfc7f467ce75a9
Closes-Bug: 1866087
2020-03-05 15:43:45 +01:00
Zuul
a8291338d1 Merge "Enable cover job" 2020-03-02 19:15:09 +00:00
Zuul
f45cbfb2df Merge "Add admin and contributor documentation" 2020-03-02 16:49:30 +00:00
Maciej Józefczyk
cd7fab3027 Enable cover job
This job is green. Lets enabled it.

Change-Id: I482b287c5d67b60c1c5d0eabb33bee53ee67a636
2020-03-02 11:57:26 +01:00
Zuul
ee3a89f2e8 Merge "Fix Exception string arguments" 2020-03-02 10:39:58 +00:00
Brian Haley
e948b83896 Add admin and contributor documentation
This patch adds documenation on the driver design and API.

Change-Id: Ia5a011f6f1a6a97511bf29915a62a5cdad694eee
2020-03-02 11:33:16 +01:00