mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
deprecated _halt_on_error=_exit_on_error, added #!/usr/bin/env python3 added check for python3
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
8
py-scripts/connection_test.py
Normal file → Executable file
8
py-scripts/connection_test.py
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Candela Technologies Inc.
|
||||
|
||||
@@ -7,6 +8,10 @@ Info : Standard Script for Connection Testing - Creates HTML and pdf report as
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit(1)
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-json')
|
||||
from LANforge import LFUtils
|
||||
@@ -34,8 +39,7 @@ class ConnectionTest(LFCliBase):
|
||||
dut_ssid="lexusdut", dut_security="open", dut_passwd="[BLANK]", upstream="eth1", name_prefix="L3Test",
|
||||
session_id="Layer3Test", test_name="Client/s Connectivity Test", pass_criteria=20, _debug_on=False,
|
||||
_exit_on_error=False, _exit_on_fail=False):
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _halt_on_error=_exit_on_error,
|
||||
_exit_on_fail=_exit_on_fail)
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
self.host = lfclient_host
|
||||
self.port = lfclient_port
|
||||
self.radio = radio
|
||||
|
||||
8
py-scripts/layer3_test.py
Normal file → Executable file
8
py-scripts/layer3_test.py
Normal file → Executable file
@@ -1,5 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit(1)
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-json')
|
||||
from LANforge import LFUtils
|
||||
@@ -17,7 +23,7 @@ class Layer3Test(LFCliBase):
|
||||
def __init__(self, lfclient_host="localhost", lfclient_port=8080, radio="wiphy1", sta_prefix="sta", start_id=0, num_sta=2,
|
||||
dut_ssid="lexusdut", dut_security="open", dut_passwd="[BLANK]", upstream="eth1", name_prefix="L3Test",
|
||||
traffic_type="lf_udp",side_a_speed="0M", side_b_speed="10M", session_id="Layer3Test", duration="1m",_debug_on=False, _exit_on_error=False, _exit_on_fail=False):
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
print("Test is about to start")
|
||||
self.host = lfclient_host
|
||||
self.port = lfclient_port
|
||||
|
||||
7
py-scripts/layer4_test.py
Normal file → Executable file
7
py-scripts/layer4_test.py
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Candela Technologies Inc.
|
||||
@@ -9,6 +10,10 @@ Author : Shivam Thakur
|
||||
"""
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit(1)
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-json')
|
||||
from LANforge import LFUtils
|
||||
@@ -35,7 +40,7 @@ class HTTPTest(LFCliBase):
|
||||
def __init__(self, lfclient_host="localhost", lfclient_port=8080, radio="wiphy1", sta_prefix="sta", start_id=0, num_sta=2,
|
||||
dut_ssid="lexusdut", dut_security="open", dut_passwd="[BLANK]", upstream="eth1", name_prefix="L3Test", _test_update="",
|
||||
url="", url_ps=600, session_id="Layer3Test", duration="1m",_debug_on=False, _exit_on_error=False, _exit_on_fail=False):
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
print("Test is about to start")
|
||||
self.host = lfclient_host
|
||||
self.port = lfclient_port
|
||||
|
||||
@@ -91,7 +91,7 @@ class Login_DUT:
|
||||
# Class to Load a Scenario that has been Created in Chamber View saved under DB/[Database_Name]
|
||||
class LoadScenario(LFCliBase):
|
||||
def __init__(self, host, port, db_name, security_debug_on=False, _exit_on_error=False,_exit_on_fail=False):
|
||||
super().__init__(host, port, _debug=security_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
super().__init__(host, port, _debug=security_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.json_post("/cli-json/load", { "name": db_name, "action": 'overwrite' })
|
||||
@@ -102,7 +102,7 @@ class LoadScenario(LFCliBase):
|
||||
class CreateSTA_CX(LFCliBase):
|
||||
|
||||
def __init__(self, host, port, radio, num_sta, sta_id, ssid, security, password, upstream, protocol, min_bps, max_bps, security_debug_on=True, _exit_on_error=True, _exit_on_fail=True):
|
||||
super().__init__(host, port, _debug=security_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
super().__init__(host, port, _debug=security_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
||||
@@ -35,7 +35,7 @@ class IPV4L4(LFCliBase):
|
||||
_debug_on=False,
|
||||
_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)
|
||||
super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.ssid = ssid
|
||||
|
||||
Reference in New Issue
Block a user