-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(eos_designs): Fix context vars for custom interface description t…
…emplates (#4437) Co-authored-by: Carl Buchmann <[email protected]>
- Loading branch information
1 parent
25da256
commit 1cec539
Showing
24 changed files
with
578 additions
and
29 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
2 changes: 1 addition & 1 deletion
2
..._tests/custom_templates/interface_descriptions/connected_endpoints/ethernet-interfaces.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 +1 @@ | ||
{{ description_prefix }}_{{ peer }}_{{ peer_interface }} | ||
{{ description_prefix }}_{{ peer }}_{{ peer_interface }}_{{ adapter_description }} |
2 changes: 1 addition & 1 deletion
2
...ts/custom_templates/interface_descriptions/connected_endpoints/port-channel-interfaces.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 +1 @@ | ||
{{ description_prefix }}_{{ peer }}_{{ adapter_port_channel_description }} | ||
{{ description_prefix }}_{{ peer }}_{{ adapter_description }}_{{ adapter_port_channel_description }} |
2 changes: 1 addition & 1 deletion
2
...os_designs_unit_tests/custom_templates/interface_descriptions/mlag/ethernet-interfaces.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 +1 @@ | ||
{{ description_prefix }}_MLAG_PEER_{{ switch.mlag_peer }}_{{ mlag_interface }} | ||
{{ description_prefix }}_MLAG_PEER_{{ mlag_peer }}_{{ mlag_interface }} |
2 changes: 1 addition & 1 deletion
2
...esigns_unit_tests/custom_templates/interface_descriptions/mlag/port-channel-interfaces.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 +1 @@ | ||
{{ description_prefix }}_MLAG_PEER_{{ switch.mlag_peer }}_Po{{ switch.mlag_interfaces[0] | regex_findall("\d") | join }} | ||
{{ description_prefix }}_MLAG_PEER_{{ mlag_peer }}_Eth{{ mlag_interfaces[0] | regex_findall("\d") | join }}_Eth{{ mlag_interfaces[1] | regex_findall("\d") | join }}_Po{{ mlag_port_channel_id }} |
2 changes: 1 addition & 1 deletion
2
...ns_unit_tests/custom_templates/interface_descriptions/underlay/port-channel-interfaces.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 +1 @@ | ||
{{ description_prefix }}_{{ link.channel_description | arista.avd.default(link.peer) | upper }}_Po{{ link.peer_channel_group_id }} | ||
{{ description_prefix }}_{{ link.peer | upper }}_To_Po{{ link.peer_channel_group_id }}_{{ link.channel_description }} |
88 changes: 88 additions & 0 deletions
88
...arista/avd/molecule/eos_designs_unit_tests/intended/configs/CUSTOM-TEMPLATES-L2LEAF1A.cfg
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,88 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname CUSTOM-TEMPLATES-L2LEAF1A | ||
! | ||
no spanning-tree vlan-id 4094 | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vlan 4094 | ||
name MLAG_PEER | ||
trunk group MLAG | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Port-Channel1 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_To_Po5_CUSTOM_TEMPLATES_L3LEAF1 | ||
no shutdown | ||
switchport | ||
switchport trunk allowed vlan none | ||
switchport mode trunk | ||
mlag 1 | ||
! | ||
interface Port-Channel3 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1B_Po3 | ||
no shutdown | ||
switchport | ||
switchport mode trunk | ||
switchport trunk group MLAG | ||
! | ||
interface Ethernet1 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet5 | ||
no shutdown | ||
channel-group 1 mode active | ||
! | ||
interface Ethernet2 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet5 | ||
no shutdown | ||
channel-group 1 mode active | ||
! | ||
interface Ethernet3 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1B_Ethernet3 | ||
no shutdown | ||
channel-group 3 mode active | ||
! | ||
interface Ethernet4 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1B_Ethernet4 | ||
no shutdown | ||
channel-group 3 mode active | ||
! | ||
interface Management1 | ||
description oob_management | ||
no shutdown | ||
vrf MGMT | ||
ip address 192.168.200.103/24 | ||
! | ||
interface Vlan4094 | ||
description MLAG_PEER | ||
no shutdown | ||
mtu 9214 | ||
no autostate | ||
ip address 10.255.252.0/31 | ||
no ip routing vrf MGMT | ||
! | ||
mlag configuration | ||
domain-id CUSTOM_TEMPLATES_L2LEAF1 | ||
local-interface Vlan4094 | ||
peer-address 10.255.252.1 | ||
peer-link Port-Channel3 | ||
reload-delay mlag 300 | ||
reload-delay non-mlag 330 | ||
! | ||
ip route vrf MGMT 0.0.0.0/0 192.168.200.1 | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
88 changes: 88 additions & 0 deletions
88
...arista/avd/molecule/eos_designs_unit_tests/intended/configs/CUSTOM-TEMPLATES-L2LEAF1B.cfg
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,88 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname CUSTOM-TEMPLATES-L2LEAF1B | ||
! | ||
no spanning-tree vlan-id 4094 | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vlan 4094 | ||
name MLAG_PEER | ||
trunk group MLAG | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Port-Channel1 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_To_Po5_CUSTOM_TEMPLATES_L3LEAF1 | ||
no shutdown | ||
switchport | ||
switchport trunk allowed vlan none | ||
switchport mode trunk | ||
mlag 1 | ||
! | ||
interface Port-Channel3 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1A_Po3 | ||
no shutdown | ||
switchport | ||
switchport mode trunk | ||
switchport trunk group MLAG | ||
! | ||
interface Ethernet1 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet6 | ||
no shutdown | ||
channel-group 1 mode active | ||
! | ||
interface Ethernet2 | ||
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet6 | ||
no shutdown | ||
channel-group 1 mode active | ||
! | ||
interface Ethernet3 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1A_Ethernet3 | ||
no shutdown | ||
channel-group 3 mode active | ||
! | ||
interface Ethernet4 | ||
description MLAG_PEER_CUSTOM-TEMPLATES-L2LEAF1A_Ethernet4 | ||
no shutdown | ||
channel-group 3 mode active | ||
! | ||
interface Management1 | ||
description oob_management | ||
no shutdown | ||
vrf MGMT | ||
ip address 192.168.200.103/24 | ||
! | ||
interface Vlan4094 | ||
description MLAG_PEER | ||
no shutdown | ||
mtu 9214 | ||
no autostate | ||
ip address 10.255.252.1/31 | ||
no ip routing vrf MGMT | ||
! | ||
mlag configuration | ||
domain-id CUSTOM_TEMPLATES_L2LEAF1 | ||
local-interface Vlan4094 | ||
peer-address 10.255.252.0 | ||
peer-link Port-Channel3 | ||
reload-delay mlag 300 | ||
reload-delay non-mlag 330 | ||
! | ||
ip route vrf MGMT 0.0.0.0/0 192.168.200.1 | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
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.