summaryrefslogtreecommitdiff
path: root/data/templates/frr/bfd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-15 20:16:02 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-15 20:16:02 +0100
commit3d3d09d6e5d7350b09709447ed4d7a7790e09b81 (patch)
treec08e2227b4ffebfa81f2070b46c4d241f52c64cb /data/templates/frr/bfd.frr.tmpl
parent3a32c507134c4599f343dda54ccf4e80ea62def4 (diff)
downloadvyos-1x-3d3d09d6e5d7350b09709447ed4d7a7790e09b81.tar.gz
vyos-1x-3d3d09d6e5d7350b09709447ed4d7a7790e09b81.zip
bfd: T3310: implement peer profile support
Diffstat (limited to 'data/templates/frr/bfd.frr.tmpl')
-rw-r--r--data/templates/frr/bfd.frr.tmpl29
1 files changed, 25 insertions, 4 deletions
diff --git a/data/templates/frr/bfd.frr.tmpl b/data/templates/frr/bfd.frr.tmpl
index 921d9b0bc..3b3d13f9d 100644
--- a/data/templates/frr/bfd.frr.tmpl
+++ b/data/templates/frr/bfd.frr.tmpl
@@ -1,15 +1,35 @@
!
bfd
+{% if profile is defined and profile is not none %}
+{% for profile_name, profile_config in profile.items() %}
+ profile {{ profile_name }}
+ detect-multiplier {{ profile_config.interval.multiplier }}
+ receive-interval {{ profile_config.interval.receive }}
+ transmit-interval {{ profile_config.interval.transmit }}
+{% if profile_config.interval['echo-interval'] is defined and profile_config.interval['echo-interval'] is not none %}
+ echo-interval {{ profile_config.interval['echo-interval'] }}
+{% endif %}
+{% if profile_config['echo-mode'] is defined %}
+ echo-mode
+{% endif %}
+{% if profile_config.shutdown is defined %}
+ shutdown
+{% else %}
+ no shutdown
+{% endif %}
+ exit
+{% endfor %}
+{% endif %}
{% 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 }}
+{% 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 %}
+{% if peer_config['echo-mode'] is defined %}
echo-mode
{% endif %}
{% if peer_config.shutdown is defined %}
@@ -17,7 +37,8 @@ bfd
{% else %}
no shutdown
{% endif %}
- !
+ exit
{% endfor %}
{% endif %}
+ exit
!