From 9a8f82a0d0d111422be7c9c1d9262ce70e6e5235 Mon Sep 17 00:00:00 2001 From: Boden R Date: Wed, 29 Aug 2018 10:59:49 -0600 Subject: [PATCH] use payloads for SECURITY_GROUP BEFORE_DELETE events This patch switches over to the payload style callbacks for BEFORE_DELETE events of SECURITY_GROUP resources. NeutronLibImpact Change-Id: I44ab8bfd92ece7501793979f8f45eae65f1e7a2c --- neutron/db/securitygroups_db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/db/securitygroups_db.py b/neutron/db/securitygroups_db.py index 2c78f51f110..8dcc5bbc0fa 100644 --- a/neutron/db/securitygroups_db.py +++ b/neutron/db/securitygroups_db.py @@ -216,7 +216,8 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase): self._registry_notify(resources.SECURITY_GROUP, events.BEFORE_DELETE, exc_cls=ext_sg.SecurityGroupInUse, id=id, - **kwargs) + payload=events.DBEventPayload( + context, states=(sg,), resource_id=id)) with db_api.CONTEXT_WRITER.using(context): # pass security_group_rule_ids to ensure