summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2020-02-23 16:08:48 -0800
committerhagbard <vyosdev@derith.de>2020-02-23 16:08:48 -0800
commitd9fa3fb7d7613cd5d6297115da0dc63462d4cf69 (patch)
treee7cc4b9da687577ee6bf9bcc42af4ae0006dc28d
parentcd2147cfa2dc3202fa044b17592a6ddb28275daa (diff)
downloadvyos-1x-d9fa3fb7d7613cd5d6297115da0dc63462d4cf69.tar.gz
vyos-1x-d9fa3fb7d7613cd5d6297115da0dc63462d4cf69.zip
service-pppoe: T2067: Allow setting multiple service-names
-rw-r--r--interface-definitions/service-pppoe.xml.in1
-rwxr-xr-xsrc/conf_mode/service-pppoe.py9
2 files changed, 6 insertions, 4 deletions
diff --git a/interface-definitions/service-pppoe.xml.in b/interface-definitions/service-pppoe.xml.in
index 7f93a6e2f..b4950ede1 100644
--- a/interface-definitions/service-pppoe.xml.in
+++ b/interface-definitions/service-pppoe.xml.in
@@ -436,6 +436,7 @@
<regex>[a-zA-Z0-9\-]{1,100}</regex>
</constraint>
<constraintErrorMessage>servicename can contain aplhanumerical characters and dashes only (max. 100)</constraintErrorMessage>
+ <multi/>
</properties>
</leafNode>
<node name="wins-servers">
diff --git a/src/conf_mode/service-pppoe.py b/src/conf_mode/service-pppoe.py
index 4090cb953..22250d18b 100755
--- a/src/conf_mode/service-pppoe.py
+++ b/src/conf_mode/service-pppoe.py
@@ -234,7 +234,6 @@ ipv6-peer-intf-id={{ppp_options['ipv6-peer-intf-id']}}
ipv6-accept-peer-intf-id={{ppp_options['ipv6-accept-peer-intf-id']}}
{% endif %}
{% endif %}
-
mtu={{mtu}}
[pppoe]
@@ -251,9 +250,11 @@ interface=re:{{int}}\.\d+
{% endif %}
{% endfor -%}
{% endif -%}
+
{% if svc_name %}
-service-name={{svc_name}}
+service-name={{svc_name|join(',')}}
{% endif -%}
+
{% if pado_delay %}
pado-delay={{pado_delay}}
{% endif %}
@@ -343,7 +344,7 @@ def get_config():
'client_ipv6_pool': {},
'interface': {},
'ppp_gw': '',
- 'svc_name': '',
+ 'svc_name': [],
'dns': [],
'dnsv6': [],
'wins': [],
@@ -360,7 +361,7 @@ def get_config():
if c.exists(['access-concentrator']):
config_data['concentrator'] = c.return_value(['access-concentrator'])
if c.exists(['service-name']):
- config_data['svc_name'] = c.return_value(['service-name'])
+ config_data['svc_name'] = c.return_values(['service-name'])
if c.exists(['interface']):
for intfc in c.list_nodes(['interface']):
config_data['interface'][intfc] = {'vlans': []}