Commit Graph

5 Commits

Author SHA1 Message Date
elajkat 3c557b29f8 Bandit: Remove bandit B311, B303 from skip list
Remove B303 (md5, sha1 for python<3.9) and
remove B311 (Standard pseudo-random generators are
not suitable for security/cryptographic purpose) from
the skip list of bandit execution.

Change-Id: I6e9e61e7f94dc9ca339942529af8997adef45e38
2024-03-28 13:55:25 +01:00
Rodolfo Alonso Hernandez dd184c5c10 Fix Loki tempest jobs
This patch fixes the issues reported in the
"neutron-ovn-tempest-with-uwsgi-loki" job:
* The missing retry decorators in some ``TapPlugin`` methods.
* Added a session flush in
  ``OVNL3RouterPlugin.create_router_precommit``. In case the router
  creation fails before the creation of the initial
  ``OVNRevisionNumbers`` register, the transaction is retried.
  That will prevent from trying to retrieve a router standard
  attribute that doesn't exist, due to a previous error.

Closes-Bug: #2017131

Change-Id: Idbf7ea6018146b67387f2ff99e281e32170ba039
2023-04-23 07:26:55 +02:00
Boden R c774930aed use sqla functions from neutron-lib
The public db apis are available in neutron-lib. This patch consumes
the sqla_listen, sqla_remove and sqla_remove_all functions from lib
by removing them from neutron and using lib's version.

There's also a TODO added here so we can eventually rehome the
check_no_sqlalchemy_event_import hacking check to neutron-lib.

NeutronLibImpact

Change-Id: I3b3862016125303fb227b4ff41420a89bb33c917
2018-07-25 21:04:20 +00:00
Boden R a6a344c7b5 Consume ServicePluginBase from neutron-lib
Neutron lib now contains ServicePluginBase [1]. In accordance
with the discussion in [2], this patch:
- Removes ServicePluginBase from neutron and replaces all uses
with neutron-lib.
- Removes PluginInterface; the plugin interface for extensions
is ServicePluginBase; that's what's used by everyone today.
- Updates a few UTs, based on the above.

NB: A subsequent patch will address the WorkerSupportServiceMixin
so its untouched herein.

NeutronLibImpact

[1] I2b1131ac53e9bfeb42a92f9ef134be6ff4cfe5a3
[2] https://review.openstack.org/#/c/424151/

Change-Id: I1e8f2ee6a96df9ba07dae37f1a80e61ad20693cc
2017-03-17 12:06:57 -06:00
Kevin Benton 1e1e7a842f Add Loki service plugin for optional DB havoc
This adds a service plugin to introduce random delays
and deadlocks to DB operations to make it easier for
us to see that retry decorators are correctly applied
and race conditions are handled.

Change-Id: I8e283c1b53165faee548d26b3560a2c883dfb977
2017-02-03 05:12:33 -08:00