neutron/neutron/services/logapi/common
Rodolfo Alonso Hernandez 41f78c678b Delete log entries when SG or port is deleted
NOTE: this patch is an ammend of [1].

When a SG or a port is deleted, the related log entry should be
too. A log entry has the following fields:
- log.resource_id = SG ID
- log.target_id = port ID

[1] was deleting all log entries, related or not with the SG ID
deleted. This is because "get_logs_bound_sg" returned all log entries,
including those ones without any "resource_id" or "target_id".

Now this method can return only the log entries related to a port or
a SG, excluding those ones without those two parameters populated.

Closes-Bug: #1939558

[1]https://review.opendev.org/c/openstack/neutron/+/804237

Change-Id: Icb92327a06486e168ce064532d819347e6031cc1
2021-10-05 16:27:13 +00:00
..
__init__.py [log]: db models and migration rules 2017-06-13 08:52:12 +07:00
db_api.py Delete log entries when SG or port is deleted 2021-10-05 16:27:13 +00:00
exceptions.py Add missing ws seperator between words 2018-11-19 13:57:05 +08:00
sg_callback.py Delete log entries when SG or port is deleted 2021-10-05 16:27:13 +00:00
sg_validate.py use logapi constants from neutron-lib 2019-05-22 14:49:21 -06:00
snat_validate.py use logapi constants from neutron-lib 2019-05-22 14:49:21 -06:00
validators.py Fix flake8 H404 errors 2018-10-05 21:48:41 +00:00