Skip to content
Snippets Groups Projects
Commit c22470e2 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

BGP neighbor template update

Added for the use-case of Kentik:
- support for the `hold-time`
- support for the auth_key
- support for the `cluster-id`
parent 50d36265
No related branches found
No related tags found
1 merge request!165BGP neighbor template update
Pipeline #88842 passed
...@@ -3,27 +3,44 @@ ...@@ -3,27 +3,44 @@
<ip-address>{{ neighbor.ip }}</ip-address> <ip-address>{{ neighbor.ip }}</ip-address>
<description>{{ neighbor.description }}</description> <description>{{ neighbor.description }}</description>
<group>{{ neighbor.group }}</group> <group>{{ neighbor.group }}</group>
{% if neighbor.families is defined %} {% if neighbor.auth_key is defined %}
<authentication-key>{{ neighbor.auth_key }</authentication-key>
{% endif %}
{% if neighbor.hold_time is defined %}
<hold-time>
<seconds>{{ neighbor.hold_time }}</seconds>
</hold-time>
{% endif %}
{% if neighbor.families is defined %}
<family> <family>
{% for family in neighbor.families %} {% for family in neighbor.families %}
<{{ family }}>true</{{ family }}> <{{ family }}>true</{{ family }}>
{% endfor %} {% endfor %}
</family> </family>
{% endif %} {% endif %}
{% if neighbor.policies.import is defined %} {% if neighbor.policies.import is defined %}
<import> <import>
{% for imp_pol in neighbor.policies.import %} {% for imp_pol in neighbor.policies.import %}
<policy>{{ imp_pol }}</policy> <policy>{{ imp_pol }}</policy>
{% endfor %} {% endfor %}
</import> </import>
{% endif %} {% endif %}
{% if neighbor.policies.export is defined %} {% if neighbor.policies.export is defined %}
<export> <export>
{% for exp_pol in neighbor.policies.export %} {% for exp_pol in neighbor.policies.export %}
<policy>{{ exp_pol }}</policy> <policy>{{ exp_pol }}</policy>
{% endfor %} {% endfor %}
</export> </export>
{% endif %} {% endif %}
{% if neighbor.cluster_id is defined %}
<cluster>
{% if neighbor.cluster_id == 'system' %}
<cluster-id>{{ lo_ipv4_address }}</cluster-id>
{% else %}
<cluster-id>{{ neighbor.cluster_id }}</cluster-id>
{% endif %}
</cluster>
{% endif %}
</neighbor> </neighbor>
{% endfor %} {% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment