Commit 627b8d92 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci-local-registry' into integration_2022_wk42b

parents d4536d20 1a0d91fd
...@@ -81,7 +81,7 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge ...@@ -81,7 +81,7 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
if ranTargetBranch == '': if ranTargetBranch == '':
ranTargetBranch = 'develop' ranTargetBranch = 'develop'
logging.debug(f'Merging with the target branch: {ranTargetBranch}') 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): def CopyLogsToExecutor(sshSession, sourcePath, log_name, scpIp, scpUser, scpPw):
sshSession.command(f'cd {sourcePath}/cmake_targets', '\$', 5) sshSession.command(f'cd {sourcePath}/cmake_targets', '\$', 5)
...@@ -208,6 +208,7 @@ class Containerize(): ...@@ -208,6 +208,7 @@ class Containerize():
self.imageToCopy = '' self.imageToCopy = ''
self.registrySvrId = '' self.registrySvrId = ''
self.testSvrId = '' self.testSvrId = ''
self.imageToPull = []
#checkers from xml #checkers from xml
self.ran_checkers={} self.ran_checkers={}
...@@ -547,72 +548,194 @@ class Containerize(): ...@@ -547,72 +548,194 @@ class Containerize():
HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize)
def Copy_Image_to_Test_Server(self, HTML): def ImageTagToUse(self, imageName):
imageTag = 'develop' shortCommit = self.ranCommitID[0:8]
if (self.ranAllowMerge): if self.ranAllowMerge:
imageTag = 'ci-temp' tagToUse = f'{self.ranBranch}-{shortCommit}'
else:
tagToUse = f'develop-{shortCommit}'
fullTag = f'porcepix.sboai.cs.eurecom.fr/{imageName}:{tagToUse}'
return fullTag
lSsh = SSH.SSHConnection() def Push_Image_to_Local_Registry(self, HTML):
# Going to the Docker Registry server
if self.registrySvrId == '0': if self.registrySvrId == '0':
lIpAddr = self.eNBIPAddress lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName lUserName = self.eNBUserName
lPassWord = self.eNBPassword lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.registrySvrId == '1': elif self.registrySvrId == '1':
lIpAddr = self.eNB1IPAddress lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName lUserName = self.eNB1UserName
lPassWord = self.eNB1Password lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.registrySvrId == '2': elif self.registrySvrId == '2':
lIpAddr = self.eNB2IPAddress lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName lUserName = self.eNB2UserName
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSourcePath = self.eNB2SourceCodePath
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.') HELP.GenericHelp(CONST.Version)
if ret != 0: sys.exit('Insufficient Parameter')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) logging.debug('Pushing images from server: ' + lIpAddr)
self.exitStatus = 1 mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord)
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 return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'): orgTag = 'develop'
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK) if self.ranAllowMerge:
self.exitStatus = 1 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 return False
lSsh.close() 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
# Going to the Test Server 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': if self.testSvrId == '0':
lIpAddr = self.eNBIPAddress lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName lUserName = self.eNBUserName
lPassWord = self.eNBPassword lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.testSvrId == '1': elif self.testSvrId == '1':
lIpAddr = self.eNB1IPAddress lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName lUserName = self.eNB1UserName
lPassWord = self.eNB1Password lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.testSvrId == '2': elif self.testSvrId == '2':
lIpAddr = self.eNB2IPAddress lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName lUserName = self.eNB2UserName
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSourcePath = self.eNB2SourceCodePath
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~') if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
# copyout has no return code and will quit if something fails HELP.GenericHelp(CONST.Version)
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10) sys.exit('Insufficient Parameter')
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) if lIpAddr != 'none':
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'): logging.debug('Pulling images onto server: ' + lIpAddr)
logging.debug(lSsh.getBefore()) mySSH = SSH.SSHConnection()
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK) mySSH.open(lIpAddr, lUserName, lPassWord)
self.exitStatus = 1 else:
logging.debug('Pulling images locally')
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 return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'): for image in self.imageToPull:
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK) tagToUse = self.ImageTagToUse(image)
self.exitStatus = 1 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 return False
lSsh.close()
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'): cmd = 'docker logout porcepix.sboai.cs.eurecom.fr'
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz') 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) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
...@@ -644,11 +767,10 @@ class Containerize(): ...@@ -644,11 +767,10 @@ class Containerize():
mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5) mySSH.command('cd ' + lSourcePath + '/' + self.yamlPath[self.eNB_instance], '\$', 5)
mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5) mySSH.command('cp docker-compose.yml ci-docker-compose.yml', '\$', 5)
imageTag = 'develop' imagesList = ['oai-enb', 'oai-gnb']
if (self.ranAllowMerge): for image in imagesList:
imageTag = 'ci-temp' imageToUse = self.ImageTagToUse(image)
mySSH.command('sed -i -e "s/image: oai-enb:latest/image: oai-enb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2) mySSH.command(f'sed -i -e "s#image: {image}:latest#image: {imageToUse}#" ci-docker-compose.yml', '\$', 2)
mySSH.command('sed -i -e "s/image: oai-gnb:latest/image: oai-gnb:' + imageTag + '/" ci-docker-compose.yml', '\$', 2)
localMmeIpAddr = EPC.MmeIPAddress localMmeIpAddr = EPC.MmeIPAddress
mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2) mySSH.command('sed -i -e "s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/" ci-docker-compose.yml', '\$', 2)
# if self.flexranCtrlDeployed: # if self.flexranCtrlDeployed:
...@@ -672,6 +794,8 @@ class Containerize(): ...@@ -672,6 +794,8 @@ class Containerize():
healthyNb = 0 healthyNb = 0
startingNb = 0 startingNb = 0
containerName = '' containerName = ''
usedImage = ''
imageInfo = ''
if result is not None: if result is not None:
containerName = result.group('container_name') containerName = result.group('container_name')
time.sleep(5) time.sleep(5)
...@@ -686,6 +810,20 @@ class Containerize(): ...@@ -686,6 +810,20 @@ class Containerize():
else: else:
time.sleep(10) time.sleep(10)
cnt += 1 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(healthyNb) + ' healthy container(s)')
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)') logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)') logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
...@@ -715,11 +853,24 @@ class Containerize(): ...@@ -715,11 +853,24 @@ class Containerize():
mySSH.copyin(lIpAddr, lUserName, lPassWord, logfilename, '.') mySSH.copyin(lIpAddr, lUserName, lPassWord, logfilename, '.')
mySSH.close() mySSH.close()
html_queue = SimpleQueue()
html_cell = '<pre style="background-color:white">\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: 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 += '</pre>'
html_queue.put(html_cell)
if status:
HTML.CreateHtmlTestRowQueue('N/A', 'OK', CONST.ENB_PROCESS_OK, html_queue)
else: else:
self.exitStatus = 1 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): def UndeployObject(self, HTML, RAN):
...@@ -800,33 +951,40 @@ class Containerize(): ...@@ -800,33 +951,40 @@ class Containerize():
def DeployGenObject(self, HTML, RAN, UE): def DeployGenObject(self, HTML, RAN, UE):
self.exitStatus = 0 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' cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services'
logging.debug(cmd) logging.info(cmd)
try: try:
listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True) listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True)
except Exception as e: except Exception as e:
self.exitStatus = 1 self.exitStatus = 1
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return return
displayUsedTag = False
for reqSvc in self.services[0].split(' '): for reqSvc in self.services[0].split(' '):
res = re.search(reqSvc, listServices) res = re.search(reqSvc, listServices)
if res is None: if res is None:
logging.error(reqSvc + ' not found in specified docker-compose') logging.error(reqSvc + ' not found in specified docker-compose')
self.exitStatus = 1 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): if (self.exitStatus == 1):
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return return
if (self.ranAllowMerge): cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml' imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
else: for image in imageNames:
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml' tagToUse = self.ImageTagToUse(image)
logging.debug(cmd) cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
subprocess.run(cmd, shell=True) 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] cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
logging.debug(cmd) logging.info(cmd)
try: try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e: except Exception as e:
...@@ -835,7 +993,7 @@ class Containerize(): ...@@ -835,7 +993,7 @@ class Containerize():
HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK)
return 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' cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a'
count = 0 count = 0
healthy = 0 healthy = 0
...@@ -930,7 +1088,7 @@ class Containerize(): ...@@ -930,7 +1088,7 @@ class Containerize():
cmd += ' -w /tmp/capture_' cmd += ' -w /tmp/capture_'
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
cmd += ymlPath[1] + '.pcap > /tmp/tshark.log 2>&1 &' 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) networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = True self.tsharkStarted = True
...@@ -939,22 +1097,23 @@ class Containerize(): ...@@ -939,22 +1097,23 @@ class Containerize():
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
if (self.ranAllowMerge): cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@ci-temp@" docker-compose.y*ml > docker-compose-ci.yml' subprocess.run(cmd, shell=True)
else: imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
cmd = 'cd ' + self.yamlPath[0] + ' && sed -e "s@develop@develop@" docker-compose.y*ml > docker-compose-ci.yml' for image in imageNames:
logging.debug(cmd) 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) subprocess.run(cmd, shell=True)
# check which containers are running for log recovery later # check which containers are running for log recovery later
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all' 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) deployStatusLogs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Stop the containers to shut down objects # Stop the containers to shut down objects
logging.debug('\u001B[1m Stopping containers \u001B[0m') logging.debug('\u001B[1m Stopping containers \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop' cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop'
logging.debug(cmd) logging.info(cmd)
try: try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e: except Exception as e:
...@@ -976,16 +1135,16 @@ class Containerize(): ...@@ -976,16 +1135,16 @@ class Containerize():
anyLogs = True anyLogs = True
cName = res.group('container_name') cName = res.group('container_name')
cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1' 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) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
if re.search('magma-mme', cName) is not None: 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' 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) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
fullStatus = True fullStatus = True
if anyLogs: if anyLogs:
cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath 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) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
# Analyzing log file(s)! # Analyzing log file(s)!
...@@ -1035,25 +1194,25 @@ class Containerize(): ...@@ -1035,25 +1194,25 @@ class Containerize():
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
cmd = 'rm ' + self.yamlPath[0] + '/*.log' 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) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
if self.tsharkStarted: if self.tsharkStarted:
self.tsharkStarted = True self.tsharkStarted = True
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
cmd = 'sudo chmod 666 /tmp/capture_' + ymlPath[1] + '.pcap' 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) copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
cmd = 'cp /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath 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) copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
cmd = 'sudo rm /tmp/capture_' + ymlPath[1] + '.pcap' 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) copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = False self.tsharkStarted = False
logging.debug('\u001B[1m Undeploying \u001B[0m') logging.debug('\u001B[1m Undeploying \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down' cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
logging.debug(cmd) logging.info(cmd)
try: try:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
except Exception as e: except Exception as e:
...@@ -1066,7 +1225,7 @@ class Containerize(): ...@@ -1066,7 +1225,7 @@ class Containerize():
self.deployedContainers = [] self.deployedContainers = []
# Cleaning any created tmp volume # Cleaning any created tmp volume
cmd = 'docker volume prune --force || true' 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) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
if fullStatus: if fullStatus:
...@@ -1074,7 +1233,7 @@ class Containerize(): ...@@ -1074,7 +1233,7 @@ class Containerize():
logging.info('\u001B[1m Undeploying OAI Object(s) PASS\u001B[0m') logging.info('\u001B[1m Undeploying OAI Object(s) PASS\u001B[0m')
else: else:
HTML.CreateHtmlTestRow('n/a', 'KO', CONST.ALL_PROCESSES_OK) 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): def StatsFromGenObject(self, HTML):
self.exitStatus = 0 self.exitStatus = 0
...@@ -1083,7 +1242,7 @@ class Containerize(): ...@@ -1083,7 +1242,7 @@ class Containerize():
# if the containers are running, recover the logs! # if the containers are running, recover the logs!
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all' 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) 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}}" ' cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
anyLogs = False anyLogs = False
...@@ -1099,7 +1258,7 @@ class Containerize(): ...@@ -1099,7 +1258,7 @@ class Containerize():
cmd += res.group('container_name') + ' ' cmd += res.group('container_name') + ' '
message = '' message = ''
if anyLogs: if anyLogs:
logging.debug(cmd) logging.info(cmd)
stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
for statLine in stats.split('\n'): for statLine in stats.split('\n'):
logging.debug(statLine) logging.debug(statLine)
...@@ -1119,7 +1278,7 @@ class Containerize(): ...@@ -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' 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) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus) result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
...@@ -1176,9 +1335,9 @@ class Containerize(): ...@@ -1176,9 +1335,9 @@ class Containerize():
logging.error('\u001B[1;37;41m ping test FAIL -- ' + message + ' \u001B[0m') logging.error('\u001B[1;37;41m ping test FAIL -- ' + message + ' \u001B[0m')
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'KO', 1, html_queue) HTML.CreateHtmlTestRowQueue(self.pingOptions, 'KO', 1, html_queue)
# Automatic undeployment # Automatic undeployment
logging.debug('----------------------------------------') logging.warning('----------------------------------------')
logging.debug('\u001B[1m Starting Automatic undeployment \u001B[0m') logging.warning('\u001B[1m Starting Automatic undeployment \u001B[0m')
logging.debug('----------------------------------------') logging.warning('----------------------------------------')
HTML.testCase_id = 'AUTO-UNDEPLOY' HTML.testCase_id = 'AUTO-UNDEPLOY'
HTML.desc = 'Automatic Un-Deployment' HTML.desc = 'Automatic Un-Deployment'
self.UndeployGenObject(HTML, RAN, UE) self.UndeployGenObject(HTML, RAN, UE)
...@@ -1194,23 +1353,23 @@ class Containerize(): ...@@ -1194,23 +1353,23 @@ class Containerize():
# Start the server process # Start the server process
cmd = 'docker exec -d ' + self.svrContName + ' /bin/bash -c "nohup iperf ' + self.svrOptions + ' > /tmp/iperf_server.log 2>&1" || true' 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) serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(5) time.sleep(5)
# Start the client process # 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' 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) clientStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
# Stop the server process # Stop the server process
cmd = 'docker exec ' + self.svrContName + ' /bin/bash -c "pkill iperf" || true' 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) serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(5) time.sleep(5)
cmd = 'docker cp ' + self.svrContName + ':/tmp/iperf_server.log '+ logPath + '/iperf_server_' + HTML.testCase_id + '.log' 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) serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Analyze client output # Analyze client output
......
...@@ -35,11 +35,6 @@ import re ...@@ -35,11 +35,6 @@ import re
import subprocess import subprocess
import sshconnection import sshconnection
logging.basicConfig(
level=logging.DEBUG,
format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
)
class Log_Mgt: class Log_Mgt:
def __init__(self,Username, IPAddress,Password,Path): def __init__(self,Username, IPAddress,Password,Path):
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#----------------------------------------------------------- #-----------------------------------------------------------
import sys # arg import sys # arg
import re # reg import re # reg
import fileinput
import logging import logging
import os import os
import time import time
...@@ -102,9 +103,9 @@ class HTMLManagement(): ...@@ -102,9 +103,9 @@ class HTMLManagement():
def CreateHtmlHeader(self, ADBIPAddress): def CreateHtmlHeader(self, ADBIPAddress):
if (not self.htmlHeaderCreated): if (not self.htmlHeaderCreated):
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1m Creating HTML header \u001B[0m') logging.info('\u001B[1m Creating HTML header \u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
self.htmlFile = open('test_results.html', 'w') self.htmlFile = open('test_results.html', 'w')
self.htmlFile.write('<!DOCTYPE html>\n') self.htmlFile.write('<!DOCTYPE html>\n')
self.htmlFile.write('<html class="no-js" lang="en-US">\n') self.htmlFile.write('<html class="no-js" lang="en-US">\n')
...@@ -195,6 +196,9 @@ class HTMLManagement(): ...@@ -195,6 +196,9 @@ class HTMLManagement():
self.htmlFile.write(' <ul class="nav nav-pills">\n') self.htmlFile.write(' <ul class="nav nav-pills">\n')
count = 0 count = 0
while (count < self.nbTestXMLfiles): while (count < self.nbTestXMLfiles):
if count == 0:
pillMsg = ' <li class="active"><a data-toggle="pill" href="#'
else:
pillMsg = ' <li><a data-toggle="pill" href="#' pillMsg = ' <li><a data-toggle="pill" href="#'
pillMsg += self.htmlTabRefs[count] pillMsg += self.htmlTabRefs[count]
pillMsg += '">' pillMsg += '">'
...@@ -269,6 +273,15 @@ class HTMLManagement(): ...@@ -269,6 +273,15 @@ class HTMLManagement():
def CreateHtmlFooter(self, passStatus): def CreateHtmlFooter(self, passStatus):
if (os.path.isfile('test_results.html')): 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 = open('test_results.html', 'a')
self.htmlFile.write('</div>\n') self.htmlFile.write('</div>\n')
self.htmlFile.write(' <p></p>\n') self.htmlFile.write(' <p></p>\n')
......
...@@ -44,10 +44,6 @@ import datetime ...@@ -44,10 +44,6 @@ import datetime
import signal import signal
import statistics as stat import statistics as stat
from multiprocessing import Process, Lock, SimpleQueue from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig(
level=logging.DEBUG,
format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
)
#import our libs #import our libs
import helpreadme as HELP import helpreadme as HELP
...@@ -263,10 +259,10 @@ class OaiCiTest(): ...@@ -263,10 +259,10 @@ class OaiCiTest():
if self.ranAllowMerge: if self.ranAllowMerge:
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) 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('source oaienv', '\$', 5)
SSH.command('cd cmake_targets', '\$', 5) SSH.command('cd cmake_targets', '\$', 5)
SSH.command('mkdir -p log', '\$', 5) SSH.command('mkdir -p log', '\$', 5)
...@@ -3937,7 +3933,7 @@ class OaiCiTest(): ...@@ -3937,7 +3933,7 @@ class OaiCiTest():
sys.exit(1) sys.exit(1)
def ShowTestID(self): def ShowTestID(self):
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m') logging.info('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m')
logging.debug('\u001B[1m' + self.desc + '\u001B[0m') logging.info('\u001B[1m' + self.desc + '\u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
...@@ -180,10 +180,10 @@ class PhySim: ...@@ -180,10 +180,10 @@ class PhySim:
if (self.ranAllowMerge): if (self.ranAllowMerge):
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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: else:
logging.info('Merging with the target branch: ' + self.ranTargetBranch) 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 #build
mySSH.command('source oaienv', '\$', 5) mySSH.command('source oaienv', '\$', 5)
......
...@@ -108,10 +108,10 @@ class PhySim: ...@@ -108,10 +108,10 @@ class PhySim:
imageTag = "ci-temp" imageTag = "ci-temp"
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) 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: else:
imageTag = "develop" imageTag = "develop"
......
...@@ -123,10 +123,10 @@ class StaticCodeAnalysis(): ...@@ -123,10 +123,10 @@ class StaticCodeAnalysis():
if (self.ranAllowMerge): if (self.ranAllowMerge):
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) 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('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) 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(): ...@@ -281,11 +281,11 @@ class StaticCodeAnalysis():
argToPass = '--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH=' + self.ranBranch argToPass = '--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH=' + self.ranBranch
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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 ' argToPass += ' --build-arg TARGET_BRANCH=develop '
else: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) 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 + ' ' argToPass += ' --build-arg TARGET_BRANCH=' + self.ranTargetBranch + ' '
mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60) mySSH.command('docker image rm oai-formatting-check:latest || true', '\$', 60)
......
...@@ -70,7 +70,7 @@ import subprocess ...@@ -70,7 +70,7 @@ import subprocess
from multiprocessing import Process, Lock, SimpleQueue from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig( logging.basicConfig(
level=logging.DEBUG, 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( ...@@ -84,7 +84,7 @@ logging.basicConfig(
def CheckClassValidity(xml_class_list,action,id): def CheckClassValidity(xml_class_list,action,id):
if action not in xml_class_list: 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 resp=False
else: else:
resp=True resp=True
...@@ -336,14 +336,14 @@ def GetParametersFromXML(action): ...@@ -336,14 +336,14 @@ def GetParametersFromXML(action):
CiTestObj.iperf_profile = 'balanced' CiTestObj.iperf_profile = 'balanced'
else: else:
if CiTestObj.iperf_profile != 'balanced' and CiTestObj.iperf_profile != 'unbalanced' and CiTestObj.iperf_profile != 'single-ue': 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_profile = 'balanced'
CiTestObj.iperf_options = test.findtext('iperf_options') CiTestObj.iperf_options = test.findtext('iperf_options')
if (CiTestObj.iperf_options is None): if (CiTestObj.iperf_options is None):
CiTestObj.iperf_options = 'check' CiTestObj.iperf_options = 'check'
else: else:
if CiTestObj.iperf_options != 'check' and CiTestObj.iperf_options != 'sink': 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' CiTestObj.iperf_options = 'check'
elif action == 'IdleSleep': elif action == 'IdleSleep':
...@@ -380,6 +380,11 @@ def GetParametersFromXML(action): ...@@ -380,6 +380,11 @@ def GetParametersFromXML(action):
if (string_field is not None): if (string_field is not None):
EPC.mmeConfFile = string_field 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': elif action == 'Deploy_EPC':
string_field = test.findtext('parameters') string_field = test.findtext('parameters')
if (string_field is not None): if (string_field is not None):
...@@ -458,17 +463,6 @@ def GetParametersFromXML(action): ...@@ -458,17 +463,6 @@ def GetParametersFromXML(action):
if (string_field is not None): if (string_field is not None):
CONTAINERS.cliOptions = string_field 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': elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest':
ldpc.runargs = test.findtext('physim_run_args') ldpc.runargs = test.findtext('physim_run_args')
...@@ -478,8 +472,27 @@ def GetParametersFromXML(action): ...@@ -478,8 +472,27 @@ def GetParametersFromXML(action):
elif action == 'Cppcheck_Analysis': elif action == 'Cppcheck_Analysis':
pass 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: 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 #check if given test is in list
...@@ -631,7 +644,7 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE): ...@@ -631,7 +644,7 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
if RAN.eNBIPAddress == 'none': if RAN.eNBIPAddress == 'none':
cmd = 'zip -r enb.log.' + RAN.BuildId + '.zip cmake_targets/log' 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) zipStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=60)
sys.exit(0) sys.exit(0)
RAN.LogCollecteNB() RAN.LogCollecteNB()
...@@ -697,17 +710,17 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE): ...@@ -697,17 +710,17 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
HTML.htmlNb_CATM_Modules=len(CiTestObj.CatMDevices) HTML.htmlNb_CATM_Modules=len(CiTestObj.CatMDevices)
HTML.CreateHtmlHeader(CiTestObj.ADBIPAddress) HTML.CreateHtmlHeader(CiTestObj.ADBIPAddress)
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE): elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1m Creating HTML footer \u001B[0m') logging.info('\u001B[1m Creating HTML footer \u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
CiTestObj.RetrieveSystemVersion('eNB',HTML,RAN) CiTestObj.RetrieveSystemVersion('eNB',HTML,RAN)
CiTestObj.RetrieveSystemVersion('UE',HTML,RAN) CiTestObj.RetrieveSystemVersion('UE',HTML,RAN)
HTML.CreateHtmlFooter(CiTestObj.finalStatus) HTML.CreateHtmlFooter(CiTestObj.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE): elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m') logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.info('\u001B[1m----------------------------------------\u001B[0m')
if re.match('^TesteNB$', mode, re.IGNORECASE): 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 == '': 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) HELP.GenericHelp(CONST.Version)
...@@ -750,7 +763,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -750,7 +763,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.testUnstable = True HTML.testUnstable = True
CiTestObj.testMinStableId = xmlRoot.findtext('TestMinId',default='999999') CiTestObj.testMinStableId = xmlRoot.findtext('TestMinId',default='999999')
HTML.testMinStableId = CiTestObj.testMinStableId 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') all_tests=xmlRoot.findall('testCase')
exclusion_tests=exclusion_tests.split() exclusion_tests=exclusion_tests.split()
...@@ -761,10 +774,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -761,10 +774,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
for test in exclusion_tests: for test in exclusion_tests:
if (not re.match('^[0-9]{6}$', test) and if (not re.match('^[0-9]{6}$', test) and
not re.match('^[0-9]{1,5}\+$', test)): 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) sys.exit(1)
else: else:
logging.debug(test) logging.info(test)
#check that requested tests are well formatted #check that requested tests are well formatted
#(6 digits or less than 6 digits followed by +) #(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 ...@@ -772,9 +785,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
for test in requested_tests: for test in requested_tests:
if (re.match('^[0-9]{6}$', test) or if (re.match('^[0-9]{6}$', test) or
re.match('^[0-9]{1,5}\+$', test)): re.match('^[0-9]{1,5}\+$', test)):
logging.debug('INFO: test group/case requested: ' + test) logging.info('test group/case requested: ' + test)
else: else:
logging.debug('ERROR: requested test is invalidly formatted: ' + test) logging.error('requested test is invalidly formatted: ' + test)
sys.exit(1) sys.exit(1)
if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'): if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS) CiTestObj.CheckFlexranCtrlInstallation(RAN,EPC,CONTAINERS)
...@@ -785,9 +798,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -785,9 +798,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
todo_tests=[] todo_tests=[]
for test in requested_tests: for test in requested_tests:
if (test_in_list(test, exclusion_tests)): if (test_in_list(test, exclusion_tests)):
logging.debug('INFO: test will be skipped: ' + test) logging.info('test will be skipped: ' + test)
else: else:
#logging.debug('INFO: test will be run: ' + test) #logging.info('test will be run: ' + test)
todo_tests.append(test) todo_tests.append(test)
signal.signal(signal.SIGUSR1, receive_signal) signal.signal(signal.SIGUSR1, receive_signal)
...@@ -951,8 +964,16 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -951,8 +964,16 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CONTAINERS.BuildImage(HTML) CONTAINERS.BuildImage(HTML)
elif action == 'Build_Proxy': elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML) CONTAINERS.BuildProxy(HTML)
elif action == 'Copy_Image_to_Test': elif action == 'Push_Local_Registry':
success = CONTAINERS.Copy_Image_to_Test_Server(HTML) 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: if not success:
RAN.prematureExit = True RAN.prematureExit = True
elif action == 'Deploy_Object': elif action == 'Deploy_Object':
...@@ -987,23 +1008,25 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -987,23 +1008,25 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
RAN.prematureExit = True RAN.prematureExit = True
elif action == 'StatsFromGenObject': elif action == 'StatsFromGenObject':
CONTAINERS.StatsFromGenObject(HTML) CONTAINERS.StatsFromGenObject(HTML)
elif action == 'Push_Images_To_Test_Servers':
logging.debug('To be implemented')
else: else:
sys.exit('Invalid class (action) from xml') sys.exit('Invalid class (action) from xml')
if RAN.prematureExit: if RAN.prematureExit:
if CiTestObj.testCase_id == CiTestObj.testMinStableId: 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 CiTestObj.testStabilityPointReached = True
HTML.testStabilityPointReached = True HTML.testStabilityPointReached = True
CiTestObj.FailReportCnt += 1 CiTestObj.FailReportCnt += 1
if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit: 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) HTML.CreateHtmlTabFooter(False)
if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'): 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: else:
sys.exit('Failed Scenario') sys.exit('Failed Scenario')
else: 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) HTML.CreateHtmlTabFooter(True)
elif re.match('^LoadParams$', mode, re.IGNORECASE): elif re.match('^LoadParams$', mode, re.IGNORECASE):
pass pass
......
...@@ -203,10 +203,10 @@ class RANManagement(): ...@@ -203,10 +203,10 @@ class RANManagement():
if (self.ranAllowMerge): if (self.ranAllowMerge):
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): 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: else:
logging.debug('Merging with the target branch: ' + self.ranTargetBranch) 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 logging.debug(mySSH.getBefore()) # print what git said when merging/checking out
mySSH.command('source oaienv', '\$', 5) mySSH.command('source oaienv', '\$', 5)
mySSH.command('cd cmake_targets', '\$', 5) mySSH.command('cd cmake_targets', '\$', 5)
......
...@@ -74,7 +74,7 @@ class SSHConnection(): ...@@ -74,7 +74,7 @@ class SSHConnection():
count = 10 count = 10
connect_status = True connect_status = True
else: else:
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.warning('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 1: elif self.sshresponse == 1:
self.ssh.sendline(password) self.ssh.sendline(password)
self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) self.sshresponse = self.ssh.expect([prompt, 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
...@@ -82,7 +82,7 @@ class SSHConnection(): ...@@ -82,7 +82,7 @@ class SSHConnection():
count = 10 count = 10
connect_status = True connect_status = True
else: else:
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.warning('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 2: elif self.sshresponse == 2:
# We directly ended up on the remote server because of pubkey auth # We directly ended up on the remote server because of pubkey auth
count = 10 count = 10
...@@ -91,8 +91,8 @@ class SSHConnection(): ...@@ -91,8 +91,8 @@ class SSHConnection():
self.sshresponse = self.ssh.expect([prompt]) self.sshresponse = self.ssh.expect([prompt])
else: else:
# debug output # debug output
logging.debug(str(self.ssh.before)) logging.warning(str(self.ssh.before))
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.warning('self.sshresponse = ' + str(self.sshresponse))
# adding a tempo when failure # adding a tempo when failure
if not connect_status: if not connect_status:
time.sleep(1) time.sleep(1)
...@@ -108,7 +108,7 @@ class SSHConnection(): ...@@ -108,7 +108,7 @@ class SSHConnection():
def cde_check_value(self, commandline, expected, timeout): def cde_check_value(self, commandline, expected, timeout):
logging.debug(commandline) logging.info(commandline)
self.ssh.timeout = timeout self.ssh.timeout = timeout
self.ssh.sendline(commandline) self.ssh.sendline(commandline)
expected.append(pexpect.EOF) expected.append(pexpect.EOF)
...@@ -118,7 +118,7 @@ class SSHConnection(): ...@@ -118,7 +118,7 @@ class SSHConnection():
def command(self, commandline, expectedline, timeout, silent=False, resync=False): def command(self, commandline, expectedline, timeout, silent=False, resync=False):
if not silent: if not silent:
logging.debug(commandline) logging.info(commandline)
self.ssh.timeout = timeout self.ssh.timeout = timeout
# Nasty patch when pexpect output is out of sync. # Nasty patch when pexpect output is out of sync.
# Much pronounced when running back-to-back-back oc commands # Much pronounced when running back-to-back-back oc commands
...@@ -133,27 +133,27 @@ class SSHConnection(): ...@@ -133,27 +133,27 @@ class SSHConnection():
if self.sshresponse == 0: if self.sshresponse == 0:
return 0 return 0
elif self.sshresponse == 1: elif self.sshresponse == 1:
logging.debug('\u001B[1;37;41m Unexpected EOF \u001B[0m') logging.error('\u001B[1;37;41m Unexpected EOF \u001B[0m')
logging.debug('Expected Line : ' + expectedline) logging.error('Expected Line : ' + expectedline)
logging.debug(str(self.ssh.before)) logging.error(str(self.ssh.before))
sys.exit(self.sshresponse) sys.exit(self.sshresponse)
elif self.sshresponse == 2: elif self.sshresponse == 2:
logging.debug('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m') logging.error('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m')
logging.debug('Expected Line : ' + expectedline) logging.error('Expected Line : ' + expectedline)
result = re.search('ping |iperf |picocom', str(commandline)) result = re.search('ping |iperf |picocom', str(commandline))
if result is None: if result is None:
logging.debug(str(self.ssh.before)) logging.warning(str(self.ssh.before))
sys.exit(self.sshresponse) sys.exit(self.sshresponse)
else: else:
return -1 return -1
else: else:
logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m') logging.error('\u001B[1;37;41m Unexpected Others \u001B[0m')
logging.debug('Expected Line : ' + expectedline) logging.error('Expected Line : ' + expectedline)
sys.exit(self.sshresponse) sys.exit(self.sshresponse)
def command2(self, commandline, timeout, silent=False): def command2(self, commandline, timeout, silent=False):
if not silent: if not silent:
logging.debug(commandline) logging.info(commandline)
self.cmd2Results = '' self.cmd2Results = ''
noHistoryCmd = 'unset HISTFILE; ' + commandline noHistoryCmd = 'unset HISTFILE; ' + commandline
myHost = self.username + '@' + self.ipaddress myHost = self.username + '@' + self.ipaddress
...@@ -165,7 +165,7 @@ class SSHConnection(): ...@@ -165,7 +165,7 @@ class SSHConnection():
def command3(self, commandline, timeout, silent=False): def command3(self, commandline, timeout, silent=False):
if not silent: if not silent:
logging.debug(commandline) logging.info(commandline)
self.cmd2Results = '' self.cmd2Results = ''
noHistoryCmd = 'unset HISTFILE; ' + commandline noHistoryCmd = 'unset HISTFILE; ' + commandline
myHost = self.username + '@' + self.ipaddress myHost = self.username + '@' + self.ipaddress
...@@ -186,14 +186,14 @@ class SSHConnection(): ...@@ -186,14 +186,14 @@ class SSHConnection():
pass pass
elif self.sshresponse == 1: elif self.sshresponse == 1:
if not self.picocom_closure: 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: 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): def copyin(self, ipaddress, username, password, source, destination):
count = 0 count = 0
copy_status = False copy_status = False
logging.debug('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination) logging.info('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination)
while count < 10: while count < 10:
scp_spawn = pexpect.spawn('scp -r '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 100) 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]) 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(): ...@@ -206,7 +206,7 @@ class SSHConnection():
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('1 - scp_response = ' + str(scp_response)) logging.warning('1 - scp_response = ' + str(scp_response))
elif scp_response == 1: elif scp_response == 1:
scp_spawn.sendline(password) scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
...@@ -214,12 +214,12 @@ class SSHConnection(): ...@@ -214,12 +214,12 @@ class SSHConnection():
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('2 - scp_response = ' + str(scp_response)) logging.warning('2 - scp_response = ' + str(scp_response))
elif scp_response == 2: elif scp_response == 2:
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('3 - scp_response = ' + str(scp_response)) logging.warning('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure # adding a tempo when failure
if not copy_status: if not copy_status:
time.sleep(1) time.sleep(1)
...@@ -232,7 +232,7 @@ class SSHConnection(): ...@@ -232,7 +232,7 @@ class SSHConnection():
def copyout(self, ipaddress, username, password, source, destination): def copyout(self, ipaddress, username, password, source, destination):
count = 0 count = 0
copy_status = False copy_status = False
logging.debug('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination) logging.info('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
while count < 4: while count < 4:
scp_spawn = pexpect.spawn('scp -r ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100) 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]) 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(): ...@@ -245,7 +245,7 @@ class SSHConnection():
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('1 - scp_response = ' + str(scp_response)) logging.warning('1 - scp_response = ' + str(scp_response))
elif scp_response == 1: elif scp_response == 1:
scp_spawn.sendline(password) scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
...@@ -253,12 +253,12 @@ class SSHConnection(): ...@@ -253,12 +253,12 @@ class SSHConnection():
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('2 - scp_response = ' + str(scp_response)) logging.warning('2 - scp_response = ' + str(scp_response))
elif scp_response == 2: elif scp_response == 2:
count = 10 count = 10
copy_status = True copy_status = True
else: else:
logging.debug('3 - scp_response = ' + str(scp_response)) logging.warning('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure # adding a tempo when failure
if not copy_status: if not copy_status:
time.sleep(1) time.sleep(1)
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
- IdleSleep - IdleSleep
- Perform_X2_Handover - Perform_X2_Handover
- Build_Image - Build_Image
- Copy_Image_to_Test
- Deploy_Object - Deploy_Object
- Undeploy_Object - Undeploy_Object
- Cppcheck_Analysis - Cppcheck_Analysis
...@@ -51,3 +50,6 @@ ...@@ -51,3 +50,6 @@
- IperfFromContainer - IperfFromContainer
- StatsFromGenObject - StatsFromGenObject
- LicenceAndFormattingCheck - LicenceAndFormattingCheck
- Push_Local_Registry
- Pull_Local_Registry
- Clean_Test_Server_Images
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100001 100001
000000 000000
000001 000001
...@@ -42,6 +43,13 @@ ...@@ -42,6 +43,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000000"> <testCase id="000000">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc> <desc>Deploy Cassandra Database</desc>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100002 100002
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_l2sim_fdd</yaml_path> <yaml_path>yaml_files/4g_l2sim_fdd</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>Monolithic eNB - FDD 05MHz</htmlTabName> <htmlTabName>Monolithic eNB - FDD 05MHz</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000011 000011
000001 000001
...@@ -42,6 +43,13 @@ ...@@ -42,6 +43,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000011"> <testCase id="000011">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc> <desc>Deploy Cassandra Database</desc>
...@@ -74,7 +82,7 @@ ...@@ -74,7 +82,7 @@
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc> <desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc>
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
<services>enb</services> <services>oai_enb0</services>
<nb_healthy>8</nb_healthy> <nb_healthy>8</nb_healthy>
</testCase> </testCase>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100011 100011
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>Monolithic eNB - FDD 05MHz - noS1</htmlTabName> <htmlTabName>Monolithic eNB - FDD 05MHz - noS1</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000013 000013
000001 000001
...@@ -38,6 +39,13 @@ ...@@ -38,6 +39,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000001"> <testCase id="000001">
<class>IdleSleep</class> <class>IdleSleep</class>
<desc>Sleep</desc> <desc>Sleep</desc>
...@@ -54,7 +62,7 @@ ...@@ -54,7 +62,7 @@
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc> <desc>Deploy OAI 4G eNB RF sim (FDD 05MHz)</desc>
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
<services>enb</services> <services>oai_enb0</services>
<nb_healthy>1</nb_healthy> <nb_healthy>1</nb_healthy>
</testCase> </testCase>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100011 100011
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_05MHz_noS1</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>Monolithic eNB - FDD 10MHz</htmlTabName> <htmlTabName>Monolithic eNB - FDD 10MHz</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000011 000011
000001 000001
...@@ -42,6 +43,13 @@ ...@@ -42,6 +43,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000011"> <testCase id="000011">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc> <desc>Deploy Cassandra Database</desc>
...@@ -74,7 +82,7 @@ ...@@ -74,7 +82,7 @@
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB RF sim (FDD 10MHz)</desc> <desc>Deploy OAI 4G eNB RF sim (FDD 10MHz)</desc>
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
<services>enb</services> <services>oai_enb0</services>
<nb_healthy>8</nb_healthy> <nb_healthy>8</nb_healthy>
</testCase> </testCase>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100011 100011
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_10MHz</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>Monolithic eNB - FDD 20MHz</htmlTabName> <htmlTabName>Monolithic eNB - FDD 20MHz</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000011 000011
000001 000001
...@@ -42,6 +43,13 @@ ...@@ -42,6 +43,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000011"> <testCase id="000011">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc> <desc>Deploy Cassandra Database</desc>
...@@ -74,7 +82,7 @@ ...@@ -74,7 +82,7 @@
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB RF sim (FDD 20MHz)</desc> <desc>Deploy OAI 4G eNB RF sim (FDD 20MHz)</desc>
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
<services>enb</services> <services>oai_enb0</services>
<nb_healthy>8</nb_healthy> <nb_healthy>8</nb_healthy>
</testCase> </testCase>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100011 100011
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_fdd_20MHz</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000011 000011
000001 000001
...@@ -43,6 +44,13 @@ ...@@ -43,6 +44,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb oai-lte-ue</images_to_pull>
</testCase>
<testCase id="000011"> <testCase id="000011">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy Cassandra Database</desc> <desc>Deploy Cassandra Database</desc>
...@@ -75,7 +83,7 @@ ...@@ -75,7 +83,7 @@
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy OAI 4G eNB RF sim (TDD 05MHz)</desc> <desc>Deploy OAI 4G eNB RF sim (TDD 05MHz)</desc>
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
<services>enb</services> <services>oai_enb0</services>
<nb_healthy>7</nb_healthy> <nb_healthy>7</nb_healthy>
</testCase> </testCase>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100011 100011
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path> <yaml_path>yaml_files/4g_rfsimulator_tdd_05MHz</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>CU-DU F1 split</htmlTabName> <htmlTabName>CU-DU F1 split</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100021 100021
000020 000020
000021 000021
...@@ -38,6 +39,13 @@ ...@@ -38,6 +39,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000020"> <testCase id="000020">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy MySql Database</desc> <desc>Deploy MySql Database</desc>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100022 100022
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_f1_rfsimulator</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100011 100011
000010 000010
000011 000011
...@@ -39,6 +40,13 @@ ...@@ -39,6 +40,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000010"> <testCase id="000010">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy MySql Database</desc> <desc>Deploy MySql Database</desc>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100012 100012
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_fdd_rfsimulator</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100001 100001
000000 000000
000001 000001
...@@ -40,6 +41,13 @@ ...@@ -40,6 +41,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000"> <testCase id="000000">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy MySql Database</desc> <desc>Deploy MySql Database</desc>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100002 100002
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/5g_l2sim_tdd</yaml_path> <yaml_path>yaml_files/5g_l2sim_tdd</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
100001 100001
000000 000000
000001 000001
...@@ -42,6 +43,13 @@ ...@@ -42,6 +43,13 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000000"> <testCase id="000000">
<class>DeployGenObject</class> <class>DeployGenObject</class>
<desc>Deploy MySql Database</desc> <desc>Deploy MySql Database</desc>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>trash</htmlTabIcon> <htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
100002 100002
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -35,4 +36,10 @@ ...@@ -35,4 +36,10 @@
<yaml_path>yaml_files/5g_rfsimulator</yaml_path> <yaml_path>yaml_files/5g_rfsimulator</yaml_path>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabIcon>wrench</htmlTabIcon> <htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
000001 000001
000010
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -38,4 +39,10 @@ ...@@ -38,4 +39,10 @@
<forced_workspace_cleanup>True</forced_workspace_cleanup> <forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
<testCase id="000010">
<class>Push_Local_Registry</class>
<desc>Push Images to Local Registry</desc>
<registry_svr_id>0</registry_svr_id>
</testCase>
</testCaseList> </testCaseList>
<!--
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
Replace xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
-->
<testCaseList>
<htmlTabRef>test-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
111110
040101
030101
000001
040301 000001 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201
030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111110">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb</images_to_pull>
</testCase>
<testCase id="030101">
<class>Deploy_Object</class>
<desc>Deploy eNB (FDD/Band7/5MHz/B200) in a container</desc>
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030201">
<class>Undeploy_Object</class>
<desc>Undeploy eNB</desc>
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_05Mhz_tm1</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040607">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111110
111111
000001 000001
010002 010002
030000
030101 030101
000001 000001
030102 030102
...@@ -49,6 +50,20 @@ ...@@ -49,6 +50,20 @@
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111110">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-enb</images_to_pull>
</testCase>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>1</test_svr_id>
<images_to_pull>oai-gnb</images_to_pull>
</testCase>
<testCase id="010000"> <testCase id="010000">
<class>Initialize_UE</class> <class>Initialize_UE</class>
<desc>Initialize Quectel</desc> <desc>Initialize Quectel</desc>
...@@ -62,14 +77,6 @@ ...@@ -62,14 +77,6 @@
<id>idefix</id> <id>idefix</id>
</testCase> </testCase>
<testCase id="030000">
<class>Copy_Image_to_Test</class>
<desc>Copy gNB image to test server</desc>
<image_name>oai-gnb</image_name>
<registry_svr_id>0</registry_svr_id>
<test_svr_id>1</test_svr_id>
</testCase>
<testCase id="030101"> <testCase id="030101">
<class>Deploy_Object</class> <class>Deploy_Object</class>
<desc>Deploy eNB (FDD/Band7/5MHz/B200) in a container</desc> <desc>Deploy eNB (FDD/Band7/5MHz/B200) in a container</desc>
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
<TestCaseRequestedList> <TestCaseRequestedList>
030202 030202
030201 030201
222220
222221
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -47,5 +49,17 @@ ...@@ -47,5 +49,17 @@
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
</testCase> </testCase>
<testCase id="222220">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
<testCase id="222221">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>1</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
111111
010002 010002
030000
030101 030101
000001 000001
010000 010000
...@@ -47,6 +47,13 @@ ...@@ -47,6 +47,13 @@
--> -->
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb</images_to_pull>
</testCase>
<testCase id="010000"> <testCase id="010000">
<class>Initialize_UE</class> <class>Initialize_UE</class>
<desc>Initialize Quectel</desc> <desc>Initialize Quectel</desc>
...@@ -60,14 +67,6 @@ ...@@ -60,14 +67,6 @@
<id>idefix</id> <id>idefix</id>
</testCase> </testCase>
<testCase id="030000">
<class>Copy_Image_to_Test</class>
<desc>Copy gNB image to test server</desc>
<image_name>oai-gnb</image_name>
<registry_svr_id>1</registry_svr_id>
<test_svr_id>0</test_svr_id>
</testCase>
<testCase id="030101"> <testCase id="030101">
<class>Deploy_Object</class> <class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/40MHz/B200) in a container</desc> <desc>Deploy gNB (TDD/Band78/40MHz/B200) in a container</desc>
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
222222
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
...@@ -39,4 +40,10 @@ ...@@ -39,4 +40,10 @@
<image_tag>sa-test</image_tag> <image_tag>sa-test</image_tag>
</testCase> </testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList> </testCaseList>
<!--
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-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201
040101
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040607">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
...@@ -146,7 +146,7 @@ rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy) ...@@ -146,7 +146,7 @@ rfsim4g-trf-gen /bin/bash -c ip route add ... Up (healthy)
## 2.3. Deploy OAI eNB in RF simulator mode ## ## 2.3. Deploy OAI eNB in RF simulator mode ##
```bash ```bash
$ docker-compose up -d enb $ docker-compose up -d oai_enb0
Creating rfsim4g-oai-enb ... done Creating rfsim4g-oai-enb ... done
``` ```
......
...@@ -179,7 +179,7 @@ services: ...@@ -179,7 +179,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
enb: oai_enb0:
image: oai-enb:develop image: oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
......
version: '3.8' version: '3.8'
services: services:
enb: oai_enb0:
image: oai-enb:develop image: oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
......
...@@ -179,7 +179,7 @@ services: ...@@ -179,7 +179,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
enb: oai_enb0:
image: oai-enb:develop image: oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
......
...@@ -179,7 +179,7 @@ services: ...@@ -179,7 +179,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
enb: oai_enb0:
image: oai-enb:develop image: oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
......
...@@ -179,7 +179,7 @@ services: ...@@ -179,7 +179,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
enb: oai_enb0:
image: oai-enb:develop image: oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
......
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment