Skip to content

Commit

Permalink
New Template: cisco_wlc_ssh_show_port_summary/stats_port_summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbear committed Jan 30, 2021
1 parent 0d19e36 commit fa65ea1
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 0 deletions.
23 changes: 23 additions & 0 deletions templates/cisco_wlc_ssh_show_port_summary.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Value PORT (\S+)
Value TYPE (\S+)
Value STP_STATUS (\S+)
Value ADMIN_MODE (\S+)
Value PHYSICAL_MODE (\w+\s?\w+)
Value PHYSICAL_STATUS (\w+\s?\w+)
Value LINK_STATUS (\S+)
Value LINK_TRAP (\S+)
Value POE (\S+(\s+\S+\s+\S+)?)

Start
^\s+STP\s+Admin\s+(Physical\s+){2}\s*(Link\s*){2}\s*$$
^\s*Pr\s+Type\s+Stat\s+(Mode\s+){2}\s*(Status\s+){2}\s*Trap\s+POE\s*$$
#
# Port Status and Modes (after the dashed line)
^\s*[-\s]+$$ -> Port_Status
^\s*$$
^. -> Error

Port_Status
^\s*${PORT}\s+${TYPE}\s+${STP_STATUS}\s+${ADMIN_MODE}\s+${PHYSICAL_MODE}\s+${PHYSICAL_STATUS}\s+${LINK_STATUS}\s+${LINK_TRAP}\s+${POE}\s*$$ -> Record
^\s*$$
^. -> Error
23 changes: 23 additions & 0 deletions templates/cisco_wlc_ssh_show_stats_port_summary.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Value PORT (\d)
Value LINK_STATUS (\S+)
Value PACKETS_IN (\d+)
Value PACKETS_OUT (\d+)
Value BROADCAST_IN (\d+)
Value ERRORS_IN (\d+)
Value ERRORS_OUT (\d+)
Value COLLISIONS (\d+)

Start
^\s+Link\s+(Pkts In\s+){2}\s*Pkts Out\s*$$
^\s*Pr\s+Status\s+(Pkts (In|Out)\s+){2}\s*Bcast\s+(?:Errors\s+){2}\s*Collisions\s*$$
#
# Port Statistics (after the dashed line)
^\s*[-\s]+$$ -> Port_Stats
^\s*$$
^. -> Error

