Skip to content

Commit

Permalink
Fix the spelling of the deferred capture group name (networktocode#1584)
Browse files Browse the repository at this point in the history
* update ASA interface detail to work with loopback interface issue networktocode#1538

* fix spelling of DEFERRED capture group
  • Loading branch information
mjbear committed Jan 7, 2024
1 parent e750b6c commit ab7787a
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 27 deletions.
12 changes: 9 additions & 3 deletions ntc_templates/templates/cisco_asa_show_interface_detail.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Value FLOWCONTROL_OUT (\w+)
Value BONDED_PORT (.+?)
Value DESCRIPTION (.*)
Value MAC_ADDRESS ([a-zA-Z0-9]+\.[a-zA-Z0-9]+\.[a-zA-Z0-9]+)
Value MTU (.+?)
Value MTU (.+)
Value IP_ADDRESS (.+?)
Value NETMASK (.+?)
Value IN_PACKETS (\d+)
Expand Down Expand Up @@ -42,7 +42,7 @@ Value OUT_ERRORS (\d+)
Value COLLISIONS (\d+)
Value INTERFACE_RESETS (\d+)
Value LATE_COLLISIONS (\d+)
Value DEFFERED (\d+)
Value DEFERRED (\d+)
Value OUT_DECODE_DROPS (\d+)
Value RATE_LIMIT_DROPS (\d+)
Value SWITCH_EGRESS_POLICY_DROPS (\d+)
Expand Down Expand Up @@ -81,31 +81,37 @@ Start
^Interface -> Continue.Record
^Interface\s+${INTERFACE}\s+"${INTERFACE_NAME}",\s+is\s+${LINK_STATUS},\s+line\s+protocol\s+is\s+${PROTOCOL_STATUS}
^\s+Hardware\s+is\s+${HARDWARE_TYPE}.*BW\s+${BANDWIDTH}.*DLY\s+${DELAY}
^\s+Hardware\s+is\s+${HARDWARE_TYPE}.*MAC\s+address\s+${MAC_ADDRESS},\s+MTU\s+${MTU}
^\s+\S*${DUPLEX}\S*,\s+\S*?${SPEED}(?:\)|\S+)\s*$$
^\s+Input\s+flow\s+control\s+is\s+${FLOWCONTROL_IN},\s+output\s+flow\s+control\s+is\s+${FLOWCONTROL_OUT}
^\s+Active\s+member\s+of\s+${BONDED_PORT}\s*$$
^\s+Description:\s+${DESCRIPTION}
^\s+MAC\s+address\s+${MAC_ADDRESS}.*MTU\s+${MTU}\s*$$
^\s+IP\s+[Aa]ddress\s+${IP_ADDRESS}(?:,\s+[Ss]ubnet\s+[Mm]ask\s+${NETMASK})?\s*$$
^\s+${IN_PACKETS}\s+packets\s+input,\s+${IN_BYTES}\s+bytes,\s+${NO_BUFFER}\s+no\s+buffer
^\s+${IN_PACKETS}\s+packets\s+input,\s+${IN_BYTES}\s+bytes
^\s+Received\s+${BROADCASTS}\s+broadcasts,\s+${RUNTS}\s+runts,\s+${GIANTS}\s+giants
^\s+${IN_ERRORS}\s+input\s+errors,\s+${CRC}\s+CRC,\s+${FRAME}\s+frame,\s+${OVERRUN}\s+overrun,\s+${IGNORED}\s+ignored,\s+${ABORT}\s+abort
^\s+${IN_PAUSE_RESUME}\s+pause/resume\s+input
^\s+${IN_PAUSE}\s+pause\s+input,\s+${IN_RESUME}\s+resume\s+input
^\s+${L2_DECODE_DROPS}\s+L2\s+decode\s+drops
^\s+${SWITCH_INGRESS_POLICY_DROPS}\s+switch\s+ingress\s+policy\s+drops
^\s+${OUT_PACKETS}\s+packets\s+output,\s+${OUT_BYTES}\s+bytes,\s+${UNDERRUNS}\s+underruns
^\s+${OUT_PACKETS}\s+packets\s+output,\s+${OUT_BYTES}\s+bytes
^\s+${OUT_PAUSE_RESUME}\s+pause/resume\s+output
^\s+${OUT_PAUSE}\s+pause\s+output,\s+${OUT_RESUME}\s+resume\s+output
^\s+${OUT_ERRORS}\s+output\s+errors,\s+${COLLISIONS}\s+collisions,\s+${INTERFACE_RESETS}\s+interface\s+resets
^\s+${LATE_COLLISIONS}\s+late\s+collisions,\s+${DEFFERED}\s+deferred
^\s+${LATE_COLLISIONS}\s+late\s+collisions,\s+${DEFERRED}\s+deferred
^\s+${OUT_DECODE_DROPS}\s+output\s+decode\s+drops
^\s+${RATE_LIMIT_DROPS}\s+rate\s+limit\s+drops
^\s+${SWITCH_EGRESS_POLICY_DROPS}\s+switch\s+egress\s+policy\s+drops
^\s+${IN_RESET_DROPS}\s+input\s+reset\s+drops,\s+${OUT_RESET_DROPS}\s+output\s+reset\s+drops
^\s+input\s+queue
^\s+output\s+queue
^\s+Queue\s+Stats:
^\s+Traffic\s+Statistics
^\s+\d+\s+packets\s+dropped
^\s+\d+\s+minute\s+\w+\s+rate
^\s+VLAN\s+identifier\s+${VLAN_ID}
^\s+Control\s+Point\s+Interface\s+States -> ControlPoint
^\s+RX\[${RXRING_NUMBER}\]:\s+${RXRING_PACKETS}\s+packets,\s+${RXRING_BYTES}\s+bytes,\s+${RXRING_OVERRUN}\s+overrun -> RXRingBlocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parsed_sample:
control_interface_number: "8"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: "LAN Failover Interface"
duplex: "Full"
Expand Down Expand Up @@ -77,7 +77,7 @@ parsed_sample:
control_interface_number: "9"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: "STATE Failover Interface"
duplex: "Full"
Expand Down Expand Up @@ -145,7 +145,7 @@ parsed_sample:
control_interface_number: "10"
control_interface_state: "not active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Auto"
Expand Down Expand Up @@ -213,7 +213,7 @@ parsed_sample:
control_interface_number: "11"
control_interface_state: "not active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Auto"
Expand Down Expand Up @@ -281,7 +281,7 @@ parsed_sample:
control_interface_number: "12"
control_interface_state: "not active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Auto"
Expand Down Expand Up @@ -349,7 +349,7 @@ parsed_sample:
control_interface_number: "13"
control_interface_state: "not active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Auto"
Expand Down Expand Up @@ -417,7 +417,7 @@ parsed_sample:
control_interface_number: "2"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -553,7 +553,7 @@ parsed_sample:
control_interface_number: "3"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -690,7 +690,7 @@ parsed_sample:
control_interface_number: "4"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -827,7 +827,7 @@ parsed_sample:
control_interface_number: "5"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -957,7 +957,7 @@ parsed_sample:
control_interface_number: "18"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1025,7 +1025,7 @@ parsed_sample:
control_interface_number: "19"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1093,7 +1093,7 @@ parsed_sample:
control_interface_number: "20"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1161,7 +1161,7 @@ parsed_sample:
control_interface_number: "21"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1229,7 +1229,7 @@ parsed_sample:
control_interface_number: "6"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1297,7 +1297,7 @@ parsed_sample:
control_interface_number: "7"
control_interface_state: "not active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Auto"
Expand Down Expand Up @@ -1365,7 +1365,7 @@ parsed_sample:
control_interface_number: "14"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1433,7 +1433,7 @@ parsed_sample:
control_interface_number: "15"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "10 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1501,7 +1501,7 @@ parsed_sample:
control_interface_number: "16"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "1000 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1569,7 +1569,7 @@ parsed_sample:
control_interface_number: "17"
control_interface_state: "active"
crc: "0"
deffered: "0"
deferred: "0"
delay: "1000 usec"
description: ""
duplex: "Full"
Expand Down Expand Up @@ -1637,7 +1637,7 @@ parsed_sample:
control_interface_number: "23"
control_interface_state: "active"
crc: ""
deffered: ""
deferred: ""
delay: "10 usec"
description: "ext"
duplex: "Full"
Expand Down Expand Up @@ -1705,7 +1705,7 @@ parsed_sample:
control_interface_number: ""
control_interface_state: ""
crc: ""
deffered: ""
deferred: ""
delay: "10 usec"
description: "data-inside"
duplex: ""
Expand Down Expand Up @@ -1773,7 +1773,7 @@ parsed_sample:
control_interface_number: "24"
control_interface_state: "active"
crc: ""
deffered: ""
deferred: ""
delay: "1000 usec"
description: "techlan"
duplex: "Full"
Expand Down Expand Up @@ -1841,7 +1841,7 @@ parsed_sample:
control_interface_number: ""
control_interface_state: ""
crc: ""
deffered: ""
deferred: ""
delay: "1000 usec"
description: "data-outside"
duplex: ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Interface Virtual0 "_internal_loopback", is up, line protocol is up
Hardware is Virtual MAC address 0000.0000.0000, MTU 1500
IP address 127.1.0.1, subnet mask 255.255.0.0
Traffic Statistics for "_internal_loopback":
1 packets input, 28 bytes
1 packets output, 28 bytes
1 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
Control Point Interface States:
Interface number is 16
Interface config status is active
Interface state is active
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
parsed_sample:
- abort: ""
bandwidth: ""
bonded_port: ""
broadcasts: ""
collisions: ""
control_interface_config_status: "active"
control_interface_number: "16"
control_interface_state: "active"
crc: ""
deferred: ""
delay: ""
description: ""
duplex: ""
flowcontrol_in: ""
flowcontrol_out: ""
frame: ""
giants: ""
hardware_type: "Virtual "
ignored: ""
in_bytes: "28"
in_errors: ""
in_packets: "1"
in_pause: ""
in_pause_resume: ""
in_reset_drops: ""
in_resume: ""
interface: "Virtual0"
interface_name: "_internal_loopback"
interface_resets: ""
ip_address: "127.1.0.1"
l2_decode_drops: ""
late_collisions: ""
link_status: "up"
mac_address: "0000.0000.0000"
mtu: "1500"
netmask: "255.255.0.0"
no_buffer: ""
out_bytes: "28"
out_decode_drops: ""
out_errors: ""
out_packets: "1"
out_pause: ""
out_pause_resume: ""
out_reset_drops: ""
out_resume: ""
overrun: ""
protocol_status: "up"
rate_limit_drops: ""
runts: ""
rxring_blocks_free_curr: []
rxring_blocks_free_low: []
rxring_bytes: []
rxring_interface: []
rxring_number: []
rxring_overrun: []
rxring_packets: []
speed: ""
switch_egress_policy_drops: ""
switch_ingress_policy_drops: ""
txring_blocks_free_curr: []
txring_blocks_free_low: []
txring_bytes: []
txring_interface: []
txring_number: []
txring_packets: []
txring_underrun: []
underruns: ""
vlan_id: ""

0 comments on commit ab7787a

Please sign in to comment.