NSX|P: Update ports dhcp bindings when enabling subnet dhcp
Change-Id: I07fa28d6c6f9d9ce86084dfb933a913a2fa097b3
This commit is contained in:
parent
b4c3b48d17
commit
f500e331b7
@ -1582,9 +1582,9 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||||||
context, subnet_data, updated_subnet)
|
context, subnet_data, updated_subnet)
|
||||||
|
|
||||||
# Check if needs to update DHCP related NSX resources
|
# Check if needs to update DHCP related NSX resources
|
||||||
# (only if the subnet changed, but dhcp was already enabled)
|
if (enable_dhcp and
|
||||||
if (enable_dhcp and orig_enable_dhcp and
|
(not orig_enable_dhcp or
|
||||||
('dns_nameservers' in subnet_data or
|
'dns_nameservers' in subnet_data or
|
||||||
'gateway_ip' in subnet_data or
|
'gateway_ip' in subnet_data or
|
||||||
'host_routes' in subnet_data)):
|
'host_routes' in subnet_data)):
|
||||||
self._update_nsx_net_dhcp(context, network, net_az, updated_subnet)
|
self._update_nsx_net_dhcp(context, network, net_az, updated_subnet)
|
||||||
|
@ -1257,7 +1257,7 @@ class NsxPTestSubnets(common_v3.NsxV3TestSubnets,
|
|||||||
self._verify_dhcp_service(subnet['subnet']['network_id'],
|
self._verify_dhcp_service(subnet['subnet']['network_id'],
|
||||||
subnet['subnet']['tenant_id'], True)
|
subnet['subnet']['tenant_id'], True)
|
||||||
# verify backend calls
|
# verify backend calls
|
||||||
seg_update.assert_called_once_with(
|
seg_update.assert_called_with(
|
||||||
dhcp_server_config_id=NSX_DHCP_PROFILE_ID,
|
dhcp_server_config_id=NSX_DHCP_PROFILE_ID,
|
||||||
segment_id=subnet['subnet']['network_id'],
|
segment_id=subnet['subnet']['network_id'],
|
||||||
subnets=[mock.ANY])
|
subnets=[mock.ANY])
|
||||||
|
Loading…
Reference in New Issue
Block a user