mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
realm.py: fix vr_profile import, todo on lint warning about undeclared variable, fixes lint warning on static method
Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
@@ -7,7 +7,6 @@ from LANforge import LFRequest
|
|||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from LANforge import set_port
|
from LANforge import set_port
|
||||||
from LANforge import add_sta
|
from LANforge import add_sta
|
||||||
|
|
||||||
from LANforge import add_dut
|
from LANforge import add_dut
|
||||||
from LANforge import lfcli_base
|
from LANforge import lfcli_base
|
||||||
from LANforge import add_vap
|
from LANforge import add_vap
|
||||||
@@ -812,10 +811,10 @@ class Realm(LFCliBase):
|
|||||||
return vap_prof
|
return vap_prof
|
||||||
|
|
||||||
def new_vr_profile(self):
|
def new_vr_profile(self):
|
||||||
vap_prof = VRProfile(lfclient_host=self.lfclient_host,
|
import vr_profile
|
||||||
lfclient_port=self.lfclient_port,
|
from vr_profile import VRProfile
|
||||||
local_realm=self,
|
vap_prof = VRProfile(local_realm=self,
|
||||||
debug_=self.debug)
|
debug=self.debug)
|
||||||
return vap_prof
|
return vap_prof
|
||||||
|
|
||||||
def new_http_profile(self):
|
def new_http_profile(self):
|
||||||
@@ -1131,6 +1130,9 @@ class L4CXProfile(LFCliBase):
|
|||||||
endp_list = self.json_get("layer4/list?fields=urls/s")
|
endp_list = self.json_get("layer4/list?fields=urls/s")
|
||||||
expected_passes = 0
|
expected_passes = 0
|
||||||
passes = 0
|
passes = 0
|
||||||
|
# TODO: this might raise a nameerror lower down
|
||||||
|
# if self.target_requests_per_ten is None:
|
||||||
|
# raise NameError("check request rate: missing self.target_requests_per_ten")
|
||||||
if endp_list is not None and endp_list['endpoint'] is not None:
|
if endp_list is not None and endp_list['endpoint'] is not None:
|
||||||
endp_list = endp_list['endpoint']
|
endp_list = endp_list['endpoint']
|
||||||
for item in endp_list:
|
for item in endp_list:
|
||||||
@@ -1215,7 +1217,7 @@ class L4CXProfile(LFCliBase):
|
|||||||
iterations=0,
|
iterations=0,
|
||||||
debug=False):
|
debug=False):
|
||||||
try:
|
try:
|
||||||
duration_sec = self.parse_time(duration_sec).seconds
|
duration_sec = Realm.parse_time(duration_sec).seconds
|
||||||
except:
|
except:
|
||||||
if (duration_sec is None) or (duration_sec <= 1):
|
if (duration_sec is None) or (duration_sec <= 1):
|
||||||
raise ValueError("L4CXProfile::monitor wants duration_sec > 1 second")
|
raise ValueError("L4CXProfile::monitor wants duration_sec > 1 second")
|
||||||
|
|||||||
Reference in New Issue
Block a user