Add logging API delete corresponding SG test
This test ensures that log entries configured for specific security
group are deleted after SG is deleted from Neutron.
Related-Bug: #1939558
Change-Id: I93eb8d623945a1fe9b9174523ed8383c9b5f07ed
diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py
index ecdd00a..3c7441a 100644
--- a/neutron_tempest_plugin/api/base.py
+++ b/neutron_tempest_plugin/api/base.py
@@ -1105,12 +1105,13 @@
target_id=None, event='ALL', enabled=True):
"""Wrapper utility that returns a test log object."""
log_args = {'name': name,
- 'description': description,
'resource_type': resource_type,
'resource_id': resource_id,
'target_id': target_id,
'event': event,
'enabled': enabled}
+ if description:
+ log_args['description'] = description
body = cls.admin_client.create_log(**log_args)
log_object = body['log']
cls.log_objects.append(log_object)