From 50d36265e000596c3cfa4f5cd6d49d8d1b2ec6f1 Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Tue, 27 Aug 2024 19:23:03 +0100
Subject: [PATCH] VPRN - add BGP multipath support

---
 .../templates/routers/nokia/router/vprn.j2    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2
index c6c04964..fa8b9362 100644
--- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2
+++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2
@@ -38,6 +38,28 @@
               {% endfor %}
             </best-path-selection>
             {% endif %}
+            {% if vprn.bgp.multipath is defined %}
+            <multipath>
+              {% if vprn.bgp.multipath.ibgp is defined %}
+                <ibgp>{{ vprn.bgp.multipath.ibgp }}</ibgp>
+              {% endif %}
+              {% if vprn.bgp.multipath.ebgp is defined %}
+                <ebgp>{{ vprn.bgp.multipath.ebgp }}</ebgp>
+              {% endif %}
+              {% if vprn.bgp.multipath.ipv4 is defined %}
+                <family>
+                    <family-type>ipv4</family-type>
+                    <max-paths>{{ vprn.bgp.multipath.ipv4 }}</max-paths>
+                </family>
+              {% endif %}
+              {% if vprn.bgp.multipath.ipv6 is defined %}
+                <family>
+                    <family-type>ipv6</family-type>
+                    <max-paths>{{ vprn.bgp.multipath.ipv6 }}</max-paths>
+                </family>
+              {% endif %}
+            </multipath>
+            {% endif %}
             {% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %}
             {% include 'router/bgp_group.j2' %}
             {% endwith %}
-- 
GitLab