diff --git a/ntc_templates/templates/cisco_wlc_ssh_show_ap_summary.textfsm b/ntc_templates/templates/cisco_wlc_ssh_show_ap_summary.textfsm index b725f38c07..a453893615 100644 --- a/ntc_templates/templates/cisco_wlc_ssh_show_ap_summary.textfsm +++ b/ntc_templates/templates/cisco_wlc_ssh_show_ap_summary.textfsm @@ -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 diff --git a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary.yml b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary.yml index af4871f2a7..f54fddc557 100644 --- a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary.yml +++ b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary.yml @@ -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" @@ -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: "" diff --git a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.raw b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.raw new file mode 100644 index 0000000000..c781d6dc94 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.raw @@ -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 diff --git a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.yml b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.yml new file mode 100644 index 0000000000..1bc41696c7 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_2500.yml @@ -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: "" diff --git a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.raw b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.raw new file mode 100644 index 0000000000..f286cec6df --- /dev/null +++ b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.raw @@ -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 diff --git a/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.yml b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.yml new file mode 100644 index 0000000000..aea8736364 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_ap_summary/cisco_wlc_ssh_show_ap_summary_C9800.yml @@ -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"