[stable-only] "_clean_logs_by_target_id" to use old notifications
"LoggingPlugin._clean_logs_by_resource_id" method receives PORT,
AFTER_DELETE events, in the old format (not using payloads but
kwargs). New implementation was added in Xena release.
Closes-Bug: #1954666
Change-Id: I736fef3a10bc2887efb26c95e9fc1eea14969ccf
(cherry picked from commit aaa0e99bac
)
This commit is contained in:
parent
f35a0a06e5
commit
c68ce94f01
|
@ -63,10 +63,11 @@ class LoggingPlugin(log_ext.LoggingPluginBase):
|
||||||
self._clean_logs(payload.context.elevated(), sg_id=payload.resource_id)
|
self._clean_logs(payload.context.elevated(), sg_id=payload.resource_id)
|
||||||
|
|
||||||
@registry.receives(resources.PORT, [events.AFTER_DELETE])
|
@registry.receives(resources.PORT, [events.AFTER_DELETE])
|
||||||
def _clean_logs_by_target_id(self, resource, event, trigger, payload):
|
def _clean_logs_by_target_id(self, resource, event, trigger, **kwargs):
|
||||||
# log.target_id == port
|
# log.target_id == port
|
||||||
self._clean_logs(payload.context.elevated(),
|
context = kwargs['context']
|
||||||
port_id=payload.resource_id)
|
port_id = kwargs['port']['id']
|
||||||
|
self._clean_logs(context.elevated(), port_id=port_id)
|
||||||
|
|
||||||
@db_base_plugin_common.filter_fields
|
@db_base_plugin_common.filter_fields
|
||||||
@db_base_plugin_common.convert_result_to_dict
|
@db_base_plugin_common.convert_result_to_dict
|
||||||
|
|
Loading…
Reference in New Issue