Port_Stats
# make the Port ID optional so the Total line will be captured without error
^\s*${PORT}?\s+${LINK_STATUS}\s+${PACKETS_IN}\s+${PACKETS_OUT}\s+${BROADCAST_IN}\s+${ERRORS_IN}\s+${ERRORS_OUT}\s+${COLLISIONS}\s*$$ -> Record
^\s*$$
^. -> Error
2 changes: 2 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,15 @@ cisco_wlc_ssh_show_interface_detailed_id.textfsm, .*, cisco_wlc_ssh, sh[[ow]] in
cisco_wlc_ssh_show_cdp_neighbors_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]]
cisco_wlc_ssh_show_redundancy_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] red[[undancy]] su[[mmary]]
cisco_wlc_ssh_show_rf-profile_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] rf-[[profile]] s[[ummary]]
cisco_wlc_ssh_show_stats_port_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] st[[ats]] p[[ort]] s[[ummary]]
cisco_wlc_ssh_show_ap_config_general.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ap con[[fig]] ge[[neral]]
cisco_wlc_ssh_show_interface_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] int[[erface]] s[[ummary]]
cisco_wlc_ssh_show_redundancy_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] red[[undancy]] d[[etail]]
cisco_wlc_ssh_show_client_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] cl[[ient]] det[[ail]]
cisco_wlc_ssh_show_exclusionlist.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ex[[clusionlist]]
cisco_wlc_ssh_show_ap_image_all.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ap ima[[ge]] a[[ll]]
cisco_wlc_ssh_show_mobility_sum.textfsm, .*, cisco_wlc_ssh, sh[[ow]] mo[[bility]] su[[mmary]]
cisco_wlc_ssh_show_port_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] por[[t]] s[[ummary]]
cisco_wlc_ssh_show_band-select.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ba[[nd-select]]
cisco_wlc_ssh_show_ap_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ap sum[[mary]]
cisco_wlc_ssh_show_inventory.textfsm, .*, cisco_wlc_ssh, sh[[ow]] inve[[ntory]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

STP Admin Physical Physical Link Link
Pr Type Stat Mode Mode Status Status Trap POE
-- ------- ---- ------- ---------- ---------- ------ ------- ---------
1 Normal Forw Enable Auto 1000 Full Up Enable N/A
2 Normal Disa Disable Auto Auto Down Enable N/A
3 Normal Disa Disable Auto Auto Down Enable Disable
4 Normal Forw Enable Auto 1000 Full Up Enable Enable (Power Off)
5 Normal Disa Enable Auto Auto Down Enable N/A
RP Normal Forw Enable Auto Auto Up Enable N/A
SP Normal Disa Enable Auto Auto Down Enable N/A
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
parsed_sample:
- port: "1"
type: "Normal"
stp_status: "Forw"
admin_mode: "Enable"
physical_mode: "Auto"
physical_status: "1000 Full"
link_status: "Up"
link_trap: "Enable"
poe: "N/A"
- port: "2"
type: "Normal"
stp_status: "Disa"
admin_mode: "Disable"
physical_mode: "Auto"
physical_status: "Auto"
link_status: "Down"
link_trap: "Enable"
poe: "N/A"
- port: "3"
type: "Normal"
stp_status: "Disa"
admin_mode: "Disable"
physical_mode: "Auto"
physical_status: "Auto"
link_status: "Down"
link_trap: "Enable"
poe: "Disable"
- port: "4"
type: "Normal"
stp_status: "Forw"
admin_mode: "Enable"
physical_mode: "Auto"
physical_status: "1000 Full"
link_status: "Up"
link_trap: "Enable"
poe: "Enable (Power Off)"
- port: "5"
type: "Normal"
stp_status: "Disa"
admin_mode: "Enable"
physical_mode: "Auto"
physical_status: "Auto"
link_status: "Down"
link_trap: "Enable"
poe: "N/A"
- port: "RP"
type: "Normal"
stp_status: "Forw"
admin_mode: "Enable"
physical_mode: "Auto"
physical_status: "Auto"
link_status: "Up"
link_trap: "Enable"
poe: "N/A"
- port: "SP"
type: "Normal"
stp_status: "Disa"
admin_mode: "Enable"
physical_mode: "Auto"
physical_status: "Auto"
link_status: "Down"
link_trap: "Enable"
poe: "N/A"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Link Pkts In Pkts In Pkts Out
Pr Status Pkts In Pkts Out Bcast Errors Errors Collisions
-- ------ ------- ------- ------- ------- ------- ----------
1 Up 2364509905 2472568024 66473417 0 0 0
2 Down 0 0 0 0 0 0
3 Down 0 0 0 0 0 0
4 Up 335582045 124686415 3515026 0 0 0
5 Down 0 0 0 0 0 0
Total 2700091950 2597254439 69988443 0 0 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
parsed_sample:
- port: "1"
link_status: "Up"
packets_in: "2364509905"
packets_out: "2472568024"
broadcast_in: "66473417"
errors_in: "0"
errors_out: "0"
collisions: "0"
- port: "2"
link_status: "Down"
packets_in: "0"
packets_out: "0"
broadcast_in: "0"
errors_in: "0"
errors_out: "0"
collisions: "0"
- port: "3"
link_status: "Down"
packets_in: "0"
packets_out: "0"
broadcast_in: "0"
errors_in: "0"
errors_out: "0"
collisions: "0"
- port: "4"
link_status: "Up"
packets_in: "335582045"
packets_out: "124686415"
broadcast_in: "3515026"
errors_in: "0"
errors_out: "0"
collisions: "0"
- port: "5"
link_status: "Down"
packets_in: "0"
packets_out: "0"
broadcast_in: "0"
errors_in: "0"
errors_out: "0"
collisions: "0"
- port: ""
link_status: "Total"
packets_in: "2700091950"
packets_out: "2597254439"
broadcast_in: "69988443"
errors_in: "0"
errors_out: "0"
collisions: "0"

0 comments on commit fa65ea1

Please sign in to comment.