Browse Source

NSX|V3+P: Allow external subnet updates

It is forbidden to enable dhcp on an external subnet, but other
updates should be allowed.

Change-Id: I9f1f77cbcba7e02e1ed1b76eb29de308b145f944
changes/17/700617/1
asarfaty 1 month ago
parent
commit
1e19e85693
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      vmware_nsx/plugins/common_v3/plugin.py

+ 2
- 1
vmware_nsx/plugins/common_v3/plugin.py View File

@@ -2332,7 +2332,6 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
updated_subnet = None
orig_subnet = self.get_subnet(context, subnet_id)
self._validate_number_of_subnet_static_routes(subnet)
self._validate_external_subnet(context, orig_subnet['network_id'])
self._validate_host_routes_input(
subnet,
orig_enable_dhcp=orig_subnet['enable_dhcp'],
@@ -2350,6 +2349,8 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
orig_enable_dhcp = self._subnet_with_native_dhcp(orig_subnet)
if enable_dhcp != orig_enable_dhcp:
self._ensure_native_dhcp()
self._validate_external_subnet(
context, orig_subnet['network_id'])
lock = 'nsxv3_network_' + orig_subnet['network_id']
with locking.LockManager.get_lock(lock):
if enable_dhcp:

Loading…
Cancel
Save