From 74474b8fc31ca61663c5c69e563dae4e3665db3b Mon Sep 17 00:00:00 2001 From: Boden R Date: Mon, 14 Jan 2019 13:49:43 -0700 Subject: [PATCH] use payloads for all SUBNETPOOL_ADDRESS_SCOPE events This patch switches the code over to the payload style of callbacks [1] for SUBNETPOOL_ADDRESS_SCOPE events. [1] https://docs.openstack.org/neutron-lib/latest/contributor/callbacks.html Depends-On: I9048b2026571694eb39279e3c0fc1d598ee1fd05 Change-Id: I8242a8caf4ddf2469dbb8194efb7d2b8ae59e4d5 --- vmware_nsx/plugins/common/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/plugins/common/plugin.py b/vmware_nsx/plugins/common/plugin.py index 3d803c38c7..e62bd0676a 100644 --- a/vmware_nsx/plugins/common/plugin.py +++ b/vmware_nsx/plugins/common/plugin.py @@ -241,11 +241,11 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2, if subnet['subnetpool_id'] == subnetpool_id] def on_subnetpool_address_scope_updated(self, resource, event, - trigger, **kwargs): - context = kwargs['context'] + trigger, payload=None): + context = payload.context routers = self.get_routers(context) - subnetpool_id = kwargs['subnetpool_id'] + subnetpool_id = payload.resource_id elevated_context = context.elevated() LOG.info("Inspecting routers for potential configuration changes " "due to address scope change on subnetpool %s", subnetpool_id)