mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
lf_snp_test.py : adjusted loops for station configuration
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -2365,7 +2365,7 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
logg.info("# controller run settings: {}".format(test_config))
|
logg.info("# controller run settings: {}".format(test_config))
|
||||||
if(args.no_controller):
|
if(args.no_controller):
|
||||||
logg.info("################################################")
|
logg.info("################################################")
|
||||||
logg.info("# NO CONTROLLER SET , TEST MODE")
|
logg.info("# TEST MODE : NO CONTROLLER SET : TEST MODE")
|
||||||
logg.info("################################################")
|
logg.info("################################################")
|
||||||
if( controller_ap != __ap_set or
|
if( controller_ap != __ap_set or
|
||||||
controller_band != __band_set or
|
controller_band != __band_set or
|
||||||
@@ -2376,7 +2376,7 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
controller_chan_24ghz != __chan_24ghz_set
|
controller_chan_24ghz != __chan_24ghz_set
|
||||||
):
|
):
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
logg.info("# NEW CONTROLLER CONFIG")
|
logg.info("# TEST MODE : NEW CONTROLLER CONFIG : TEST MODE")
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
__ap_set = controller_ap
|
__ap_set = controller_ap
|
||||||
__band_set = controller_band
|
__band_set = controller_band
|
||||||
@@ -2387,6 +2387,10 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
__chan_24ghz_set = controller_chan_24ghz
|
__chan_24ghz_set = controller_chan_24ghz
|
||||||
__client_density = controller_client_density
|
__client_density = controller_client_density
|
||||||
else:
|
else:
|
||||||
|
logg.info("################################################")
|
||||||
|
logg.info("# SETUP MODE : SETUP CONTROLLER : SETUP MODE")
|
||||||
|
logg.info("################################################")
|
||||||
|
|
||||||
if( controller_ap != __ap_set or
|
if( controller_ap != __ap_set or
|
||||||
controller_band != __band_set or
|
controller_band != __band_set or
|
||||||
controller_chan_width != __chan_width_set or
|
controller_chan_width != __chan_width_set or
|
||||||
@@ -2396,7 +2400,7 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
controller_chan_24ghz != __chan_24ghz_set
|
controller_chan_24ghz != __chan_24ghz_set
|
||||||
):
|
):
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
logg.info("# NEW CONTROLLER CONFIG")
|
logg.info("# SETUP MODE : NEW CONTROLLER CONFIG")
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
__ap_set = controller_ap
|
__ap_set = controller_ap
|
||||||
__band_set = controller_band
|
__band_set = controller_band
|
||||||
@@ -2459,7 +2463,7 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
####################################
|
####################################
|
||||||
else:
|
else:
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
logg.info("# NO CHANGE TO CONTROLLER CONFIG")
|
logg.info("# SETUP MODE : NO CHANGE TO CONTROLLER CONFIG")
|
||||||
logg.info("###############################################")
|
logg.info("###############################################")
|
||||||
logg.info("controller_ap: {} controller_band: {} controller_chan_width: {} controller_ap_mode: {} controller_tx_power: {} controller_chan_5ghz: {} controller_chan_24ghz: {}"
|
logg.info("controller_ap: {} controller_band: {} controller_chan_width: {} controller_ap_mode: {} controller_tx_power: {} controller_chan_5ghz: {} controller_chan_24ghz: {}"
|
||||||
.format(controller_ap,controller_band, controller_chan_width, controller_ap_mode, controller_tx_power, controller_chan_5ghz, controller_chan_24ghz))
|
.format(controller_ap,controller_band, controller_chan_width, controller_ap_mode, controller_tx_power, controller_chan_5ghz, controller_chan_24ghz))
|
||||||
@@ -2501,112 +2505,112 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
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("#################################################")
|
||||||
logg.info("# NO STATIONS TEST MODE")
|
logg.info("# TEST MODE : NO STATIONS TEST MODE")
|
||||||
logg.info("##################################")
|
logg.info("##################################################")
|
||||||
else:
|
|
||||||
index = 0
|
|
||||||
station_lists = []
|
|
||||||
for (radio_name_, number_of_stations_per_radio_) in zip(radio_name_list,number_of_stations_per_radio_list):
|
|
||||||
number_of_stations = int(number_of_stations_per_radio_)
|
|
||||||
if number_of_stations > MAX_NUMBER_OF_STATIONS:
|
|
||||||
logg.info("number of stations per radio exceeded max of : {}".format(MAX_NUMBER_OF_STATIONS))
|
|
||||||
quit(1)
|
|
||||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_= 1 + index*1000, end_id_= number_of_stations + index*1000,
|
|
||||||
padding_number_=10000, radio=radio_name_)
|
|
||||||
station_lists.append(station_list)
|
|
||||||
index += 1
|
|
||||||
# Run Traffic upload (STA to AP)
|
|
||||||
if(controller_direction == "upload"):
|
|
||||||
side_a_tx_min_bps = side_a_tx_min_bps_ul
|
|
||||||
side_b_tx_min_bps = 0
|
|
||||||
# Run Traffic download (AP to STA)
|
|
||||||
else:
|
else:
|
||||||
side_a_tx_min_bps = 0
|
index = 0
|
||||||
side_b_tx_min_bps = side_b_tx_min_bps_dl
|
station_lists = []
|
||||||
# current default is to have a values
|
for (radio_name_, number_of_stations_per_radio_) in zip(radio_name_list,number_of_stations_per_radio_list):
|
||||||
ip_var_test = L3VariableTime(
|
number_of_stations = int(number_of_stations_per_radio_)
|
||||||
args=args,
|
if number_of_stations > MAX_NUMBER_OF_STATIONS:
|
||||||
_scheme=__scheme,
|
logg.info("number of stations per radio exceeded max of : {}".format(MAX_NUMBER_OF_STATIONS))
|
||||||
_port=__port,
|
quit(1)
|
||||||
_series=__series,
|
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_= 1 + index*1000, end_id_= number_of_stations + index*1000,
|
||||||
_ctlr=__ctlr,
|
padding_number_=10000, radio=radio_name_)
|
||||||
_prompt=__prompt,
|
station_lists.append(station_list)
|
||||||
_user=__user,
|
index += 1
|
||||||
_passwd=__passwd,
|
# Run Traffic upload (STA to AP)
|
||||||
_ap=__ap_set,
|
if(controller_direction == "upload"):
|
||||||
_ap_slot=__ap_slot,
|
side_a_tx_min_bps = side_a_tx_min_bps_ul
|
||||||
_band=__band_set,
|
side_b_tx_min_bps = 0
|
||||||
_chan_5ghz=__chan_5ghz_set,
|
# Run Traffic download (AP to STA)
|
||||||
_chan_24ghz=__chan_24ghz_set,
|
else:
|
||||||
_chan_width=__chan_width_set,
|
side_a_tx_min_bps = 0
|
||||||
_ap_mode=__ap_mode_set,
|
side_b_tx_min_bps = side_b_tx_min_bps_dl
|
||||||
_tx_power=__tx_power_set,
|
# current default is to have a values
|
||||||
_client_density=__client_density,
|
ip_var_test = L3VariableTime(
|
||||||
_cap_ctl_out=__cap_ctl_out,
|
args=args,
|
||||||
_ap_dict = ap_dict,
|
_scheme=__scheme,
|
||||||
endp_type=controller_packet_type,
|
_port=__port,
|
||||||
tos=args.tos,
|
_series=__series,
|
||||||
side_b=side_b,
|
_ctlr=__ctlr,
|
||||||
radio_name_list=radio_name_list,
|
_prompt=__prompt,
|
||||||
number_of_stations_per_radio_list=number_of_stations_per_radio_list,
|
_user=__user,
|
||||||
ssid_list=ssid_list,
|
_passwd=__passwd,
|
||||||
ssid_password_list=ssid_password_list,
|
_ap=__ap_set,
|
||||||
ssid_security_list=ssid_security_list,
|
_ap_slot=__ap_slot,
|
||||||
wifimode_list=wifimode_list,
|
_band=__band_set,
|
||||||
station_lists= station_lists,
|
_chan_5ghz=__chan_5ghz_set,
|
||||||
name_prefix="LT-",
|
_chan_24ghz=__chan_24ghz_set,
|
||||||
debug_on=debug_on,
|
_chan_width=__chan_width_set,
|
||||||
wait_timeout=wait_timeout,
|
_ap_mode=__ap_mode_set,
|
||||||
outfile=csv_outfile,
|
_tx_power=__tx_power_set,
|
||||||
results=csv_results,
|
_client_density=__client_density,
|
||||||
test_keys=test_keys,
|
_cap_ctl_out=__cap_ctl_out,
|
||||||
test_config=test_config,
|
_ap_dict = ap_dict,
|
||||||
reset_port_enable_list=reset_port_enable_list,
|
endp_type=controller_packet_type,
|
||||||
reset_port_time_min_list=reset_port_time_min_list,
|
tos=args.tos,
|
||||||
reset_port_time_max_list=reset_port_time_max_list,
|
side_b=side_b,
|
||||||
csv_started=__csv_started,
|
radio_name_list=radio_name_list,
|
||||||
side_a_tx_min_bps = side_a_tx_min_bps,
|
number_of_stations_per_radio_list=number_of_stations_per_radio_list,
|
||||||
side_a_tx_max_bps =0,
|
ssid_list=ssid_list,
|
||||||
side_a_min_pdu =controller_pdu,
|
ssid_password_list=ssid_password_list,
|
||||||
side_a_max_pdu =0,
|
ssid_security_list=ssid_security_list,
|
||||||
side_b_tx_min_bps =side_b_tx_min_bps,
|
wifimode_list=wifimode_list,
|
||||||
side_b_tx_max_bps =0,
|
station_lists= station_lists,
|
||||||
side_b_min_pdu =controller_pdu,
|
name_prefix="LT-",
|
||||||
side_b_max_pdu = 0,
|
debug_on=debug_on,
|
||||||
number_template="00",
|
wait_timeout=wait_timeout,
|
||||||
test_duration=test_duration,
|
outfile=csv_outfile,
|
||||||
polling_interval= polling_interval,
|
results=csv_results,
|
||||||
lfclient_host=lfjson_host,
|
test_keys=test_keys,
|
||||||
lfclient_port=lfjson_port)
|
test_config=test_config,
|
||||||
__csv_started = True
|
reset_port_enable_list=reset_port_enable_list,
|
||||||
ip_var_test.pre_cleanup()
|
reset_port_time_min_list=reset_port_time_min_list,
|
||||||
ip_var_test.build()
|
reset_port_time_max_list=reset_port_time_max_list,
|
||||||
if not ip_var_test.passes():
|
csv_started=__csv_started,
|
||||||
logg.info("build step failed.")
|
side_a_tx_min_bps = side_a_tx_min_bps,
|
||||||
logg.info(ip_var_test.get_fail_message())
|
side_a_tx_max_bps =0,
|
||||||
exit(1)
|
side_a_min_pdu =controller_pdu,
|
||||||
ip_var_test.start(False, False)
|
side_a_max_pdu =0,
|
||||||
ip_var_test.stop()
|
side_b_tx_min_bps =side_b_tx_min_bps,
|
||||||
if not ip_var_test.passes():
|
side_b_tx_max_bps =0,
|
||||||
logg.info("stop test failed")
|
side_b_min_pdu =controller_pdu,
|
||||||
logg.info(ip_var_test.get_fail_message())
|
side_b_max_pdu = 0,
|
||||||
# clean up
|
number_template="00",
|
||||||
radio_name_list = []
|
test_duration=test_duration,
|
||||||
number_of_stations_per_radio_list = []
|
polling_interval= polling_interval,
|
||||||
ssid_list = []
|
lfclient_host=lfjson_host,
|
||||||
ssid_password_list = []
|
lfclient_port=lfjson_port)
|
||||||
ssid_security_list = []
|
__csv_started = True
|
||||||
wifimode_list = []
|
ip_var_test.pre_cleanup()
|
||||||
ip_var_test.cleanup()
|
ip_var_test.build()
|
||||||
if ( args.no_stations):
|
if not ip_var_test.passes():
|
||||||
pass
|
logg.info("build step failed.")
|
||||||
else:
|
logg.info(ip_var_test.get_fail_message())
|
||||||
ip_var_test.passes()
|
exit(1)
|
||||||
logg.info("Full test passed, all connections increased rx rate")
|
ip_var_test.start(False, False)
|
||||||
##########################################
|
ip_var_test.stop()
|
||||||
|
if not ip_var_test.passes():
|
||||||
|
logg.info("stop test failed")
|
||||||
|
logg.info(ip_var_test.get_fail_message())
|
||||||
|
# clean up
|
||||||
|
radio_name_list = []
|
||||||
|
number_of_stations_per_radio_list = []
|
||||||
|
ssid_list = []
|
||||||
|
ssid_password_list = []
|
||||||
|
ssid_security_list = []
|
||||||
|
wifimode_list = []
|
||||||
|
ip_var_test.cleanup()
|
||||||
|
if ( args.no_stations):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
ip_var_test.passes()
|
||||||
|
logg.info("Full test passed, all connections increased rx rate")
|
||||||
|
##########################################
|
||||||
#
|
#
|
||||||
# Build Results
|
# Build Results
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user