-
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.
IS-IS route import (Cumulus Linux, EOS, FRR, IOS) (#1305)
- Loading branch information
Showing
22 changed files
with
240 additions
and
263 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
{% 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) -%} | ||
{% macro config(pdata,af='ipv4',vrf=False,ospf_match=[]) -%} | ||
{% 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' %} | ||
{% set sp_config = 'ospfv3' if s_proto == 'ospf' and af == 'ipv6' else s_proto %} | ||
{% if s_proto == 'isis' %} | ||
{% set sp_config = sp_config + ' level-1-2' %} | ||
{% endif %} | ||
{% if vrf %} | ||
{% set sp_config = sp_config + ' include leaked' %} | ||
{% endif %} | ||
{% if s_proto == 'ospf' and ospf_match %} | ||
{% for osm in ospf_match %} | ||
redistribute {{ sp_config }} match {{ osm }}{{ policy(s_data,af) }} | ||
{% endfor %} | ||
{% else %} | ||
redistribute {{ sp_config }}{{ policy(s_data,af) }} | ||
{% 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
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
Oops, something went wrong.