diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index 5cf6b76b38..e3893b8179 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -81,7 +81,7 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
if ranTargetBranch == '':
ranTargetBranch = 'develop'
logging.debug(f'Merging with the target branch: {ranTargetBranch}')
- sshSession.command(f'git merge --ff origin/{ranTargetBranch} -m "Temporary merge for CI"', '\$', 5)
+ sshSession.command(f'git merge --ff origin/{ranTargetBranch} -m "Temporary merge for CI"', '\$', 30)
def CopyLogsToExecutor(sshSession, sourcePath, log_name, scpIp, scpUser, scpPw):
sshSession.command(f'cd {sourcePath}/cmake_targets', '\$', 5)
@@ -208,6 +208,7 @@ class Containerize():
self.imageToCopy = ''
self.registrySvrId = ''
self.testSvrId = ''
+ self.imageToPull = []
#checkers from xml
self.ran_checkers={}
@@ -547,72 +548,194 @@ class Containerize():
HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize)
- def Copy_Image_to_Test_Server(self, HTML):
- imageTag = 'develop'
- if (self.ranAllowMerge):
- imageTag = 'ci-temp'
+ def ImageTagToUse(self, imageName):
+ shortCommit = self.ranCommitID[0:8]
+ if self.ranAllowMerge:
+ tagToUse = f'{self.ranBranch}-{shortCommit}'
+ else:
+ tagToUse = f'develop-{shortCommit}'
+ fullTag = f'porcepix.sboai.cs.eurecom.fr/{imageName}:{tagToUse}'
+ return fullTag
- lSsh = SSH.SSHConnection()
- # Going to the Docker Registry server
+ def Push_Image_to_Local_Registry(self, HTML):
if self.registrySvrId == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
+ lSourcePath = self.eNBSourceCodePath
elif self.registrySvrId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
+ lSourcePath = self.eNB1SourceCodePath
elif self.registrySvrId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
- lSsh.open(lIpAddr, lUserName, lPassWord)
- lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
- ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
- if ret != 0:
- HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
- self.exitStatus = 1
- return False
- lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
- if lSsh.getBefore().count('cannot remove'):
- HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
- self.exitStatus = 1
- return False
- lSsh.close()
+ lSourcePath = self.eNB2SourceCodePath
+ if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+ HELP.GenericHelp(CONST.Version)
+ sys.exit('Insufficient Parameter')
+ logging.debug('Pushing images from server: ' + lIpAddr)
+ mySSH = SSH.SSHConnection()
+ mySSH.open(lIpAddr, lUserName, lPassWord)
- # Going to the Test Server
+ mySSH.command('docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5)
+ if re.search('Login Succeeded', mySSH.getBefore()) is None:
+ msg = 'Could not log into local registry'
+ logging.error(msg)
+ mySSH.close()
+ HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+
+ orgTag = 'develop'
+ if self.ranAllowMerge:
+ orgTag = 'ci-temp'
+ imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
+ for image in imageNames:
+ tagToUse = self.ImageTagToUse(image)
+ mySSH.command(f'docker image tag {image}:{orgTag} {tagToUse}', '\$', 5)
+ mySSH.command(f'docker push {tagToUse}', '\$', 120)
+ if re.search(': digest:', mySSH.getBefore()) is None:
+ logging.debug(mySSH.getBefore())
+ msg = f'Could not push {image} to local registry : {tagToUse}'
+ logging.error(msg)
+ mySSH.close()
+ HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+ mySSH.command(f'docker rmi {tagToUse} {image}:{orgTag}', '\$', 30)
+
+ mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5)
+ if re.search('Removing login credentials', mySSH.getBefore()) is None:
+ msg = 'Could not log off from local registry'
+ logging.error(msg)
+ mySSH.close()
+ HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+
+ mySSH.close()
+ HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+ return True
+
+ def Pull_Image_from_Local_Registry(self, HTML):
+ # This method can be called either onto a remote server (different from python executor)
+ # or directly on the python executor (ie lIpAddr == 'none')
if self.testSvrId == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
+ lSourcePath = self.eNBSourceCodePath
elif self.testSvrId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
+ lSourcePath = self.eNB1SourceCodePath
elif self.testSvrId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
- lSsh.open(lIpAddr, lUserName, lPassWord)
- lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
- # copyout has no return code and will quit if something fails
- lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
- lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
- if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
- logging.debug(lSsh.getBefore())
- HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
- self.exitStatus = 1
- return False
- lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
- if lSsh.getBefore().count('cannot remove'):
- HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
- self.exitStatus = 1
- return False
- lSsh.close()
+ lSourcePath = self.eNB2SourceCodePath
+ if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+ HELP.GenericHelp(CONST.Version)
+ sys.exit('Insufficient Parameter')
+ if lIpAddr != 'none':
+ logging.debug('Pulling images onto server: ' + lIpAddr)
+ mySSH = SSH.SSHConnection()
+ mySSH.open(lIpAddr, lUserName, lPassWord)
+ else:
+ logging.debug('Pulling images locally')
- if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
- os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
+ cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr'
+ if lIpAddr != 'none':
+ mySSH.command(cmd, '\$', 5)
+ response = mySSH.getBefore()
+ else:
+ logging.info(cmd)
+ response = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT)
+ if re.search('Login Succeeded', response) is None:
+ msg = 'Could not log into local registry'
+ logging.error(msg)
+ if lIpAddr != 'none':
+ mySSH.close()
+ HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+ for image in self.imageToPull:
+ tagToUse = self.ImageTagToUse(image)
+ cmd = f'docker pull {tagToUse}'
+ if lIpAddr != 'none':
+ mySSH.command(cmd, '\$', 120)
+ response = mySSH.getBefore()
+ else:
+ logging.info(cmd)
+ response = subprocess.check_output(cmd, shell=True, universal_newlines=True)
+ if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response) is None:
+ logging.debug(response)
+ msg = f'Could not pull {image} from local registry : {tagToUse}'
+ logging.error(msg)
+ if lIpAddr != 'none':
+ mySSH.close()
+ HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+
+ cmd = 'docker logout porcepix.sboai.cs.eurecom.fr'
+ if lIpAddr != 'none':
+ mySSH.command(cmd, '\$', 5)
+ response = mySSH.getBefore()
+ else:
+ logging.info(cmd)
+ response = subprocess.check_output(cmd, shell=True, universal_newlines=True)
+ if re.search('Removing login credentials', response) is None:
+ msg = 'Could not log off from local registry'
+ logging.error(msg)
+ mySSH.close()
+ HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
+ return False
+
+ if lIpAddr != 'none':
+ mySSH.close()
+ HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+ return True
+
+ def Clean_Test_Server_Images(self, HTML):
+ # This method can be called either onto a remote server (different from python executor)
+ # or directly on the python executor (ie lIpAddr == 'none')
+ if self.testSvrId == '0':
+ lIpAddr = self.eNBIPAddress
+ lUserName = self.eNBUserName
+ lPassWord = self.eNBPassword
+ lSourcePath = self.eNBSourceCodePath
+ elif self.testSvrId == '1':
+ lIpAddr = self.eNB1IPAddress
+ lUserName = self.eNB1UserName
+ lPassWord = self.eNB1Password
+ lSourcePath = self.eNB1SourceCodePath
+ elif self.testSvrId == '2':
+ lIpAddr = self.eNB2IPAddress
+ lUserName = self.eNB2UserName
+ lPassWord = self.eNB2Password
+ lSourcePath = self.eNB2SourceCodePath
+ if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+ HELP.GenericHelp(CONST.Version)
+ sys.exit('Insufficient Parameter')
+ if lIpAddr != 'none':
+ logging.debug('Removing test images from server: ' + lIpAddr)
+ mySSH = SSH.SSHConnection()
+ mySSH.open(lIpAddr, lUserName, lPassWord)
+ else:
+ logging.debug('Removing test images locally')
+
+ imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
+ for image in imageNames:
+ cmd = f'docker rmi {self.ImageTagToUse(image)} || true'
+ if lIpAddr != 'none':
+ mySSH.command(cmd, '\$', 5)
+ else:
+ logging.info(cmd)
+ subprocess.run(cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+
+ if lIpAddr != 'none':
+ mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
@@ -639,16 +762,15 @@ class Containerize():
mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
-
+
CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
- imageTag = 'develop'
- if (self.ranAllowMerge):
- imageTag = 'ci-temp'
- mySSH.command('sed -i -e "s/image: oai-enb:latest/image: oai-enb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
- mySSH.command('sed -i -e "s/image: oai-gnb:latest/image: oai-gnb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
+ imagesList = ['oai-enb', 'oai-gnb']
+ for image in imagesList:
+ imageToUse = self.ImageTagToUse(image)
+ mySSH.command(f'sed -i -e "s#image: {image}:latest#image: {imageToUse}#" ci-docker-compose.yml', '\$', 2)
localMmeIpAddr = EPC.MmeIPAddress
mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2)
# if self.flexranCtrlDeployed:
@@ -672,6 +794,8 @@ class Containerize():
healthyNb = 0
startingNb = 0
containerName = ''
+ usedImage = ''
+ imageInfo = ''
if result is not None:
containerName = result.group('container_name')
time.sleep(5)
@@ -686,6 +810,20 @@ class Containerize():
else:
time.sleep(10)
cnt += 1
+ mySSH.command('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName, '\$', 5)
+ for stdoutLine in mySSH.getBefore().split('\n'):
+ if stdoutLine.count('ImageUsed: porcepix'):
+ usedImage = stdoutLine.replace('ImageUsed: porcepix', 'porcepix').strip()
+ logging.debug('Used image is ' + usedImage)
+ if usedImage != '':
+ mySSH.command('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, '\$', 5, silent=True)
+ for stdoutLine in mySSH.getBefore().split('\n'):
+ if re.search('Size = [0-9]', stdoutLine) is not None:
+ imageInfo += stdoutLine.strip() + '\n'
+ if re.search('Creation = [0-9]', stdoutLine) is not None:
+ imageInfo += stdoutLine.strip() + '\n'
+ if re.search('Id = sha256', stdoutLine) is not None:
+ imageInfo += stdoutLine.strip() + '\n'
logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
@@ -715,11 +853,24 @@ class Containerize():
mySSH.copyin(lIpAddr, lUserName, lPassWord, logfilename, '.')
mySSH.close()
+ html_queue = SimpleQueue()
+ html_cell = '
\n'
+ if usedImage != '':
+ html_cell += f'Used Image = {usedImage} :\n'
+ html_cell += imageInfo
+ else:
+ html_cell += 'Could not retrieve used image info!\n'
if status:
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+ html_cell += '\nHealthy deployment!\n'
+ else:
+ html_cell += '\nUnhealthy deployment! -- Check logs for reason!\n'
+ html_cell += ''
+ html_queue.put(html_cell)
+ if status:
+ HTML.CreateHtmlTestRowQueue('N/A', 'OK', CONST.ENB_PROCESS_OK, html_queue)
else:
self.exitStatus = 1
- HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
+ HTML.CreateHtmlTestRowQueue('N/A', 'KO', CONST.ENB_PROCESS_OK, html_queue)
def UndeployObject(self, HTML, RAN):
@@ -800,33 +951,40 @@ class Containerize():
def DeployGenObject(self, HTML, RAN, UE):
self.exitStatus = 0
- logging.info('\u001B[1m Checking Services to deploy\u001B[0m')
+ logging.debug('\u001B[1m Checking Services to deploy\u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services'
- logging.debug(cmd)
+ logging.info(cmd)
try:
listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True)
except Exception as e:
self.exitStatus = 1
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return
+ displayUsedTag = False
for reqSvc in self.services[0].split(' '):
res = re.search(reqSvc, listServices)
if res is None:
logging.error(reqSvc + ' not found in specified docker-compose')
self.exitStatus = 1
+ res = re.search('oai-gnb|oai-nr-ue|oai-cu|oai-du|oai_enb|oai_ue', reqSvc)
+ if res is not None:
+ displayUsedTag = True
if (self.exitStatus == 1):
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return
- if (self.ranAllowMerge):
- cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml'
- else:
- cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml'
- logging.debug(cmd)
- subprocess.run(cmd, shell=True)
+ cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
+ imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
+ for image in imageNames:
+ tagToUse = self.ImageTagToUse(image)
+ cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+ subprocess.run(cmd, shell=True)
+ if displayUsedTag:
+ tagToUse = self.ImageTagToUse('oai-xxx')
+ logging.info(f'\u001B[1m Using Image Tag: {tagToUse}\u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
- logging.debug(cmd)
+ logging.info(cmd)
try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e:
@@ -835,7 +993,7 @@ class Containerize():
HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK)
return
- logging.info('\u001B[1m Checking if all deployed healthy\u001B[0m')
+ logging.debug('\u001B[1m Checking if all deployed healthy\u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a'
count = 0
healthy = 0
@@ -930,7 +1088,7 @@ class Containerize():
cmd += ' -w /tmp/capture_'
ymlPath = self.yamlPath[0].split('/')
cmd += ymlPath[1] + '.pcap > /tmp/tshark.log 2>&1 &'
- logging.debug(cmd)
+ logging.info(cmd)
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = True
@@ -939,22 +1097,23 @@ class Containerize():
ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1]
- if (self.ranAllowMerge):
- cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml'
- else:
- cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml'
- logging.debug(cmd)
+ cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
subprocess.run(cmd, shell=True)
+ imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
+ for image in imageNames:
+ tagToUse = self.ImageTagToUse(image)
+ cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+ subprocess.run(cmd, shell=True)
# check which containers are running for log recovery later
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
- logging.debug(cmd)
+ logging.info(cmd)
deployStatusLogs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Stop the containers to shut down objects
logging.debug('\u001B[1m Stopping containers \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop'
- logging.debug(cmd)
+ logging.info(cmd)
try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e:
@@ -976,16 +1135,16 @@ class Containerize():
anyLogs = True
cName = res.group('container_name')
cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
- logging.debug(cmd)
+ logging.info(cmd)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
if re.search('magma-mme', cName) is not None:
cmd = 'cd ' + self.yamlPath[0] + ' && docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log'
- logging.debug(cmd)
+ logging.info(cmd)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
fullStatus = True
if anyLogs:
cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath
- logging.debug(cmd)
+ logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
# Analyzing log file(s)!
@@ -1035,25 +1194,25 @@ class Containerize():
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
cmd = 'rm ' + self.yamlPath[0] + '/*.log'
- logging.debug(cmd)
+ logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
if self.tsharkStarted:
self.tsharkStarted = True
ymlPath = self.yamlPath[0].split('/')
cmd = 'sudo chmod 666 /tmp/capture_' + ymlPath[1] + '.pcap'
- logging.debug(cmd)
+ logging.info(cmd)
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
cmd = 'cp /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath
- logging.debug(cmd)
+ logging.info(cmd)
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
cmd = 'sudo rm /tmp/capture_' + ymlPath[1] + '.pcap'
- logging.debug(cmd)
+ logging.info(cmd)
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = False
logging.debug('\u001B[1m Undeploying \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
- logging.debug(cmd)
+ logging.info(cmd)
try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e:
@@ -1066,7 +1225,7 @@ class Containerize():
self.deployedContainers = []
# Cleaning any created tmp volume
cmd = 'docker volume prune --force || true'
- logging.debug(cmd)
+ logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
if fullStatus:
@@ -1074,7 +1233,7 @@ class Containerize():
logging.info('\u001B[1m Undeploying OAI Object(s) PASS\u001B[0m')
else:
HTML.CreateHtmlTestRow('n/a', 'KO', CONST.ALL_PROCESSES_OK)
- logging.info('\u001B[1m Undeploying OAI Object(s) FAIL\u001B[0m')
+ logging.error('\u001B[1m Undeploying OAI Object(s) FAIL\u001B[0m')
def StatsFromGenObject(self, HTML):
self.exitStatus = 0
@@ -1083,7 +1242,7 @@ class Containerize():
# if the containers are running, recover the logs!
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
- logging.debug(cmd)
+ logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
anyLogs = False
@@ -1099,7 +1258,7 @@ class Containerize():
cmd += res.group('container_name') + ' '
message = ''
if anyLogs:
- logging.debug(cmd)
+ logging.info(cmd)
stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
for statLine in stats.split('\n'):
logging.debug(statLine)
@@ -1119,7 +1278,7 @@ class Containerize():
cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log || true'
- logging.debug(cmd)
+ logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
@@ -1176,9 +1335,9 @@ class Containerize():
logging.error('\u001B[1;37;41m ping test FAIL -- ' + message + ' \u001B[0m')
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'KO', 1, html_queue)
# Automatic undeployment
- logging.debug('----------------------------------------')
- logging.debug('\u001B[1m Starting Automatic undeployment \u001B[0m')
- logging.debug('----------------------------------------')
+ logging.warning('----------------------------------------')
+ logging.warning('\u001B[1m Starting Automatic undeployment \u001B[0m')
+ logging.warning('----------------------------------------')
HTML.testCase_id = 'AUTO-UNDEPLOY'
HTML.desc = 'Automatic Un-Deployment'
self.UndeployGenObject(HTML, RAN, UE)
@@ -1194,23 +1353,23 @@ class Containerize():
# Start the server process
cmd = 'docker exec -d ' + self.svrContName + ' /bin/bash -c "nohup iperf ' + self.svrOptions + ' > /tmp/iperf_server.log 2>&1" || true'
- logging.debug(cmd)
+ logging.info(cmd)
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(5)
# Start the client process
cmd = 'docker exec ' + self.cliContName + ' /bin/bash -c "iperf ' + self.cliOptions + '" 2>&1 | tee '+ logPath + '/iperf_client_' + HTML.testCase_id + '.log || true'
- logging.debug(cmd)
+ logging.info(cmd)
clientStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
# Stop the server process
cmd = 'docker exec ' + self.svrContName + ' /bin/bash -c "pkill iperf" || true'
- logging.debug(cmd)
+ logging.info(cmd)
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(5)
cmd = 'docker cp ' + self.svrContName + ':/tmp/iperf_server.log '+ logPath + '/iperf_server_' + HTML.testCase_id + '.log'
- logging.debug(cmd)
+ logging.info(cmd)
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Analyze client output
diff --git a/ci-scripts/cls_log_mgt.py b/ci-scripts/cls_log_mgt.py
index f1dbf6b8ec..a78eee5a33 100644
--- a/ci-scripts/cls_log_mgt.py
+++ b/ci-scripts/cls_log_mgt.py
@@ -35,11 +35,6 @@ import re
import subprocess
import sshconnection
-logging.basicConfig(
- level=logging.DEBUG,
- format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
-)
-
class Log_Mgt:
def __init__(self,Username, IPAddress,Password,Path):
diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py
index 536f2ff49e..48123f52ad 100644
--- a/ci-scripts/cls_oai_html.py
+++ b/ci-scripts/cls_oai_html.py
@@ -33,6 +33,7 @@
#-----------------------------------------------------------
import sys # arg
import re # reg
+import fileinput
import logging
import os
import time
@@ -102,9 +103,9 @@ class HTMLManagement():
def CreateHtmlHeader(self, ADBIPAddress):
if (not self.htmlHeaderCreated):
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
- logging.debug('\u001B[1m Creating HTML header \u001B[0m')
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m Creating HTML header \u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
self.htmlFile = open('test_results.html', 'w')
self.htmlFile.write('\n')
self.htmlFile.write('\n')
@@ -195,7 +196,10 @@ class HTMLManagement():
self.htmlFile.write(' \n')
count = 0
while (count < self.nbTestXMLfiles):
- pillMsg = ' - '
pillMsg += '__STATE_' + self.htmlTabNames[count] + '__'
@@ -269,6 +273,15 @@ class HTMLManagement():
def CreateHtmlFooter(self, passStatus):
if (os.path.isfile('test_results.html')):
+ # Tagging the 1st tab as active so it is automatically opened.
+ firstTabFound = False
+ for line in fileinput.FileInput("test_results.html", inplace=1):
+ if re.search('tab-pane fade', line) and not firstTabFound:
+ firstTabFound = True
+ print(line.replace('tab-pane fade', 'tab-pane fade in active'), end ='')
+ else:
+ print(line, end ='')
+
self.htmlFile = open('test_results.html', 'a')
self.htmlFile.write('\n')
self.htmlFile.write(' \n')
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 9d619ed633..081e821807 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -44,10 +44,6 @@ import datetime
import signal
import statistics as stat
from multiprocessing import Process, Lock, SimpleQueue
-logging.basicConfig(
- level=logging.DEBUG,
- format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
-)
#import our libs
import helpreadme as HELP
@@ -263,10 +259,10 @@ class OaiCiTest():
if self.ranAllowMerge:
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- SSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ SSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
- SSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ SSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
SSH.command('source oaienv', '\$', 5)
SSH.command('cd cmake_targets', '\$', 5)
SSH.command('mkdir -p log', '\$', 5)
@@ -3937,7 +3933,7 @@ class OaiCiTest():
sys.exit(1)
def ShowTestID(self):
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
- logging.debug('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m')
- logging.debug('\u001B[1m' + self.desc + '\u001B[0m')
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m')
+ logging.info('\u001B[1m' + self.desc + '\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py
index 14abd9116e..5efbc25aae 100644
--- a/ci-scripts/cls_physim.py
+++ b/ci-scripts/cls_physim.py
@@ -180,10 +180,10 @@ class PhySim:
if (self.ranAllowMerge):
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.info('Merging with the target branch: ' + self.ranTargetBranch)
- mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
#build
mySSH.command('source oaienv', '\$', 5)
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index e664353fa4..20d2481c56 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -108,10 +108,10 @@ class PhySim:
imageTag = "ci-temp"
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
- mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
else:
imageTag = "develop"
diff --git a/ci-scripts/cls_static_code_analysis.py b/ci-scripts/cls_static_code_analysis.py
index 131f2d72bc..ee3f1bbebf 100644
--- a/ci-scripts/cls_static_code_analysis.py
+++ b/ci-scripts/cls_static_code_analysis.py
@@ -123,10 +123,10 @@ class StaticCodeAnalysis():
if (self.ranAllowMerge):
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
- mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:focal || true', '\$', 60)
mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6)
@@ -281,11 +281,11 @@ class StaticCodeAnalysis():
argToPass = '--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH=' + self.ranBranch
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
argToPass += ' --build-arg TARGET_BRANCH=develop '
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
- mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
argToPass += ' --build-arg TARGET_BRANCH=' + self.ranTargetBranch + ' '
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index fc9398e1c9..c56c376b7f 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -70,7 +70,7 @@ import subprocess
from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig(
level=logging.DEBUG,
- format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
+ format="[%(asctime)s] %(levelname)8s: %(message)s"
)
@@ -84,7 +84,7 @@ logging.basicConfig(
def CheckClassValidity(xml_class_list,action,id):
if action not in xml_class_list:
- logging.debug('ERROR: test-case ' + id + ' has unlisted class ' + action + ' ##CHECK xml_class_list.yml')
+ logging.error('test-case ' + id + ' has unlisted class ' + action + ' ##CHECK xml_class_list.yml')
resp=False
else:
resp=True
@@ -336,14 +336,14 @@ def GetParametersFromXML(action):
CiTestObj.iperf_profile = 'balanced'
else:
if CiTestObj.iperf_profile != 'balanced' and CiTestObj.iperf_profile != 'unbalanced' and CiTestObj.iperf_profile != 'single-ue':
- logging.debug('ERROR: test-case has wrong profile ' + CiTestObj.iperf_profile)
+ logging.error('test-case has wrong profile ' + CiTestObj.iperf_profile)
CiTestObj.iperf_profile = 'balanced'
CiTestObj.iperf_options = test.findtext('iperf_options')
if (CiTestObj.iperf_options is None):
CiTestObj.iperf_options = 'check'
else:
if CiTestObj.iperf_options != 'check' and CiTestObj.iperf_options != 'sink':
- logging.debug('ERROR: test-case has wrong option ' + CiTestObj.iperf_options)
+ logging.error('test-case has wrong option ' + CiTestObj.iperf_options)
CiTestObj.iperf_options = 'check'
elif action == 'IdleSleep':
@@ -380,6 +380,11 @@ def GetParametersFromXML(action):
if (string_field is not None):
EPC.mmeConfFile = string_field
+ elif action == 'Initialize_HSS' or action == 'Initialize_SPGW':
+ pass
+ elif action == 'Terminate_HSS' or action == 'Terminate_MME' or action == 'Terminate_SPGW':
+ pass
+
elif action == 'Deploy_EPC':
string_field = test.findtext('parameters')
if (string_field is not None):
@@ -458,17 +463,6 @@ def GetParametersFromXML(action):
if (string_field is not None):
CONTAINERS.cliOptions = string_field
- elif action == 'Copy_Image_to_Test':
- string_field = test.findtext('image_name')
- if (string_field is not None):
- CONTAINERS.imageToCopy = string_field
- string_field = test.findtext('registry_svr_id')
- if (string_field is not None):
- CONTAINERS.registrySvrId = string_field
- string_field = test.findtext('test_svr_id')
- if (string_field is not None):
- CONTAINERS.testSvrId = string_field
-
elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest':
ldpc.runargs = test.findtext('physim_run_args')
@@ -478,8 +472,27 @@ def GetParametersFromXML(action):
elif action == 'Cppcheck_Analysis':
pass
+ elif action == 'Push_Local_Registry':
+ string_field = test.findtext('registry_svr_id')
+ if (string_field is not None):
+ CONTAINERS.registrySvrId = string_field
+
+ elif action == 'Pull_Local_Registry':
+ string_field = test.findtext('test_svr_id')
+ if (string_field is not None):
+ CONTAINERS.testSvrId = string_field
+ CONTAINERS.imageToPull.clear()
+ string_field = test.findtext('images_to_pull')
+ if (string_field is not None):
+ CONTAINERS.imageToPull = string_field.split()
+
+ elif action == 'Clean_Test_Server_Images':
+ string_field = test.findtext('test_svr_id')
+ if (string_field is not None):
+ CONTAINERS.testSvrId = string_field
+
else:
- logging.error(f"unknown action {action}")
+ logging.warning(f"unknown action {action} from option-parsing point-of-view")
#check if given test is in list
@@ -631,7 +644,7 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
sys.exit('Insufficient Parameter')
if RAN.eNBIPAddress == 'none':
cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log'
- logging.debug(cmd)
+ logging.info(cmd)
zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60)
sys.exit(0)
RAN.LogCollecteNB()
@@ -697,17 +710,17 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
HTML.htmlNb_CATM_Modules=len(CiTestObj.CatMDevices)
HTML.CreateHtmlHeader(CiTestObj.ADBIPAddress)
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
- logging.debug('\u001B[1m Creating HTML footer \u001B[0m')
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m Creating HTML footer \u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
CiTestObj.RetrieveSystemVersion('eNB',HTML,RAN)
CiTestObj.RetrieveSystemVersion('UE',HTML,RAN)
HTML.CreateHtmlFooter(CiTestObj.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
- logging.debug('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
- logging.debug('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
+ logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
+ logging.info('\u001B[1m----------------------------------------\u001B[0m')
if re.match('^TesteNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '' or EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '' or CiTestObj.ADBIPAddress == '' or CiTestObj.ADBUserName == '' or CiTestObj.ADBPassword == '':
HELP.GenericHelp(CONST.Version)
@@ -750,7 +763,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.testUnstable = True
CiTestObj.testMinStableId = xmlRoot.findtext('TestMinId',default='999999')
HTML.testMinStableId = CiTestObj.testMinStableId
- logging.debug('Test is tagged as Unstable -- starting from TestID ' + str(CiTestObj.testMinStableId))
+ logging.warning('Test is tagged as Unstable -- starting from TestID ' + str(CiTestObj.testMinStableId))
all_tests=xmlRoot.findall('testCase')
exclusion_tests=exclusion_tests.split()
@@ -761,10 +774,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
for test in exclusion_tests:
if (not re.match('^[0-9]{6}$', test) and
not re.match('^[0-9]{1,5}\+$', test)):
- logging.debug('ERROR: exclusion test is invalidly formatted: ' + test)
+ logging.error('exclusion test is invalidly formatted: ' + test)
sys.exit(1)
else:
- logging.debug(test)
+ logging.info(test)
#check that requested tests are well formatted
#(6 digits or less than 6 digits followed by +)
@@ -772,9 +785,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
for test in requested_tests:
if (re.match('^[0-9]{6}$', test) or
re.match('^[0-9]{1,5}\+$', test)):
- logging.debug('INFO: test group/case requested: ' + test)
+ logging.info('test group/case requested: ' + test)
else:
- logging.debug('ERROR: requested test is invalidly formatted: ' + test)
+ logging.error('requested test is invalidly formatted: ' + test)
sys.exit(1)
if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS)
@@ -785,9 +798,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
todo_tests=[]
for test in requested_tests:
if (test_in_list(test, exclusion_tests)):
- logging.debug('INFO: test will be skipped: ' + test)
+ logging.info('test will be skipped: ' + test)
else:
- #logging.debug('INFO: test will be run: ' + test)
+ #logging.info('test will be run: ' + test)
todo_tests.append(test)
signal.signal(signal.SIGUSR1, receive_signal)
@@ -951,8 +964,16 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CONTAINERS.BuildImage(HTML)
elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML)
- elif action == 'Copy_Image_to_Test':
- success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
+ elif action == 'Push_Local_Registry':
+ success = CONTAINERS.Push_Image_to_Local_Registry(HTML)
+ if not success:
+ RAN.prematureExit = True
+ elif action == 'Pull_Local_Registry':
+ success = CONTAINERS.Pull_Image_from_Local_Registry(HTML)
+ if not success:
+ RAN.prematureExit = True
+ elif action == 'Clean_Test_Server_Images':
+ success = CONTAINERS.Clean_Test_Server_Images(HTML)
if not success:
RAN.prematureExit = True
elif action == 'Deploy_Object':
@@ -987,23 +1008,25 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
RAN.prematureExit = True
elif action == 'StatsFromGenObject':
CONTAINERS.StatsFromGenObject(HTML)
+ elif action == 'Push_Images_To_Test_Servers':
+ logging.debug('To be implemented')
else:
sys.exit('Invalid class (action) from xml')
if RAN.prematureExit:
if CiTestObj.testCase_id == CiTestObj.testMinStableId:
- logging.debug('Scenario has reached minimal stability point')
+ logging.warning('Scenario has reached minimal stability point')
CiTestObj.testStabilityPointReached = True
HTML.testStabilityPointReached = True
CiTestObj.FailReportCnt += 1
if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit:
- logging.debug('Scenario failed ' + str(CiTestObj.FailReportCnt) + ' time(s)')
+ logging.error('\u001B[1;37;41mScenario failed ' + str(CiTestObj.FailReportCnt) + ' time(s)\u001B[0m')
HTML.CreateHtmlTabFooter(False)
if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'):
- logging.debug('Scenario has reached minimal stability point -- Not a Failure')
+ logging.warning('\u001B[1;30;43mScenario has reached minimal stability point -- Not a Failure\u001B[0m')
else:
sys.exit('Failed Scenario')
else:
- logging.info('Scenario passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)')
+ logging.info('\u001B[1;37;42mScenario passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)\u001B[0m')
HTML.CreateHtmlTabFooter(True)
elif re.match('^LoadParams$', mode, re.IGNORECASE):
pass
diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py
index 2a59847c21..7a50a12231 100644
--- a/ci-scripts/ran.py
+++ b/ci-scripts/ran.py
@@ -203,10 +203,10 @@ class RANManagement():
if (self.ranAllowMerge):
if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
- mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
- mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
+ mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
logging.debug(mySSH.getBefore()) # print what git said when merging/checking out
mySSH.command('source oaienv', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5)
diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py
index 0946ce0f34..7c9991119e 100644
--- a/ci-scripts/sshconnection.py
+++ b/ci-scripts/sshconnection.py
@@ -74,7 +74,7 @@ class SSHConnection():
count = 10
connect_status = True
else:
- logging.debug('self.sshresponse = ' + str(self.sshresponse))
+ logging.warning('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 1:
self.ssh.sendline(password)
self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
@@ -82,7 +82,7 @@ class SSHConnection():
count = 10
connect_status = True
else:
- logging.debug('self.sshresponse = ' + str(self.sshresponse))
+ logging.warning('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 2:
# We directly ended up on the remote server because of pubkey auth
count = 10
@@ -91,8 +91,8 @@ class SSHConnection():
self.sshresponse = self.ssh.expect([prompt])
else:
# debug output
- logging.debug(str(self.ssh.before))
- logging.debug('self.sshresponse = ' + str(self.sshresponse))
+ logging.warning(str(self.ssh.before))
+ logging.warning('self.sshresponse = ' + str(self.sshresponse))
# adding a tempo when failure
if not connect_status:
time.sleep(1)
@@ -108,7 +108,7 @@ class SSHConnection():
def cde_check_value(self, commandline, expected, timeout):
- logging.debug(commandline)
+ logging.info(commandline)
self.ssh.timeout = timeout
self.ssh.sendline(commandline)
expected.append(pexpect.EOF)
@@ -118,7 +118,7 @@ class SSHConnection():
def command(self, commandline, expectedline, timeout, silent=False, resync=False):
if not silent:
- logging.debug(commandline)
+ logging.info(commandline)
self.ssh.timeout = timeout
# Nasty patch when pexpect output is out of sync.
# Much pronounced when running back-to-back-back oc commands
@@ -133,27 +133,27 @@ class SSHConnection():
if self.sshresponse == 0:
return 0
elif self.sshresponse == 1:
- logging.debug('\u001B[1;37;41m Unexpected EOF \u001B[0m')
- logging.debug('Expected Line : ' + expectedline)
- logging.debug(str(self.ssh.before))
+ logging.error('\u001B[1;37;41m Unexpected EOF \u001B[0m')
+ logging.error('Expected Line : ' + expectedline)
+ logging.error(str(self.ssh.before))
sys.exit(self.sshresponse)
elif self.sshresponse == 2:
- logging.debug('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m')
- logging.debug('Expected Line : ' + expectedline)
+ logging.error('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m')
+ logging.error('Expected Line : ' + expectedline)
result = re.search('ping |iperf |picocom', str(commandline))
if result is None:
- logging.debug(str(self.ssh.before))
+ logging.warning(str(self.ssh.before))
sys.exit(self.sshresponse)
else:
return -1
else:
- logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m')
- logging.debug('Expected Line : ' + expectedline)
+ logging.error('\u001B[1;37;41m Unexpected Others \u001B[0m')
+ logging.error('Expected Line : ' + expectedline)
sys.exit(self.sshresponse)
def command2(self, commandline, timeout, silent=False):
if not silent:
- logging.debug(commandline)
+ logging.info(commandline)
self.cmd2Results = ''
noHistoryCmd = 'unset HISTFILE; ' + commandline
myHost = self.username + '@' + self.ipaddress
@@ -165,7 +165,7 @@ class SSHConnection():
def command3(self, commandline, timeout, silent=False):
if not silent:
- logging.debug(commandline)
+ logging.info(commandline)
self.cmd2Results = ''
noHistoryCmd = 'unset HISTFILE; ' + commandline
myHost = self.username + '@' + self.ipaddress
@@ -186,14 +186,14 @@ class SSHConnection():
pass
elif self.sshresponse == 1:
if not self.picocom_closure:
- logging.debug('\u001B[1;37;41m Unexpected TIMEOUT during closing\u001B[0m')
+ logging.warning('\u001B[1;37;41m Unexpected TIMEOUT during closing\u001B[0m')
else:
- logging.debug('\u001B[1;37;41m Unexpected Others during closing\u001B[0m')
+ logging.warning('\u001B[1;37;41m Unexpected Others during closing\u001B[0m')
def copyin(self, ipaddress, username, password, source, destination):
count = 0
copy_status = False
- logging.debug('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination)
+ logging.info('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination)
while count < 10:
scp_spawn = pexpect.spawn('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 100)
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
@@ -206,7 +206,7 @@ class SSHConnection():
count = 10
copy_status = True
else:
- logging.debug('1 - scp_response = ' + str(scp_response))
+ logging.warning('1 - scp_response = ' + str(scp_response))
elif scp_response == 1:
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
@@ -214,12 +214,12 @@ class SSHConnection():
count = 10
copy_status = True
else:
- logging.debug('2 - scp_response = ' + str(scp_response))
+ logging.warning('2 - scp_response = ' + str(scp_response))
elif scp_response == 2:
count = 10
copy_status = True
else:
- logging.debug('3 - scp_response = ' + str(scp_response))
+ logging.warning('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure
if not copy_status:
time.sleep(1)
@@ -232,7 +232,7 @@ class SSHConnection():
def copyout(self, ipaddress, username, password, source, destination):
count = 0
copy_status = False
- logging.debug('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
+ logging.info('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
while count < 4:
scp_spawn = pexpect.spawn('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100)
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
@@ -245,7 +245,7 @@ class SSHConnection():
count = 10
copy_status = True
else:
- logging.debug('1 - scp_response = ' + str(scp_response))
+ logging.warning('1 - scp_response = ' + str(scp_response))
elif scp_response == 1:
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
@@ -253,12 +253,12 @@ class SSHConnection():
count = 10
copy_status = True
else:
- logging.debug('2 - scp_response = ' + str(scp_response))
+ logging.warning('2 - scp_response = ' + str(scp_response))
elif scp_response == 2:
count = 10
copy_status = True
else:
- logging.debug('3 - scp_response = ' + str(scp_response))
+ logging.warning('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure
if not copy_status:
time.sleep(1)
diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml
index 6497fd3020..a191bd3332 100755
--- a/ci-scripts/xml_class_list.yml
+++ b/ci-scripts/xml_class_list.yml
@@ -40,7 +40,6 @@
- IdleSleep
- Perform_X2_Handover
- Build_Image
- - Copy_Image_to_Test
- Deploy_Object
- Undeploy_Object
- Cppcheck_Analysis
@@ -51,3 +50,6 @@
- IperfFromContainer
- StatsFromGenObject
- LicenceAndFormattingCheck
+ - Push_Local_Registry
+ - Pull_Local_Registry
+ - Clean_Test_Server_Images
diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
index 3ac32e1989..419ede8cbb 100644
--- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
+++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
@@ -26,6 +26,7 @@
wrench
1
+ 111111
100001
000000
000001
@@ -42,6 +43,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
DeployGenObject
Deploy Cassandra Database
diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml
index ec0f2523e2..011c3dbf6a 100644
--- a/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml
+++ b/ci-scripts/xml_files/container_4g_l2sim_tdd_down.xml
@@ -26,6 +26,7 @@
trash
100002
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_l2sim_fdd
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
index a598b2bdc1..a776b85c2c 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
@@ -25,6 +25,7 @@
Monolithic eNB - FDD 05MHz
wrench
+ 111111
100011
000011
000001
@@ -42,6 +43,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
DeployGenObject
Deploy Cassandra Database
@@ -74,7 +82,7 @@
DeployGenObject
Deploy OAI 4G eNB RF sim (FDD 05MHz)
yaml_files/4g_rfsimulator_fdd_05MHz
- enb
+ oai_enb0
8
@@ -97,7 +105,7 @@
PingFromContainer
Ping LTE-UE from Traffic-Gen
- rfsim4g-trf-gen
+ rfsim4g-trf-gen
-c 20 12.0.0.2
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml
index 1c3b1d5a7c..068a4063f4 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_down.xml
@@ -26,6 +26,7 @@
trash
100011
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_rfsimulator_fdd_05MHz
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
index 07ea358ad5..e70d954a22 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
@@ -25,6 +25,7 @@
Monolithic eNB - FDD 05MHz - noS1
wrench
+ 111111
100011
000013
000001
@@ -38,6 +39,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
IdleSleep
Sleep
@@ -54,7 +62,7 @@
DeployGenObject
Deploy OAI 4G eNB RF sim (FDD 05MHz)
yaml_files/4g_rfsimulator_fdd_05MHz_noS1
- enb
+ oai_enb0
1
@@ -77,7 +85,7 @@
PingFromContainer
Ping LTE-UE from eNB
- rfsim4g-oai-enb
+ rfsim4g-oai-enb
-I oaitun_enb1 -c 20 10.0.1.2
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml
index 6db1dfd9de..f528ae0c21 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1_down.xml
@@ -26,6 +26,7 @@
trash
100011
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_rfsimulator_fdd_05MHz_noS1
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
index 29acfa3b09..6b88816c4a 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
@@ -25,6 +25,7 @@
Monolithic eNB - FDD 10MHz
wrench
+ 111111
100011
000011
000001
@@ -42,6 +43,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
DeployGenObject
Deploy Cassandra Database
@@ -74,7 +82,7 @@
DeployGenObject
Deploy OAI 4G eNB RF sim (FDD 10MHz)
yaml_files/4g_rfsimulator_fdd_10MHz
- enb
+ oai_enb0
8
@@ -97,7 +105,7 @@
PingFromContainer
Ping LTE-UE from Traffic-Gen
- rfsim4g-trf-gen
+ rfsim4g-trf-gen
-c 20 12.0.0.2
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml
index 7d03d56ff4..37295911a5 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz_down.xml
@@ -26,6 +26,7 @@
trash
100011
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_rfsimulator_fdd_10MHz
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
index 74f712ebda..e33554c8ce 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
@@ -25,6 +25,7 @@
Monolithic eNB - FDD 20MHz
wrench
+ 111111
100011
000011
000001
@@ -42,6 +43,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
DeployGenObject
Deploy Cassandra Database
@@ -74,7 +82,7 @@
DeployGenObject
Deploy OAI 4G eNB RF sim (FDD 20MHz)
yaml_files/4g_rfsimulator_fdd_20MHz
- enb
+ oai_enb0
8
@@ -97,7 +105,7 @@
PingFromContainer
Ping LTE-UE from Traffic-Gen
- rfsim4g-trf-gen
+ rfsim4g-trf-gen
-c 20 12.0.0.2
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml
index 0a721c5091..2017aec636 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz_down.xml
@@ -26,6 +26,7 @@
trash
100011
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_rfsimulator_fdd_20MHz
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
index 7a29e50f39..c39679e063 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
@@ -24,8 +24,9 @@
rfsim-4glte-tdd05mhz
Monolithic eNB - TDD 05MHz
wrench
- 1
+ 1
+ 111111
100011
000011
000001
@@ -43,6 +44,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb oai-lte-ue
+
+
DeployGenObject
Deploy Cassandra Database
@@ -75,7 +83,7 @@
DeployGenObject
Deploy OAI 4G eNB RF sim (TDD 05MHz)
yaml_files/4g_rfsimulator_tdd_05MHz
- enb
+ oai_enb0
7
@@ -98,7 +106,7 @@
PingFromContainer
Ping LTE-UE from Traffic-Gen
- rfsim4g-trf-gen
+ rfsim4g-trf-gen
-c 20 12.0.0.2
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml
index 7e27bac73c..7e526d4f48 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz_down.xml
@@ -26,6 +26,7 @@
trash
100011
+ 222222
@@ -35,4 +36,10 @@
yaml_files/4g_rfsimulator_tdd_05MHz
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
index af732e8352..8a7549da91 100644
--- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
@@ -25,6 +25,7 @@
CU-DU F1 split
wrench
+ 111111
100021
000020
000021
@@ -38,6 +39,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb oai-nr-ue
+
+
DeployGenObject
Deploy MySql Database
@@ -89,7 +97,7 @@
PingFromContainer
Ping NR-UE from ext-dn
- rfsim5g-oai-ext-dn
+ rfsim5g-oai-ext-dn
-c 20 12.1.1.2
5
diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
index bb640381cf..e083286a09 100644
--- a/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
+++ b/ci-scripts/xml_files/container_5g_f1_rfsim_down.xml
@@ -26,6 +26,7 @@
trash
100022
+ 222222
@@ -35,4 +36,10 @@
yaml_files/5g_f1_rfsimulator
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
index 9ed6cd4ab3..e1dc8f0d60 100644
--- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
@@ -26,6 +26,7 @@
wrench
1
+ 111111
100011
000010
000011
@@ -39,6 +40,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb oai-nr-ue
+
+
DeployGenObject
Deploy MySql Database
@@ -82,7 +90,7 @@
PingFromContainer
Ping NR-UE from ext-dn
- rfsim5g-oai-ext-dn
+ rfsim5g-oai-ext-dn
-c 20 12.1.1.2
5
diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml
index 12648ca750..a2cae33f4c 100644
--- a/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml
+++ b/ci-scripts/xml_files/container_5g_fdd_rfsim_down.xml
@@ -26,6 +26,7 @@
trash
100012
+ 222222
@@ -35,4 +36,10 @@
yaml_files/5g_fdd_rfsimulator
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml
index 1cc7bfb007..e2631d6e05 100644
--- a/ci-scripts/xml_files/container_5g_l2sim_tdd.xml
+++ b/ci-scripts/xml_files/container_5g_l2sim_tdd.xml
@@ -26,6 +26,7 @@
wrench
1
+ 111111
100001
000000
000001
@@ -40,6 +41,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb oai-nr-ue
+
+
DeployGenObject
Deploy MySql Database
diff --git a/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml b/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml
index d3630cd905..906ce7aa81 100644
--- a/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml
+++ b/ci-scripts/xml_files/container_5g_l2sim_tdd_down.xml
@@ -26,6 +26,7 @@
trash
100002
+ 222222
@@ -35,4 +36,10 @@
yaml_files/5g_l2sim_tdd
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml
index 8124fdac98..b43265a8b4 100644
--- a/ci-scripts/xml_files/container_5g_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim.xml
@@ -26,6 +26,7 @@
wrench
1
+ 111111
100001
000000
000001
@@ -42,6 +43,13 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb oai-nr-ue
+
+
DeployGenObject
Deploy MySql Database
@@ -93,7 +101,7 @@
PingFromContainer
Ping NR-UE from ext-dn
- rfsim5g-oai-ext-dn
+ rfsim5g-oai-ext-dn
-c 20 12.1.1.2
5
@@ -109,7 +117,7 @@
PingFromContainer
Ping Second NR-UE from ext-dn
- rfsim5g-oai-ext-dn
+ rfsim5g-oai-ext-dn
-c 20 12.1.1.3
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim_down.xml b/ci-scripts/xml_files/container_5g_rfsim_down.xml
index 028ff61864..a2f048a7f4 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_down.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_down.xml
@@ -26,6 +26,7 @@
trash
100002
+ 222222
@@ -35,4 +36,10 @@
yaml_files/5g_rfsimulator
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml
index e7eabc0794..7684e0f997 100644
--- a/ci-scripts/xml_files/container_image_build.xml
+++ b/ci-scripts/xml_files/container_image_build.xml
@@ -26,6 +26,7 @@
wrench
000001
+ 000010
@@ -38,4 +39,10 @@
True
+
+ Push_Local_Registry
+ Push Images to Local Registry
+ 0
+
+
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
new file mode 100644
index 0000000000..28b70f103f
--- /dev/null
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
@@ -0,0 +1,168 @@
+
+
+ test-05-tm1
+ Test-05MHz-TM1
+ tasks
+
+111110
+040101
+030101
+000001
+040301 000001 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201
+030201
+
+
+
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb
+
+
+
+ Deploy_Object
+ Deploy eNB (FDD/Band7/5MHz/B200) in a container
+ ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1
+ 0
+ 0
+
+
+
+ IdleSleep
+ Sleep
+ 5
+
+
+
+ Undeploy_Object
+ Undeploy eNB
+ ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1
+ 0
+ 0
+
+
+
+ Initialize_UE
+ Initialize UE
+
+
+
+ Terminate_UE
+ Terminate UE
+
+
+
+ Attach_UE
+ Attach UE
+
+
+
+ Detach_UE
+ Detach UE
+
+
+
+ Ping
+ ping (5MHz - 20 sec)
+ -c 20
+ 5
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)
+ -u -b 15M -t 30 -i 1
+ 50
+ unbalanced
+
+
+
+ Iperf
+ iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)
+ -t 30 -i 1 -fm
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - DL/TCP)(30 sec)(balanced profile)
+ -t 30 -i 1 -fm
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)
+ -u -b 9M -t 30 -i 1 -R
+ 50
+ balanced
+
+
+
+ Iperf
+ iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)
+ -u -b 9M -t 30 -i 1 -R
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)
+ -t 30 -i 1 -fm -R
+ 50
+ single-ue
+
+
+
+ Iperf
+ iperf (5MHz - UL/TCP)(30 sec)(balanced profile)
+ -t 30 -i 1 -fm -R
+ 50
+ balanced
+
+
+
+
diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
index f023a77530..3734c91229 100644
--- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
@@ -26,9 +26,10 @@
tasks
1
+ 111110
+ 111111
000001
010002
- 030000
030101
000001
030102
@@ -49,6 +50,20 @@
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-enb
+
+
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 1
+ oai-gnb
+
+
Initialize_UE
Initialize Quectel
@@ -62,14 +77,6 @@
idefix
-
- Copy_Image_to_Test
- Copy gNB image to test server
- oai-gnb
- 0
- 1
-
-
Deploy_Object
Deploy eNB (FDD/Band7/5MHz/B200) in a container
diff --git a/ci-scripts/xml_files/container_nsa_b200_terminate.xml b/ci-scripts/xml_files/container_nsa_b200_terminate.xml
index 4b446988cd..a766fb7bcb 100644
--- a/ci-scripts/xml_files/container_nsa_b200_terminate.xml
+++ b/ci-scripts/xml_files/container_nsa_b200_terminate.xml
@@ -28,6 +28,8 @@
030202
030201
+ 222220
+ 222221
@@ -47,5 +49,17 @@
1
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 1
+
+
diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml
index e4b31527aa..016a3f34ec 100644
--- a/ci-scripts/xml_files/container_sa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml
@@ -26,8 +26,8 @@
tasks
1
+ 111111
010002
- 030000
030101
000001
010000
@@ -47,6 +47,13 @@
-->
+
+ Pull_Local_Registry
+ Pull Images from Local Registry
+ 0
+ oai-gnb
+
+
Initialize_UE
Initialize Quectel
@@ -60,14 +67,6 @@
idefix
-
- Copy_Image_to_Test
- Copy gNB image to test server
- oai-gnb
- 1
- 0
-
-
Deploy_Object
Deploy gNB (TDD/Band78/40MHz/B200) in a container
diff --git a/ci-scripts/xml_files/container_sa_b200_terminate.xml b/ci-scripts/xml_files/container_sa_b200_terminate.xml
index 5a2b6bd454..8e7e0eff44 100644
--- a/ci-scripts/xml_files/container_sa_b200_terminate.xml
+++ b/ci-scripts/xml_files/container_sa_b200_terminate.xml
@@ -27,6 +27,7 @@
1
030201
+ 222222
@@ -39,4 +40,10 @@
sa-test
+
+ Clean_Test_Server_Images
+ Clean Test Images on Test Server
+ 0
+
+
diff --git a/ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1.xml b/ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
deleted file mode 100644
index 2fe0e17611..0000000000
--- a/ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
- test-05-tm1
- Test-05MHz-TM1
- tasks
-
- 030201
- 040101
- 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
-
-
-
-
- Initialize_eNB
- Initialize eNB (FDD/Band7/5MHz)
- -O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time
-
-
-
- Terminate_eNB
- Terminate eNB
-
-
-
- Initialize_UE
- Initialize UE
-
-
-
- Terminate_UE
- Terminate UE
-
-
-
- Attach_UE
- Attach UE
-
-
-
- Detach_UE
- Detach UE
-
-
-
- Ping
- ping (5MHz - 20 sec)
- -c 20
- 5
-
-
-
- Iperf
- iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)
- -u -b 15M -t 30 -i 1
- 50
- balanced
-
-
-
- Iperf
- iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)
- -u -b 15M -t 30 -i 1
- 50
- single-ue
-
-
-
- Iperf
- iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)
- -u -b 15M -t 30 -i 1
- 50
- unbalanced
-
-
-
- Iperf
- iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)
- -t 30 -i 1 -fm
- 50
- single-ue
-
-
-
- Iperf
- iperf (5MHz - DL/TCP)(30 sec)(balanced profile)
- -t 30 -i 1 -fm
- 50
- balanced
-
-
-
- Iperf
- iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)
- -u -b 9M -t 30 -i 1 -R
- 50
- balanced
-
-
-
- Iperf
- iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)
- -u -b 9M -t 30 -i 1 -R
- 50
- single-ue
-
-
-
- Iperf
- iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)
- -t 30 -i 1 -fm -R
- 50
- single-ue
-
-
-
- Iperf
- iperf (5MHz - UL/TCP)(30 sec)(balanced profile)
- -t 30 -i 1 -fm -R
- 50
- balanced
-
-
-
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
index d146c8abec..d134ffc824 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
@@ -146,7 +146,7 @@ rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy)
## 2.3. Deploy OAI eNB in RF simulator mode ##
```bash
-$ docker-compose up -d enb
+$ docker-compose up -d oai_enb0
Creating rfsim4g-oai-enb ... done
```
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
index a260857a34..b44e09e454 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
@@ -179,7 +179,7 @@ services:
timeout: 5s
retries: 5
- enb:
+ oai_enb0:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
index 6e3916b8ca..e0a059222f 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
@@ -1,7 +1,7 @@
version: '3.8'
services:
- enb:
+ oai_enb0:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
index 3f63953b0e..730cedd720 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
@@ -179,7 +179,7 @@ services:
timeout: 5s
retries: 5
- enb:
+ oai_enb0:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
index 1165400273..c1ea936f58 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
@@ -179,7 +179,7 @@ services:
timeout: 5s
retries: 5
- enb:
+ oai_enb0:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
index 86f6c80b59..f497709221 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
@@ -179,7 +179,7 @@ services:
timeout: 5s
retries: 5
- enb:
+ oai_enb0:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
diff --git a/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml
new file mode 100644
index 0000000000..e7309df77c
--- /dev/null
+++ b/ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1/docker-compose.yml
@@ -0,0 +1,43 @@
+version: '3.8'
+
+services:
+ enb_mono_fdd:
+ image: oai-enb:latest
+ privileged: true
+ container_name: lte-b200-enb-fdd-05Mhz-tm1
+ environment:
+ USE_FDD_MONO: 'yes'
+ USE_B2XX: 'yes'
+ ENB_NAME: eNB-in-docker
+ MCC: '208'
+ MNC: '92'
+ MNC_LENGTH: 2
+ TAC: 1
+ UTRA_BAND_ID: 7
+ DL_FREQUENCY_IN_MHZ: 2680
+ UL_FREQUENCY_OFFSET_IN_MHZ: 120
+ NID_CELL: 0
+ NB_PRB: 25
+ ENABLE_MEASUREMENT_REPORTS: 'no'
+ ENABLE_X2: 'no'
+ MME_S1C_IP_ADDRESS: 172.21.18.48
+ ENB_S1C_IF_NAME: eth0
+ ENB_S1C_IP_ADDRESS: 172.21.18.46
+ ENB_S1U_IF_NAME: eth0
+ ENB_S1U_IP_ADDRESS: 172.21.18.46
+ ENB_X2_IP_ADDRESS: 172.21.18.46
+ RRC_INACTIVITY_THRESHOLD: 30
+ FLEXRAN_ENABLED: 'no'
+ FLEXRAN_INTERFACE_NAME: eth0
+ FLEXRAN_IPV4_ADDRESS: 172.21.18.48
+ THREAD_PARALLEL_CONFIG: PARALLEL_SINGLE_THREAD
+ USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time,line_num,function
+ volumes:
+ - /dev:/dev
+ network_mode: "host"
+ healthcheck:
+ # pgrep does NOT work
+ test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
+ interval: 10s
+ timeout: 5s
+ retries: 5