diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-21 10:13:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-21 10:13:06 +0100 |
commit | 36d0196a9554fb36fafc541510ca057849c25fd7 (patch) | |
tree | 79fbff531628ad1f25688db6eb58f1c24778cf6e | |
parent | a3e64141cb4db8beae72a92d4c600b48b4f6515d (diff) | |
parent | 58a15d3460ba4ba1e3494d9bcb2996cd9ce8d74e (diff) | |
download | vyos-1x-36d0196a9554fb36fafc541510ca057849c25fd7.tar.gz vyos-1x-36d0196a9554fb36fafc541510ca057849c25fd7.zip |
Merge pull request #2864 from c-po/dhcp-deprecation-T3316
dhcp: T3316: add deprecation warning on RAW ISC DHCPD options
-rw-r--r-- | interface-definitions/service_dhcpv6-server.xml.in | 2 | ||||
-rwxr-xr-x | src/conf_mode/service_dhcp-server.py | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/interface-definitions/service_dhcpv6-server.xml.in b/interface-definitions/service_dhcpv6-server.xml.in index b838f42e0..a64da83ae 100644 --- a/interface-definitions/service_dhcpv6-server.xml.in +++ b/interface-definitions/service_dhcpv6-server.xml.in @@ -11,7 +11,7 @@ #include <include/generic-disable-node.xml.i> <node name="global-parameters"> <properties> - <help>Additional global parameters for DHCPv6 server</help> + <help>Global options sent to all clients</help> </properties> <children> #include <include/name-server-ipv6.xml.i> diff --git a/src/conf_mode/service_dhcp-server.py b/src/conf_mode/service_dhcp-server.py index 6eed2129b..341b31dd7 100755 --- a/src/conf_mode/service_dhcp-server.py +++ b/src/conf_mode/service_dhcp-server.py @@ -22,6 +22,7 @@ from netaddr import IPAddress from netaddr import IPRange from sys import exit +from vyos.base import DeprecationWarning from vyos.config import Config from vyos.template import render from vyos.utils.dict import dict_search @@ -149,9 +150,15 @@ def verify(dhcp): shared_networks = len(dhcp['shared_network_name']) disabled_shared_networks = 0 + common_deprecation_msg = 'are subject of removal in VyOS 1.5! Please raise a feature request for proper CLI nodes!' + if 'global_parameters' in dhcp: + DeprecationWarning(f'Additional global parameters {common_deprecation_msg}') # A shared-network requires a subnet definition for network, network_config in dhcp['shared_network_name'].items(): + if 'shared_network_parameters' in network_config: + DeprecationWarning(f'Additional shared network parameters in "{network}" {common_deprecation_msg}') + if 'disable' in network_config: disabled_shared_networks += 1 @@ -160,6 +167,9 @@ def verify(dhcp): 'lease subnet must be configured.') for subnet, subnet_config in network_config['subnet'].items(): + if 'subnet_parameters' in subnet_config: + DeprecationWarning(f'Additional subnet parameters in "{subnet}" {common_deprecation_msg}') + # All delivered static routes require a next-hop to be set if 'static_route' in subnet_config: for route, route_option in subnet_config['static_route'].items(): |