-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(junos): trying to clean route-map still being used
Before this commit, we were always deleting autogenerated route-map for all SAFIs. The purpose of the deletion is to start from a clean slate when recreating a route-map (to avoid extra terms/options in the route-map). The goal is not to remove extra policies, which must be done in a dedicated step. The issue is that we push routing_policy update before BGP. So we should never remove a policy which is still in use (this is why the cleaning must be done in a dedicated step). So this commit aims to only delete policy which will be recreated.
- Loading branch information
1 parent
685b6ec
commit ee68f78
Showing
4 changed files
with
109 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 2 additions & 10 deletions
12
states/afk/templates/routing_policy/junos/remove_policy.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
{% set AFISAFIS = [ | ||
"", | ||
"IPV4_UNICAST", | ||
"IPV6_UNICAST", | ||
"L2VPN_EVPN" | ||
] | ||
%} | ||
|
||
{% for afisafi in AFISAFIS %} | ||
{% set auto_gen_rm_name = convert_route_map_name(route_map_name, afisafi) %} | ||
{# Explicitly remove all route policies on the AFI/SAFIS we use #} | ||
{% for afisafi in afisafis %} | ||
{% set auto_gen_rm_name = convert_route_map_name(route_map_name, afisafi) %} | ||
delete policy-options policy-statement {{ auto_gen_rm_name }} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters