Skip to content

Commit

Permalink
fix WLC Show ap summary (#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-damasceno authored Jul 20, 2024
1 parent 9351320 commit 77d6de8
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ntc_templates/templates/cisco_wlc_ssh_show_ap_summary.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@ Value AP_NAME (\S+)
Value SLOT (\d+)
Value AP_MODEL (\S+)
Value MAC_ADDRESS ([a-fA-F0-9:\.]+)
Value RADIO_MAC ([a-fA-F0-9:\.]+)
Value LOCATION (.+?)
Value PORT (.+?)
Value COUNTRY (\S+)
Value IP_ADDRESS ([a-fA-F0-9:\.]+)
Value CLIENTS (\d+)
Value DSE_LOCATION (.+?)

Value PRIORITY (\d+)
Value STATE (\S+)
Value NUMBER_OF_APS (\d+)

Start
# Skip lines
^Number\s+of\s+APs -> Record
# Match the various record patterns
^${AP_NAME}\s+${SLOT}\s+${AP_MODEL}\s+${MAC_ADDRESS}\s+${LOCATION}\s+${COUNTRY}\s+${IP_ADDRESS}\s+${CLIENTS}\s+${DSE_LOCATION}\s*$$ -> Record
^${AP_NAME}\s+${SLOT}\s+${AP_MODEL}\s+${MAC_ADDRESS}\s+${LOCATION}\s+${PORT}\s+${COUNTRY}\s+${PRIORITY}\s*$$ -> Record
^${AP_NAME}\s+${SLOT}\s+${AP_MODEL}\s+${MAC_ADDRESS}\s+${RADIO_MAC}\s${LOCATION}\s+${COUNTRY}\s+${IP_ADDRESS}\s+${STATE}\s*$$ -> Record
^.+\.+
^\s*$$
^AP\s+Name\s+Slots\s+AP\s+Model\s+Ethernet\s+MAC\s+Location\s+Country\s+IP\s+Address\s+Clients\s+DSE\s+Location\s*$$
^AP\s+Name\s+Slots\s+AP\s+Model\s+Ethernet\s+MAC\s+Location\s+Port\s+Country\s+Priority\s*$$
^AP\s+Name\s+Slots\s+AP\s+Model\s+Ethernet\s+MAC\s+Radio\s+MAC\s+Location\s+Country\s+IP\s+Address\s+State\s*$$
^-+
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ parsed_sample:
ip_address: "172.25.81.216"
location: "default location"
mac_address: "c0:ff:ee:c0:ff:ee"
number_of_aps: ""
port: ""
priority: ""
radio_mac: ""
slot: "3"
state: ""
- ap_model: "AIR-CAP2702E-E-K9"
ap_name: "2700-Server"
clients: "0"
Expand All @@ -17,4 +22,9 @@ parsed_sample:
ip_address: "172.25.81.221"
location: "Server room"
mac_address: "ca:fe:ca:fe:ca:fe"
number_of_aps: ""
port: ""
priority: ""
radio_mac: ""
slot: "2"
state: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Number of APs.................................... 2

Global AP User Name.............................. lastresort
Global AP Dot1x User Name........................ Not Configured

AP Name Slots AP Model Ethernet MAC Location Port Country Priority
------------------ ----- -------------------- ----------------- ---------------- ---- ------- ------
CISCO-WAP05 2 AIR-CAP2602I-A-K9 c0:ff:ee:c0:ff:11 default location LAG US 1
CISCO-WAP11 2 AIR-CAP2602I-A-K9 c0:ff:ee:c0:ff:22 default location LAG US 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- ap_model: "AIR-CAP2602I-A-K9"
ap_name: "CISCO-WAP05"
clients: ""
country: "US"
dse_location: ""
ip_address: ""
location: "default"
mac_address: "c0:ff:ee:c0:ff:11"
number_of_aps: ""
port: "location LAG"
priority: "1"
radio_mac: ""
slot: "2"
state: ""
- ap_model: "AIR-CAP2602I-A-K9"
ap_name: "CISCO-WAP11"
clients: ""
country: "US"
dse_location: ""
ip_address: ""
location: "default"
mac_address: "c0:ff:ee:c0:ff:22"
number_of_aps: ""
port: "location LAG"
priority: "1"
radio_mac: ""
slot: "2"
state: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Number of APs: 2

AP Name Slots AP Model Ethernet MAC Radio MAC Location Country IP Address State
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CISCO-WAP01 2 3802I 00a7.42e8.4011 00a7.42e8.b111 default location NL 11.11.11.11 Registered
CISCO-WAP02 2 3802I 00a7.42f2.8622 00a7.42f3.cb22 default location NL 22.22.22.22 Registered
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- ap_model: "3802I"
ap_name: "CISCO-WAP01"
clients: ""
country: "NL"
dse_location: ""
ip_address: "11.11.11.11"
location: " default location"
mac_address: "00a7.42e8.4011"
number_of_aps: ""
port: ""
priority: ""
radio_mac: "00a7.42e8.b111"
slot: "2"
state: "Registered"
- ap_model: "3802I"
ap_name: "CISCO-WAP02"
clients: ""
country: "NL"
dse_location: ""
ip_address: "22.22.22.22"
location: " default location"
mac_address: "00a7.42f2.8622"
number_of_aps: ""
port: ""
priority: ""
radio_mac: "00a7.42f3.cb22"
slot: "2"
state: "Registered"

0 comments on commit 77d6de8

Please sign in to comment.