neutron/neutron/tests/unit/services/logapi/common
Rodolfo Alonso Hernandez 226367eed1 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)
2021-10-25 15:37:09 +02:00
..
__init__.py [log]: Add validator to logging api 2017-08-08 13:25:40 +07:00
test_db_api.py Delete log entries when SG or port is deleted 2021-10-25 15:37:09 +02:00
test_sg_callback.py Adding resources callback handler 2018-08-01 17:20:04 -05:00
test_sg_validate.py Generic validate_request method for logging 2018-08-01 17:15:46 -05:00
test_snat_validate.py Add a request validator for SNAT logging 2018-10-18 10:43:38 +07:00
test_validators.py Generic validate_request method for logging 2018-08-01 17:15:46 -05:00