From d0f5a6881c5b015fa1094955248adff8be54e33b Mon Sep 17 00:00:00 2001 From: Tymofii Dmytrenko Date: Thu, 21 May 2020 08:15:20 +0100 Subject: [PATCH] Proposed changes have been accepted - Added few more comments - Adjusted INDEX file to make sure templates are only used when applicable - Templates are no longer compatible with 'show ip cef 1.1.1.1', or 'show ip cef Vlan100'. Usage of 'detail' keyword is mandatory, such as 'show ip cef 1.1.1.1 detail' --- templates/cisco_ios_show_ip_cef.textfsm | 40 +++++--- .../cisco_ios_show_ip_cef_detail.textfsm | 91 +++++++++++-------- templates/index | 4 +- .../show_ip_cef/show_ip_cef_c2800_v1.yml | 24 ++--- .../show_ip_cef/show_ip_cef_c2800_v2.yml | 26 +++--- .../show_ip_cef/show_ip_cef_c2900_v1.yml | 24 ++--- .../show_ip_cef/show_ip_cef_c3750.yml | 10 +- .../show_ip_cef/show_ip_cef_c3850_v1.yml | 26 +++--- .../show_ip_cef/show_ip_cef_c3850_v2.yml | 16 ++-- .../show_ip_cef_detail_c2800_v1.yml | 30 +++--- .../show_ip_cef_detail_c2800_v2.yml | 26 +++--- .../show_ip_cef_detail_c2900_v1.yml | 36 ++++---- .../show_ip_cef_detail_c3750.yml | 22 ++--- .../show_ip_cef_detail_c3850_v1.yml | 30 +++--- .../show_ip_cef_detail_c3850_v2.yml | 16 ++-- 15 files changed, 228 insertions(+), 193 deletions(-) diff --git a/templates/cisco_ios_show_ip_cef.textfsm b/templates/cisco_ios_show_ip_cef.textfsm index 255f213368..a60a46ef6b 100644 --- a/templates/cisco_ios_show_ip_cef.textfsm +++ b/templates/cisco_ios_show_ip_cef.textfsm @@ -1,25 +1,43 @@ +# +# This template is only compatible with the following command +# - show ip cef [vrf NAME] +# This is enforced by INDEX file +# Check cisco_ios_show_ip_cef_detail.textfsm for more details +# Value Required PREFIX ((?:\d{1,3}\.){3}\d{1,3}\/\d{1,2}) -Value ETYPE ((?:no\s)?(?:[a-z]+)) -# Nexthop and Interface are lists to support ECMP -# Usually these will be single item lists +Value TYPE ((?:no\s)?(?:[a-z]+)) +# To support ECMP, NEXTHOP and INTERFACE are defined as lists +# When no ECMP is available, these will be single item lists # However, if there are multiple paths available -# these will contain one items per route/path +# then expect to see one item per route/path Value List NEXTHOP ((?:\d{1,3}\.){3}\d{1,3}) Value List INTERFACE ([A-Za-z][A-Za-z0-9\.\/-]+) -# --- HEAD and DETAILED ENTRIES --- -# e.g. show ip cef detail, show ip cef 10.0.0.1, etc Start + # >>> Parse EXCEPTIONS + # CEF is not enabled + ^%IPv4\s+CEF\s+not\s+running$$ -> End + # Invalid prefix + ^\s+Invalid\s+prefix/mask -> End + # + # >>> Parse HEADING ^Prefix\s+Next\s+Hop\s+Interface$$ -> Entries -# --- BRIEF ENTRIES -# e.g. show ip cef, or show ip cef vrf Entries + # >>> Parse CEF ENTRIES + # Entry detected ^(?:\d{1,3}\.){3}\d{1,3}\/\d{1,2} -> Continue.Record - ^${PREFIX}\s+${ETYPE}\s*$$ + # Parse prefix/type + ^${PREFIX}\s+${TYPE}\s*$$ + # Parse prefix/nexthop ^${PREFIX}\s+${NEXTHOP}\s*$$ - ^${PREFIX}\s+${ETYPE}\s+${INTERFACE}$$ + # Parse prefix, type and interface + ^${PREFIX}\s+${TYPE}\s+${INTERFACE}$$ + # Parse prefix, nexthop and interface ^${PREFIX}\s+${NEXTHOP}\s+${INTERFACE}$$ + # Parse nexthop and interface for ECMP prefixes ^\s+${NEXTHOP}\s+${INTERFACE}$$ + # + # >>> Parse SPECIAL ^\s*$$ - ^. -> Error + ^. -> Error \ No newline at end of file diff --git a/templates/cisco_ios_show_ip_cef_detail.textfsm b/templates/cisco_ios_show_ip_cef_detail.textfsm index 0af43ad647..da71cb2c7d 100644 --- a/templates/cisco_ios_show_ip_cef_detail.textfsm +++ b/templates/cisco_ios_show_ip_cef_detail.textfsm @@ -1,91 +1,109 @@ +# Even though this template understands the output from +# - show ip cef [vrf NAME] [PREFIX | INTERFACE] [detail] +# INDEX file forces you to use 'detail' keyword, or there +# will be no match. This is done to simplify INDEX file +# matching logic, otherwise matching regex is too complex. +# +# This template is compatible with IOS v12.x and above, +# including IOS-XE. There are two versions of output +# with significant differences depending on IOS version. +# Template is able to recognize both versions and captures +# same structured data regardless of IOS version. +# Value Required PREFIX ((?:\d{1,3}\.){3}\d{1,3}\/\d{1,2}) Value List FLAGS ([^,\]\n]+) -Value ETYPE ((?:no\s)?(?:[a-z]+)) +Value TYPE ((?:no\s)?(?:[a-z]+)) # Nexthop and Interface are lists to support ECMP # Usually these will be single item lists # However, if there are multiple paths available -# these will contain one items per route/path +# these will contain one item per route/path Value List NEXTHOP ((?:\d{1,3}\.){3}\d{1,3}) Value List INTERFACE ([A-Za-z][A-Za-z0-9\.\/-]+) -# --- HEAD and DETAILED ENTRIES --- -# e.g. show ip cef detail, show ip cef 10.0.0.1, etc Start - # Detect errors and/or disabled CEF + # >>> Parse EXCEPTIONS + # CEF is not enabled ^%IPv4\s+CEF\s+not\s+running$$ -> End + # Invalid prefix ^\s+Invalid\s+prefix/mask -> End - # Ignore JUNK in HEAD + # + # >>> Parse HEADING + # Ignore Junk (irrelevant output) ^IP(?:v4)?\s+CEF ^VRF|Adjacency ^\s+\d+\s+(?:routes|instant|leaves|load|prefixes|in-place) ^\s+(?:Default|Table|Database|Resolution|Non-stop|Switchover) ^\s+(?:universal|refcounts) ^.*?CEF\s+resets + # + # >>> Parse CEF ENTRIES # Entry detected, begin analysis ^(?:\d{1,3}\.){3}\d{1,3}\/\d{1,2} -> Continue.Record # - # --- Parse CEF table from Cisco IOS >v15.x - # + # >>>>>> Cisco IOS >v15.x # Extract prefix (no flags) ^${PREFIX},\s+epoch(?:(?!flags).)*$$ - # Extract prefix with Flags + # Extract prefix with flags ^${PREFIX}.*?flags -> Continue - # Attempt to extract first Flag (if present) + # Attempt to extract first flag (if present) ^\d.*?flags\s+\[?${FLAGS} -> Continue - # Attempt to extract other Flags (up to 6) + # Attempt to extract other flags (up to 6) ^\d.*?flags\s+\[?(?:[^\]\n]+?,\s+){1}${FLAGS} -> Continue ^\d.*?flags\s+\[?(?:[^\]\n]+?,\s+){2}${FLAGS} -> Continue ^\d.*?flags\s+\[?(?:[^\]\n]+?,\s+){3}${FLAGS} -> Continue ^\d.*?flags\s+\[?(?:[^\]\n]+?,\s+){4}${FLAGS} -> Continue ^\d.*?flags\s+\[?(?:[^\]\n]+?,\s+){5}${FLAGS} -> Continue - # Stop processing Flags (6+) + # Stop processing flags (6+) ^\d.*?flags.*?$$ - # Attempt to extract details via source info - # Supported Type (IOS >v15.x): + # Extract nexthop IP address + ^\s+recursive\s+via\s+${NEXTHOP} + # Extract type and interface/nexthop, if available) + # Type values (IOS >v15.x): # - attached # - receive # - drop # - no route # - nexthop # - multicast - ^\s+recursive\s+via\s+${NEXTHOP} - ^\s+${ETYPE}(?<=receive)\s+for\s+${INTERFACE} - ^\s+${ETYPE}(?<=attached)\s+to\s+${INTERFACE} - ^\s+${ETYPE}(?<=drop)$$ - ^\s+${ETYPE}(?<=no route)$$ - ^\s+${ETYPE}(?<=receive)$$ - ^\s+${ETYPE}(?<=multicast)$$ - ^\s+${ETYPE}(?<=nexthop)\s+${NEXTHOP}\s+${INTERFACE} - # - # --- Parse CEF table from Cisco IOS 12.x ISR G1 + ^\s+${TYPE}(?<=receive)\s+for\s+${INTERFACE} + ^\s+${TYPE}(?<=attached)\s+to\s+${INTERFACE} + ^\s+${TYPE}(?<=drop)$$ + ^\s+${TYPE}(?<=no route)$$ + ^\s+${TYPE}(?<=receive)$$ + ^\s+${TYPE}(?<=multicast)$$ + ^\s+${TYPE}(?<=nexthop)\s+${NEXTHOP}\s+${INTERFACE} # - # Legacy CEF formatting - # Extract Prefix and Flags + # >>>>>> Cisco IOS 12.x ISR G1 (legacy CEF formatting) + # Extract prefix ^${PREFIX},\s+version -> Continue + # Extract flags (if available) ^.*?epoch\s+\d+,\s+${FLAGS} -> Continue ^.*?epoch\s+\d+,\s+(?:[^,\n]+,\s+){1}${FLAGS} -> Continue ^.*?epoch\s+\d+,\s+(?:[^,\n]+,\s+){2}${FLAGS} -> Continue ^.*?epoch\s+\d+,\s+(?:[^,\n]+,\s+){3}${FLAGS} -> Continue - # Stop processing Flags (max 4) + # Stop processing flags (max 4) ^.*?epoch.*?$$ - # Extract extra Flag, such as recursive + # Extract extra flag, such as recursive ^.*?dependenc(?:y|ies),\s+${FLAGS} -> Continue + # Extract interface for glean adjacency (it's the only place) ^\s+via\s+${INTERFACE},\s+\d+\s+depend + # Stop procssing line with 'dependencies' + # Interface and flags are extracted by now ^.*?depend - # Extract Nexthop and Interface + # Extract nexthop IP address ^\s+next\s+hop\s+${NEXTHOP}\s*$$ + # Extract nexthop IP address and interface ^\s+next\s+hop\s+${NEXTHOP},\s+${INTERFACE} - # Extract Type, where available - # Available Type (IOS v12.x ISR G1): + # Extract type, where available + # Type values (IOS v12.x ISR G1): # - null (same as receive with Null0 interface in IOS v15.x) # - glean (same as attached in IOS v15.x) # - cached (same as nexthop in IOS v15.x) # - drop # - if type is None, then it's receive (check flags) - ^\s+valid\s+${ETYPE}\s+adjacency$$ - # - # Ignore JUNK + ^\s+valid\s+${TYPE}\s+adjacency$$ # + # >>> Parse OTHER BODY (irrelevant output) ^\s+Adj\s+source ^\s+Special\s+source ^\s+Interface\s+source @@ -103,7 +121,6 @@ Start ^\s+\d+\s+IPL\s+source ^\d+\s+packets # - # End of processing - # + # >>> Parse SPECIAL ^\s*$$ - ^. -> Error + ^. -> Error \ No newline at end of file diff --git a/templates/index b/templates/index index 61af5e9a4c..5b63edc4c3 100644 --- a/templates/index +++ b/templates/index @@ -189,7 +189,7 @@ cisco_ios_show_snmp_community.textfsm, .*, cisco_ios, sh[[ow]] sn[[mp]] com[[mun cisco_ios_show_cdp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] cisco_ios_show_controller_t1.textfsm, .*, cisco_ios, sh[[ow]] cont[[rollers]] t1 cisco_ios_show_hosts_summary.textfsm, .*, cisco_ios, sh[[ow]] ho[[sts]] summary -cisco_ios_show_ip_cef_detail.textfsm, .*, cisco_ios, sh[[ow]] i[[p]] ce[[f]] de[[tail]] +cisco_ios_show_ip_cef_detail.textfsm, .*, cisco_ios, sh[[ow]] ip ce[[f]].+?d[[etail]] cisco_ios_show_platform_diag.textfsm, .*, cisco_ios, sh[[ow]] plat[[form]] di[[ag]] cisco_ios_show_processes_cpu.textfsm, .*, cisco_ios, sh[[ow]] proc[[esses]] [[cpu]] cisco_ios_show_spanning-tree.textfsm, .*, cisco_ios, sh[[ow]] sp[[anning-tree]] @@ -215,7 +215,7 @@ cisco_ios_show_standby.textfsm, .*, cisco_ios, sh[[ow]] sta[[ndby]] cisco_ios_show_version.textfsm, .*, cisco_ios, sh[[ow]] ver[[sion]] cisco_ios_show_ip_arp.textfsm, .*, cisco_ios, sh[[ow]] i[[p]] a[[rp]] cisco_ios_show_ip_bgp.textfsm, .*, cisco_ios, sh[[ow]] i[[p]] bgp -cisco_ios_show_ip_cef.textfsm, .*, cisco_ios, sh[[ow]] i[[p]] ce[[f]] +cisco_ios_show_ip_cef.textfsm, .*, cisco_ios, sh[[ow]] ip ce[[f]](?: vrf? \S+)?\s*$ cisco_ios_show_tacacs.textfsm, .*, cisco_ios, sh[[ow]] tacacs cisco_ios_show_clock.textfsm, .*, cisco_ios, sh[[ow]] clo[[ck]] cisco_ios_show_dmvpn.textfsm, .*, cisco_ios, sh[[ow]] dm[[vpn]] diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v1.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v1.yml index 0349835363..391a04d208 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v1.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v1.yml @@ -1,59 +1,59 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "" + type: "" nexthop: - "172.17.40.1" interface: - "Tunnel0" - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" - etype: "" + type: "" nexthop: - "172.17.40.1" interface: - "Tunnel0" - prefix: "10.0.120.0/24" - etype: "" + type: "" nexthop: - "172.17.40.1" interface: - "Tunnel0" - prefix: "10.191.64.0/24" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0" - prefix: "10.191.64.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: - "GigabitEthernet0/0" - prefix: "10.191.64.2/32" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0" - prefix: "224.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v2.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v2.yml index 8d5cb0d9c0..dca03eb2fe 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v2.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2800_v2.yml @@ -1,64 +1,64 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "" + type: "" nexthop: - "192.168.0.181" interface: - "GigabitEthernet0/1" - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" - etype: "" + type: "" nexthop: - "192.168.0.181" interface: - "GigabitEthernet0/1" - prefix: "10.158.0.0/19" - etype: "" + type: "" nexthop: - "0.0.0.0" interface: - "Null0" - prefix: "10.158.0.192/29" - etype: "" + type: "" nexthop: - "10.158.0.209" interface: - "GigabitEthernet0/0.1821" - prefix: "10.158.0.208/29" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0.1821" - prefix: "10.158.0.208/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "192.168.0.180/30" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/1" - prefix: "224.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2900_v1.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2900_v1.yml index 1e614846d2..5b71d87054 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c2900_v1.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c2900_v1.yml @@ -1,59 +1,59 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "" + type: "" nexthop: - "10.180.122.153" interface: - "GigabitEthernet0/1" - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" - etype: "" + type: "" nexthop: - "10.180.122.153" interface: - "GigabitEthernet0/1" - prefix: "10.157.1.0/24" - etype: "" + type: "" nexthop: - "172.17.100.101" interface: - "Tunnel60701" - prefix: "10.180.122.7/32" - etype: "receive" + type: "receive" nexthop: [] interface: - "Loopback0" - prefix: "10.180.122.152/29" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/1" - prefix: "10.180.122.152/32" - etype: "receive" + type: "receive" nexthop: [] interface: - "GigabitEthernet0/1" - prefix: "224.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3750.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3750.yml index 362163b8eb..56ba2f6d13 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3750.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3750.yml @@ -1,27 +1,27 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "" + type: "" nexthop: - "10.158.0.198" interface: - "Vlan1801" - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" - etype: "" + type: "" nexthop: - "10.158.0.198" interface: - "Vlan1801" - prefix: "10.0.120.0/24" - etype: "" + type: "" nexthop: - "10.158.0.198" interface: diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v1.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v1.yml index 8aac69707d..22256f7fd8 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v1.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v1.yml @@ -1,21 +1,21 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "" + type: "" nexthop: - "10.255.1.1" interface: - "Vlan1" - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.180.195.0/32" - etype: "" + type: "" nexthop: - "10.180.101.5" - "10.180.101.10" @@ -23,43 +23,43 @@ parsed_sample: - "GigabitEthernet1/0/1" - "GigabitEthernet1/0/2" - prefix: "10.255.1.0/24" - etype: "attached" + type: "attached" nexthop: [] interface: - "Vlan1" - prefix: "10.255.1.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: - "Vlan1" - prefix: "10.255.255.192/30" - etype: "" + type: "" nexthop: - "10.255.2.1" interface: - "Port-channel1.1825" - prefix: "10.255.200.0/24" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0/2.200" - prefix: "127.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v2.yml b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v2.yml index a4e66a4e7c..3d7dfbf189 100644 --- a/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v2.yml +++ b/tests/cisco_ios/show_ip_cef/show_ip_cef_c3850_v2.yml @@ -1,34 +1,34 @@ --- parsed_sample: - prefix: "0.0.0.0/0" - etype: "no route" + type: "no route" nexthop: [] interface: [] - prefix: "0.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "127.0.0.0/8" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v1.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v1.yml index adaa170c48..8081991696 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v1.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v1.yml @@ -2,25 +2,25 @@ parsed_sample: - prefix: "0.0.0.0/0" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "172.17.40.1" interface: - "Tunnel0" - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "172.17.40.1" interface: @@ -31,14 +31,14 @@ parsed_sample: - "connected" - "cover dependents" - "need deagg" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0" - prefix: "10.191.64.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: - "GigabitEthernet0/0" @@ -46,14 +46,14 @@ parsed_sample: flags: - "receive" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "GigabitEthernet0/0" - prefix: "10.191.64.2/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/0" @@ -63,14 +63,14 @@ parsed_sample: - "connected" - "cover dependents" - "need deagg" - etype: "attached" + type: "attached" nexthop: [] interface: - "Tunnel0" - prefix: "172.17.40.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: - "Tunnel0" @@ -78,29 +78,29 @@ parsed_sample: flags: - "receive" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Tunnel0" - prefix: "224.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v2.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v2.yml index abb38c5b3b..c967bdcfd6 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v2.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2800_v2.yml @@ -4,26 +4,26 @@ parsed_sample: flags: - "cached adjacency 199.220.235.181" - "recursive" - etype: "cached" + type: "cached" nexthop: - "199.220.235.181" interface: - "GigabitEthernet0/1" - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: - "0.0.0.0" interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "" + type: "" nexthop: [] interface: [] - prefix: "10.158.0.0/19" flags: [] - etype: "null" + type: "null" nexthop: - "0.0.0.0" interface: @@ -31,7 +31,7 @@ parsed_sample: - prefix: "10.158.0.192/29" flags: - "cached adjacency 10.158.0.209" - etype: "cached" + type: "cached" nexthop: - "10.158.0.209" interface: @@ -39,35 +39,35 @@ parsed_sample: - prefix: "10.158.0.208/32" flags: - "receive" - etype: "" + type: "" nexthop: [] interface: [] - prefix: "10.180.30.1/32" flags: - "connected" - "receive" - etype: "" + type: "" nexthop: [] interface: [] - prefix: "199.220.235.180/30" flags: - "attached" - "connected" - etype: "glean" + type: "glean" nexthop: [] interface: - "GigabitEthernet0/1" - prefix: "199.220.235.180/32" flags: - "receive" - etype: "" + type: "" nexthop: [] interface: [] - prefix: "199.220.235.181/32" flags: - "connected" - "cached adjacency 199.220.235.181" - etype: "cached" + type: "cached" nexthop: - "199.220.235.181" interface: @@ -75,18 +75,18 @@ parsed_sample: - prefix: "224.0.0.0/24" flags: - "receive" - etype: "" + type: "" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: - "0.0.0.0" interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "" + type: "" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2900_v1.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2900_v1.yml index d0dfb5df1e..8d1af45bc7 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2900_v1.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c2900_v1.yml @@ -5,25 +5,25 @@ parsed_sample: - "rib only nolabel" - "rib defined all labels" - "default route" - etype: "attached" + type: "attached" nexthop: - "10.181.150.18" interface: - "GigabitEthernet0/2" - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "10.180.150.33" interface: @@ -32,7 +32,7 @@ parsed_sample: flags: - "rib only nolabel" - "rib defined all labels" - etype: "attached" + type: "attached" nexthop: - "10.181.150.18" interface: @@ -40,7 +40,7 @@ parsed_sample: - prefix: "10.180.140.153/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "GigabitEthernet0/1" @@ -48,7 +48,7 @@ parsed_sample: flags: - "rib only nolabel" - "rib defined all labels" - etype: "attached" + type: "attached" nexthop: [] interface: - "Null0" @@ -59,7 +59,7 @@ parsed_sample: - "receive" - "local" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Loopback180" @@ -69,21 +69,21 @@ parsed_sample: - "connected" - "cover dependents" - "need deagg" - etype: "attached" + type: "attached" nexthop: [] interface: - "Port-channel1.1822" - prefix: "10.180.150.32/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: - "Port-channel1.1822" - prefix: "10.180.150.33/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "Port-channel1.1822" @@ -92,7 +92,7 @@ parsed_sample: - "receive" - "local" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Port-channel1.1822" @@ -100,7 +100,7 @@ parsed_sample: flags: - "rib only nolabel" - "rib defined all labels" - etype: "attached" + type: "attached" nexthop: - "10.181.150.18" interface: @@ -109,29 +109,29 @@ parsed_sample: flags: - "rib only nolabel" - "rib defined all labels" - etype: "attached" + type: "attached" nexthop: [] interface: - "Null0" - prefix: "224.0.0.0/4" flags: [] - etype: "multicast" + type: "multicast" nexthop: [] interface: [] - prefix: "224.0.0.0/24" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3750.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3750.yml index 4a7ee34243..c6f39dac30 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3750.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3750.yml @@ -2,25 +2,25 @@ parsed_sample: - prefix: "0.0.0.0/0" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "10.158.0.198" interface: - "Vlan1801" - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.0.0.0/16" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "10.158.0.198" interface: @@ -31,43 +31,43 @@ parsed_sample: - "connected" - "cover dependents" - "need deagg" - etype: "attached" + type: "attached" nexthop: [] interface: - "Vlan1801" - prefix: "10.158.0.192/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: - "Vlan1801" - prefix: "10.158.0.195/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "Vlan1801" - prefix: "224.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v1.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v1.yml index 1a8ad67319..3f3af0a443 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v1.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v1.yml @@ -3,25 +3,25 @@ parsed_sample: - prefix: "0.0.0.0/0" flags: - "default route" - etype: "nexthop" + type: "nexthop" nexthop: - "10.255.1.1" interface: - "Port-channel1.1" - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "10.180.195.0/32" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "10.180.101.5" - "10.180.101.10" @@ -30,7 +30,7 @@ parsed_sample: - "GigabitEthernet1/0/2" - prefix: "10.255.0.0/30" flags: [] - etype: "nexthop" + type: "nexthop" nexthop: - "10.255.1.1" interface: @@ -41,21 +41,21 @@ parsed_sample: - "connected" - "cover dependents" - "need deagg" - etype: "attached" + type: "attached" nexthop: [] interface: - "Port-channel1.1" - prefix: "10.255.1.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: - "Port-channel1.1" - prefix: "10.255.1.1/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "Port-channel1.1" @@ -64,7 +64,7 @@ parsed_sample: - "receive" - "local" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Port-channel1.1" @@ -75,7 +75,7 @@ parsed_sample: - "receive" - "local" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Loopback180" @@ -84,30 +84,30 @@ parsed_sample: - "receive" - "local" - "source eligible" - etype: "receive" + type: "receive" nexthop: [] interface: - "Vlan1831" - prefix: "10.180.163.133/32" flags: - "attached" - etype: "attached" + type: "attached" nexthop: [] interface: - "Vlan1831" - prefix: "127.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] diff --git a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v2.yml b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v2.yml index 85a797a48b..65b06cc77f 100644 --- a/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v2.yml +++ b/tests/cisco_ios/show_ip_cef_detail/show_ip_cef_detail_c3850_v2.yml @@ -4,44 +4,44 @@ parsed_sample: flags: - "default route handler" - "default route" - etype: "no route" + type: "no route" nexthop: [] interface: [] - prefix: "0.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "0.0.0.0/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "127.0.0.0/8" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "224.0.0.0/24" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: [] - prefix: "240.0.0.0/4" flags: [] - etype: "drop" + type: "drop" nexthop: [] interface: [] - prefix: "255.255.255.255/32" flags: - "receive" - etype: "receive" + type: "receive" nexthop: [] interface: []