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

Adding new template for Huawei ONT: display wifi information #2066

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Value SSID_INDEX (\d+)
Value SSID (\S.+\S)
Value BSSID (\S+)
Value ENABLED (\S+)
Value STATUS (\S+)
Value AUTHENTICATION_MODE (\S+)
Value ENCRYPTION_MODE (\S+)
Value CHANNEL (\d+)
Value CHANNEL_BANDWIDTH_MHZ (\S+)
Value WIFI_STANDARD (\S+)
Value SUPPORTED_MAX_RATE_MBPS (\d+)
Value COUNTRY_CODE (\S+)
Value MAXIMUM_TX_POWER (\d+)
Value CURRENT_TX_POWER_LEVEL (\S+)

Start
^\s*SSID\s+number\s*:\s*\d+\s*$$
^\s*-+\s*$$
^\s*SSID\s+Index\s+:\s*${SSID_INDEX}\s*$$
^\s*SSID\s+:\s*${SSID}\s*$$
^\s*BSSID\s+:\s*${BSSID}\s*$$
^\s*Enable\s+:\s*${ENABLED}\s*$$
^\s*Status\s+:\s*${STATUS}\s*$$
^\s*Authentication\s+Mode\s+:\s*${AUTHENTICATION_MODE}\s*$$
^\s*Encryption\s+Mode\s+:\s*${ENCRYPTION_MODE}\s*$$
^\s*Channel\s+:\s*${CHANNEL}(?:\(auto\))?\s*$$
^\s*Channel\s+bandwidth\s+:\s*${CHANNEL_BANDWIDTH_MHZ}\s*MHz$$
^\s*Standard\s+:\s*${WIFI_STANDARD}\s*$$
^\s*Supported\s+Max\s+Rate\s+:\s*${SUPPORTED_MAX_RATE_MBPS}\s*M\s*$$
^\s*Country\s+Code\s+:\s*${COUNTRY_CODE}\s*$$
^\s*Maximum\s+Tx-Power\s+:\s*${MAXIMUM_TX_POWER}\s+dBm\s+\(\d+\s+mW\)\s*$$
^\s*Current\s+Tx-Power\s+Level\s+:\s*${CURRENT_TX_POWER_LEVEL}%\s*$$ -> Record
^\s+$$
^\s*success!\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ hp_procurve_show_vlans.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] vl[[ans]]
hp_procurve_show_arp.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ar[[p]]
hp_procurve_show_ip.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ip

huawei_ont_display_wifi_information.textfsm, .*, huawei_ont, di[[splay]] w[[ifi]] i[[nformation]]
huawei_ont_display_epon_ont_info.textfsm, .*, huawei_ont, di[[splay]] ep[[on]] o[[nt]] i[[nfo]]
huawei_ont_display_inner_version.textfsm, .*, huawei_ont, di[[splay]] in[[ner]] ve[[rsion]]
huawei_ont_display_access_mode.textfsm, .*, huawei_ont, di[[splay]] ac[[cess]] m[[ode]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
SSID number:8
----------------------------------------------------
SSID Index :1
SSID :WIFI CASA
BSSID :AA:AA:AA:AA:AA:AA
Enable :Enabled
Status :Up
Authentication Mode :WPA2-PSK
Encryption Mode :AESEncryption
Channel :11
Channel bandwidth :20 MHz
Standard :11bgn
Supported Max Rate :216 M
Country Code :ES
Maximum Tx-Power :27 dBm (501 mW)
Current Tx-Power Level :60%
----------------------------------------------------
SSID Index :2
SSID :MY_WIFI
BSSID :BB:BB:BB:BB:BB:BB
Enable :Disabled
Status :Disabled
Authentication Mode :Open
Encryption Mode :None
Channel :11
Channel bandwidth :20 MHz
Standard :11bgn
Supported Max Rate :216 M
Country Code :ES
Maximum Tx-Power :27 dBm (501 mW)
Current Tx-Power Level :60%
----------------------------------------------------

success!
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- authentication_mode: "WPA2-PSK"
bssid: "AA:AA:AA:AA:AA:AA"
channel: "11"
channel_bandwidth_mhz: "20"
country_code: "ES"
current_tx_power_level: "60"
enabled: "Enabled"
encryption_mode: "AESEncryption"
maximum_tx_power: "27"
ssid: "WIFI CASA"
ssid_index: "1"
status: "Up"
supported_max_rate_mbps: "216"
wifi_standard: "11bgn"
- authentication_mode: "Open"
bssid: "BB:BB:BB:BB:BB:BB"
channel: "11"
channel_bandwidth_mhz: "20"
country_code: "ES"
current_tx_power_level: "60"
enabled: "Disabled"
encryption_mode: "None"
maximum_tx_power: "27"
ssid: "MY_WIFI"
ssid_index: "2"
status: "Disabled"
supported_max_rate_mbps: "216"
wifi_standard: "11bgn"