-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor default route and route redistribution templates (FRR, CL, E…
…OS, IOS)
- Loading branch information
Showing
25 changed files
with
95 additions
and
116 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
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
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
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
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
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
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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% macro policy(sp_data,af) -%} | ||
{% if 'policy' in sp_data %} route-map {{ sp_data.policy }}-{{ af }}{% endif +%} | ||
{%- endmacro %} | ||
{% macro config(pdata,af='ipv4',vrf=False) -%} | ||
{% if pdata.import is defined %} | ||
{% for s_proto,s_data in pdata.import.items() %} | ||
{% if s_proto == 'ospf' and af == 'ipv6' %} | ||
{% set s_proto = 'ospfv3' %} | ||
{% endif %} | ||
redistribute {{ s_proto }}{% if vrf %} include leaked{% endif %}{{ policy(s_data,af) }} | ||
{% endfor %} | ||
{% endif %} | ||
{%- endmacro %} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% macro policy(sp_data,af) -%} | ||
{% if 'policy' in sp_data %} route-map {{ sp_data.policy }}-{{ af }}{% endif +%} | ||
{%- endmacro %} | ||
{% macro config(pdata,af) -%} | ||
{% if pdata.import is defined %} | ||
{% for s_proto,s_data in pdata.import.items() %} | ||
{% if s_proto == 'ospf' and af == 'ipv6' %} | ||
{% set s_proto = 'ospf6' %} | ||
{% endif %} | ||
redistribute {{ s_proto }}{{ policy(s_data,af) }} | ||
{% endfor %} | ||
{% endif %} | ||
{%- endmacro %} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% macro policy(sp_data,af) -%} | ||
{% if 'policy' in sp_data %} route-map {{ sp_data.policy }}-{{ af }}{% endif +%} | ||
{%- endmacro %} | ||
{% macro config(pdata,af='ipv4',t_proto='',ospf_pid=1) -%} | ||
{% if pdata.import is defined %} | ||
{% set r_append = ' subnets' if t_proto == 'ospf' else '' %} | ||
{% for s_proto,s_data in pdata.import.items() %} | ||
{% if s_proto == 'bgp' %} | ||
{% set s_proto = s_proto + ' ' + bgp.as|string %} | ||
{% endif %} | ||
{% if s_proto == 'ospf' %} | ||
{% set s_proto = s_proto + ' ' + ospf_pid|string + ' match internal external' %} | ||
{% endif %} | ||
redistribute {{ s_proto }}{{ policy(s_data,af) }} | ||
{% endfor %} | ||
{% endif %} | ||
{%- endmacro %} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.