Eliminate SUBNET_GATEWAY resource
SUBNET_GATEWAY is not a real resource. It just corresponds to when an attribute of the SUBNET changes. We can just supercede it entirely by having everyone use the SUBNET resource, which solves significantly more use cases. Change-Id: Iae467bacb083888f72b8c9b52a10e4928a3ff6ab Closes-Bug: #1690944
This commit is contained in:
parent
8f2aad8fe1
commit
7b239a928f
neutron
@ -30,5 +30,4 @@ SEGMENT = 'segment'
|
||||
SEGMENT_HOST_MAPPING = 'segment_host_mapping'
|
||||
SUBNET = 'subnet'
|
||||
SUBNETS = 'subnets'
|
||||
SUBNET_GATEWAY = 'subnet_gateway'
|
||||
SUBNETPOOL_ADDRESS_SCOPE = 'subnetpool_address_scope'
|
||||
|
@ -837,14 +837,6 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
||||
if gateway_ip:
|
||||
self.ipam.validate_gw_out_of_pools(gateway_ip, pools)
|
||||
|
||||
if gateway_ip_changed:
|
||||
# Provide pre-update notification not to break plugins that don't
|
||||
# support gateway ip change
|
||||
kwargs = {'context': context, 'subnet_id': id,
|
||||
'network_id': db_subnet.network_id}
|
||||
registry.notify(resources.SUBNET_GATEWAY, events.BEFORE_UPDATE,
|
||||
self, **kwargs)
|
||||
|
||||
kwargs = {'context': context, 'original_subnet': orig,
|
||||
'request': s}
|
||||
registry.notify(resources.SUBNET, events.BEFORE_UPDATE,
|
||||
@ -906,12 +898,6 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
||||
if routers:
|
||||
self.l3_rpc_notifier.routers_updated(context, routers)
|
||||
|
||||
if orig['gateway_ip'] != result['gateway_ip']:
|
||||
kwargs = {'context': context, 'subnet_id': result['id'],
|
||||
'network_id': result['network_id']}
|
||||
registry.notify(resources.SUBNET_GATEWAY, events.AFTER_UPDATE,
|
||||
self, **kwargs)
|
||||
|
||||
kwargs = {'context': context, 'subnet': result,
|
||||
'original_subnet': orig}
|
||||
registry.notify(resources.SUBNET, events.AFTER_UPDATE, self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user