summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-25 21:02:35 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-26 17:09:33 +0200
commitd5b58517f88358c686e6c8ea039a7a9a64d6c6ee (patch)
tree416632fd648499c40b8f4b8975c1da568af5401f /python/vyos
parent0cdfa72d5ccd8a2d382164a1ec39865802d1be7c (diff)
downloadvyos-1x-d5b58517f88358c686e6c8ea039a7a9a64d6c6ee.tar.gz
vyos-1x-d5b58517f88358c686e6c8ea039a7a9a64d6c6ee.zip
dhcpv6-pd: pppoe: T2506: restructure CLI
Rename the CLI nodes for prefix delegation from "dhcpv6-options delegate <interface>" to "dhcpv6-options prefix-delegation interface <interface>". The change is required to add the possibility to request for specific prefix sized via the CLI. That option was not possible with the old configuration tree.
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configdict.py4
-rw-r--r--python/vyos/ifconfig/dhcp.py3
-rw-r--r--python/vyos/ifconfig_vlan.py4
3 files changed, 6 insertions, 5 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index eec64e964..6afc78039 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -112,7 +112,7 @@ interface_default_data = {
'dhcp_vendor_class_id': '',
'dhcpv6_prm_only': False,
'dhcpv6_temporary': False,
- 'dhcpv6_pd': [],
+ 'dhcpv6_pd_interfaces': [],
'disable': False,
'disable_link_detect': 1,
'ip_disable_arp_filter': 1,
@@ -248,7 +248,7 @@ def intf_to_dict(conf, default):
if conf.exists(['interface-id']):
pd['if_id'] = conf.return_value(['interface-id'])
- intf['dhcpv6_pd'].append(pd)
+ intf['dhcpv6_pd_interfaces'].append(pd)
# re-set config level
conf.set_level(current_level)
diff --git a/python/vyos/ifconfig/dhcp.py b/python/vyos/ifconfig/dhcp.py
index f8fdeb6a9..a8b9a2a87 100644
--- a/python/vyos/ifconfig/dhcp.py
+++ b/python/vyos/ifconfig/dhcp.py
@@ -86,7 +86,8 @@ class _DHCPv6 (Control):
'ifname': ifname,
'dhcpv6_prm_only': False,
'dhcpv6_temporary': False,
- 'dhcpv6_pd': [],
+ 'dhcpv6_pd_interfaces': [],
+ 'dhcpv6_pd_length': ''
})
self._conf_file = f'/run/dhcp6c/dhcp6c.{ifname}.conf'
diff --git a/python/vyos/ifconfig_vlan.py b/python/vyos/ifconfig_vlan.py
index a53136ebf..ec4d1da42 100644
--- a/python/vyos/ifconfig_vlan.py
+++ b/python/vyos/ifconfig_vlan.py
@@ -87,8 +87,8 @@ def apply_vlan_config(vlan, config):
if config['dhcpv6_temporary']:
vlan.dhcp.v6.options['dhcpv6_temporary'] = True
- if config['dhcpv6_pd']:
- vlan.dhcp.v6.options['dhcpv6_pd'] = config['dhcpv6_pd']
+ if config['dhcpv6_pd_interfaces']:
+ vlan.dhcp.v6.options['dhcpv6_pd_interfaces'] = config['dhcpv6_pd_interfaces']
# update interface description used e.g. within SNMP
vlan.set_alias(config['description'])