Use payload for PORT PRECOMMIT_DELETE event

Since [0] was merged PORT PRECOMMIT_DELETE event callback uses payload
argument instead of kwargs.

[0] https://review.opendev.org/c/openstack/neutron/+/800604

Change-Id: Ieeba5c996f06294df33581f08510bc8809ec5098
This commit is contained in:
elajkat 2021-08-04 08:51:13 +02:00
parent 33c25b513b
commit e71a3bc751

View File

@ -194,8 +194,9 @@ class TaasPlugin(taas_db.Taas_db_Mixin):
"tap_flow: %s", id)
@registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])
def handle_delete_port(self, resource, event, trigger, context, **kwargs):
deleted_port = kwargs['port']
def handle_delete_port(self, resource, event, trigger, payload):
context = payload.context
deleted_port = payload.latest_state
if not deleted_port:
LOG.error("TaaS: Handle Delete Port: Invalid port object received")
return