Skip to content

Commit

Permalink
Merge pull request #838 from FlavienJP/master
Browse files Browse the repository at this point in the history
[IOS-XE] Support space in SSID in ShowWlan
  • Loading branch information
SohanTirpude authored Apr 5, 2024
2 parents f8e6198 + b1e6d95 commit 917c322
Show file tree
Hide file tree
Showing 11 changed files with 287 additions and 131 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--------------------------------------------------------------------------------
Fix
--------------------------------------------------------------------------------
* IOSXE
* Modified ShowWlanAllSchema:
* Updated `radio_policy` from schema to Optional
* Modified ShowWlanAll:
* Updated regex pattern `p_name_ssid` to support SSID with spaces
* Modified ShowWlanSummary:
* Updated regex pattern `wlan_info_capture` to support SSID with spaces (2 spaces max between each word)
2 changes: 1 addition & 1 deletion sdk_generator/outputs/github_parser.json
Original file line number Diff line number Diff line change
Expand Up @@ -61483,7 +61483,7 @@
"doc": "Parser for show wlan all",
"module_name": "show_wlan",
"package": "genie.libs.parser",
"schema": "{\n'wlan_names': {\n Optional (type) <class 'str'>: {\n 'identifier': <class 'int'>,\n Optional (str) description: <class 'str'>,\n 'ssid': <class 'str'>,\n 'status': <class 'str'>,\n 'broadcast_ssid': <class 'str'>,\n 'advertise_ap_name': <class 'str'>,\n 'universal_ap_admin': <class 'str'>,\n 'max_clients_wlan': <class 'int'>,\n 'max_clients_ap': <class 'int'>,\n 'max_clients_ap_radio': <class 'int'>,\n 'okc': <class 'str'>,\n 'active_clients': <class 'int'>,\n 'chd_per_wlan': <class 'str'>,\n 'wmm': <class 'str'>,\n Optional (str) wifi_direct_policy: <class 'str'>,\n 'channel_scan_defer_priority': {\n 'priority': <class 'list'>,\n },\n 'scan_defer_time_msecs': <class 'int'>,\n 'media_stream_multicast_direct': <class 'str'>,\n 'ccx_aironet_support': <class 'str'>,\n 'p2p_blocking_action': <class 'str'>,\n 'radio_policy': <class 'str'>,\n Optional (str) dtim_period_dot11a: <class 'str'>,\n Optional (str) dtim_period_dot11b: <class 'str'>,\n 'local_eap_authentication': <class 'str'>,\n 'mac_filter_authorization_list_name': <class 'str'>,\n 'mac_filter_override_authorization_list_name': <class 'str'>,\n 'dot1x_authentication_list_name': <class 'str'>,\n 'dot1x_authorization_list_name': <class 'str'>,\n 'security': {\n 'dot11_authentication': <class 'str'>,\n 'static_wep_keys': <class 'str'>,\n 'wifi_protected_access_wpa1_wpa2_wpa3': <class 'str'>,\n Optional (str) wifi_protected_access_wpa: {\n Optional (str) wpa_ssn_ie: <class 'str'>,\n },\n Optional (str) wifi_protected_access_wpa2: {\n Optional (str) wpa2_rsn_ie: <class 'str'>,\n Optional (str) wpa2_attributes: {\n Optional (str) mpsk: <class 'str'>,\n Optional (str) aes: <class 'str'>,\n Optional (str) ccmp256: <class 'str'>,\n Optional (str) gcmp128: <class 'str'>,\n Optional (str) gcmp256: <class 'str'>,\n Optional (str) randomized_gtk: <class 'str'>,\n },\n },\n Optional (str) wifi_protected_access_wpa3: {\n Optional (str) wpa3_ie: <class 'str'>,\n },\n Optional (str) auth_key_mgmt: {\n Optional (str) dot1x: <class 'str'>,\n Optional (str) psk: <class 'str'>,\n Optional (str) cckm: <class 'str'>,\n Optional (str) ft_dot1x: <class 'str'>,\n Optional (str) ft_psk: <class 'str'>,\n Optional (str) dot1x_sha256: <class 'str'>,\n Optional (str) psk_sha256: <class 'str'>,\n Optional (str) sae: <class 'str'>,\n Optional (str) owe: <class 'str'>,\n Optional (str) suiteb_1x: <class 'str'>,\n Optional (str) suiteb192_1x: <class 'str'>,\n },\n Optional (str) cckm_tsf_tolerance_msecs: <class 'int'>,\n 'owe_transition_mode': <class 'str'>,\n 'osen': <class 'str'>,\n 'ft_support': {\n 'ft_support_status': <class 'str'>,\n 'ft_reassociation_timer_secs': <class 'int'>,\n 'ft_over_the_ds_mode': <class 'str'>,\n },\n 'pmf_support': {\n 'pmf_support_status': <class 'str'>,\n 'pmf_association_comeback_timeout_secs': <class 'int'>,\n 'pmf_sa_query_time_msecs': <class 'int'>,\n },\n 'web_based_authenticaion': <class 'str'>,\n 'conditional_web_redirect': <class 'str'>,\n 'splash_page_web_redirect': <class 'str'>,\n 'webauth_on_mac_filter_failure': <class 'str'>,\n 'webauth_authentication_list_name': <class 'str'>,\n 'webauth_authorization_list_name': <class 'str'>,\n 'webauth_parameter_map': <class 'str'>,\n },\n 'band_select': <class 'str'>,\n 'load_balancing': <class 'str'>,\n 'multicast_buffer': <class 'str'>,\n Optional (str) multicast_buffer_size: <class 'int'>,\n Optional (str) multicast_buffer_frames: <class 'int'>,\n 'ip_source_guard': <class 'str'>,\n 'assisted_roaming': {\n 'neighbbor_list': <class 'str'>,\n 'prediction_list': <class 'str'>,\n 'dual_band_support': <class 'str'>,\n },\n 'ieee_dot11v_parameters': {\n 'directed_multicast_service': <class 'str'>,\n 'bss_max_idle': {\n 'bss_max_idle_status': <class 'str'>,\n 'protected_mode': <class 'str'>,\n },\n 'traffic_filtering_servce': <class 'str'>,\n 'bss_transition': {\n 'bss_transition_status': <class 'str'>,\n 'disassociation_imminent': {\n 'disassociation_imminent_status': <class 'str'>,\n 'optimised_roaming_timer': <class 'int'>,\n 'timer': <class 'int'>,\n },\n Optional (str) dual_neighbor_list: <class 'str'>,\n },\n 'wmn_sleep_mode': <class 'str'>,\n },\n 'dot11ac_mu_mimo': <class 'str'>,\n 'dot11ax_parameters': {\n 'ofdma_downlink': <class 'str'>,\n 'ofdma_uplink': <class 'str'>,\n 'mu_mimo_downlink': <class 'str'>,\n 'mu_mimo_uplink': <class 'str'>,\n 'bss_target_wake_up_time': <class 'str'>,\n 'bss_target_wake_up_time_broadcast_support': <class 'str'>,\n },\n 'mdns_gateway_status': <class 'str'>,\n 'wifi_alliance_agile_multiband': <class 'str'>,\n 'device_analytics': {\n 'advertise_support': <class 'str'>,\n 'share_data_with_client': <class 'str'>,\n },\n Optional (str) client_scan_report_11k_beacon_radio_measurement: {\n 'request_on_association': <class 'str'>,\n 'request_on_roam': <class 'str'>,\n },\n Optional (str) wifi_to_cellular_steering: <class 'str'>,\n },\n },\n}",
"schema": "{\n'wlan_names': {\n Optional (type) <class 'str'>: {\n 'identifier': <class 'int'>,\n Optional (str) description: <class 'str'>,\n 'ssid': <class 'str'>,\n 'status': <class 'str'>,\n 'broadcast_ssid': <class 'str'>,\n 'advertise_ap_name': <class 'str'>,\n 'universal_ap_admin': <class 'str'>,\n 'max_clients_wlan': <class 'int'>,\n 'max_clients_ap': <class 'int'>,\n 'max_clients_ap_radio': <class 'int'>,\n 'okc': <class 'str'>,\n 'active_clients': <class 'int'>,\n 'chd_per_wlan': <class 'str'>,\n 'wmm': <class 'str'>,\n Optional (str) wifi_direct_policy: <class 'str'>,\n 'channel_scan_defer_priority': {\n 'priority': <class 'list'>,\n },\n 'scan_defer_time_msecs': <class 'int'>,\n 'media_stream_multicast_direct': <class 'str'>,\n 'ccx_aironet_support': <class 'str'>,\n 'p2p_blocking_action': <class 'str'>,\n Optional (str) radio_policy: <class 'str'>,\n Optional (str) dtim_period_dot11a: <class 'str'>,\n Optional (str) dtim_period_dot11b: <class 'str'>,\n 'local_eap_authentication': <class 'str'>,\n 'mac_filter_authorization_list_name': <class 'str'>,\n 'mac_filter_override_authorization_list_name': <class 'str'>,\n 'dot1x_authentication_list_name': <class 'str'>,\n 'dot1x_authorization_list_name': <class 'str'>,\n 'security': {\n 'dot11_authentication': <class 'str'>,\n 'static_wep_keys': <class 'str'>,\n 'wifi_protected_access_wpa1_wpa2_wpa3': <class 'str'>,\n Optional (str) wifi_protected_access_wpa: {\n Optional (str) wpa_ssn_ie: <class 'str'>,\n },\n Optional (str) wifi_protected_access_wpa2: {\n Optional (str) wpa2_rsn_ie: <class 'str'>,\n Optional (str) wpa2_attributes: {\n Optional (str) mpsk: <class 'str'>,\n Optional (str) aes: <class 'str'>,\n Optional (str) ccmp256: <class 'str'>,\n Optional (str) gcmp128: <class 'str'>,\n Optional (str) gcmp256: <class 'str'>,\n Optional (str) randomized_gtk: <class 'str'>,\n },\n },\n Optional (str) wifi_protected_access_wpa3: {\n Optional (str) wpa3_ie: <class 'str'>,\n },\n Optional (str) auth_key_mgmt: {\n Optional (str) dot1x: <class 'str'>,\n Optional (str) psk: <class 'str'>,\n Optional (str) cckm: <class 'str'>,\n Optional (str) ft_dot1x: <class 'str'>,\n Optional (str) ft_psk: <class 'str'>,\n Optional (str) dot1x_sha256: <class 'str'>,\n Optional (str) psk_sha256: <class 'str'>,\n Optional (str) sae: <class 'str'>,\n Optional (str) owe: <class 'str'>,\n Optional (str) suiteb_1x: <class 'str'>,\n Optional (str) suiteb192_1x: <class 'str'>,\n },\n Optional (str) cckm_tsf_tolerance_msecs: <class 'int'>,\n 'owe_transition_mode': <class 'str'>,\n 'osen': <class 'str'>,\n 'ft_support': {\n 'ft_support_status': <class 'str'>,\n 'ft_reassociation_timer_secs': <class 'int'>,\n 'ft_over_the_ds_mode': <class 'str'>,\n },\n 'pmf_support': {\n 'pmf_support_status': <class 'str'>,\n 'pmf_association_comeback_timeout_secs': <class 'int'>,\n 'pmf_sa_query_time_msecs': <class 'int'>,\n },\n 'web_based_authenticaion': <class 'str'>,\n 'conditional_web_redirect': <class 'str'>,\n 'splash_page_web_redirect': <class 'str'>,\n 'webauth_on_mac_filter_failure': <class 'str'>,\n 'webauth_authentication_list_name': <class 'str'>,\n 'webauth_authorization_list_name': <class 'str'>,\n 'webauth_parameter_map': <class 'str'>,\n },\n 'band_select': <class 'str'>,\n 'load_balancing': <class 'str'>,\n 'multicast_buffer': <class 'str'>,\n Optional (str) multicast_buffer_size: <class 'int'>,\n Optional (str) multicast_buffer_frames: <class 'int'>,\n 'ip_source_guard': <class 'str'>,\n 'assisted_roaming': {\n 'neighbbor_list': <class 'str'>,\n 'prediction_list': <class 'str'>,\n 'dual_band_support': <class 'str'>,\n },\n 'ieee_dot11v_parameters': {\n 'directed_multicast_service': <class 'str'>,\n 'bss_max_idle': {\n 'bss_max_idle_status': <class 'str'>,\n 'protected_mode': <class 'str'>,\n },\n 'traffic_filtering_servce': <class 'str'>,\n 'bss_transition': {\n 'bss_transition_status': <class 'str'>,\n 'disassociation_imminent': {\n 'disassociation_imminent_status': <class 'str'>,\n 'optimised_roaming_timer': <class 'int'>,\n 'timer': <class 'int'>,\n },\n Optional (str) dual_neighbor_list: <class 'str'>,\n },\n 'wmn_sleep_mode': <class 'str'>,\n },\n 'dot11ac_mu_mimo': <class 'str'>,\n 'dot11ax_parameters': {\n 'ofdma_downlink': <class 'str'>,\n 'ofdma_uplink': <class 'str'>,\n 'mu_mimo_downlink': <class 'str'>,\n 'mu_mimo_uplink': <class 'str'>,\n 'bss_target_wake_up_time': <class 'str'>,\n 'bss_target_wake_up_time_broadcast_support': <class 'str'>,\n },\n 'mdns_gateway_status': <class 'str'>,\n 'wifi_alliance_agile_multiband': <class 'str'>,\n 'device_analytics': {\n 'advertise_support': <class 'str'>,\n 'share_data_with_client': <class 'str'>,\n },\n Optional (str) client_scan_report_11k_beacon_radio_measurement: {\n 'request_on_association': <class 'str'>,\n 'request_on_roam': <class 'str'>,\n },\n Optional (str) wifi_to_cellular_steering: <class 'str'>,\n },\n },\n}",
"uid": "show_wlan_all",
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxe/show_wlan.py#L262"
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions src/genie/libs/parser/iosxe/show_wlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def cli(self, output=None):
r"^----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------$")
# 17 lizzard_Global lizzard UP [WPA2][802.1x][FT + 802.1x][AES],[FT Enabled]
wlan_info_capture = re.compile(
r"^(?P<wlan_id>\d+)\s+(?P<profile_name>\S+)\s+(?P<ssid>\S+)\s+(?P<wlan_status>\S+)\s+(?P<status_security>.*$)")
r"^(?P<wlan_id>\d+)\s+(?P<profile_name>\S+)\s+(?P<ssid>.*?)(?:\s{2,})\s+(?P<wlan_status>\S+)\s+(?P<status_security>.*$)")

for line in out.splitlines():
line = line.strip()
Expand Down Expand Up @@ -137,7 +137,7 @@ class ShowWlanAllSchema(MetaParser):
"media_stream_multicast_direct": str,
"ccx_aironet_support": str,
"p2p_blocking_action": str,
"radio_policy": str,
Optional("radio_policy"): str,
Optional("dtim_period_dot11a"): str,
Optional("dtim_period_dot11b"): str,
"local_eap_authentication": str,
Expand Down Expand Up @@ -393,7 +393,7 @@ def cli(self, output=None):
p_description = re.compile(r"^Description\s+:\s+(?P<value>.*)$")

# Network Name (SSID) : north
p_name_ssid = re.compile(r"^Network\s+Name\s+\(SSID\)\s+:\s+(?P<value>\S+)$")
p_name_ssid = re.compile(r"^Network\s+Name\s+\(SSID\)\s+:\s+(?P<value>.*)$")

# Status : Enabled
p_status = re.compile(r"^Status\s+:\s+(?P<value>\S+)$")
Expand Down
Loading

0 comments on commit 917c322

Please sign in to comment.