NSX: Restrict enable-dhcp on update external subnet
Adding restriction for enabling dhcp on updating external subnet Change-Id: I4ae085eaac5461c637edb43888e615cf7bc97ccb Signed-off-by: Michal Kelner Mishali <mkelnermishal@vmware.com>
This commit is contained in:
parent
d753ec6945
commit
c567af4497
|
@ -2179,6 +2179,7 @@ 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'],
|
||||
|
|
|
@ -3015,6 +3015,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||
gateway_ip = orig['gateway_ip']
|
||||
enable_dhcp = orig['enable_dhcp']
|
||||
orig_host_routes = orig['routes']
|
||||
self._validate_external_subnet(context, orig['network_id'])
|
||||
self._validate_host_routes_input(subnet,
|
||||
orig_enable_dhcp=enable_dhcp,
|
||||
orig_host_routes=orig_host_routes)
|
||||
|
|
Loading…
Reference in New Issue