Commit Graph

176 Commits

Author SHA1 Message Date
elajkat 8d82419125 Bump hacking
hacking 3.0.x is too old.
Try to synchronize pylint ignore and extension list with
other Networking projects.

With new pip the order of packages is not relevant, so the
related comment from requirements.txts is removed, see pip
documentation:
https://pip.pypa.io/en/stable/cli/pip_install/#installation-order

Change-Id: I586eb25b42d432e0b2158ddebb2dac013f712506
2024-02-13 09:09:06 +00:00
Zuul bb995b48d1 Merge "Enables external network mirroring" 2024-01-26 16:44:46 +00:00
Felipe Figueroa b6eaef52ab Enables external network mirroring
Change-Id: I95434982c8b8988a7c0d63af8350ad0d40554231
Signed-off-by: FelipeAFV <ffigueroa@whitestack.com>
Related-Bug: #2034445
2024-01-16 15:03:34 -03:00
Zuul 2b66482df2 Merge "Support for ovs-dpdk" 2023-11-14 19:07:17 +00:00
Juan Pablo Suazo 615c47f7f5 Replaces Deprecated Bridge-utils Command
Removes the deprecated bridge-utils command and
replaces it with an equivalent ipruote2 command.

Closes-Bug: #2024498
Signed off-by: Juan Pablo Suazo <jsuazo@whitestack.com>

Change-Id: I7b48770709bd0fb9ea5072ce6c8673074c39ab2b
2023-06-20 17:20:02 -04:00
Juan Pablo Suazo 88627c1bb1 Support for ovs-dpdk
1. While creating br-tap bridge, pass an additional argument, i.e.
   datapath_type. This parameter is read from openvswitch.ini
   conf file.

2. Add tunneling flows for taas only when tunneling is enabled.

Closes-Bug: #2020688
Signed-off-by: Juan Pablo Suazo <jsuazo@whitestack.com>
Change-Id: Ie14e5a8e7a6a237311a538f6f0bf7452ac42f2ae
2023-06-09 18:33:07 +00:00
elajkat bdc5f4b951 Remove the old CLI code from taas
With [1] all the CLI code was removed from python-neutronclient,
This causes test discovery failure for tap-as-a-servic, and
the old neutron tap-service-create type commads can be removed from
the tap-as-a-service repository.

[1]: https://review.opendev.org/c/openstack/python-neutronclient/+/871711

Change-Id: I44d2009ca661ff88d7b4a2ed89528aefc3a1f2eb
Related-Bug: #2003861
2023-05-16 11:22:53 +02:00
elajkat def943f447 OSC: Remove calls to neutronclient
With [1] the python binding code in Neutronclient prints warning
about future deprecation, change taas osc client code to use
totally OpenstackSDK.

[1]: https://review.opendev.org/c/openstack/python-neutronclient/+/862371

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/871287
Related-Bug: #1999774
Change-Id: Id22e20efbf30dddbdbcb986186e02f056f3ed21d
2023-03-03 15:58:30 +01:00
Zuul 8868e486ae Merge "Add pylint to pep8 and adopt code to the results" 2023-01-30 16:45:46 +00:00
elajkat 1ef9316e92 Add pylint to pep8 and adopt code to the results
Change-Id: Ia9048ef2dbc602ecd571da502ac2131b575f59ac
2023-01-30 13:39:38 +01:00
Corey Bryant 7eaf7dfebb Switch away from Mock auto_spec=True
In Python 3.10, Mock spec arguments are no longer allowed.
More details are available at: https://bugs.python.org/issue43478

Closes-Bug: #1954476
Change-Id: I98c3d6d67ba518f9c6c3455e9c5b0e2ea669a2f6
2023-01-30 12:28:06 +00:00
elajkat fc72381ad6 Py3: Remove six
Remove six.add_metaclass usage in taas code.

Change-Id: I73bb6d75b6608ad8fed05bc54f497abb1ca50ff1
2022-07-27 12:20:11 +00:00
Rodolfo Alonso Hernandez 1ff8830e5c Add WebTest as dependency for testing
Latest pecan release dropped this dependency. This is why now it is
needed to explicitly install it during testing.

This patch also registers the Neutron core common config options in
``TaasExtensionTestCase``. Since [1], the configuration options
must be explicitly loaded.

