Skip to content

Commit c9eb789

Browse files
author
JOLY POTTUZ Flavien
committed
Enhanced ShowWlanSummary : Add support of SSID with spaces (max 2 spaces between each words)
1 parent f8e6198 commit c9eb789

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/genie/libs/parser/iosxe/show_wlan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def cli(self, output=None):
6161
r"^----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------$")
6262
# 17 lizzard_Global lizzard UP [WPA2][802.1x][FT + 802.1x][AES],[FT Enabled]
6363
wlan_info_capture = re.compile(
64-
r"^(?P<wlan_id>\d+)\s+(?P<profile_name>\S+)\s+(?P<ssid>\S+)\s+(?P<wlan_status>\S+)\s+(?P<status_security>.*$)")
64+
r"^(?P<wlan_id>\d+)\s+(?P<profile_name>\S+)\s+(?P<ssid>.*?)(?:\s{2,})\s+(?P<wlan_status>\S+)\s+(?P<status_security>.*$)")
6565

6666
for line in out.splitlines():
6767
line = line.strip()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
expected_output = {
2+
"wlan_summary": {
3+
"wlan_count": 1,
4+
"wlan_id": {
5+
21: {
6+
"profile_name": "CUSTC_Global_NF_24a65b82",
7+
"ssid": "CUST Factory",
8+
"status": "UP",
9+
"security": "[WPA2][802.1x][AES]"
10+
}
11+
}
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
Number of WLANs: 1
3+
4+
ID Profile Name SSID Status Security
5+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6+
21 CUSTC_Global_NF_24a65b82 CUST Factory UP [WPA2][802.1x][AES]

0 commit comments

Comments
 (0)