mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
arg switches pt 1
This commit is contained in:
@@ -18,7 +18,7 @@ import pprint
|
||||
|
||||
|
||||
class IPv4Test(LFCliBase):
|
||||
def __init__(self, host, port, ssid, security, password, sta_list=None, number_template="00000", radio = "wiphy0",_debug_on=False,
|
||||
def __init__(self, ssid, security, password, sta_list=None, number_template="00000", radio = "wiphy0",_debug_on=False, host="locahost", port=8080,
|
||||
_exit_on_error=False,
|
||||
_exit_on_fail=False):
|
||||
super().__init__(host, port, _debug=_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
@@ -65,8 +65,6 @@ class IPv4Test(LFCliBase):
|
||||
debug=self.debug)
|
||||
|
||||
def main():
|
||||
lfjson_host = "localhost"
|
||||
lfjson_port = 8080
|
||||
|
||||
parser = LFCliBase.create_basic_argparse(
|
||||
prog='example_wep_connection.py',
|
||||
@@ -81,13 +79,13 @@ def main():
|
||||
--------------------
|
||||
|
||||
Generic command example:
|
||||
python3 ./example_wep_connection.py \\
|
||||
--host localhost (optional) \\
|
||||
--port 8080 (optional) \\
|
||||
--num_stations 3 \\
|
||||
python3 ./example_wep_connection.py
|
||||
--host localhost
|
||||
--port 8080
|
||||
--num_stations 3
|
||||
--radio wiphy1
|
||||
--ssid jedway-wep-48 \\
|
||||
--passwd jedway-wep-48 \\
|
||||
--ssid jedway-wep-48
|
||||
--passwd jedway-wep-48
|
||||
--debug
|
||||
''')
|
||||
|
||||
@@ -97,12 +95,11 @@ def main():
|
||||
num_stations_converted = int(args.num_stations)
|
||||
num_sta = num_stations_converted
|
||||
|
||||
|
||||
station_list = LFUtils.portNameSeries(prefix_="sta",
|
||||
start_id_=0,
|
||||
end_id_=num_sta-1,
|
||||
padding_number_=10000)
|
||||
ip_test = IPv4Test(lfjson_host, lfjson_port, ssid=args.ssid, password=args.passwd,
|
||||
ip_test = IPv4Test(host=args.mgr,port=args.mgr_port, ssid=args.ssid, password=args.passwd,
|
||||
security="wep", radio=args.radio, sta_list=station_list)
|
||||
ip_test.cleanup(station_list)
|
||||
ip_test.timeout = 60
|
||||
|
||||
Reference in New Issue
Block a user