From 88755480338c3c6a99c8528d9e8781f0565c73b6 Mon Sep 17 00:00:00 2001 From: Tymofii Dmytrenko Date: Sun, 10 May 2020 20:09:02 +0100 Subject: [PATCH] Fix #5: 'Detect INTERFACE for glean adjacency IOS 12.x' --- templates/cisco_ios_show_ip_cef.textfsm | 5 ++++- tests/cisco_ios/show_ip_cef/show_ip_cef_detail_c2800_v2.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/cisco_ios_show_ip_cef.textfsm b/templates/cisco_ios_show_ip_cef.textfsm index 3a81697d0a..97389d6209 100644 --- a/templates/cisco_ios_show_ip_cef.textfsm +++ b/templates/cisco_ios_show_ip_cef.textfsm @@ -66,7 +66,10 @@ Start # Stop processing Flags (max 4) ^.*?epoch.*?$$ # Extract extra Flag, such as recursive - ^.*?dependenc(?:y|ies),\s+${FLAGS} + ^.*?dependenc(?:y|ies),\s+${FLAGS} -> Continue + ^\s+via\s+${NEXTHOP},\s+\d+\s+dependenc + ^\s+via\s+${INTERFACE},\s+\d+\s+dependenc + ^\s+via\s+${NEXTHOP},\s+${INTERFACE},\s+\d+\s+dependenc ^.*?dependenc(?:y|ies) # Extract Nexthop and Interface ^\s+next\s+hop\s+${NEXTHOP}\s*$$ diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_detail_c2800_v2.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_detail_c2800_v2.yml index 6a91bc1471..c0034b24cc 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_detail_c2800_v2.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_detail_c2800_v2.yml @@ -48,7 +48,7 @@ parsed_sample: - "connected" type: "glean" nexthop: "" - interface: "" + interface: "GigabitEthernet0/1" - prefix: "199.220.235.180/32" flags: - "receive"