-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(eos_designs): Add support for setting node_type by matching rege…
…xes against the hostname (#2266)
- Loading branch information
Showing
25 changed files
with
1,171 additions
and
14 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
113 changes: 113 additions & 0 deletions
113
...ons/arista/avd/molecule/eos_designs_unit_tests/intended/configs/AUTO_NODE_TYPE_LEAF01.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,113 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname AUTO_NODE_TYPE_LEAF01 | ||
! | ||
spanning-tree mode mstp | ||
spanning-tree mst 0 priority 4096 | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Ethernet1 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_SPINE01_Ethernet1 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.1/31 | ||
! | ||
interface Ethernet2 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_SPINE02_Ethernet1 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.3/31 | ||
! | ||
interface Loopback0 | ||
description EVPN_Overlay_Peering | ||
no shutdown | ||
ip address 192.168.255.3/32 | ||
! | ||
interface Loopback1 | ||
description VTEP_VXLAN_Tunnel_Source | ||
no shutdown | ||
ip address 192.168.254.3/32 | ||
! | ||
interface Management1 | ||
description oob_management | ||
no shutdown | ||
vrf MGMT | ||
ip address 192.168.203.12/24 | ||
! | ||
interface Vxlan1 | ||
description AUTO_NODE_TYPE_LEAF01_VTEP | ||
vxlan source-interface Loopback1 | ||
vxlan udp-port 4789 | ||
! | ||
ip virtual-router mac-address 00:dc:00:00:00:0a | ||
! | ||
ip routing | ||
no ip routing vrf MGMT | ||
! | ||
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
seq 10 permit 192.168.255.0/24 eq 32 | ||
seq 20 permit 192.168.254.0/24 eq 32 | ||
! | ||
ip route vrf MGMT 0.0.0.0/0 192.168.203.1 | ||
! | ||
route-map RM-CONN-2-BGP permit 10 | ||
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
! | ||
router bfd | ||
multihop interval 300 min-rx 300 multiplier 3 | ||
! | ||
router bgp 65101 | ||
router-id 192.168.255.3 | ||
no bgp default ipv4-unicast | ||
distance bgp 20 200 200 | ||
maximum-paths 4 ecmp 4 | ||
neighbor EVPN-OVERLAY-PEERS peer group | ||
neighbor EVPN-OVERLAY-PEERS update-source Loopback0 | ||
neighbor EVPN-OVERLAY-PEERS bfd | ||
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3 | ||
neighbor EVPN-OVERLAY-PEERS send-community | ||
neighbor EVPN-OVERLAY-PEERS maximum-routes 0 | ||
neighbor IPv4-UNDERLAY-PEERS peer group | ||
neighbor IPv4-UNDERLAY-PEERS send-community | ||
neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 | ||
neighbor 172.31.255.0 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.0 remote-as 65100 | ||
neighbor 172.31.255.0 description AUTO_NODE_TYPE_SPINE01_Ethernet1 | ||
neighbor 172.31.255.2 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.2 remote-as 65100 | ||
neighbor 172.31.255.2 description AUTO_NODE_TYPE_SPINE02_Ethernet1 | ||
neighbor 192.168.255.1 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.1 remote-as 65100 | ||
neighbor 192.168.255.1 description AUTO_NODE_TYPE_SPINE01 | ||
neighbor 192.168.255.2 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.2 remote-as 65100 | ||
neighbor 192.168.255.2 description AUTO_NODE_TYPE_SPINE02 | ||
redistribute connected route-map RM-CONN-2-BGP | ||
! | ||
address-family evpn | ||
neighbor EVPN-OVERLAY-PEERS activate | ||
! | ||
address-family ipv4 | ||
no neighbor EVPN-OVERLAY-PEERS activate | ||
neighbor IPv4-UNDERLAY-PEERS activate | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
100 changes: 100 additions & 0 deletions
100
...ns/arista/avd/molecule/eos_designs_unit_tests/intended/configs/AUTO_NODE_TYPE_SPINE01.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,100 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname AUTO_NODE_TYPE_SPINE01 | ||
! | ||
spanning-tree mode none | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Ethernet1 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_LEAF01_Ethernet1 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.0/31 | ||
! | ||
interface Ethernet2 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_UNGROUPED_LEAF02_Ethernet1 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.4/31 | ||
! | ||
interface Loopback0 | ||
description EVPN_Overlay_Peering | ||
no shutdown | ||
ip address 192.168.255.1/32 | ||
! | ||
interface Management1 | ||
description oob_management | ||
no shutdown | ||
vrf MGMT | ||
ip address 192.168.203.10 | ||
! | ||
ip routing | ||
no ip routing vrf MGMT | ||
! | ||
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
seq 10 permit 192.168.255.0/24 eq 32 | ||
! | ||
ip route vrf MGMT 0.0.0.0/0 192.168.203.1 | ||
! | ||
route-map RM-CONN-2-BGP permit 10 | ||
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
! | ||
router bfd | ||
multihop interval 300 min-rx 300 multiplier 3 | ||
! | ||
router bgp 65100 | ||
router-id 192.168.255.1 | ||
no bgp default ipv4-unicast | ||
distance bgp 20 200 200 | ||
maximum-paths 4 ecmp 4 | ||
neighbor EVPN-OVERLAY-PEERS peer group | ||
neighbor EVPN-OVERLAY-PEERS next-hop-unchanged | ||
neighbor EVPN-OVERLAY-PEERS update-source Loopback0 | ||
neighbor EVPN-OVERLAY-PEERS bfd | ||
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3 | ||
neighbor EVPN-OVERLAY-PEERS send-community | ||
neighbor EVPN-OVERLAY-PEERS maximum-routes 0 | ||
neighbor IPv4-UNDERLAY-PEERS peer group | ||
neighbor IPv4-UNDERLAY-PEERS send-community | ||
neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 | ||
neighbor 172.31.255.1 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.1 remote-as 65101 | ||
neighbor 172.31.255.1 description AUTO_NODE_TYPE_LEAF01_Ethernet1 | ||
neighbor 172.31.255.5 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.5 remote-as 65102 | ||
neighbor 172.31.255.5 description AUTO_NODE_TYPE_UNGROUPED_LEAF02_Ethernet1 | ||
neighbor 192.168.255.3 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.3 remote-as 65101 | ||
neighbor 192.168.255.3 description AUTO_NODE_TYPE_LEAF01 | ||
neighbor 192.168.255.4 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.4 remote-as 65102 | ||
neighbor 192.168.255.4 description AUTO_NODE_TYPE_UNGROUPED_LEAF02 | ||
redistribute connected route-map RM-CONN-2-BGP | ||
! | ||
address-family evpn | ||
neighbor EVPN-OVERLAY-PEERS activate | ||
! | ||
address-family ipv4 | ||
no neighbor EVPN-OVERLAY-PEERS activate | ||
neighbor IPv4-UNDERLAY-PEERS activate | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
100 changes: 100 additions & 0 deletions
100
...ns/arista/avd/molecule/eos_designs_unit_tests/intended/configs/AUTO_NODE_TYPE_SPINE02.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,100 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname AUTO_NODE_TYPE_SPINE02 | ||
! | ||
spanning-tree mode none | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Ethernet1 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_LEAF01_Ethernet2 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.2/31 | ||
! | ||
interface Ethernet2 | ||
description P2P_LINK_TO_AUTO_NODE_TYPE_UNGROUPED_LEAF02_Ethernet2 | ||
no shutdown | ||
mtu 9000 | ||
no switchport | ||
ip address 172.31.255.6/31 | ||
! | ||
interface Loopback0 | ||
description EVPN_Overlay_Peering | ||
no shutdown | ||
ip address 192.168.255.2/32 | ||
! | ||
interface Management1 | ||
description oob_management | ||
no shutdown | ||
vrf MGMT | ||
ip address 192.168.203.11 | ||
! | ||
ip routing | ||
no ip routing vrf MGMT | ||
! | ||
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
seq 10 permit 192.168.255.0/24 eq 32 | ||
! | ||
ip route vrf MGMT 0.0.0.0/0 192.168.203.1 | ||
! | ||
route-map RM-CONN-2-BGP permit 10 | ||
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
! | ||
router bfd | ||
multihop interval 300 min-rx 300 multiplier 3 | ||
! | ||
router bgp 65100 | ||
router-id 192.168.255.2 | ||
no bgp default ipv4-unicast | ||
distance bgp 20 200 200 | ||
maximum-paths 4 ecmp 4 | ||
neighbor EVPN-OVERLAY-PEERS peer group | ||
neighbor EVPN-OVERLAY-PEERS next-hop-unchanged | ||
neighbor EVPN-OVERLAY-PEERS update-source Loopback0 | ||
neighbor EVPN-OVERLAY-PEERS bfd | ||
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3 | ||
neighbor EVPN-OVERLAY-PEERS send-community | ||
neighbor EVPN-OVERLAY-PEERS maximum-routes 0 | ||
neighbor IPv4-UNDERLAY-PEERS peer group | ||
neighbor IPv4-UNDERLAY-PEERS send-community | ||
neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 | ||
neighbor 172.31.255.3 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.3 remote-as 65101 | ||
neighbor 172.31.255.3 description AUTO_NODE_TYPE_LEAF01_Ethernet2 | ||
neighbor 172.31.255.7 peer group IPv4-UNDERLAY-PEERS | ||
neighbor 172.31.255.7 remote-as 65102 | ||
neighbor 172.31.255.7 description AUTO_NODE_TYPE_UNGROUPED_LEAF02_Ethernet2 | ||
neighbor 192.168.255.3 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.3 remote-as 65101 | ||
neighbor 192.168.255.3 description AUTO_NODE_TYPE_LEAF01 | ||
neighbor 192.168.255.4 peer group EVPN-OVERLAY-PEERS | ||
neighbor 192.168.255.4 remote-as 65102 | ||
neighbor 192.168.255.4 description AUTO_NODE_TYPE_UNGROUPED_LEAF02 | ||
redistribute connected route-map RM-CONN-2-BGP | ||
! | ||
address-family evpn | ||
neighbor EVPN-OVERLAY-PEERS activate | ||
! | ||
address-family ipv4 | ||
no neighbor EVPN-OVERLAY-PEERS activate | ||
neighbor IPv4-UNDERLAY-PEERS activate | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
Oops, something went wrong.