Skip to content

Commit

Permalink
[templates] include IRR for IOS-XR
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed May 21, 2021
1 parent b96dad5 commit 6fe6a0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/host/sk1/edge1/bgp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ peers:
- 192.145.251.168
- 192.145.251.169
authentication: "..."
irr: AS-GOOGLE
2 changes: 2 additions & 0 deletions templates/iosxr/edge-bgp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ end-policy
{% endfor %}
{% endfor %}

{% include "iosxr/irr.j2" %}

{% set asn = lookup("bgp", "local-asn") %}
{% set supernets = lookup("bgp", "supernets") %}
router static
Expand Down
4 changes: 2 additions & 2 deletions templates/iosxr/irr.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{% for name, peer in peers.items() if peer.irr is defined %}
{% set prefix_set_4 = 'PFX-AS{}-IRR-V4'.format(peer.asn | upper) %}
{% set prefix_set_6 = 'PFX-AS{}-IRR-V6'.format(peer.asn | upper) %}
{{ bgpq3(prefix_set_4, "-4 -R 24 -m 24", peer.irr) }}
{{ bgpq3(prefix_set_6, "-6 -R 48 -m 48", peer.irr) }}
{{ bgpq3(prefix_set_4, "-4 -R 24 -m 24", peer.irr) | replace("no prefix-set {}".format(prefix_set_4), "") }}
{{ bgpq3(prefix_set_6, "-6 -R 48 -m 48", peer.irr) | replace("no prefix-set {}".format(prefix_set_6), "") }}
{% endfor %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit 6fe6a0d

Please sign in to comment.