in neutron.db.db_base_plugin_v2,
def update_subnetpool(self, context, id, subnetpool):
....
if address_scope_changed:
# Notify about the update of subnetpool's address scope
kwargs = {'context': context, 'subnetpool_id': id}
registry.notify(resources.SUBNETPOOL_ADDRESS_SCOPE,
events.AFTER_UPDATE,
self.update_subnetpool,
**kwargs)
This kwargs ONLY includes subnetpool_id, in some cases, we want to know the subnetpool old address scope id.
Here is the use case,
To develop bgp vpn in neutron-dynamic-routing, each bgpvpn is associated to address scope, bgpvpn routes only include the subnets of same address scope.
If the subnetpool change its address scope, for some bgpvpnvs associated to old address scope, it should delete the routes; for some bgpvpns associated to new address scope, it should add new routes.
If this event does not include old address_scope_id, bgpvpn can not delete old routes.
Fix proposed to branch: master /review. openstack. org/337662
Review: https:/