Merge "NSX|V3: address edge case of subnet deletion when attached to router"
This commit is contained in:
commit
f036f5a988
|
@ -1533,6 +1533,9 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||
def delete_subnet(self, context, subnet_id):
|
||||
# TODO(berlin): cancel public external subnet announcement
|
||||
if cfg.CONF.nsx_v3.native_dhcp_metadata:
|
||||
# Ensure that subnet is not deleted if attached to router.
|
||||
self._subnet_check_ip_allocations_internal_router_ports(
|
||||
context, subnet_id)
|
||||
subnet = self.get_subnet(context, subnet_id)
|
||||
if subnet['enable_dhcp']:
|
||||
lock = 'nsxv3_network_' + subnet['network_id']
|
||||
|
|
Loading…
Reference in New Issue