Fixes a few pylint warning from this recent pylint.
len-as-condition, inconsistent-return-statements and
no-else-return rules are
added to the ignore list in .pylintrc because they are
patterns commonly used in the neutron stadium and
already ignored in the neutron repo.
Co-Author: Akihiro Motoki <firstname.lastname@example.org>
This patch switches over to the payload style of callbacks by updating
neutron to callbacks to handle a DBEventPayload for BEFORE_DELETE events
of ROUTER_INTERFACE resources. See the depends on patch for more
This change also disables legacy-tempest-dsvm-networking-bgpvpn-bagpipe
that is currently broken because of bug 1807152 - since both this change
and that bug break the gate, we have to squash.
Access to neutron.db.api's context manager is already in neutron-lib
and in fact neutron is already using it as a shim. This patch switches
over context manager access to use neutron-lib's accessors.
Also see https://review.openstack.org/#/c/613122
Using decorators has a few benefits:
- readability: what event triggers a callback is described
next to the method definition
- subclass can cleanly change the event that the mother
class chose to trigger a callback
- a bit less verbose in the end
Beyond obvious reasons to try to migrate to the new facade, bug
17446996 is leading us into using the new DB facade for BGPVPN
OVObjects used by bagpipe driver.
However, unless we switched all DB operations to the new DB facade,
we have a situation where we mix both old and new facade, which
is a known source of issues.
This change switches all DB operation to use the new DB facade.
bagpipe driver introduces support for the VNI extension
in I98d36903bc0e44f31531e03226c6b60e9fc88618, we can hence
advertise the support for the API extension.
The behavior of the current "v1" bagpipe driver is to
produce both the old and new RPCs to not prevent rolling
This change introduces a bagpipe v2 driver that does not
produce old RPCs and only relies on OVO push/pull RPCs.
To avoid code duplication of the code for new RPCs,
the current driver is refactored to inherits from the
v2 driver the code for the new OVO push/pull RPCs.
The current v1 driver is also modified to raise a warning
indicating its future removal.
This change also extends the previous unit test
coverage for the production of push-based RPCs.