summaryrefslogtreecommitdiff
path: root/data/templates/frr/ospfd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-29 12:08:22 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-29 12:08:22 +0200
commit40bfaed4d1d427c33157136026944df80e02a5b6 (patch)
treedffae855d355f5d8fe9139c686500739aa303a9e /data/templates/frr/ospfd.frr.tmpl
parent33ccbfdd0b367a2416c3a8b41a73d7477123d276 (diff)
downloadvyos-1x-40bfaed4d1d427c33157136026944df80e02a5b6.tar.gz
vyos-1x-40bfaed4d1d427c33157136026944df80e02a5b6.zip
ospf: T3236: add possibility to redistribute "table"
Add new CLI command: * "set protocols ospf redistribute table <n>"
Diffstat (limited to 'data/templates/frr/ospfd.frr.tmpl')
-rw-r--r--data/templates/frr/ospfd.frr.tmpl10
1 files changed, 8 insertions, 2 deletions
diff --git a/data/templates/frr/ospfd.frr.tmpl b/data/templates/frr/ospfd.frr.tmpl
index be39519c3..90a6bbd56 100644
--- a/data/templates/frr/ospfd.frr.tmpl
+++ b/data/templates/frr/ospfd.frr.tmpl
@@ -172,8 +172,14 @@ router ospf {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% endfor %}
{% endif %}
{% if redistribute is defined and redistribute is not none %}
-{% for protocol, options in redistribute.items() %}
- redistribute {{ protocol }} {{ 'metric ' + options.metric if options.metric is defined }} {{ 'metric-type ' + options.metric_type if options.metric_type is defined }} {{ 'route-map ' + options.route_map if options.route_map is defined }}
+{% for protocol, protocols_options in redistribute.items() %}
+{% if protocol == 'table' %}
+{% for table, table_options in protocols_options.items() %}
+ redistribute {{ protocol }} {{ table }} {{ 'metric ' + table_options.metric if table_options.metric is defined }} {{ 'metric-type ' + table_options.metric_type if table_options.metric_type is defined }} {{ 'route-map ' + table_options.route_map if table_options.route_map is defined }}
+{% endfor %}
+{% else %}
+ redistribute {{ protocol }} {{ 'metric ' + protocols_options.metric if protocols_options.metric is defined }} {{ 'metric-type ' + protocols_options.metric_type if protocols_options.metric_type is defined }} {{ 'route-map ' + protocols_options.route_map if protocols_options.route_map is defined }}
+{% endif %}
{% endfor %}
{% endif %}
{% if refresh is defined and refresh.timers is defined and refresh.timers is not none %}