Browse Source

Merge "[Stable only] Fix callback function arguments" into stable/victoria

changes/71/823271/1
Zuul 5 months ago committed by Gerrit Code Review
parent
commit
43261cf7ac
  1. 6
      neutron/services/logapi/logging_plugin.py

6
neutron/services/logapi/logging_plugin.py

@ -58,9 +58,11 @@ class LoggingPlugin(log_ext.LoggingPluginBase):
self.delete_log(context, log['id'])
@registry.receives(resources.SECURITY_GROUP, [events.AFTER_DELETE])
def _clean_logs_by_resource_id(self, resource, event, trigger, payload):
def _clean_logs_by_resource_id(self, resource, event, trigger, **kwargs):
# log.resource_id == SG
self._clean_logs(payload.context.elevated(), sg_id=payload.resource_id)
context = kwargs['context']
sg_id = kwargs['security_group_id']
self._clean_logs(context.elevated(), sg_id=sg_id)
@registry.receives(resources.PORT, [events.AFTER_DELETE])
def _clean_logs_by_target_id(self, resource, event, trigger, **kwargs):

Loading…
Cancel
Save