lf_cisco_snp.py : modified logic to take into account wifi frequencies,

and radio modes
This commit is contained in:
Chuck SmileyRekiere
2020-12-03 14:00:41 -07:00
parent a51993e6d2
commit cb2297fb38

View File

@@ -1245,7 +1245,7 @@ Script logic loops:
AP {Axel, Vanc} Dynamic AP {Axel, Vanc} Dynamic
frequency {24ghz, 5ghz} Common (band) : 24ghz == b , 5ghz == a frequency {24ghz, 5ghz} Common (band) : 24ghz == b , 5ghz == a
wifimode{11ax, 11ac, 11n, 11bg} Common (an anAX anAC abgn bg) wifimode{11ax (2.4 ghz or 5 ghz), 11ac (5 ghz only), 11n (2.4 ghz or 5ghz), 11bg(2.4 ghz)} Common (an anAX anAC abgn bg)
Bandwidth {20, 40, 80, 160} Bandwidth {20, 40, 80, 160}
data-encryption {enable/disable} Common data-encryption {enable/disable} Common
AP-mode {local/flexconnect} Common AP-mode {local/flexconnect} Common
@@ -1273,7 +1273,7 @@ Note: wave-2 radios can act as ac, an, (802.11an-AC) or legacy a/b/g (802.11bgn-
############################################# #############################################
wifimodes needed to support wifimodes needed to support
############################################# #############################################
11ax, 11ac, 11n, 11bg (Cisco) 11ax (2.4 ghz or 5 ghz), 11ac (5 ghz only), 11n (2.4ghz or 5 ghz), 11bg (2.4 ghz) (Cisco)
############################################# #############################################
5 Ghz 5 Ghz
@@ -1282,10 +1282,10 @@ Wifi mode: 11ax - 5ghz
Radios : ax200 : 802.11 /a/n/ac/AX Radios : ax200 : 802.11 /a/n/ac/AX
Wifi mode: 11ac - 5ghz Wifi mode: 11ac - 5ghz
Radios : ath10K(9984) 802.11an-AC Radios : ath10K(9984) 802.11an-AC (9984 are single band)
Wifi mode: 11n - 5ghz Wifi mode: 11n - 5ghz
Radios : ath10K(9984) 802.11an-AC Radios : ath10K(9984) 802.11an-AC (9984 are single band)
############################################# #############################################
24 Ghz 24 Ghz
@@ -1294,7 +1294,7 @@ Wifi mode: 11ax - 24ghz
Radios : ax200 - 802.11 /b/g/n/AX Radios : ax200 - 802.11 /b/g/n/AX
Wifi mode: 11ac - 24ghz Wifi mode: 11ac - 24ghz
Radios : ax200 802.11 /b/g/n/AX (2.4Ghz doesn't officially support /AC, but often chips will do /AC there anyway) Radios : ax200 802.11 /b/g/n/AX (2.4Ghz doesn't officially support /AC, but often chips will do /AC there anyway) (invalid)
Wifi mode: 11n - 24ghz Wifi mode: 11n - 24ghz
Radios : ax200 802.11 /b/g/n/AX Radios : ax200 802.11 /b/g/n/AX
@@ -1746,6 +1746,11 @@ Eventual Realm at Cisco
for cisco_ap in cisco_aps: for cisco_ap in cisco_aps:
for cisco_band in cisco_bands: # frequency for cisco_band in cisco_bands: # frequency
for cisco_wifimode in cisco_wifimodes: for cisco_wifimode in cisco_wifimodes:
# check for valid frequency and wifi_mode combination put here to simplify logic since all radios do not support all modes
# "an anAX anAC abgn bg"
if((cisco_band == "a" and cisco_wifimode == "bg") or (cisco_band == "b" and cisco_wifimode == "anAC")):
pass # invalid combination continue
else:
for cisco_chan_width in cisco_chan_widths: #bandwidth for cisco_chan_width in cisco_chan_widths: #bandwidth
for cisco_data_encryption in cisco_data_encryptions: for cisco_data_encryption in cisco_data_encryptions:
for cisco_ap_mode in cisco_ap_modes: for cisco_ap_mode in cisco_ap_modes:
@@ -1811,12 +1816,13 @@ Eventual Realm at Cisco
cisco.controller_create_wlan() cisco.controller_create_wlan()
cisco.controller_set_wireless_tag_policy() cisco.controller_set_wireless_tag_policy()
cisco.controller_enable_wlan() cisco.controller_enable_wlan()
if cisco_band == "a":
cisco.controller_enable_network_5ghz() cisco.controller_enable_network_5ghz()
else:
cisco.controller_enable_network_24ghz() cisco.controller_enable_network_24ghz()
cisco.controller_enable_ap() cisco.controller_enable_ap()
# need to actually check the CAC timer # need to actually check the CAC timer
time.sleep(30) time.sleep(30)
#################################### ####################################
# end of cisco controller code # end of cisco controller code
#################################### ####################################
@@ -1824,15 +1830,35 @@ Eventual Realm at Cisco
logg.info("###############################################") logg.info("###############################################")
logg.info("# NO CHANGE TO CONTROLLER CONFIG") logg.info("# NO CHANGE TO CONTROLLER CONFIG")
logg.info("###############################################") logg.info("###############################################")
logg.info("cisco_wifi_mode {}".format(cisco_wifimode)) logg.info("cisco_wifi_mode {}".format(cisco_wifimode))
if args.radio: if args.radio:
radios = args.radio radios = args.radio
elif cisco_wifimode == "anAX" or cisco_wifimode == "abgn" or cisco_wifimode == "bg": elif cisco_band == "a":
#elif cisco_wifimode == "anAX" or cisco_wifimode == "abgn" or cisco_wifimode == "bg":
if cisco_wifimode == "anAX" or cisco_wifimode == "abgn":
#AX200 dual band
radios = radio_AX200_abgn_ax_dict[cisco_client_density] radios = radio_AX200_abgn_ax_dict[cisco_client_density]
elif cisco_wifimode == "an" or cisco_wifimode == "anAC": elif cisco_wifimode == "an" or cisco_wifimode == "anAC" or cisco_wifimode =="auto":
#ath10K only supports 5Ghz
radios = radio_ath10K_9984_an_AC_dict[cisco_client_density] radios = radio_ath10K_9984_an_AC_dict[cisco_client_density]
else:
logg.info("##################################")
logg.info("# INVALID COMBINATION 5ghz")
logg.info("# Cisco run settings: {}".format(test_config))
logg.info("##################################")
exit(1)
else: # cisco_band == "b"
if cisco_wifimode == "anAX" or cisco_wifimode == "abgn" or cisco_wifimode == "bg" or cisco_wifimode == "auto":
#AX200 dual band
radios = radio_AX200_abgn_ax_dict[cisco_client_density]
else:
logg.info("##################################")
logg.info("# INVALID COMBINATION 24 ghz")
logg.info("# Cisco run settings: {}".format(test_config))
logg.info("##################################")
exit(1)
logg.info("radios {}".format(radios)) logg.info("radios {}".format(radios))
for radio_ in radios: for radio_ in radios:
radio_keys = ['radio','stations','ssid','ssid_pw','security','wifimode'] radio_keys = ['radio','stations','ssid','ssid_pw','security','wifimode']
@@ -1852,7 +1878,6 @@ Eventual Realm at Cisco
else: else:
number_of_stations_per_radio_list.append(radio_info_dict['stations']) number_of_stations_per_radio_list.append(radio_info_dict['stations'])
wifimode_list.append(int(wifi_mode_dict[radio_info_dict['wifimode']])) wifimode_list.append(int(wifi_mode_dict[radio_info_dict['wifimode']]))
optional_radio_reset_keys = ['reset_port_enable'] optional_radio_reset_keys = ['reset_port_enable']
radio_reset_found = True radio_reset_found = True
for key in optional_radio_reset_keys: for key in optional_radio_reset_keys:
@@ -1869,7 +1894,6 @@ Eventual Realm at Cisco
reset_port_enable_list.append(False) reset_port_enable_list.append(False)
reset_port_time_min_list.append('0s') reset_port_time_min_list.append('0s')
reset_port_time_max_list.append('0s') reset_port_time_max_list.append('0s')
# no stations for testing reconfiguration of the controller - # no stations for testing reconfiguration of the controller -
if(args.no_stations): if(args.no_stations):
logg.info("##################################") logg.info("##################################")
@@ -1895,7 +1919,6 @@ Eventual Realm at Cisco
else: else:
side_a_min_bps = 0 side_a_min_bps = 0
side_b_min_bps = cisco_side_b_min_bps side_b_min_bps = cisco_side_b_min_bps
# current default is to have a values # current default is to have a values
ip_var_test = L3VariableTime( ip_var_test = L3VariableTime(
lfjson_host, lfjson_host,
@@ -1945,14 +1968,11 @@ Eventual Realm at Cisco
ssid_security_list = [] ssid_security_list = []
wifimode_list = [] wifimode_list = []
ip_var_test.cleanup() ip_var_test.cleanup()
if ( args.no_stations): if ( args.no_stations):
pass pass
else: else:
ip_var_test.passes() ip_var_test.passes()
logg.info("Full test passed, all connections increased rx bytes") logg.info("Full test passed, all connections increased rx bytes")
if __name__ == "__main__": if __name__ == "__main__":
main() main()