[1]https://review.opendev.org/c/openstack/neutron/+/837392

Closes-Bug: #1982110
Change-Id: I3d8cd840881a2c67e7b07458276d600e214d028e
2022-07-09 18:38:06 +00:00
zitptan fedca42dbd Modify taas extensions to use neutron-lib API def
Change-Id: I2920a6e375c3dbd0521ae2c48a4c91e5ab613629
Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/824926
2022-06-14 11:38:52 +00:00
Zuul 3fde047777 Merge "test: Make py310 passing" 2022-05-27 15:47:36 +00:00
Zuul 74e6e5639b Merge "Code cleaning: make RPC method signatures more meaningful" 2022-05-27 15:42:40 +00:00
elajkat f59837263c Add context for all SQL transactions
Follow the last efforts to make Neutron compatible with sqlalchemy-20
(see [1]), and use the necessary context for all SQL transactions.

Also make tempest job non-voting until [2] merges.

[1] https://review.opendev.org/c/openstack/neutron-lib/+/828738
[2] https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/842113

Closes-Bug: #1973757
Change-Id: I5aef8683df55b0825181e57257f0b71887315e52
2022-05-23 15:37:50 +02:00
elajkat 611c44c5c6 test: Make py310 passing
Remove test-setup.sh as with zuul it is not necessary, and would like to
use mysqladmin which is not available on some nodesets.
Fix failing unit tests with a possible typo and change auto_spec to
autospec in calling mock.patch.object.

Change-Id: Idd7b6788152a336314d5b99ae89f5049182a269c
2022-04-26 16:15:07 +00:00
elajkat 002de24695 Code cleaning: make RPC method signatures more meaningful
Change RPC calls like create_tap_service or create_tap_flow signature
to avoid parameter names like tap_service which is really a dict of
values.

Change-Id: I0ec7fef934e63eff76dd30bb1fb28c8277f1a749
2022-04-26 12:37:19 +00:00
Zuul fcaebb77dc Merge "Do not try to call status setting methods in case of periodic task" 2022-03-23 13:54:20 +00:00
elajkat 7c862f7d2c Do not try to call status setting methods in case of periodic task
[0] enhanced the failure handling of taas agent, but the handling of
periodic_task was left out, which resulted in exceptions:
KeyError: 'periodic_tasks'.
To avoid such exception TaasAgentRpcCallback's self.func_dict must be
extended with periodic_task entry.

[0]: https://review.opendev.org/c/openstack/tap-as-a-service/+/681946

Change-Id: I623e373b391605f69e9f3ed8f50c6d99f15198bf
Closes-Bug: #1958373
2022-02-16 09:15:13 +01:00
elajkat c73538876d Remove ovs-vsctl direct calls
OvsTaasDriver _create_tunnel_flood_flow_action used osv-vsctl call,
change that to get_port_name_list.

Change-Id: Ib8e160115564316991112a3a32034c645a427b31
2022-02-08 18:37:25 +01:00
elajkat c919ccd485 Use ovs TUNNEL_ constants from new location
[0] rehomed some ovs related constants to separate module, use the new
location in taas as well.

[0]: https://review.opendev.org/c/openstack/neutron-lib/+/822131

Change-Id: I346eaabff3c4869429c827c8955d41b621f82304
2022-02-01 11:50:51 +01:00
elajkat c78e795a35 CLI: remove leftover logs from tap-flow create
Change-Id: I21deec1adc7ecf452503b0b2b32e45f83012a7d7
2021-11-10 12:37:59 +00:00
Zuul fcd1f4ac14 Merge "Use ovs constants from neutron-lib" 2021-10-07 13:12:35 +00:00
elajkat 5088e8ead8 Tests: remove tempest plugin from taas repository
These tests are not maintained and exists in [1], and will be merged to
neutron-tempest-plugin (see [2] as a step)

[1]: https://opendev.org/x/tap-as-a-service-tempest-plugin
[2]: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/803752

Change-Id: I4d824c55e4ea85b98c165e482e510bf79f5df118
2021-08-19 06:54:16 +00:00
elajkat e71a3bc751 Use payload for PORT PRECOMMIT_DELETE event
Since [0] was merged PORT PRECOMMIT_DELETE event callback uses payload
argument instead of kwargs.

