Skip to content

Commit

Permalink
address bug 1225 (#1226)
Browse files Browse the repository at this point in the history
Update arista_eos_show_ip_route for message of no ip routing
  • Loading branch information
ryanmerolle authored Nov 25, 2022
1 parent e158213 commit 275a887
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ntc_templates/templates/arista_eos_show_ip_route.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Start
# Match for codes
^\s+.+-.+
^\s*$$ -> Routes
# Ignore IP routing not enabled
^\! IP routing not enabled
# Error on everything else
^. -> Error

Routes
Expand All @@ -27,4 +30,7 @@ Routes
^\s*$$ -> Record
^VRF(\s+name)?:\s+${VRF}\s*$$ -> Start
^Gateway\s+of\s+last
^. -> Error
# Ignore IP routing not enabled
^\! IP routing not enabled
# Error on everything else
^. -> Error
19 changes: 19 additions & 0 deletions tests/arista_eos/show_ip_route/arista_eos_show_ip_route6.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VRF: MGMT
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 - Other BGP Routes,
B I - iBGP, B E - eBGP, R - RIP, I L1 - IS-IS level 1,
I L2 - IS-IS level 2, O3 - OSPFv3, A B - BGP Aggregate,
A O - OSPF Summary, NG - Nexthop Group Static Route,
V - VXLAN Control Service, M - Martian,
DH - DHCP client installed default route,
DP - Dynamic Policy Route, L - VRF Leaked,
G - gRIBI, RC - Route Cache Route

Gateway of last resort:
S 0.0.0.0/0 [1/0] via 172.20.20.1, Management0

C 172.20.20.0/24 is directly connected, Management0

! IP routing not enabled
24 changes: 24 additions & 0 deletions tests/arista_eos/show_ip_route/arista_eos_show_ip_route6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
parsed_sample:
- direct: ""
distance: "1"
interface:
- "Management0"
mask: "0"
metric: "0"
network: "0.0.0.0"
next_hop:
- "172.20.20.1"
protocol: "S"
vrf: "MGMT"
- direct: "directly"
distance: ""
interface:
- "Management0"
mask: "24"
metric: ""
network: "172.20.20.0"
next_hop:
- "connected"
protocol: "C"
vrf: "MGMT"

0 comments on commit 275a887

Please sign in to comment.