neutron/neutron/tests/unit/services/logapi/common
Rodolfo Alonso Hernandez 7790cecfc8 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
(cherry picked from commit 41f78c678b)
(cherry picked from commit 2c4ab468ae)
(cherry picked from commit d5fd9f035a)
2021-10-25 15:27:22 +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:27:22 +02:00
test_sg_callback.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_sg_validate.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_snat_validate.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_validators.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00