mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
remove halt_on_error
This commit is contained in:
@@ -137,13 +137,12 @@ This directory defines the LANforge module holding the following classes:
|
||||
|
||||
class MyScript(LFCliBase):
|
||||
def __init__(self, host, port, debug_=False, _exit_on_error=False, _exit_on_fail=False):
|
||||
super().__init__(host, port, _debug=debug_, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
super().__init__(host, port, _debug=debug_, _exit_on_fail=_exit_on_fail)
|
||||
|
||||
Those parameters provide base functionality:
|
||||
* host: lfclient host running the LANforge GUI or headless LANforgeGUI -daemon
|
||||
* port: lfclient HTTP port, typically 8080
|
||||
* _debug: provides verbose mode behavior
|
||||
* _halt_on_error: if a HTTP 400 or HTTP 500 occurs or some execeptions are raised, exit
|
||||
* _exit_on_fail: if a test calls _fail(), exit
|
||||
|
||||
* LFRequest.py / class **LFRequest**: provides default mechanism to make API queries, use this
|
||||
|
||||
@@ -14,7 +14,6 @@ from pprint import pprint
|
||||
class BaseProfile:
|
||||
def __init__(self, local_realm, debug=False):
|
||||
self.parent_realm = local_realm
|
||||
#self.halt_on_error = False
|
||||
self.exit_on_error = False
|
||||
self.debug = debug or local_realm.debug
|
||||
self.profiles = []
|
||||
|
||||
@@ -10,7 +10,7 @@ import base64
|
||||
|
||||
class DUTProfile(LFCliBase):
|
||||
def __init__(self, lfclient_host, lfclient_port, local_realm, debug_=False):
|
||||
super().__init__(lfclient_host, lfclient_port, debug_, _halt_on_error=True, _local_realm=local_realm)
|
||||
super().__init__(lfclient_host, lfclient_port, debug_, _local_realm=local_realm)
|
||||
self.name = "NA"
|
||||
self.flags = "NA"
|
||||
self.img_file = "NA"
|
||||
|
||||
@@ -34,8 +34,7 @@ updates_path = webconsole_dir + "/web_json/updates.js"
|
||||
|
||||
class ClientVisualization(LFCliBase, threading.Thread):
|
||||
def __init__(self, lfclient_host="localhost", lfclient_port=8080, num_clients= 64, max_data= 120, thread_id=None, _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)
|
||||
threading.Thread.__init__(self)
|
||||
self.num_clients = num_clients
|
||||
self.max_data = max_data
|
||||
@@ -292,7 +291,7 @@ class StatusSession(LFCliBase):
|
||||
_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.deep_clean = _deep_clean
|
||||
self.session_id = session_id
|
||||
self.json_put("/status-msg/" + self.session_id, {})
|
||||
|
||||
Reference in New Issue
Block a user