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:
parent
33c25b513b
commit
e71a3bc751
@ -194,8 +194,9 @@ class TaasPlugin(taas_db.Taas_db_Mixin):
|
|||||||
"tap_flow: %s", id)
|
"tap_flow: %s", id)
|
||||||
|
|
||||||
@registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])
|
@registry.receives(resources.PORT, [events.PRECOMMIT_DELETE])
|
||||||
def handle_delete_port(self, resource, event, trigger, context, **kwargs):
|
def handle_delete_port(self, resource, event, trigger, payload):
|
||||||
deleted_port = kwargs['port']
|
context = payload.context
|
||||||
|
deleted_port = payload.latest_state
|
||||||
if not deleted_port:
|
if not deleted_port:
|
||||||
LOG.error("TaaS: Handle Delete Port: Invalid port object received")
|
LOG.error("TaaS: Handle Delete Port: Invalid port object received")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user