20 Commits

Author SHA1 Message Date
9f93e3299b Update TOX_CONSTRAINTS_FILE for stable/2024.1
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/2024.1 branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I481fc4bce82210822f63a3f80732facccf2a7fb6
2024-03-14 07:22:36 +00:00
Takashi Kajinami
b20f5d5526 tox: Drop envdir
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: I18ad8e5de031bc6be1b8e01860585ffae5ec0aa5
2024-02-02 23:51:27 +09:00
Zuul
43c6614e1c Merge "Use .coveragerc to omit directories" 2024-01-26 09:23:04 +00:00
Takashi Kajinami
54bddd5b9f Use .coveragerc to omit directories
We can use the omit option instead of adding --omit argument, so that
we can run coverage commands outside of tox easily. Also this fixes
the inconsistent omit used in some coverage commands in tox.

Change-Id: I1efa406401c2e8a6b705daef4921b2dec7d55f2e
2024-01-26 16:01:31 +09:00
Takashi Kajinami
5aff8a4b7c Generate config file using oslo-config-generator
... so that we can review the available options more easily.

This also updates tox.ini to reuse the same environment for multiple
targets.

Change-Id: I561ff8a116c5a13784b83ff1450af965e6aff82c
2024-01-12 08:50:35 +00:00
Takashi Kajinami
1aed511c8e Drop lower-constraints.txt
The content has never been tested in CI. Lower constraints are no
longer tested in neutron since l-c job was removed[1].

[1] bc8e512b4a7b68f2e5c31efd320d8b347d06bba0

Change-Id: I99c7ca171638cf058ec216a29e26f522d580fdae
2024-01-08 23:42:39 +09:00
Luis Tomas Bolivar
938cdc2643 Add initial support for local OVN cluster instead of kernel-networking
This patch adds support for configuring a local (in-node) OVN cluster
to do the actions that were being done by the kernel networking.
This way, things like ovs-dpdk or HWOL could be supported.

This also includes adaptation to the tox.ini coverage so that
test files are not considered. This was making coveraged artificially
higher that it was, so this patch is also adjusting the minimun
coverage accordingly.

Missing items to be handled in follow up patch sets:
- Documentation
- Support for IPv6
- Support for BFD
- Support for vlan provider networks

Change-Id: Ieff19d88a22d7267bd58f8d1d4ecbcdc668c6bfb
2023-11-14 15:45:59 +01:00
Rodolfo Alonso Hernandez
1cbfe7823c Add new privileged method implementations
This patch add the following new privileged methods implementations:
* create_interface: this method will be used to create dummy, vlan,
  vxlan, bridge and vrf interfaces.
* delete_interface: to delete a interface
* set_link_attribute: to set UP the interface
* add_ip_address: to add an IP address on a interface
* delete_ip_address: to delete an IP address on a interface
* set_master_for_device: defines a master device for a second one

These new method use pyroute2 IPRoute class, replacing the use of the
NDB class.

This patch is creating the functional test framework, in order to
test these new methods.

This patch is also adding a new CI job to the gate (to be defined).

Partial-Bug: #2022357
Change-Id: I40d70829bfccb2df98b822afacbdab7da5a5ab7f
2023-06-15 12:12:08 +02:00
Luis Tomas Bolivar
b46dcf8d7f Ensure all vlan tags are processed
There may be serveral neutron vlan provider networks associated
to a physical bridge. For example, having ovs bridge-mappings
set to "datacentre:br-ex", and then have several provider networks
of vlan type associated to datacentre.

This was not being properly handled on the sync actions as only
the first vlan tag was being processed. This patch ensure all the
vlan tags associated to a bridge are processed and their respective
vlan devices are created

In addition, it seems the way of estimating the coverage has changed,
as now the value is higher, this patch also bumps the minimal coverage
(setting it to 92%), so that the coverage is not reduced unnoticed

Change-Id: I39168fa633f0a69439980c5a2fd163e389cf11fe
2023-04-27 19:02:29 +02:00
Luis Tomas Bolivar
921d93896b Ensure cover information is recreated upon coverage failure
Change-Id: I3f5fcfc2f4f52627a0fc8ed3d3ac8bf6b55360ef
2023-04-17 15:13:30 +02:00
Luis Tomas Bolivar
b7c2078a95 Fix gates due to tox bump to tox4
Change-Id: I5dc6b7a2720be7c6f6fdb8f97dc84205bfe8c329
2022-12-23 08:27:09 +00:00
Luis Tomas Bolivar
d8a26afe9a More removal of duplicated code
Avoid code duplication by reusing the same functions for
events and sync actions.

It also fixes a leak on NDB Proxy removal

It also bumps the minimum coverage to 87%

Change-Id: I7d704381c0585b642f0c420b98cd4090266fa2ce
2022-12-13 08:59:34 +01:00
Lucas Alvares Gomes
8e999f1207 Add unittest for OvnSbIdl()
Also bump the minimum coverage to 85%.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I11511c1cc8a45d26a25242bec9e8f85f6acde243
2022-08-24 10:51:28 +01:00
Lucas Alvares Gomes
d94b47b3dc Add unittests to ovn_evpn_agent.py
This commit adds unittests to the ovn_evpn_agent.py module.

Also bump the minimum coverage to 84%!

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Iddf48241db902a2fe29fafe2289a4d228a81b8cf
2022-08-24 10:51:24 +01:00
Lucas Alvares Gomes
8912c9fd6a Add unittests to evpn_watcher.py
Also bump the minimun % of coverage to 50%.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Iff5c6e2ffcbcdc77e17e2f68830a52f366d6dc63
2022-03-16 14:55:04 +00:00
Lucas Alvares Gomes
613397c0a3 Add unittests to base_watcher.py and bgp_watcher.py
Also bump the minimun % of coverage to 40%

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I1da35375aa4f9d9af94360bfa3128fc7d2a06535
2022-03-11 15:50:40 +00:00
Lucas Alvares Gomes
a1c18eb350 Add unittests to linux_net
* Add unittests to the utils/linux_net.py module
* Re-use set_device_status() in multiple ensure_*() methods
* A TODO was left for unittesting ensure_routing_table_for_bridge() as
  the method could benefit from some refactoring before we add the tests
  and will be done in a separated patch.
* Fix InvalidPortIP() argument that was expecting a kwargs
* Set the minimum test coverage to 30% (right now it's 34%) in an
  attempt to avoid new code being included that will lower the coverage

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I00a98dae35eda1cbbe9a2db442c66546b4b77657
2022-03-04 11:48:22 +00:00
Lucas Alvares Gomes
3554ad53e2 Coverage to omit the test files
Coverage should not include the test files as part the report.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I77cafcc54b81587193d1a74024a565d7094bac40
2021-09-17 15:17:30 +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