From 4597fbde6ac64e70ed1073ecdfd275f39fd097c1 Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Wed, 31 Jul 2024 14:40:40 +0100
Subject: [PATCH] Updated template for ip_prefix_list

Fixed template to include multiple instances in apply-path configuration
section (for BGP prefix list).
---
 .../base_config/templates/routers/nokia/ip_prefix_list.j2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2 b/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2
index 71dbe227..2322d770 100644
--- a/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2
+++ b/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2
@@ -34,14 +34,14 @@
                 <description>{{ ip_prefix.description }}</description>
                 {% endif %}
                 <apply-path>
+                  {% for ap in ip_prefix.ipv4_apply_path %}
                   <bgp-peers>
-                    {% for ap in ip_prefix.ipv4_apply_path %}
                     <criterion-index>{{ ap.idx }}</criterion-index>
                     <group>{{ ap.bgp_group }}</group>
                     <neighbor>{{ ap.bgp_neighbor }}</neighbor>
                     <router-instance>{{ ap.router_instance }}</router-instance>
-                    {% endfor %}
                   </bgp-peers>
+                  {% endfor %}
                 </apply-path>
             </ip-prefix-list>
           {% endif %}
@@ -52,14 +52,14 @@
                 <description>{{ ip_prefix.description }}</description>
                 {% endif %}
                 <apply-path>
+                  {% for ap in ip_prefix.ipv6_apply_path %}
                   <bgp-peers>
-                    {% for ap in ip_prefix.ipv6_apply_path %}
                     <criterion-index>{{ ap.idx }}</criterion-index>
                     <group>{{ ap.bgp_group }}</group>
                     <neighbor>{{ ap.bgp_neighbor }}</neighbor>
                     <router-instance>{{ ap.router_instance }}</router-instance>
-                    {% endfor %}
                   </bgp-peers>
+                  {% endfor %}
                 </apply-path>
             </ipv6-prefix-list>
           {% endif %}
-- 
GitLab