use payloads for SUBNET BEFORE_DELETE events
This patch switches over to the payload style of callbacks for the BEFORE_DELETE events of SUBNET resources in prep for the depends on patch listed below. Change-Id: Ia4a3f8074d9c2e879ead97957b2f962ddd0a161f Depends-On: https://review.openstack.org/#/c/597561/
This commit is contained in:
parent
7434a1e5eb
commit
6612506950
@ -727,10 +727,10 @@ def migration_callback(resource, event, trigger, **kwargs):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def subnet_callback(resource, event, trigger, **kwargs):
|
def subnet_callback(resource, event, trigger, payload=None):
|
||||||
"""Respond to subnet based notifications - see if subnet in use."""
|
"""Respond to subnet based notifications - see if subnet in use."""
|
||||||
context = kwargs['context']
|
context = payload.context
|
||||||
subnet_id = kwargs['subnet_id']
|
subnet_id = payload.resource_id
|
||||||
vpn_plugin = directory.get_plugin(p_constants.VPN)
|
vpn_plugin = directory.get_plugin(p_constants.VPN)
|
||||||
if vpn_plugin:
|
if vpn_plugin:
|
||||||
vpn_plugin.check_subnet_in_use_by_endpoint_group(context, subnet_id)
|
vpn_plugin.check_subnet_in_use_by_endpoint_group(context, subnet_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user