mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
sta_connect_multi_example.py: a few options
This commit is contained in:
@@ -21,8 +21,10 @@ from LANforge import LFUtils
|
||||
|
||||
def main():
|
||||
# create multiple OPEN stations
|
||||
station_names = LFUtils.port_name_series(start_id=0, end_id=1)
|
||||
test = StaConnect("localhost", 8080, _debugOn=False)
|
||||
station_names = LFUtils.port_name_series(start_id=10, end_id=19)
|
||||
|
||||
test = StaConnect("localhost", 8080, _debugOn=False, _exit_on_error=True,
|
||||
_cleanup_on_exit=False, _runtime_sec=360, _exit_on_fail=True)
|
||||
test.sta_mode = sta_connect.MODE_AUTO
|
||||
test.upstream_resource = 1
|
||||
test.upstream_port = "eth1"
|
||||
@@ -32,6 +34,9 @@ def main():
|
||||
test.dut_ssid = "jedway-open"
|
||||
test.dut_passwd = "NA"
|
||||
test.station_names = station_names
|
||||
test.runtime_secs = 500
|
||||
test.cleanup_on_exit = False
|
||||
|
||||
test.run()
|
||||
is_passing = test.passes()
|
||||
if is_passing == False:
|
||||
@@ -42,8 +47,6 @@ def main():
|
||||
else:
|
||||
print("Tests pass")
|
||||
|
||||
test.remove_stations()
|
||||
|
||||
# Stations use WPA2
|
||||
test.dut_security = sta_connect.WPA2
|
||||
test.dut_ssid = "jedway-wpa2-x2048-5-1"
|
||||
@@ -58,7 +61,9 @@ def main():
|
||||
else:
|
||||
print("Tests pass")
|
||||
|
||||
test.remove_stations()
|
||||
if test.cleanup_on_exit == True:
|
||||
test.remove_stations()
|
||||
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
Reference in New Issue
Block a user