[0] https://review.opendev.org/c/openstack/neutron/+/800604

Change-Id: Ieeba5c996f06294df33581f08510bc8809ec5098
2021-08-10 11:32:26 +02:00
Slawek Kaplonski 3ddb529589 Use ovs constants from neutron-lib
Ovs constants were moved from neutron to neutron_lib some time ago.
This patch switches to use them from neutron-lib already.

This patch bumps min version of neutron-lib to 2.11 as it is version
which has those constants already.

It also fixes some small issue in grouping of imports.

Depends-On: https://review.opendev.org/c/x/tap-as-a-service-tempest-plugin/+/797318

Change-Id: I7c44501b129673cc72fd48f3b508ea6278027762
2021-06-21 14:23:27 +00:00
Zuul 33c25b513b Merge "CFG: Remove unnused cfg options" 2021-04-15 08:09:56 +00:00
Zuul 5b395bcb0c Merge "taas OSC commands" 2021-04-14 15:51:21 +00:00
elajkat 9b66ded049 CFG: Remove unnused cfg options
Config options 'driver' and 'enabled' are not used anymore, perhaps
since this commit was merged: Ife1807c04d8f0f44f067e1905890262ae2f7e426

Change-Id: I1e456354189608e28610a6c5cff3fe98e89a3e9f
2021-04-14 13:57:36 +00:00
elajkat 62b8bb7213 taas OSC commands
Add possibility to tap-as-a-service to use openstack commands instead
of deprecated neutron commands.

Closes-Bug: #1874701

Change-Id: I339f42a63789a946011700902724a58647c80b9d
2021-03-29 14:10:57 +02:00
Robert Simon c3592c8328 Add condition for the create_tap_service method in ovs_taas.py
Check the hybrid firewall driver usage.
Closes-Bug: #1919340

Change-Id: Iaf1bcc04d292b51f88264babef5b341bb86c750b
2021-03-25 13:48:35 +00:00
elajkat 51b36d9c9c Make master working again
Changes:
- Use privsep execution.
- Streamline tox.ini and setup.cfg
- Remove lower-constraints job

