After updating pylint, it started emitting additional "W"
warnings in some cases, fix some of them.
modified-iterating-list,
implicit-str-concat,
global-variable-not-assigned
Trivialfix
Change-Id: I7deb5f1e0aa2852cb033c78dcb4c8bc87e34be1e
If "TRUNK_SKELETON" has not been initialized, the "unregister" method
should finish gracefully. This issue is happening in fullstalk tests,
where the trunk initialization is not executed if "trunk" is not in
the service plugins.
Closes-Bug: #2000314
Change-Id: Idef5fd8feaf1af309862d6cb3e06da3734fb6c19
Running with a stricter .pylintrc generates a lot of
C0330 warnings (hanging/continued indentation). Fix
the ones in neutron/services.
Trivialfix
Change-Id: Ie9779b257981bc80e69639cdaa4d7dfd0ffa5809
As a followup from the previous commit we here now also cleanup the
SubPort an Trunk fanout queues.
Closes-Bug: #1586731
Change-Id: I047603b647dec7787c2471d9edb70fa4ec599a2a
This patch switches the code over to the payload style of callbacks [1]
for TRUNK and SUBPORTS events. As needed existing callbacks are shimmed
to support both payload and kwarg style callbacks. These shims will be
removed once all callbacks are switched over to payloads.
Also the neutron.services.trunk.callback module is removed as consumers
will no longer need the TrunkPayload therein.
NeutronLibImpact
[1]
https://docs.openstack.org/neutron-lib/latest/contributor/callbacks.html
Change-Id: Ie302b48b283f8780072b5c9e2bc8787d87c11794
Removed E125 (continuation line does not distinguish itself
from next logical line) from the ignore list and fixed all
the indentation issues. Didn't think it was going to be
close to 100 files when I started.
Change-Id: I0a6f5efec4b7d8d3632dd9dbb43e0ab58af9dff3
The trunk callback resource names now live in neutron-lib [1].
This patch switches over to use those constants from lib and they
will be removed from neutron in a later patch once consumers switch
over to lib as well.
[1] https://review.openstack.org/#/c/635209/
Change-Id: I79dfe76c1b698fe634393e469157014f1914cc8e
Commit 40866acd02 stopped passing agent
object as parameter as it's already referenced by `trigger' parameter.
This leads to an error during notify_after_init() in agents' code and
hence trunk handlers are never initialized. This patch replaces `agent'
reference with `trigger' to correctly initialize handlers.
Change-Id: I808980553056b9fec4e2700c1d5440e42091afbf
Closes-bug: #1722967
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.
Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
The 'securitygroup' is registered as cfg.CONF.SECURITYGROUP. Currently,
this check always raise error as no 'cfg.CONF.securitygroup', then neutron
will abort the trunk_create. So nova will error when create VM with trunk
parent port for waiting timeout about the network-vif-plugged event.
Closes-Bug: #1699516
Related-Bug: #1669074
Change-Id: I0b0bdb5a39f1978e12ddaeddd4e0d825894ea241
OVS trunks work only with OVS firewall to implement security
groups. If a trunk request is indeed processed by an OVS agent
whose firewall_driver = iptables_hybrid, we should at least
log a warning to alert the admin.
Closes-bug: #1669074
Change-Id: I60e77e60e5e6d46ceff4bff61cbc07b6534ef152
Maintaining the context is important for keeping the request ID
and subsequently operator/developer sanity while debugging.
The resource_type is also helpful to have since a function could be
subscribed for multiple resources.
This maintains and deprecates the existing 'subscribe' method for
backwards compatibility with callbacks that don't support receiving
the context and resource type. A new 'register' method is added
for callbacks to use that are compatible with receiving the context.
Change-Id: I06c8302951c99039b532acd9f2a68d5b989fdab5
If a VM is deleted while the OVS agent is down, upon
restart the OVS trunk bridge is deleted successfully
but the patch ports integration bridge side are left
behind.
This patch makes sure the bridge as well as its peers
are cleaned up.
Closes-bug: #1623708
Change-Id: I3f010755fdb6501753d20357ad2cd0d6c02cf22a
Before this patch, change to trunk status was reported only when
subports were being added, but not when being removed. This patch
tweak things to make sure the same happens on subports removal.
This patch also improves unit coverage for the parts of the code
affected. In particular the import of oslo_context has been aliased
to catch errors where context as variable is shadowed by the homonym
module.
Closes-bug: #1625135
Change-Id: I73127d7829c31ca66578eb8f7d76409b36c9dc6d
Wiring actions of OVSDB handler communicate with server, while there is
no handling within the methods. This patch catches such failures of rpc
coming from those methods.
Partially-implements: blueprint vlan-aware-vms
Change-Id: I74663cccb0d16ce06fff479e7890dd7e8f5aefb4
Handler processes the events passed by OVSDBMonitor
and reacts to events related to trunk ports, calling
to trunk manager to wire/unwire trunks and subports.
Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Partially-implements: blueprint vlan-aware-vms
Change-Id: I97487e9d7647b4110a2cdd48d0f129340d59a40d
The agent code is enhanced to allow the trunk agent-side counterpart
to be activated seamlessly by means or local registry notifications.
Some integration with the server side is provided by loading the
RPC agent-side skeleton. Basic unit testing provides some coverage.
More effective functional and system coverage will be provided once
everything comes together.
Partially-implements: blueprint vlan-aware-vms
Co-Authored-By: Adolfo Duarte <adolfo.duarte@hpe.com>
Change-Id: Id70553e8980593f99548a4d2b0a78355933f7c2c