Skip to content

Commit

Permalink
Fix(eos_validate_state): ANTA Refactor BGP test to now also support d…
Browse files Browse the repository at this point in the history
…irect neighbors and IPv6 AFI (aristanetworks#3572)
  • Loading branch information
carl-baillargeon authored Feb 9, 2024
1 parent aeda0c2 commit af15ee7
Show file tree
Hide file tree
Showing 32 changed files with 2,065 additions and 1,838 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ router_bgp:
activate: true
- name: EVPN-OVERLAY-PEERS
activate: false
neighbors:
- ip_address: 123.1.1.10
activate: true
- ip_address: 123.1.1.11
activate: true
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand Down Expand Up @@ -74,10 +79,49 @@ router_bgp:
peer: dc1-leaf2b
description: dc1-leaf2b
remote_as: '65102'
- ip_address: 123.1.1.10
remote_as: '1234'
password: oBztv71m2uhR7hh58/OCNA==
description: External IPv4 BGP peer
send_community: standard extended
maximum_routes: 0
default_originate:
always: false
route_map: RM-Tenant_A_WAN_Zone-123.1.1.10-SET-NEXT-HOP-OUT
update_source: Loopback123
ebgp_multihop: 3
route_map_in: RM-123-1-1-10-IN
route_map_out: RM-Tenant_A_WAN_Zone-123.1.1.10-SET-NEXT-HOP-OUT
local_as: '123'
- ip_address: 123.1.1.11
remote_as: '1234'
password: oBztv71m2uhR7hh58/OCNA==
description: External IPv4 BGP peer
send_community: standard extended
maximum_routes: 0
default_originate:
always: false
update_source: Loopback123
ebgp_multihop: 3
route_map_in: RM-123-1-1-11-IN
route_map_out: RM-123-1-1-11-OUT
local_as: '123'
- ip_address: fd5a:fe45:8831:06c5::a
remote_as: '12345'
send_community: all
route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT
- ip_address: fd5a:fe45:8831:06c5::b
remote_as: '12345'
address_family_evpn:
peer_groups:
- name: EVPN-OVERLAY-PEERS
activate: true
address_family_ipv6:
neighbors:
- ip_address: fd5a:fe45:8831:06c5::a
activate: true
- ip_address: fd5a:fe45:8831:06c5::b
activate: true
static_routes:
- vrf: MGMT
destination_address_prefix: 0.0.0.0/0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,23 @@ router_bgp:
maximum_routes: 0
ebgp_multihop: 3
next_hop_unchanged: true
- name: IPv4-EXTERNAL-PEERS
type: ipv4
remote_as: '577'
- name: IPv6-EXTERNAL-PEERS
type: ipv6
remote_as: '577'
- name: EVPN-EXTERNAL-PEERS
type: evpn
remote_as: '577'
address_family_ipv4:
peer_groups:
- name: IPv4-UNDERLAY-PEERS
activate: true
- name: EVPN-OVERLAY-PEERS
activate: false
- name: IPv4-EXTERNAL-PEERS
activate: true
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand Down Expand Up @@ -74,10 +85,25 @@ router_bgp:
peer: dc1-leaf2b
description: dc1-leaf2b
remote_as: '65102'
- ip_address: 142.112.39.2
peer_group: IPv4-EXTERNAL-PEERS
description: Primary_ISP_IPv4
- ip_address: 2001:db8:1::2
peer_group: IPv6-EXTERNAL-PEERS
description: Primary_ISP_IPv6
- ip_address: 142.112.41.2
peer_group: EVPN-EXTERNAL-PEERS
description: Primary_ISP_EVPN
address_family_evpn:
peer_groups:
- name: EVPN-OVERLAY-PEERS
activate: true
- name: EVPN-EXTERNAL-PEERS
activate: true
address_family_ipv6:
peer_groups:
- name: IPv6-EXTERNAL-PEERS
activate: true
static_routes:
- vrf: MGMT
destination_address_prefix: 0.0.0.0/0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,65 +453,60 @@ anta.tests.mlag:
anta.tests.routing.bgp:
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.1.97
safi: unicast
- 10.255.0.1
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.1.97'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.1'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.255.0
safi: unicast
- 10.255.0.2
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.0'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.2'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
peers:
- 10.255.255.2
- 10.255.1.97
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.2'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.1.97'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.0.1
- 10.255.255.0
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.1'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.0'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.0.2
- 10.255.255.2
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.2'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.2'
anta.tests.routing.generic:
- VerifyRoutingProtocolModel:
model: multi-agent
result_overwrite:
categories:
- BGP
custom_field: ArBGP
description: ArBGP is configured and operating
custom_field: 'Routing protocol model: multi-agent'
description: Verifies the configured routing protocol model.
- VerifyRoutingTableEntry:
result_overwrite:
categories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,65 +453,60 @@ anta.tests.mlag:
anta.tests.routing.bgp:
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.1.96
safi: unicast
- 10.255.0.1
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.1.96'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.1'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.255.4
safi: unicast
- 10.255.0.2
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.4'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.2'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
peers:
- 10.255.255.6
- 10.255.1.96
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.6'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.1.96'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.0.1
- 10.255.255.4
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.1'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.4'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.0.2
- 10.255.255.6
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.2'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.6'
anta.tests.routing.generic:
- VerifyRoutingProtocolModel:
model: multi-agent
result_overwrite:
categories:
- BGP
custom_field: ArBGP
description: ArBGP is configured and operating
custom_field: 'Routing protocol model: multi-agent'
description: Verifies the configured routing protocol model.
- VerifyRoutingTableEntry:
result_overwrite:
categories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,56 +464,51 @@ anta.tests.mlag:
anta.tests.routing.bgp:
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.255.8
safi: unicast
- 10.255.0.1
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.8'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.1'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
- afi: evpn
peers:
- 10.255.255.10
safi: unicast
- 10.255.0.2
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.255.10'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP EVPN Peer: 10.255.0.2'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
peers:
- 10.255.0.1
- 10.255.128.15
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.1'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP EVPN Peer: 10.255.128.15'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.0.2
- 10.255.255.8
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.0.2'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.8'
- VerifyBGPSpecificPeers:
address_families:
- afi: evpn
- afi: ipv4
peers:
- 10.255.128.15
- 10.255.255.10
safi: unicast
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 10.255.128.15'
description: bgp evpn peer state established (evpn)
custom_field: 'BGP IPv4 Unicast Peer: 10.255.255.10'
- VerifyBGPSpecificPeers:
address_families:
- afi: ipv4
Expand All @@ -523,16 +518,15 @@ anta.tests.routing.bgp:
result_overwrite:
categories:
- BGP
custom_field: 'bgp_neighbor: 192.168.100.1'
description: ip bgp peer state established (ipv4)
custom_field: 'BGP IPv4 Unicast Peer: 192.168.100.1'
anta.tests.routing.generic:
- VerifyRoutingProtocolModel:
model: multi-agent
result_overwrite:
categories:
- BGP
custom_field: ArBGP
description: ArBGP is configured and operating
custom_field: 'Routing protocol model: multi-agent'
description: Verifies the configured routing protocol model.
- VerifyRoutingTableEntry:
result_overwrite:
categories:
Expand Down
Loading

0 comments on commit af15ee7

Please sign in to comment.