Depends-On: https://review.opendev.org/c/openstack/neutron/+/764015
Change-Id: I0017028ff35fe1f375d67e15e9f03f6917f8ccff
2021-02-04 13:22:35 +00:00
elajkat dd49e36bab Switch to hacking 3.0.1 and to testing on focal
Make the code compatible with hacking rules:
* import order problems
* line break before/after binary operator (for this added ignore for
W504, line break after binary operator
* indentation problems

I removed the rule N530 (Direct neutron imports not allowed), as that is
a longer story.

Fix mysql syntax in tools/test-setup.sh
Fix constraints files for testing on focal

Change-Id: Iacb12d5add773404468e2b755cf95c4e6e54ec99
Depends-On: https://review.opendev.org/#/c/708965/
Depends-On: https://review.opendev.org/752416
2020-09-18 07:54:33 +00:00
Deepak Tiwari 8332a396b1 Enhancements to TaaS agent driver failure handling
As per current handling if there is any failure in the taas agent driver
there is no way to convey that to the plugin. Due to which end user gets
the impression that everything went well. This is confusing.

Now, as part of this enhancement, when the tap resources are :-

1. Created: iniitally they shall be created with status 'DOWN' by TaaS plugin. Once
the TaaS agent driver exectuion is finished, it will ask the plugin to
set the status to either 'ACTIVE' or 'ERROR' depending on whether the
driver was able to do its tasks successfully or not.

2. Deleted: as per curretn handling plugin used to first delete the
resources from DB and then inform the agent. Now the sequence would be
that plugin informs agent first. Agent shall ask the plugin to set the
resource status t either INACTIVE (indicates successful deletion,
whereby plugin shall clear the resources from the DB) or
PENDING_DELETE (failure in deleting the resources from driver, whereby
plugin would simply update the status for the resource in DB).

Change-Id: If8b1aba3b3955fd705f2a13a79c7225a03369da6
2020-08-19 14:32:46 +00:00
elajkat 4eb270d886 Complete removal of dependency on the "mock" package
Remove sphinx from test-requirements.txt as the whole doc building is
is fixed in this patch: https://review.opendev.org/721994

Change-Id: I7a065a0cde1344af38655c9f136526eaa2524923
2020-07-13 13:21:19 +00:00
jessegler b2b225e967 Adds policy in code to Tap-as-a-Service
Adding oslo.policy allows operators to use and customize RBAC for tap-as-a-service instead of
relying on Neutron's default policy.

Change-Id: I6132054ef3bd8423990f91fae6329dfd089660b4
2020-01-09 12:52:26 +00:00
YAMAMOTO Takashi 5d5aeec066 DB migration milestone for Stein
Change-Id: Ia5fb360f32691c568f5993635fc1fa167f3708c7
2019-04-16 21:23:30 +09:00
Deepak Tiwari 2c83eb26a5 Add SRIOV mirroring support to Tap as a Service.
The following patch allows VF to VF mirroring in Tap-as-a-Service
Code-changes are applicable for new tap agent driver for sriov on
Intel i40e nic.

Vlan Mirror input parameter is part of tap-flow-create API

The current TaaS SRIOV driver is based on Intel i40e NIC driver with
following requirements:-

hardware: Intel Ethernet Network Adapter XXV710 (25GbE)
Driver: Intel i40e v4.16.0

Ref Spec: openstack/neutron-specs/specs/rocky/port-mirroring-sriov-vfs.rst
Commit: https://review.openstack.org/#/c/574477/

Change-Id: Id3aa83d7e1e22ae1806cef0c93e5dd61169c6735
2019-04-09 18:41:39 -05:00
Zuul 9e8299246b Merge "stop using common db mixin" 2019-03-01 00:46:23 +00:00
Boden R 5052ea8aab stop using common db mixin
All of the methods of common db mixin are available via neutron-lib
and the mixin will be removed before long.
This patch switches the code over to use neutron-lib's APIs rather
than those of the mixin and stops using the mixin as a parent class.

Change-Id: I1e9790e47c0befebc6f0073098694440dbc62873
2019-02-20 15:08:26 -07:00
Deepak Tiwari 080ef1661f Clear associated tap resources on port delete
Change-Id: Ifdaa08734825dd5fe9ded2ce13d16cad699d0737
Closes-Bug: #1814937
2019-02-19 21:24:54 -06:00
Boden R 97bb1b3383 use rpc from neutron-lib
We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import.

This patch switches rpc uses over to neutron-lib.

[1] https://review.openstack.org/#/c/634790/

This commit includes a part of the following commit
to pass the gate.
----------------------------------------
Fix zuul job failures

Fix zuul job failures

Change-Id: I1d073b8c58e32669ecf6932512b94c8a2cabf70e
----------------------------------------

Co-Authored-By: Deepak Tiwari <deepak.tiwari@aricent.com>
Change-Id: I053b5c56594e1a914143a2308fef77349dfa7ea4
2019-02-19 20:39:21 +09:00
Zuul aee5d28934 Merge "use neutron-lib for _model_query" 2018-12-25 07:17:18 +00:00
Zuul 0e131517c5 Merge "Changes to tap service and flow update tests in taas Client" 2018-12-03 16:51:55 +00:00
bk160f 2a4e2483ee Changes to tap service and flow update tests in taas Client
Add tempest tests for the tap service and flow update

Change-Id: Ibba64c78e5e244599c8b6d8defb33d77330ba563
2018-11-28 17:49:21 +00:00
Boden R 9d44af10b3 use neutron-lib for _model_query
The model_query module is in neutron-lib and the CommonDBMixin will
eventually be removed. This patch swiches use of the _model_query
method over to query_with_hooks from neutron-lib.

This patch also bumps the neutron-lib version up to 1.20.0

Change-Id: I8ff41c9d914b8329e4fca90de8a9ef9f41ccdcde
2018-11-13 11:46:12 -07:00
Zuul 5ffd2b759a Merge "use common rpc and exceptions from neutron-lib" 2018-11-08 00:48:36 +00:00
Boden R 0f23f0ca2e use common rpc and exceptions from neutron-lib
The neutron.common.rpc and exceptions were rehomed into neutron-lib and
are currently shimmed in neutron [1]

This patch consumes those modules from neutron-lib by using lib's
modules rather than neutrons.

[1] https://review.openstack.org/#/c/586525/

Change-Id: Ifb87c315953a02291201a25aff05910149023d10
2018-10-26 09:22:36 -06:00