]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add security groups events
authorarmando-migliaccio <armamig@gmail.com>
Thu, 16 Apr 2015 19:45:32 +0000 (12:45 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Tue, 21 Apr 2015 15:10:07 +0000 (08:10 -0700)
commit868e67b480b08cc815d802cf950547c6b5ac0153
treedb8dcf77b442c5350972785b1554d867a2050622
parent05a9f16257c2953bf40d11ca2a2f9651ba4e86b2
Add security groups events

ML2 mech drivers have no direct exposure to security groups,
and they can only infer them from the associated network/ports.
This is problematic as agentless ML2 mech drivers have no way of
intercepting securitygroups events and propagate the information
to their backend, or more generally, react to them.

This patch leverages the callback registry to dispatch such events
so that interested ML2 mech drivers (or any interested party like
service plugins) can be notified and react accordingly.

This patch addresses create/update/delete of security groups and
create/delete of security groups rules. Other events may be added
over time, if need be.

This patch is only about emitting the events. The actual subscription
and implementation of the event handlers will have to take place where
deemed appropriate.

Closes-bug: #1444112

Change-Id: Ifa1d7ee9c967576f824f1129dd68e6e3abd48f5c
neutron/callbacks/resources.py
neutron/db/securitygroups_db.py
neutron/extensions/securitygroup.py
neutron/tests/base.py
neutron/tests/functional/agent/test_l3_agent.py
neutron/tests/unit/db/test_securitygroups_db.py