summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_pim.py
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-04 20:51:22 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-04 20:51:22 +0000
commitfbdfd7a2f03205d69ebe53e927f378850f832a20 (patch)
treec4aa9302e628a4381c5e3021a8d2aa993133b542 /src/conf_mode/protocols_pim.py
parent3e7fe69a6b03b053098171411e286ba515838842 (diff)
downloadvyos-1x-fbdfd7a2f03205d69ebe53e927f378850f832a20.tar.gz
vyos-1x-fbdfd7a2f03205d69ebe53e927f378850f832a20.zip
pim: T1729: Add dr-priority and IGMP join support
Diffstat (limited to 'src/conf_mode/protocols_pim.py')
-rwxr-xr-xsrc/conf_mode/protocols_pim.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/conf_mode/protocols_pim.py b/src/conf_mode/protocols_pim.py
index dc65a59a6..f4c365923 100755
--- a/src/conf_mode/protocols_pim.py
+++ b/src/conf_mode/protocols_pim.py
@@ -45,10 +45,13 @@ no ip pim
{% endfor -%}
{% for iface in pim.ifaces -%}
interface {{ iface }}
+ip pim
+{% if pim.ifaces[iface].dr_prio -%}
+ip pim drpriority {{ pim.ifaces[iface].dr_prio }}
+{% endif -%}
{% if pim.ifaces[iface].hello -%}
ip pim hello {{ pim.ifaces[iface].hello }}
{% endif -%}
-ip pim
!
{% endfor -%}
{% for rp_addr in pim.rp -%}
@@ -87,14 +90,16 @@ def get_config():
for iface in conf.list_effective_nodes('interface'):
pim_conf['old_pim']['ifaces'].update({
iface : {
- 'hello' : conf.return_effective_value('interface {0} hello'.format(iface))
+ 'hello' : conf.return_effective_value('interface {0} hello'.format(iface)),
+ 'dr_prio' : conf.return_effective_value('interface {0} dr-priority'.format(iface))
}
})
for iface in conf.list_nodes('interface'):
pim_conf['pim']['ifaces'].update({
iface : {
- 'hello' : conf.return_value('interface {0} hello'.format(iface))
+ 'hello' : conf.return_value('interface {0} hello'.format(iface)),
+ 'dr_prio' : conf.return_value('interface {0} dr-priority'.format(iface)),
}
})