diff options
author | sever-sever <v.gletenko@vyos.io> | 2021-02-27 15:06:58 +0000 |
---|---|---|
committer | sever-sever <v.gletenko@vyos.io> | 2021-02-28 14:40:38 +0000 |
commit | cf93fec3b38ac3df5d2e77dc1ae8c37bb6971d83 (patch) | |
tree | cc253bd57d150528e2c1ca4afe3a4b054548fcfd /data/templates/accel-ppp/pppoe.config.tmpl | |
parent | 46af54fe7545913226585230dfffd7e722280d81 (diff) | |
download | vyos-1x-cf93fec3b38ac3df5d2e77dc1ae8c37bb6971d83.tar.gz vyos-1x-cf93fec3b38ac3df5d2e77dc1ae8c37bb6971d83.zip |
pppoe: T3353: Modify template for vlan-mon and interface
Diffstat (limited to 'data/templates/accel-ppp/pppoe.config.tmpl')
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.tmpl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl index 3dfb615da..9d5d58bec 100644 --- a/data/templates/accel-ppp/pppoe.config.tmpl +++ b/data/templates/accel-ppp/pppoe.config.tmpl @@ -96,12 +96,22 @@ mtu={{ mtu }} verbose=1 ac-name={{ access_concentrator }} -{% if interface %} -{% for iface in interface %} +{% if interface is defined and interface is not none %} +{% for iface, iface_config in interface.items() %} +{% if iface_config.vlan_id is not defined and iface_config.vlan_range is not defined %} interface={{ iface }} -{% if interface[iface].vlan_id is defined or interface[iface].vlan_range is defined %} -vlan-mon={{ iface }},{{ interface[iface].vlan_id | join(',') }},{{ interface[iface].vlan_range | join(',') }} -interface=re:{{ interface.name }}\.\d+ +{% endif %} +{% if iface_config.vlan_id is defined and iface_config.vlan_range is not defined %} +vlan-mon={{ iface }},{{ iface_config.vlan_id | join(',') }} +interface=re:{{ iface | replace('.', '\\.') }}\.\d+ +{% endif %} +{% if iface_config.vlan_range is defined and iface_config.vlan_id is not defined %} +vlan-mon={{ iface }},{{ iface_config.vlan_range | join(',') }} +interface=re:{{ iface | replace('.', '\\.') }}\.\d+ +{% endif %} +{% if iface_config.vlan_id is defined and iface_config.vlan_range is defined %} +vlan-mon={{ iface }},{{ iface_config.vlan_id | join(',') }},{{ iface_config.vlan_range | join(',') }} +interface=re:{{ iface | replace('.', '\\.') }}\.\d+ {% endif %} {% endfor %} {% endif %} |