Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/dpu-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/m0-mx.j2
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -102,7 +102,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t0-8-lag-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t0-backend-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -136,7 +136,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t0-leaf-lag-2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t0-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['bgp']['router-id'] if host['bgp']['router-id'] is defined else host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t0-mclag-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-28-lag-spine.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-28-lag-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -110,7 +110,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-56-lag-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -110,7 +110,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-64-lag-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -110,7 +110,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-8-lag-spine.j2
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-8-lag-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -108,7 +108,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-backend-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -136,7 +136,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-lag-spine.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['bgp']['router-id'] if host['bgp']['router-id'] is defined else host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t1-lag-tor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['bgp']['router-id'] if host['bgp']['router-id'] is defined else host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
graceful-restart restart-time {{ bgp_gr_timer }}
graceful-restart
Expand All @@ -102,7 +102,7 @@ router bgp {{ host['bgp']['asn'] }}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t2-core.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} maximum-routes 0
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t2-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} maximum-routes 0
neighbor {{ remote_ip }} description {{ asn }}
neighbor {{ remote_ip }} allowas-in
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t2-vs-core.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} maximum-routes 0
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/eos/templates/t2-vs-leaf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ interface {{ bp_ifname }}
no shutdown
!
router bgp {{ host['bgp']['asn'] }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ipaddr('address') }}
router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }}
!
{% for asn, remote_ips in host['bgp']['peers'].items() %}
{% for remote_ip in remote_ips %}
neighbor {{ remote_ip }} remote-as {{ asn }}
neighbor {{ remote_ip }} maximum-routes 0
neighbor {{ remote_ip }} description {{ asn }}
{% if remote_ip | ipv6 %}
{% if remote_ip | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ remote_ip }} activate
exit
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/sonicv2/templates/quagga/bgpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ router bgp {{ minigraph_bgp_asn }}
{% for lo in minigraph_lo_interfaces %}
{% if lo['addr'] | ipv4 %}
network {{ lo['addr'] }}/32
{% elif lo['addr'] | ipv6 %}
{% elif lo['addr'] | ansible.utils.ipv6 %}
address-family ipv6
network {{ lo['addr'] }}/128
exit-address-family
Expand All @@ -44,7 +44,7 @@ router bgp {{ minigraph_bgp_asn }}
{% if bgp_session['asn'] != 0 %}
neighbor {{ bgp_session['addr'] }} remote-as {{ bgp_session['asn'] }}
neighbor {{ bgp_session['addr'] }} description {{ bgp_session['name'] }}
{% if bgp_session['addr'] | ipv6 %}
{% if bgp_session['addr'] | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ bgp_session['addr'] }} activate
maximum-paths 64
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/sonicv2/templates/quagga/zebra.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ route-map RM_SET_SRC permit 10
{% set lo_ipv6_addrs = [] %}
{% if minigraph_lo_interfaces is defined %}
{% for interface in minigraph_lo_interfaces %}
{% if interface['addr'] is defined and interface['addr']|ipv6 %}
{% if interface['addr'] is defined and interface['addr']| ansible.utils.ipv6 %}
{% if lo_ipv6_addrs.append(interface['addr']) %}
{% endif %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@

- name: Initialize session prefixes.
set_fact:
session_prefix_1: "{{ addr_1|ipaddr('network') }}/{{ addr_1|ipaddr('prefix') }}"
session_prefix_2: "{{ addr_2|ipaddr('network') }}/{{ addr_2|ipaddr('prefix') }}"
session_prefix_1: "{{ addr_1|ansible.utils.ipaddr('network') }}/{{ addr_1|ansible.utils.ipaddr('prefix') }}"
session_prefix_2: "{{ addr_2|ansible.utils.ipaddr('network') }}/{{ addr_2|ansible.utils.ipaddr('prefix') }}"
4 changes: 2 additions & 2 deletions ansible/roles/test/templates/bgp_no_export.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for (name, prefix) in VLAN_INTERFACE %}
{% if prefix | ipv4 %}
network {{ prefix }}
{% elif prefix | ipv6 %}
{% elif prefix | ansible.utils.ipv6 %}
address-family ipv6
network {{ prefix }}
exit-address-family
Expand Down Expand Up @@ -88,7 +88,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
exit-address-family
{% endif %}
{% endif %}
{% if neighbor_addr | ipv6 %}
{% if neighbor_addr | ansible.utils.ipv6 %}
address-family ipv6
neighbor {{ neighbor_addr }} activate
maximum-paths 64
Expand Down
Loading
Loading