From c27df05d07ccb9f6b49bd037468acd8cd260fd87 Mon Sep 17 00:00:00 2001 From: starlightdreamer <42082309+starlightdreamer@users.noreply.github.com> Date: Mon, 26 Oct 2020 13:00:40 -0500 Subject: [PATCH] Bugfix: ASA - show_interface - Adds missing case for duplex and speed. (#815) --- templates/cisco_asa_show_interface.textfsm | 1 + .../cisco_asa_show_interface2.raw | 29 +++++++++++++++++++ .../cisco_asa_show_interface2.yml | 26 +++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 tests/cisco_asa/show_interface/cisco_asa_show_interface2.raw create mode 100644 tests/cisco_asa/show_interface/cisco_asa_show_interface2.yml diff --git a/templates/cisco_asa_show_interface.textfsm b/templates/cisco_asa_show_interface.textfsm index f7533874f9..274a7a92ef 100644 --- a/templates/cisco_asa_show_interface.textfsm +++ b/templates/cisco_asa_show_interface.textfsm @@ -31,6 +31,7 @@ Start ^.*BW\s+${BANDWIDTH},\s+DLY\s+${DELAY} ^.*\(${DUPLEX}\),\s+Auto-Speed\(${SPEED}\) ^.*\(${DUPLEX}\),\s+\d+\s+Mbps\(${SPEED}\) + ^.*Duplex,\s+Auto-Speed ^.*Description:\s+${DESCRIPTION} ^.*MAC\s+address\s+${ADDRESS},\s+MTU\s+${MTU} ^.*MAC\s+address\s+${ADDRESS},\s+MTU\s+not\s+set diff --git a/tests/cisco_asa/show_interface/cisco_asa_show_interface2.raw b/tests/cisco_asa/show_interface/cisco_asa_show_interface2.raw new file mode 100644 index 0000000000..ad5372236f --- /dev/null +++ b/tests/cisco_asa/show_interface/cisco_asa_show_interface2.raw @@ -0,0 +1,29 @@ +Interface GigabitEthernet0/0 "outside", is up, line protocol is up + Hardware is i82540EM rev03, BW 1000 Mbps, DLY 10 usec + Full-Duplex, Auto-Speed + Input flow control is unsupported, output flow control is off + Description: to iosv-1 + MAC address fa16.3eb0.c3d3, MTU 1500 + IP address 10.0.0.5, subnet mask 255.255.255.252 + 2 packets input, 0 bytes, 0 no buffer + Received 0 broadcasts, 0 runts, 0 giants + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort + 0 pause input, 0 resume input + 0 L2 decode drops + 1 packets output, 0 bytes, 0 underruns + 0 pause output, 0 resume output + 0 output errors, 0 collisions, 2 interface resets + 0 late collisions, 0 deferred + 0 input reset drops, 0 output reset drops + input queue (blocks free curr/low): hardware (511/511) + output queue (blocks free curr/low): hardware (511/511) + Traffic Statistics for "outside": + 2 packets input, 381 bytes + 1 packets output, 28 bytes + 2 packets dropped + 1 minute input rate 0 pkts/sec, 0 bytes/sec + 1 minute output rate 0 pkts/sec, 0 bytes/sec + 1 minute drop rate, 0 pkts/sec + 5 minute input rate 0 pkts/sec, 0 bytes/sec + 5 minute output rate 0 pkts/sec, 0 bytes/sec + 5 minute drop rate, 0 pkts/sec diff --git a/tests/cisco_asa/show_interface/cisco_asa_show_interface2.yml b/tests/cisco_asa/show_interface/cisco_asa_show_interface2.yml new file mode 100644 index 0000000000..197fbd70c0 --- /dev/null +++ b/tests/cisco_asa/show_interface/cisco_asa_show_interface2.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - address: "fa16.3eb0.c3d3" + bandwidth: "1000 Mbps" + delay: "10 usec" + description: "to iosv-1" + duplex: "" + fivemin_drop_rate: "0" + fivemin_in_pps: "0" + fivemin_in_rate: "0" + fivemin_out_pps: "0" + fivemin_out_rate: "0" + hardware_type: "i82540EM rev03" + interface: "GigabitEthernet0/0" + interface_zone: "outside" + ip_address: "10.0.0.5" + link_status: "up" + mtu: "1500" + net_mask: "255.255.255.252" + onemin_drop_rate: "0" + onemin_in_pps: "0" + onemin_in_rate: "0" + onemin_out_pps: "0" + onemin_out_rate: "0" + protocol_status: "up" + speed: ""