369 Commits

Author SHA1 Message Date
Luis Tomas Bolivar
8289705e25 Ensure permanent nei entry is added for cr-lrp ports
This is needed to ensure we can redirect traffic from outside
to tenant networks through the cr-lrp, when the router has the
snat disabled.

Change-Id: Icdabc4f511ca5d08cd70b0249685751ee4492a9f
2021-09-16 12:06:11 +02:00
Lucas Alvares Gomes
3cd3bb3714 Refactor parts of frr.py and add unittests
* Remove the bgp_as parameter from the _get_router_id() function as it
  wasn't used

* Run the run_vtysh_config() command using temporary files to avoid
  leaving the filesystem dirty when we run the OVN BGP Agent

* Fix logs to delay the interpolation

* Base test class to stop all mocks at the end of each test execution

Story: 2009165
Task: 43296

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Idf37e2fd3305c5b4d8f5a4d2f57f781852938e13
2021-09-13 15:12:58 +01:00
Zuul
16449bba14 Merge "Remove OVSDB lock-related code" 2021-09-10 14:02:36 +00:00
Lucas Alvares Gomes
33fa478caf Remove OVSDB lock-related code
We are not using OVSDB locks anywwhere, no set_lock() is being called so
we can get rid of the lock-related code for the OVSDB connection.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I783179936bfff2988af4fff1e36af1d94e925818
2021-09-10 13:24:50 +01:00
Lucas Alvares Gomes
7b0fccfb5a Refactor some methods from OvsdbSbOvnIdl + unittests
This patch also refactor a few things in the OvsdbSbOvnIdl class:

*  is_provider_network() now returns a boolean, as expected by is_*
   methods.

* The methods get_ports_on_datapath() and _get_ports_by_datapath() were
  merged since they were the same thing.

* The methods get_evpn_info_from_port() and get_evpn_info() are now
  merged since they were the same thing.

* The methods get_evpn_info_from_crlrp_port_name() and
  get_evpn_info_from_lrp_port_name() were merged into
  get_evpn_info_from_port_name()

* get_ip_from_port_peer() now can raise PortNotFound

This patch also adds unittests for the methods in the OvsdbSbOvnIdl class.

Story: 2009165
Task: 43262

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I3d1e3b20727227f32d094deedc897d034ab6f7f6
2021-09-10 12:08:00 +01:00
Luis Tomas Bolivar
05e3d1bff4 Add privsep support
Change-Id: Iab2cb051807cbfa52f43604c93905a8d15158d44
2021-09-07 08:28:52 +02:00
Luis Tomas Bolivar
496755d3a2 Ensure existing env variables are not removed
Change-Id: I14c5227eda3c3f43c15c6fa8b13bc0b991c9b827
2021-09-06 11:17:59 +02:00
Luis Tomas Bolivar
afe17e59cd Fix _check_single_dual_stack_format function definition
Change-Id: I693d20c2d5c8fcc93b3261643dce8b9e9b1f4c32
2021-09-06 10:12:05 +02:00
Zuul
b07eeb20d0 Merge "Clean-up OVN utils" 2021-09-03 09:53:03 +00:00
Lucas Alvares Gomes
69884f03fa Clean-up OVN utils
Remove unnecessary return values as well as simplify other methods.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Ie8ce2ae6b95e569fe7248301700f71c72ace403b
2021-09-03 10:17:45 +01:00
Luis Tomas Bolivar
d880d1d613 Create base watcher class
It also removes some prints in favor of LOG.xxx

Change-Id: I7689f8a11c5492681a35999eb85a85a9c547f2c4
2021-09-03 11:06:31 +02:00
Zuul
04650bda1e Merge "Ensure InvalidIP exceptions are handled properly" 2021-09-03 09:05:44 +00:00
Luis Tomas Bolivar
4d7ef570c7 Ensure InvalidIP exceptions are handled properly
Change-Id: I31033e6e804bc2b56abdf4704deb04c55a6ec39c
2021-09-03 10:33:08 +02:00
Luis Tomas Bolivar
e3afbb0aba Add initial support for EVPN
Change-Id: I8c6ffc192158b96ea3186501ae6579bd2934d37b
2021-09-03 10:15:49 +02:00
Luis Tomas Bolivar
d1d9b63e0f Ensure stderr error handling works on non-english systems
Change-Id: I063b2a9e5724ebfe5eb4bce24d9f269c7ef42df4
2021-09-02 15:38:38 +02:00
Lucas Alvares Gomes
8aed020eee Enable basic gate jobs
This patch enables the basic pep8 and unittests jobs.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Ibce2e868bdd194d84cf9f75555a9fdf9af905bc9
2021-09-02 11:07:44 +01:00
Luis Tomas Bolivar
f5ef3c8f31 Initial support for BGP
Change-Id: Ieed45b80e2860c94a42a8d5d16f5dfe7b515bf2c
2021-09-01 11:29:04 +02:00
Lucas Alvares Gomes
224a19994e Initial commit
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I7de2acf50ab009a3a45b90b977c4c7d801c491b5
2021-08-27 16:56:11 +01:00
OpenDev Project Creator
4e8bccdb8f Added .gitreview 2021-08-27 13:57:53 +00:00