summaryrefslogtreecommitdiff
path: root/python/vyos/template.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2024-01-13 00:28:01 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2024-01-13 02:37:30 +0100
commit45d472c8782f927980044eaba0d49421e91fc0c8 (patch)
tree0d532f2fbc3218ac9be69f7146270e73a5172b87 /python/vyos/template.py
parentbc3cf0a0a18ad70448322f90bdb6bf8292b59ccf (diff)
downloadvyos-1x-45d472c8782f927980044eaba0d49421e91fc0c8.tar.gz
vyos-1x-45d472c8782f927980044eaba0d49421e91fc0c8.zip
dhcpv6: T3316: Move options to separate node and extend scopes
* Also migrate `address-range` to `range` tag node for consistency with dhcpv4 server syntax
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r--python/vyos/template.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 1368f1f61..456239568 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -894,7 +894,9 @@ def kea6_shared_network_json(shared_networks):
'name': name,
'subnet6': []
}
- options = kea6_parse_options(config)
+
+ if 'common_options' in config:
+ network['option-data'] = kea6_parse_options(config['common_options'])
if 'interface' in config:
network['interface'] = config['interface']
@@ -903,9 +905,6 @@ def kea6_shared_network_json(shared_networks):
for subnet, subnet_config in config['subnet'].items():
network['subnet6'].append(kea6_parse_subnet(subnet, subnet_config))
- if options:
- network['option-data'] = options
-
out.append(network)
return dumps(out, indent=4)