IdleSleep(): no need for class members
This commit is contained in:
@@ -239,6 +239,11 @@ def Custom_Command(HTML, node, command, command_fail):
|
|||||||
HTML.CreateHtmlTestRowQueue(command, status, message)
|
HTML.CreateHtmlTestRowQueue(command, status, message)
|
||||||
return status == 'OK' or status == 'Warning'
|
return status == 'OK' or status == 'Warning'
|
||||||
|
|
||||||
|
def IdleSleep(HTML, idle_sleep_time):
|
||||||
|
time.sleep(idle_sleep_time)
|
||||||
|
HTML.CreateHtmlTestRow(f"{idle_sleep_time} sec", 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
return True
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# OaiCiTest Class Definition
|
# OaiCiTest Class Definition
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@@ -263,7 +268,6 @@ class OaiCiTest():
|
|||||||
self.iperf_profile = ''
|
self.iperf_profile = ''
|
||||||
self.iperf_options = ''
|
self.iperf_options = ''
|
||||||
self.iperf_tcp_rate_target = ''
|
self.iperf_tcp_rate_target = ''
|
||||||
self.idle_sleep_time = 0
|
|
||||||
self.finalStatus = False
|
self.finalStatus = False
|
||||||
self.UEIPAddress = ''
|
self.UEIPAddress = ''
|
||||||
self.UEUserName = ''
|
self.UEUserName = ''
|
||||||
@@ -915,10 +919,6 @@ class OaiCiTest():
|
|||||||
CONTAINERS.UndeployGenObject(HTML,RAN,self)
|
CONTAINERS.UndeployGenObject(HTML,RAN,self)
|
||||||
RAN.prematureExit=True
|
RAN.prematureExit=True
|
||||||
|
|
||||||
def IdleSleep(self,HTML):
|
|
||||||
time.sleep(self.idle_sleep_time)
|
|
||||||
HTML.CreateHtmlTestRow(str(self.idle_sleep_time) + ' sec', 'OK', CONST.ALL_PROCESSES_OK)
|
|
||||||
|
|
||||||
def LogCollectBuild(self,RAN):
|
def LogCollectBuild(self,RAN):
|
||||||
# Some pipelines are using "none" IP / Credentials
|
# Some pipelines are using "none" IP / Credentials
|
||||||
# In that case, just forget about it
|
# In that case, just forget about it
|
||||||
|
|||||||
+2
-6
@@ -298,12 +298,8 @@ def ExecuteActionWithParam(action):
|
|||||||
CiTestObj.Iperf2_Unidir(HTML,RAN,EPC,CONTAINERS)
|
CiTestObj.Iperf2_Unidir(HTML,RAN,EPC,CONTAINERS)
|
||||||
|
|
||||||
elif action == 'IdleSleep':
|
elif action == 'IdleSleep':
|
||||||
string_field = test.findtext('idle_sleep_time_in_sec')
|
st = test.findtext('idle_sleep_time_in_sec') or "5"
|
||||||
if (string_field is None):
|
cls_oaicitest.IdleSleep(HTML, int(st))
|
||||||
CiTestObj.idle_sleep_time = 5
|
|
||||||
else:
|
|
||||||
CiTestObj.idle_sleep_time = int(string_field)
|
|
||||||
CiTestObj.IdleSleep(HTML)
|
|
||||||
|
|
||||||
elif action == 'Build_PhySim':
|
elif action == 'Build_PhySim':
|
||||||
ldpc.buildargs = test.findtext('physim_build_args')
|
ldpc.buildargs = test.findtext('physim_build_args')
|
||||||
|
|||||||
Reference in New Issue
Block a user