From b01f482914648f4cd3b6bf3793ff78037ad39d21 Mon Sep 17 00:00:00 2001 From: Mikhail Yohman Date: Sun, 3 May 2020 08:18:25 -0600 Subject: [PATCH] BugFix: arista_eos_show_ip_route: Accounting for new data for WARNING output & capture ecmp routes (#669) --- templates/arista_eos_show_ip_route.textfsm | 4 ++- .../arista_eos_show_ip_route3.raw | 16 ++++++++++ .../arista_eos_show_ip_route3.yml | 29 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.raw create mode 100644 tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.yml diff --git a/templates/arista_eos_show_ip_route.textfsm b/templates/arista_eos_show_ip_route.textfsm index 5f868edd52..9123d6f09d 100644 --- a/templates/arista_eos_show_ip_route.textfsm +++ b/templates/arista_eos_show_ip_route.textfsm @@ -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+ diff --git a/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.raw b/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.raw new file mode 100644 index 0000000000..b86ffdaca5 --- /dev/null +++ b/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.raw @@ -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 diff --git a/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.yml b/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.yml new file mode 100644 index 0000000000..2cda5b6c28 --- /dev/null +++ b/tests/arista_eos/show_ip_route/arista_eos_show_ip_route3.yml @@ -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"