summaryrefslogtreecommitdiff
path: root/data/templates/frr/bfd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-14 14:23:25 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-15 18:21:16 +0100
commit3a32c507134c4599f343dda54ccf4e80ea62def4 (patch)
treea10c535bdc13bd2ea84b7ae7f66bf378c1e7e1fc /data/templates/frr/bfd.frr.tmpl
parent82bdae42ceefb1132f8a98628fa9681543f4f269 (diff)
downloadvyos-1x-3a32c507134c4599f343dda54ccf4e80ea62def4.tar.gz
vyos-1x-3a32c507134c4599f343dda54ccf4e80ea62def4.zip
bfd: T3310: migrate to get_config_dict() and FRR reload
Diffstat (limited to 'data/templates/frr/bfd.frr.tmpl')
-rw-r--r--data/templates/frr/bfd.frr.tmpl37
1 files changed, 19 insertions, 18 deletions
diff --git a/data/templates/frr/bfd.frr.tmpl b/data/templates/frr/bfd.frr.tmpl
index 9e5ad3379..921d9b0bc 100644
--- a/data/templates/frr/bfd.frr.tmpl
+++ b/data/templates/frr/bfd.frr.tmpl
@@ -1,22 +1,23 @@
!
bfd
-{% for peer in old_peers %}
- no peer {{ peer.remote }}{% if peer.multihop %} multihop{% endif %}{% if peer.src_addr %} local-address {{ peer.src_addr }}{% endif %}{% if peer.src_if %} interface {{ peer.src_if }}{% endif %}
-
-{% endfor %}
-!
-{% for peer in new_peers %}
- peer {{ peer.remote }}{% if peer.multihop %} multihop{% endif %}{% if peer.src_addr %} local-address {{ peer.src_addr }}{% endif %}{% if peer.src_if %} interface {{ peer.src_if }}{% endif %}
-
- detect-multiplier {{ peer.multiplier }}
- receive-interval {{ peer.rx_interval }}
- transmit-interval {{ peer.tx_interval }}
-{% if peer.echo_mode %}
- echo-mode
-{% endif %}
-{% if peer.echo_interval != '' %}
- echo-interval {{ peer.echo_interval }}
+{% if peer is defined and peer is not none %}
+{% for peer_name, peer_config in peer.items() %}
+ peer {{ peer_name }}{{ ' multihop' if peer_config.multihop is defined }}{{ ' local-address ' + peer_config.source.address if peer_config.source is defined and peer_config.source.address is defined }}{{ ' interface ' + peer_config.source.interface if peer_config.source is defined and peer_config.source.interface is defined }}
+ detect-multiplier {{ peer_config.interval.multiplier }}
+ receive-interval {{ peer_config.interval.receive }}
+ transmit-interval {{ peer_config.interval.transmit }}
+{% if peer_config.interval.echo_interval is defined and peer_config.interval.echo_interval is not none %}
+ echo-interval {{ peer_config.interval.echo_interval }}
+{% endif %}
+{% if peer_config.echo_mode is defined %}
+ echo-mode
+{% endif %}
+{% if peer_config.shutdown is defined %}
+ shutdown
+{% else %}
+ no shutdown
+{% endif %}
+ !
+{% endfor %}
{% endif %}
- {% if not peer.shutdown %}no {% endif %}shutdown
-{% endfor %}
!