Skip to content

Commit

Permalink
BugFix: arista_eos_show_ip_route: Accounting for new data for WARNING…
Browse files Browse the repository at this point in the history
… output & capture ecmp routes (networktocode#669)
  • Loading branch information
FragmentedPacket authored and thomasblass committed Oct 25, 2020
1 parent 3168150 commit b01f482
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/arista_eos_show_ip_route.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Value INTERFACE (\S+)

Start
^\s+${PROTOCOL}\s+${NETWORK}/${MASK}\s+(?:\[${DISTANCE}/${METRIC}\]|is\s+${DIRECT})(?:.+?)${NEXT_HOP},\s+${INTERFACE}$$ -> Record
^\s+via\s+${NEXT_HOP},\s+${INTERFACE}
^\s+via\s+${NEXT_HOP},\s+${INTERFACE} -> Record
^VRF\s+name:\s+${VRF}\s*$$
^VRF:\s+${VRF}\s*$$
^WARNING
^kernel
^Codes:
# Match for codes
^\s+\S+\s+-\s+\S+
Expand Down
16 changes: 16 additions & 0 deletions tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
VRF name: default
WARNING: Some of the routes are not programmed in
kernel, and they are marked with '%'.
Codes: C - connected, S - static, K - kernel,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP,
R - RIP, I L1 - ISIS level 1, I L2 - ISIS level 2,
O3 - OSPFv3, A B - BGP Aggregate, A O - OSPF Summary,
NG - Nexthop Group Static Route, V - VXLAN Control Service

Gateway of last resort:
O E1 0.0.0.0/0 [110/21] via 172.83.43.48, Vlan55
via 172.83.43.50, Vlan65

S 10.1.26.0/24 [1/0] via 142.54.229.92, Vlan2503
29 changes: 29 additions & 0 deletions tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
parsed_sample:
- vrf: "default"
protocol: "O E1"
network: "0.0.0.0"
mask: "0"
distance: "110"
metric: "21"
direct: ""
next_hop: "172.83.43.48"
interface: "Vlan55"
- vrf: "default"
protocol: "O E1"
network: "0.0.0.0"
mask: "0"
distance: "110"
metric: "21"
direct: ""
next_hop: "172.83.43.50"
interface: "Vlan65"
- vrf: "default"
protocol: "S"
network: "10.1.26.0"
mask: "24"
distance: "1"
metric: "0"
direct: ""
next_hop: "142.54.229.92"
interface: "Vlan2503"

0 comments on commit b01f482

Please sign in to comment.