neutron/neutron/services/logapi
Rodolfo Alonso Hernandez 7df245ee5b 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

Conflicts:
    neutron/tests/unit/services/logapi/test_logging_plugin.py

Change-Id: Icb92327a06486e168ce064532d819347e6031cc1
(cherry picked from commit 41f78c678b)
(cherry picked from commit 2c4ab468ae)
(cherry picked from commit d5fd9f035a)
(cherry picked from commit 7790cecfc8)
(cherry picked from commit 226367eed1)
2021-10-25 15:38:13 +02:00
..
agent remove neutron.common.rpc 2019-02-06 11:05:55 -07:00
common Delete log entries when SG or port is deleted 2021-10-25 15:38:13 +02:00
drivers use logapi constants from neutron-lib 2019-05-22 14:49:21 -06:00
rpc use logapi constants from neutron-lib 2019-05-22 14:49:21 -06:00
__init__.py [log]: db models and migration rules 2017-06-13 08:52:12 +07:00
logging_plugin.py Delete log entries when SG or port is deleted 2021-10-25 15:38:13 +02:00