fix(ci): implement proper automatic un-deploy of RAN containers
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -580,6 +580,8 @@ class Containerize():
|
|||||||
# Currently support only one
|
# Currently support only one
|
||||||
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
mySSH.command('docker-compose --file ci-docker-compose.yml config', '\$', 5)
|
||||||
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
|
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
|
||||||
|
if self.eNB_logFile[self.eNB_instance] == '':
|
||||||
|
self.eNB_logFile[self.eNB_instance] = 'enb_' + HTML.testCase_id + '.log'
|
||||||
if result is not None:
|
if result is not None:
|
||||||
containerName = result.group('container_name')
|
containerName = result.group('container_name')
|
||||||
mySSH.command('docker kill --signal INT ' + containerName, '\$', 30)
|
mySSH.command('docker kill --signal INT ' + containerName, '\$', 30)
|
||||||
|
|||||||
+59
-49
@@ -368,7 +368,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE,ue_trace):
|
def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE,ue_trace,CONTAINERS):
|
||||||
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -424,12 +424,12 @@ class OaiCiTest():
|
|||||||
Module_UE.CheckModuleMTU()
|
Module_UE.CheckModuleMTU()
|
||||||
else: #status==-1 failed to retrieve IP address
|
else: #status==-1 failed to retrieve IP address
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
@@ -653,7 +653,7 @@ class OaiCiTest():
|
|||||||
HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced'
|
HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced'
|
||||||
HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
|
HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
|
||||||
logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
|
logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def checkDevTTYisUnlocked(self):
|
def checkDevTTYisUnlocked(self):
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
@@ -731,7 +731,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
self.checkDevTTYisUnlocked()
|
self.checkDevTTYisUnlocked()
|
||||||
|
|
||||||
def AttachCatM(self,HTML,RAN,COTS_UE,EPC,InfraUE):
|
def AttachCatM(self,HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS):
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
@@ -804,9 +804,9 @@ class OaiCiTest():
|
|||||||
html_cell = '<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
|
html_cell = '<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
|
||||||
html_queue.put(html_cell)
|
html_queue.put(html_cell)
|
||||||
HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue)
|
HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def PingCatM(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def PingCatM(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
@@ -815,7 +815,7 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
statusQueue = SimpleQueue()
|
statusQueue = SimpleQueue()
|
||||||
@@ -836,7 +836,7 @@ class OaiCiTest():
|
|||||||
moduleIPAddr = result.group('ipaddr')
|
moduleIPAddr = result.group('ipaddr')
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||||
device_id = 'catm'
|
device_id = 'catm'
|
||||||
@@ -900,7 +900,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue)
|
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
|
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
@@ -992,7 +992,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -1002,7 +1002,7 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
multi_jobs = []
|
multi_jobs = []
|
||||||
status_queue = SimpleQueue()
|
status_queue = SimpleQueue()
|
||||||
@@ -1021,7 +1021,7 @@ class OaiCiTest():
|
|||||||
|
|
||||||
if (status_queue.empty()):
|
if (status_queue.empty()):
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
attach_status = True
|
attach_status = True
|
||||||
@@ -1050,7 +1050,7 @@ class OaiCiTest():
|
|||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
else: #if an ID is specified, it is a module from the yaml infrastructure file
|
else: #if an ID is specified, it is a module from the yaml infrastructure file
|
||||||
#Attention, as opposed to InitializeUE, the connect manager process is not checked as it is supposed to be active already
|
#Attention, as opposed to InitializeUE, the connect manager process is not checked as it is supposed to be active already
|
||||||
@@ -1086,7 +1086,7 @@ class OaiCiTest():
|
|||||||
Module_UE.CheckModuleMTU()
|
Module_UE.CheckModuleMTU()
|
||||||
else: #status==-1 failed to retrieve IP address
|
else: #status==-1 failed to retrieve IP address
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
|
|
||||||
def DetachUE_common(self, device_id, idx,COTS_UE):
|
def DetachUE_common(self, device_id, idx,COTS_UE):
|
||||||
@@ -1111,7 +1111,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def DetachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def DetachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -1121,7 +1121,7 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
multi_jobs = []
|
multi_jobs = []
|
||||||
cnt = 0
|
cnt = 0
|
||||||
@@ -1396,7 +1396,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
@@ -1443,7 +1443,7 @@ class OaiCiTest():
|
|||||||
|
|
||||||
if (status_queue.empty()):
|
if (status_queue.empty()):
|
||||||
HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
else:
|
else:
|
||||||
check_status = True
|
check_status = True
|
||||||
html_queue = SimpleQueue()
|
html_queue = SimpleQueue()
|
||||||
@@ -1459,7 +1459,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def GetAllUEIPAddresses(self):
|
def GetAllUEIPAddresses(self):
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
@@ -1686,14 +1686,14 @@ class OaiCiTest():
|
|||||||
html_queue.put(html_cell)
|
html_queue.put(html_cell)
|
||||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
|
|
||||||
def PingNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def PingNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
SSH=sshconnection.SSHConnection()
|
SSH=sshconnection.SSHConnection()
|
||||||
check_eNB = True
|
check_eNB = True
|
||||||
check_OAI_UE = True
|
check_OAI_UE = True
|
||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
|
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
|
||||||
if ping_from_eNB is not None:
|
if ping_from_eNB is not None:
|
||||||
@@ -1779,10 +1779,10 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE):
|
def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE, CONTAINERS):
|
||||||
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.PingNoS1(HTML,RAN,EPC,COTS_UE,InfraUE)
|
self.PingNoS1(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -1795,7 +1795,7 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.ue_id=="":
|
if self.ue_id=="":
|
||||||
@@ -1803,7 +1803,7 @@ class OaiCiTest():
|
|||||||
ueIpStatus = self.GetAllUEIPAddresses()
|
ueIpStatus = self.GetAllUEIPAddresses()
|
||||||
if (ueIpStatus < 0):
|
if (ueIpStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self.UEIPAddresses=[]
|
self.UEIPAddresses=[]
|
||||||
@@ -1830,7 +1830,7 @@ class OaiCiTest():
|
|||||||
|
|
||||||
if (status_queue.empty()):
|
if (status_queue.empty()):
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
else:
|
else:
|
||||||
ping_status = True
|
ping_status = True
|
||||||
html_queue = SimpleQueue()
|
html_queue = SimpleQueue()
|
||||||
@@ -1847,7 +1847,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def Iperf_ComputeTime(self):
|
def Iperf_ComputeTime(self):
|
||||||
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
|
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
|
||||||
@@ -2647,7 +2647,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def IperfNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
def IperfNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS):
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
|
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -2657,7 +2657,7 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
server_on_enb = re.search('-R', str(self.iperf_args))
|
server_on_enb = re.search('-R', str(self.iperf_args))
|
||||||
if server_on_enb is not None:
|
if server_on_enb is not None:
|
||||||
@@ -2756,12 +2756,12 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE):
|
def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE,CONTAINERS):
|
||||||
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.IperfNoS1(HTML,RAN,EPC,COTS_UE,InfraUE)
|
self.IperfNoS1(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -2774,14 +2774,14 @@ class OaiCiTest():
|
|||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
if (pStatus < 0):
|
if (pStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.ue_id=="":#is not a module, follow legacy code
|
if self.ue_id=="":#is not a module, follow legacy code
|
||||||
ueIpStatus = self.GetAllUEIPAddresses()
|
ueIpStatus = self.GetAllUEIPAddresses()
|
||||||
if (ueIpStatus < 0):
|
if (ueIpStatus < 0):
|
||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
return
|
return
|
||||||
else: #is a module
|
else: #is a module
|
||||||
self.UEIPAddresses=[]
|
self.UEIPAddresses=[]
|
||||||
@@ -2826,7 +2826,7 @@ class OaiCiTest():
|
|||||||
|
|
||||||
if (status_queue.empty()):
|
if (status_queue.empty()):
|
||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
else:
|
else:
|
||||||
iperf_status = True
|
iperf_status = True
|
||||||
iperf_noperf = False
|
iperf_noperf = False
|
||||||
@@ -2848,7 +2848,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue)
|
||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
|
|
||||||
def CheckProcessExist(self, check_eNB, check_OAI_UE,RAN,EPC):
|
def CheckProcessExist(self, check_eNB, check_OAI_UE,RAN,EPC):
|
||||||
multi_jobs = []
|
multi_jobs = []
|
||||||
@@ -3280,7 +3280,7 @@ class OaiCiTest():
|
|||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRow('QLog trace is disabled', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('QLog trace is disabled', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE):
|
def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS):
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
|
SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5)
|
||||||
@@ -3321,11 +3321,11 @@ class OaiCiTest():
|
|||||||
# Not an error then
|
# Not an error then
|
||||||
if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
|
if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
|
||||||
self.Initialize_OAI_UE_args = ''
|
self.Initialize_OAI_UE_args = ''
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
else:
|
else:
|
||||||
if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
|
if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
|
||||||
self.Initialize_OAI_UE_args = ''
|
self.Initialize_OAI_UE_args = ''
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
else:
|
else:
|
||||||
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
|
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
|
||||||
HTML.htmlUEFailureMsg='<b>' + ueAction + ' Completed</b>\n' + HTML.htmlUEFailureMsg
|
HTML.htmlUEFailureMsg='<b>' + ueAction + ' Completed</b>\n' + HTML.htmlUEFailureMsg
|
||||||
@@ -3334,26 +3334,26 @@ class OaiCiTest():
|
|||||||
else:
|
else:
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE):
|
def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS):
|
||||||
if (self.ADBIPAddress != 'none'):
|
if (self.ADBIPAddress != 'none'):
|
||||||
self.testCase_id = 'AUTO-KILL-UE'
|
self.testCase_id = 'AUTO-KILL-UE'
|
||||||
HTML.testCase_id=self.testCase_id
|
HTML.testCase_id = self.testCase_id
|
||||||
self.desc = 'Automatic Termination of UE'
|
self.desc = 'Automatic Termination of UE'
|
||||||
HTML.desc='Automatic Termination of UE'
|
HTML.desc = self.desc
|
||||||
self.ShowTestID()
|
self.ShowTestID()
|
||||||
self.TerminateUE(HTML,COTS_UE,InfraUE,self.ue_trace)
|
self.TerminateUE(HTML,COTS_UE,InfraUE,self.ue_trace)
|
||||||
if (self.Initialize_OAI_UE_args != ''):
|
if (self.Initialize_OAI_UE_args != ''):
|
||||||
self.testCase_id = 'AUTO-KILL-OAI-UE'
|
self.testCase_id = 'AUTO-KILL-OAI-UE'
|
||||||
HTML.testCase_id=self.testCase_id
|
HTML.testCase_id = self.testCase_id
|
||||||
self.desc = 'Automatic Termination of OAI-UE'
|
self.desc = 'Automatic Termination of OAI-UE'
|
||||||
HTML.desc='Automatic Termination of OAI-UE'
|
HTML.desc = self.desc
|
||||||
self.ShowTestID()
|
self.ShowTestID()
|
||||||
self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
|
self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
|
||||||
if (RAN.Initialize_eNB_args != ''):
|
if (RAN.Initialize_eNB_args != ''):
|
||||||
self.testCase_id = 'AUTO-KILL-RAN'
|
self.testCase_id = 'AUTO-KILL-RAN'
|
||||||
HTML.testCase_id=self.testCase_id
|
HTML.testCase_id = self.testCase_id
|
||||||
self.desc = 'Automatic Termination of all RAN nodes'
|
self.desc = 'Automatic Termination of all RAN nodes'
|
||||||
HTML.desc='Automatic Termination of RAN nodes'
|
HTML.desc = self.desc
|
||||||
self.ShowTestID()
|
self.ShowTestID()
|
||||||
#terminate all RAN nodes eNB/gNB/OCP
|
#terminate all RAN nodes eNB/gNB/OCP
|
||||||
for instance in range(0, len(RAN.air_interface)):
|
for instance in range(0, len(RAN.air_interface)):
|
||||||
@@ -3363,11 +3363,21 @@ class OaiCiTest():
|
|||||||
RAN.TerminateeNB(HTML,EPC)
|
RAN.TerminateeNB(HTML,EPC)
|
||||||
if RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted:
|
if RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted:
|
||||||
self.testCase_id = 'AUTO-KILL-flexran-ctl'
|
self.testCase_id = 'AUTO-KILL-flexran-ctl'
|
||||||
HTML.testCase_id=self.testCase_id
|
HTML.testCase_id = self.testCase_id
|
||||||
self.desc = 'Automatic Termination of FlexRan CTL'
|
self.desc = 'Automatic Termination of FlexRan CTL'
|
||||||
HTML.desc='Automatic Termination of FlexRan CTL'
|
HTML.desc = self.desc
|
||||||
self.ShowTestID()
|
self.ShowTestID()
|
||||||
self.TerminateFlexranCtrl(HTML,RAN,EPC)
|
self.TerminateFlexranCtrl(HTML,RAN,EPC)
|
||||||
|
if CONTAINERS.yamlPath[0] != '':
|
||||||
|
self.testCase_id = 'AUTO-KILL-CONTAINERS'
|
||||||
|
HTML.testCase_id = self.testCase_id
|
||||||
|
self.desc = 'Automatic Termination of all RAN containers'
|
||||||
|
HTML.desc = self.desc
|
||||||
|
self.ShowTestID()
|
||||||
|
for instance in range(0, len(CONTAINERS.yamlPath)):
|
||||||
|
if CONTAINERS.yamlPath[instance]!='':
|
||||||
|
CONTAINERS.eNB_instance=instance
|
||||||
|
CONTAINERS.UndeployObject(HTML,RAN)
|
||||||
RAN.prematureExit=True
|
RAN.prematureExit=True
|
||||||
|
|
||||||
def IdleSleep(self,HTML):
|
def IdleSleep(self,HTML):
|
||||||
|
|||||||
+11
-11
@@ -544,7 +544,7 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
|
|||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
signal.signal(signal.SIGUSR1, receive_signal)
|
signal.signal(signal.SIGUSR1, receive_signal)
|
||||||
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
|
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
|
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
|
||||||
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
@@ -809,39 +809,39 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
elif action == 'Terminate_eNB':
|
elif action == 'Terminate_eNB':
|
||||||
RAN.TerminateeNB(HTML, EPC)
|
RAN.TerminateeNB(HTML, EPC)
|
||||||
elif action == 'Initialize_UE':
|
elif action == 'Initialize_UE':
|
||||||
CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE, CiTestObj.ue_trace)
|
CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE, CiTestObj.ue_trace, CONTAINERS)
|
||||||
elif action == 'Terminate_UE':
|
elif action == 'Terminate_UE':
|
||||||
CiTestObj.TerminateUE(HTML,COTS_UE, InfraUE, CiTestObj.ue_trace)
|
CiTestObj.TerminateUE(HTML,COTS_UE, InfraUE, CiTestObj.ue_trace)
|
||||||
elif action == 'Attach_UE':
|
elif action == 'Attach_UE':
|
||||||
CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
|
CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
elif action == 'Detach_UE':
|
elif action == 'Detach_UE':
|
||||||
CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE)
|
CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
elif action == 'DataDisable_UE':
|
elif action == 'DataDisable_UE':
|
||||||
CiTestObj.DataDisableUE(HTML)
|
CiTestObj.DataDisableUE(HTML)
|
||||||
elif action == 'DataEnable_UE':
|
elif action == 'DataEnable_UE':
|
||||||
CiTestObj.DataEnableUE(HTML)
|
CiTestObj.DataEnableUE(HTML)
|
||||||
elif action == 'CheckStatusUE':
|
elif action == 'CheckStatusUE':
|
||||||
CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE,InfraUE)
|
CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
elif action == 'Build_OAI_UE':
|
elif action == 'Build_OAI_UE':
|
||||||
CiTestObj.BuildOAIUE(HTML)
|
CiTestObj.BuildOAIUE(HTML)
|
||||||
elif action == 'Initialize_OAI_UE':
|
elif action == 'Initialize_OAI_UE':
|
||||||
CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE,InfraUE)
|
CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE,InfraUE,CONTAINERS)
|
||||||
elif action == 'Terminate_OAI_UE':
|
elif action == 'Terminate_OAI_UE':
|
||||||
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE)
|
CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
elif action == 'Initialize_CatM_module':
|
elif action == 'Initialize_CatM_module':
|
||||||
CiTestObj.InitializeCatM(HTML)
|
CiTestObj.InitializeCatM(HTML)
|
||||||
elif action == 'Terminate_CatM_module':
|
elif action == 'Terminate_CatM_module':
|
||||||
CiTestObj.TerminateCatM(HTML)
|
CiTestObj.TerminateCatM(HTML)
|
||||||
elif action == 'Attach_CatM_module':
|
elif action == 'Attach_CatM_module':
|
||||||
CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC,InfraUE)
|
CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
elif action == 'Detach_CatM_module':
|
elif action == 'Detach_CatM_module':
|
||||||
CiTestObj.TerminateCatM(HTML)
|
CiTestObj.TerminateCatM(HTML)
|
||||||
elif action == 'Ping_CatM_module':
|
elif action == 'Ping_CatM_module':
|
||||||
CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC,InfraUE)
|
CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC,InfraUE,CONTAINERS)
|
||||||
elif action == 'Ping':
|
elif action == 'Ping':
|
||||||
CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE)
|
CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE, CONTAINERS)
|
||||||
elif action == 'Iperf':
|
elif action == 'Iperf':
|
||||||
CiTestObj.Iperf(HTML,RAN,EPC,COTS_UE, InfraUE)
|
CiTestObj.Iperf(HTML,RAN,EPC,COTS_UE, InfraUE, CONTAINERS)
|
||||||
elif action == 'Reboot_UE':
|
elif action == 'Reboot_UE':
|
||||||
CiTestObj.RebootUE(HTML,RAN,EPC)
|
CiTestObj.RebootUE(HTML,RAN,EPC)
|
||||||
elif action == 'Initialize_HSS':
|
elif action == 'Initialize_HSS':
|
||||||
|
|||||||
+16
-4
@@ -800,10 +800,21 @@ class RANManagement():
|
|||||||
x2ap_pdu = 0
|
x2ap_pdu = 0
|
||||||
#NSA specific log markers
|
#NSA specific log markers
|
||||||
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
||||||
|
nodeB_prefix_found = False
|
||||||
|
|
||||||
line_cnt=0 #log file line counter
|
line_cnt=0 #log file line counter
|
||||||
for line in enb_log_file.readlines():
|
for line in enb_log_file.readlines():
|
||||||
line_cnt+=1
|
line_cnt+=1
|
||||||
|
# Detection of eNB/gNB from a container log
|
||||||
|
result = re.search('Starting eNB soft modem', str(line))
|
||||||
|
if result is not None:
|
||||||
|
nodeB_prefix_found = True
|
||||||
|
nodeB_prefix = 'e'
|
||||||
|
result = re.search('Starting gNB soft modem', str(line))
|
||||||
|
if result is not None:
|
||||||
|
nodeB_prefix_found = True
|
||||||
|
nodeB_prefix = 'g'
|
||||||
|
result = re.search('Run time:' ,str(line))
|
||||||
# Runtime statistics
|
# Runtime statistics
|
||||||
result = re.search('Run time:' ,str(line))
|
result = re.search('Run time:' ,str(line))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
@@ -1037,10 +1048,11 @@ class RANManagement():
|
|||||||
logging.debug(' File analysis (stdout, stats) completed')
|
logging.debug(' File analysis (stdout, stats) completed')
|
||||||
|
|
||||||
#post processing depending on the node type
|
#post processing depending on the node type
|
||||||
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
if not nodeB_prefix_found:
|
||||||
nodeB_prefix = 'e'
|
if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'):
|
||||||
else:
|
nodeB_prefix = 'e'
|
||||||
nodeB_prefix = 'g'
|
else:
|
||||||
|
nodeB_prefix = 'g'
|
||||||
|
|
||||||
if nodeB_prefix == 'g':
|
if nodeB_prefix == 'g':
|
||||||
if ulschReceiveOK > 0:
|
if ulschReceiveOK > 0:
|
||||||
|
|||||||
@@ -115,8 +115,8 @@
|
|||||||
|
|
||||||
<testCase id="070000">
|
<testCase id="070000">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
<desc>iperf (DL/40Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-u -b 20M -t 60</iperf_args>
|
<iperf_args>-u -b 40M -t 60</iperf_args>
|
||||||
<direction>DL</direction>
|
<direction>DL</direction>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<iperf_packetloss_threshold>3</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>3</iperf_packetloss_threshold>
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>TEST-NSA-FR1-TM1-B200-terminate</htmlTabRef>
|
||||||
|
<htmlTabName>NSA tear-down in case of problem</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>1</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030202
|
||||||
|
030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Undeploy_Object</class>
|
||||||
|
<desc>Undeploy eNB</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_enb</yaml_path>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030202">
|
||||||
|
<class>Undeploy_Object</class>
|
||||||
|
<desc>Undeploy gNB</desc>
|
||||||
|
<yaml_path>ci-scripts/yaml_files/nsa_b200_gnb</yaml_path>
|
||||||
|
<eNB_instance>1</eNB_instance>
|
||||||
|
<eNB_serverId>1</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
|
|
||||||
Reference in New Issue
Block a user