Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fields to IOS/NXOS show int #1769

Merged
merged 5 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ntc_templates/templates/cisco_ios_show_interfaces.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Value OUTPUT_ERRORS (\d+)
Value VLAN_ID (\d+)
Value VLAN_ID_INNER (\d+)
Value VLAN_ID_OUTER (\d+)
Value QUEUE_SIZE (\d+)
Value QUEUE_MAX (\d+)
Value QUEUE_DROPS (\d+)
Value QUEUE_FLUSHES (\d+)
Value QUEUE_OUTPUT_DROPS (\d+)

Start
^\S+\s+is\s+.+?,\s+line\s+protocol.*$$ -> Continue.Record
Expand All @@ -48,6 +53,7 @@ Start
^\s+Encapsulation\s+${ENCAPSULATION}, outer ID\s+${VLAN_ID_OUTER}, inner ID\s+${VLAN_ID_INNER}.+$$
^\s+Encapsulation\s+${ENCAPSULATION},.+$$
^\s+Last\s+input\s+${LAST_INPUT},\s+output\s+${LAST_OUTPUT},\s+output\s+hang\s+${LAST_OUTPUT_HANG}\s*$$
^\s+Input\s+queue:\s+${QUEUE_SIZE}\/${QUEUE_MAX}\/${QUEUE_DROPS}\/${QUEUE_FLUSHES}\s+\(size\/max\/drops\/flushes\);\s+Total output\s+drops:\s+${QUEUE_OUTPUT_DROPS}\s*$$
^\s+Queueing\s+strategy:\s+${QUEUE_STRATEGY}\s*$$
^\s+${DUPLEX},\s+${SPEED},.+media\stype\sis\s${MEDIA_TYPE}$$
^\s+${DUPLEX},\s+${SPEED},.+TX/FX$$
Expand Down
9 changes: 8 additions & 1 deletion ntc_templates/templates/cisco_nxos_show_interface.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Value DELAY (\d+\s+\w+)
Value ENCAPSULATION ([\w\.]+)
Value LAST_LINK_FLAPPED (.+?)
Value VLAN_ID (\d+)
Value PACKET_INPUT_RATE (.+?)
Value PACKET_OUTPUT_RATE (.+?)
Value BANDWIDTH_INPUT_RATE (.+?)
Value BANDWIDTH_OUTPUT_RATE (.+?)
Value MEDIA_TYPE (.+?)

Start
^\S+\s+is.+ -> Continue.Record
Expand All @@ -30,11 +35,13 @@ Start
^\s+Description:\s+${DESCRIPTION}\s*$$
^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}\/${PREFIX_LENGTH}
^\s+Port\s+mode\s+is\s+${MODE}
^\s+${DUPLEX}, ${SPEED}(,|$$)
^\s+${DUPLEX}, ${SPEED}(,\s+media\s+type\s+is\s+${MEDIA_TYPE})?\s*$$
^\s+MTU\s+${MTU}.*BW\s+${BANDWIDTH}.*DLY\s+${DELAY}
^\s+Encapsulation\s+${ENCAPSULATION}(,)?(\s+Virtual\s+LAN,\s+Vlan\s+ID\s+${VLAN_ID},)?
^\s+${INPUT_PACKETS}\s+input\s+packets\s+\d+\s+bytes\s*$$
^\s+${INPUT_ERRORS}\s+input\s+error\s+\d+\s+short\s+frame\s+\d+\s+overrun\s+\d+\s+underrun\s+\d+\s+ignored\s*$$
^\s+${OUTPUT_PACKETS}\s+output\s+packets\s+\d+\s+bytes\s*$$
^\s+${OUTPUT_ERRORS}\s+output\s+error\s+\d+\s+collision\s+\d+\s+deferred\s+\d+\s+late\s+collision\s*$$
^\s+Last\s+link\s+flapped\s+${LAST_LINK_FLAPPED}\s*$$
^\s+\d+\s+seconds\s+input\s+rate\s+${BANDWIDTH_INPUT_RATE}\s+bits/sec,\s+${PACKET_INPUT_RATE}\s+packets/sec
^\s+\d+\s+seconds\s+output\s+rate\s+${BANDWIDTH_OUTPUT_RATE}\s+bits/sec,\s+${PACKET_OUTPUT_RATE}\s+packets/sec
45 changes: 45 additions & 0 deletions tests/cisco_ios/show_interfaces/cisco_ios_show_interfaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "down (notconnect)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -68,6 +73,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "up (connected)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -105,6 +115,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "up (connected)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -142,6 +157,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "up (connected)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -179,6 +199,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "up (connected)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -216,6 +241,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "down (notconnect)"
queue_drops: "0"
queue_flushes: "0"
queue_max: "2000"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "Auto-speed"
Expand Down Expand Up @@ -253,6 +283,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "up"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: ""
Expand Down Expand Up @@ -290,6 +325,11 @@ parsed_sample:
overrun: "0"
prefix_length: "16"
protocol_status: "up"
queue_drops: "0"
queue_flushes: "0"
queue_max: "75"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: ""
Expand Down Expand Up @@ -327,6 +367,11 @@ parsed_sample:
overrun: "0"
prefix_length: ""
protocol_status: "down"
queue_drops: "0"
queue_flushes: "0"
queue_max: "375"
queue_output_drops: "0"
queue_size: "0"
queue_strategy: "fifo"
runts: "0"
speed: "1000Mbps"
Expand Down
Loading
Loading