Patch to resolve MR comments
This commit is contained in:
committed by
Raphael Defosseux
parent
9890896b9c
commit
3afbf8e39a
@@ -234,7 +234,6 @@ def ReTagImages(mySSH,IMAGES,ranCommitID,ranBranch,ranAllowMerge,displayedNewTag
|
|||||||
if not displayedNewTags:
|
if not displayedNewTags:
|
||||||
logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m')
|
logging.debug(f'\u001B[1m Using sanitized version of {image} with {imageTag}\u001B[0m')
|
||||||
mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True)
|
mySSH.run(f'sed -i -e "s@oaisoftwarealliance/{image}:develop@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True)
|
||||||
mySSH.run(f'sed -i -e "s@{image}:latest@oai-ci/{imageTag}@" ci-docker-compose.yml',silent=True) # temporary solution for not using the new branch
|
|
||||||
|
|
||||||
def DeployServices(mySSH,svcName):
|
def DeployServices(mySSH,svcName):
|
||||||
allServices = []
|
allServices = []
|
||||||
@@ -979,7 +978,7 @@ class Containerize():
|
|||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def Create_Workspace(self):
|
def Create_Workspace(self,HTML):
|
||||||
if self.eNB_serverId[self.eNB_instance] == '0':
|
if self.eNB_serverId[self.eNB_instance] == '0':
|
||||||
lIpAddr = self.eNBIPAddress
|
lIpAddr = self.eNBIPAddress
|
||||||
lUserName = self.eNBUserName
|
lUserName = self.eNBUserName
|
||||||
@@ -1003,6 +1002,7 @@ class Containerize():
|
|||||||
sshSession = cls_cmd.getConnection(lIpAddr)
|
sshSession = cls_cmd.getConnection(lIpAddr)
|
||||||
|
|
||||||
CreateWorkspace(sshSession, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
|
CreateWorkspace(sshSession, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
|
||||||
def DeployObject(self, HTML, EPC):
|
def DeployObject(self, HTML, EPC):
|
||||||
lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self)
|
lIpAddr, lUserName, lPassWord, lSourcePath = GetCredentials(self)
|
||||||
@@ -1012,6 +1012,7 @@ class Containerize():
|
|||||||
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
||||||
self.deployKind[self.eNB_instance] = True
|
self.deployKind[self.eNB_instance] = True
|
||||||
mySSH = cls_cmd.getConnection(lIpAddr, f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}')
|
mySSH = cls_cmd.getConnection(lIpAddr, f'{lSourcePath}/{self.yamlPath[self.eNB_instance]}')
|
||||||
|
logging.info(f'Current working directory: {lSourcePath}/{self.yamlPath[self.eNB_instance]}')
|
||||||
ReTagImages(mySSH,IMAGES,self.ranCommitID, self.ranBranch, self.ranAllowMerge, self.displayedNewTags)
|
ReTagImages(mySSH,IMAGES,self.ranCommitID, self.ranBranch, self.ranAllowMerge, self.displayedNewTags)
|
||||||
deployStatus,allServices = DeployServices(mySSH,self.services[self.eNB_instance])
|
deployStatus,allServices = DeployServices(mySSH,self.services[self.eNB_instance])
|
||||||
if deployStatus != 0:
|
if deployStatus != 0:
|
||||||
@@ -1031,7 +1032,7 @@ class Containerize():
|
|||||||
logging.warning(f"Deployment Failed: Trying to copy container logs {self.eNB_logFile[self.eNB_instance]}")
|
logging.warning(f"Deployment Failed: Trying to copy container logs {self.eNB_logFile[self.eNB_instance]}")
|
||||||
CopyinContainerLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance])
|
CopyinContainerLog(mySSH,lSourcePath,self.yamlPath[0].split('/'),containerName,self.eNB_logFile[self.eNB_instance])
|
||||||
status = False
|
status = False
|
||||||
logging.debug(GetImageInfo(mySSH, containerName))
|
HTML.CreateHtmlTestRowQueue('N/A', 'OK', [(GetImageInfo(mySSH, containerName))])
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
if status:
|
if status:
|
||||||
HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!'])
|
HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['Healthy deployment!'])
|
||||||
@@ -1057,7 +1058,8 @@ class Containerize():
|
|||||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||||
self.exitStatus = 1
|
self.exitStatus = 1
|
||||||
else:
|
else:
|
||||||
self.exitStatus = 1 if any(CheckLogs(self, mySSH, self.yamlPath[0].split('/'), service_name, HTML, RAN) for service_name, _ in services) else 0
|
log_results = [CheckLogs(self, mySSH, self.yamlPath[0].split('/'), service_name, HTML, RAN) for service_name, _ in services]
|
||||||
|
self.exitStatus = 1 if any(log_results) else 0
|
||||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') if self.exitStatus == 0 else logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m')
|
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m') if self.exitStatus == 0 else logging.error('\u001B[1m Undeploying OAI Object Failed\u001B[0m')
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
|
|
||||||
|
|||||||
+10
-28
@@ -219,6 +219,9 @@ def GetParametersFromXML(action):
|
|||||||
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
||||||
if test.findtext('nodes'):
|
if test.findtext('nodes'):
|
||||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||||
|
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||||
|
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||||
|
sys.exit("Mismatch in number of Nodes and UIs")
|
||||||
|
|
||||||
elif action == 'Build_OAI_UE':
|
elif action == 'Build_OAI_UE':
|
||||||
CiTestObj.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args')
|
CiTestObj.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args')
|
||||||
@@ -267,6 +270,9 @@ def GetParametersFromXML(action):
|
|||||||
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
CiTestObj.ue_ids = test.findtext('id').split(' ')
|
||||||
if test.findtext('nodes'):
|
if test.findtext('nodes'):
|
||||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||||
|
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||||
|
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||||
|
sys.exit("Mismatch in number of Nodes and UIs")
|
||||||
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or ''
|
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or ''
|
||||||
|
|
||||||
elif action == 'Iperf' or action == 'Iperf2_Unidir':
|
elif action == 'Iperf' or action == 'Iperf2_Unidir':
|
||||||
@@ -275,6 +281,9 @@ def GetParametersFromXML(action):
|
|||||||
CiTestObj.svr_id = test.findtext('svr_id') or None
|
CiTestObj.svr_id = test.findtext('svr_id') or None
|
||||||
if test.findtext('nodes'):
|
if test.findtext('nodes'):
|
||||||
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
CiTestObj.nodes = test.findtext('nodes').split(' ')
|
||||||
|
if len(CiTestObj.ue_ids) != len(CiTestObj.nodes):
|
||||||
|
logging.error('Number of Nodes are not equal to the total number of UEs')
|
||||||
|
sys.exit("Mismatch in number of Nodes and UIs")
|
||||||
if test.findtext('svr_node'):
|
if test.findtext('svr_node'):
|
||||||
CiTestObj.svr_node = test.findtext('svr_node')
|
CiTestObj.svr_node = test.findtext('svr_node')
|
||||||
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
|
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
|
||||||
@@ -377,23 +386,6 @@ def GetParametersFromXML(action):
|
|||||||
if string_field is not None:
|
if string_field is not None:
|
||||||
CONTAINERS.services[CONTAINERS.eNB_instance] = string_field
|
CONTAINERS.services[CONTAINERS.eNB_instance] = string_field
|
||||||
|
|
||||||
elif action == 'DeployGenObject' or action == 'UndeployGenObject' or action == 'StatsFromGenObject':
|
|
||||||
string_field=test.findtext('yaml_path')
|
|
||||||
if (string_field is not None):
|
|
||||||
CONTAINERS.yamlPath[0] = string_field
|
|
||||||
string_field=test.findtext('services')
|
|
||||||
if (string_field is not None):
|
|
||||||
CONTAINERS.services[0] = string_field
|
|
||||||
string_field=test.findtext('nb_healthy')
|
|
||||||
if (string_field is not None):
|
|
||||||
CONTAINERS.nb_healthy[0] = int(string_field)
|
|
||||||
string_field=test.findtext('d_retx_th')
|
|
||||||
if (string_field is not None):
|
|
||||||
CONTAINERS.ran_checkers['d_retx_th'] = [float(x) for x in string_field.split(',')]
|
|
||||||
string_field=test.findtext('u_retx_th')
|
|
||||||
if (string_field is not None):
|
|
||||||
CONTAINERS.ran_checkers['u_retx_th'] = [float(x) for x in string_field.split(',')]
|
|
||||||
|
|
||||||
elif action == 'Run_CUDATest' or action == 'Run_NRulsimTest' or action == 'Run_T2Test':
|
elif action == 'Run_CUDATest' or action == 'Run_NRulsimTest' or action == 'Run_T2Test':
|
||||||
ldpc.runargs = test.findtext('physim_run_args')
|
ldpc.runargs = test.findtext('physim_run_args')
|
||||||
ldpc.runsim = test.findtext('physim_run')
|
ldpc.runsim = test.findtext('physim_run')
|
||||||
@@ -865,7 +857,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
if not success:
|
if not success:
|
||||||
RAN.prematureExit = True
|
RAN.prematureExit = True
|
||||||
elif action == 'Create_Workspace':
|
elif action == 'Create_Workspace':
|
||||||
CONTAINERS.Create_Workspace()
|
CONTAINERS.Create_Workspace(HTML)
|
||||||
elif action == 'Deploy_Object':
|
elif action == 'Deploy_Object':
|
||||||
CONTAINERS.DeployObject(HTML, EPC)
|
CONTAINERS.DeployObject(HTML, EPC)
|
||||||
if CONTAINERS.exitStatus==1:
|
if CONTAINERS.exitStatus==1:
|
||||||
@@ -884,20 +876,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
RAN.prematureExit = True
|
RAN.prematureExit = True
|
||||||
elif action == 'Deploy_Run_PhySim':
|
elif action == 'Deploy_Run_PhySim':
|
||||||
PHYSIM.Deploy_PhySim(HTML, RAN)
|
PHYSIM.Deploy_PhySim(HTML, RAN)
|
||||||
elif action == 'DeployGenObject':
|
|
||||||
CONTAINERS.DeployGenObject(HTML, RAN, CiTestObj)
|
|
||||||
if CONTAINERS.exitStatus==1:
|
|
||||||
RAN.prematureExit = True
|
|
||||||
elif action == 'UndeployGenObject':
|
|
||||||
CONTAINERS.UndeployGenObject(HTML, RAN, CiTestObj)
|
|
||||||
if CONTAINERS.exitStatus==1:
|
|
||||||
RAN.prematureExit = True
|
|
||||||
elif action == 'IperfFromContainer':
|
elif action == 'IperfFromContainer':
|
||||||
CONTAINERS.IperfFromContainer(HTML, RAN, CiTestObj)
|
CONTAINERS.IperfFromContainer(HTML, RAN, CiTestObj)
|
||||||
if CONTAINERS.exitStatus==1:
|
if CONTAINERS.exitStatus==1:
|
||||||
RAN.prematureExit = True
|
RAN.prematureExit = True
|
||||||
elif action == 'StatsFromGenObject':
|
|
||||||
CONTAINERS.StatsFromGenObject(HTML)
|
|
||||||
elif action == 'Push_Images_To_Test_Servers':
|
elif action == 'Push_Images_To_Test_Servers':
|
||||||
logging.debug('To be implemented')
|
logging.debug('To be implemented')
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
040101
|
040101
|
||||||
800813
|
800813
|
||||||
030131
|
030131
|
||||||
800814
|
|
||||||
030132
|
030132
|
||||||
040301 040531 040633 040634 040636 040671 040672 040673 040401 040201
|
040301 040531 040633 040634 040636 040671 040672 040673 040401 040201
|
||||||
030231
|
030231
|
||||||
@@ -78,12 +77,6 @@
|
|||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800814">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace for server 0</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="030132">
|
<testCase id="030132">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy RCC (FDD/Band7/5MHz) in a container</desc>
|
<desc>Deploy RCC (FDD/Band7/5MHz) in a container</desc>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
111110
|
111110
|
||||||
800813
|
800813
|
||||||
030134
|
030134
|
||||||
800814
|
|
||||||
030135
|
030135
|
||||||
040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201
|
040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201
|
||||||
030231
|
030231
|
||||||
@@ -79,12 +78,6 @@
|
|||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800814">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace for server 0</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="030135">
|
<testCase id="030135">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy RCC (TDD/Band40/5MHz) in a container</desc>
|
<desc>Deploy RCC (TDD/Band40/5MHz) in a container</desc>
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
001111
|
001111
|
||||||
800813
|
800813
|
||||||
002222
|
002222
|
||||||
800814
|
|
||||||
002223
|
002223
|
||||||
000111
|
000111
|
||||||
100000
|
100000
|
||||||
@@ -70,12 +69,6 @@
|
|||||||
<eNB_instance>0</eNB_instance>
|
<eNB_instance>0</eNB_instance>
|
||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800814">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace for server 0</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="002223">
|
<testCase id="002223">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy VNF in a container</desc>
|
<desc>Deploy VNF in a container</desc>
|
||||||
|
|||||||
@@ -94,12 +94,6 @@
|
|||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
<services>gnb_cucp</services>
|
<services>gnb_cucp</services>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800814">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="330102">
|
<testCase id="330102">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy gNB-CU-UP in a container</desc>
|
<desc>Deploy gNB-CU-UP in a container</desc>
|
||||||
@@ -108,12 +102,6 @@
|
|||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
<services>gnb_cuup</services>
|
<services>gnb_cuup</services>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800815">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="330103">
|
<testCase id="330103">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
110002
|
110002
|
||||||
800813
|
800813
|
||||||
130101
|
130101
|
||||||
800814
|
|
||||||
130102
|
130102
|
||||||
100001
|
100001
|
||||||
110000
|
110000
|
||||||
@@ -95,12 +94,6 @@
|
|||||||
<eNB_serverId>0</eNB_serverId>
|
<eNB_serverId>0</eNB_serverId>
|
||||||
<services>gnb_cu</services>
|
<services>gnb_cu</services>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="800814">
|
|
||||||
<class>Create_Workspace</class>
|
|
||||||
<desc>Creating new Workspace</desc>
|
|
||||||
<eNB_instance>0</eNB_instance>
|
|
||||||
<eNB_serverId>0</eNB_serverId>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="130102">
|
<testCase id="130102">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container</desc>
|
<desc>Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container</desc>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
200000
|
200000
|
||||||
110000
|
110000
|
||||||
|
800813
|
||||||
120000
|
120000
|
||||||
102000
|
102000
|
||||||
102001
|
102001
|
||||||
@@ -56,7 +57,12 @@
|
|||||||
<oc_project>oaicicd-ran</oc_project>
|
<oc_project>oaicicd-ran</oc_project>
|
||||||
<images_to_pull>oai-gnb-fhi72</images_to_pull>
|
<images_to_pull>oai-gnb-fhi72</images_to_pull>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
<testCase id="800813">
|
||||||
|
<class>Create_Workspace</class>
|
||||||
|
<desc>Creating new Workspace for server 0</desc>
|
||||||
|
<eNB_instance>0</eNB_instance>
|
||||||
|
<eNB_serverId>0</eNB_serverId>
|
||||||
|
</testCase>
|
||||||
<testCase id="120000">
|
<testCase id="120000">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy gNB (TDD/Band78/100MHz/VVDN) in a container</desc>
|
<desc>Deploy gNB (TDD/Band78/100MHz/VVDN) in a container</desc>
|
||||||
|
|||||||
Reference in New Issue
Block a user