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
This commit is contained in:
Boden R 2019-01-14 13:49:43 -07:00 committed by Adit Sarfaty
parent 98d9ae53b3
commit 74474b8fc3
1 changed files with 3 additions and 3 deletions

View File

@ -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)