Commit e089b635 authored by Raphael Defosseux's avatar Raphael Defosseux

chore(ci): removing OAI-Rel14-CUPS old bare-metal 4G core installation variant

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 0e641650
...@@ -220,10 +220,10 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST ...@@ -220,10 +220,10 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
EPC.SourceCodePath=matchReg.group(1) EPC.SourceCodePath=matchReg.group(1)
elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE)
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-CUPS', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE): if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE):
EPC.Type=matchReg.group(1) EPC.Type=matchReg.group(1)
else: else:
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker or OC-OAI-CN5G)') sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-Docker or OC-OAI-CN5G)')
elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
EPC.ContainerPrefix=matchReg.group(1) EPC.ContainerPrefix=matchReg.group(1)
......
...@@ -505,54 +505,33 @@ class OaiCiTest(): ...@@ -505,54 +505,33 @@ class OaiCiTest():
def Ping_common(self, EPC, ue, RAN): def Ping_common(self, EPC, ue, RAN):
# Launch ping on the EPC side (true for ltebox and old open-air-cn) # Launch ping on the EPC side (true for ltebox and old open-air-cn)
# But for OAI-Rel14-CUPS, we launch from python executor
ping_status = 0 ping_status = 0
ueIP = ue.getIP() ueIP = ue.getIP()
if not ueIP: if not ueIP:
return (False, f"UE {ue.getName()} has no IP address") return (False, f"UE {ue.getName()} has no IP address")
launchFromEpc = False
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log' ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
launchFromEpc = False
ping_time = re.findall("-c *(\d+)",str(self.ping_args)) ping_time = re.findall("-c *(\d+)",str(self.ping_args))
if launchFromEpc: #target address is different depending on EPC type
SSH = sshconnection.SSHConnection() if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) Target = EPC.MmeIPAddress
SSH.command('cd ' + EPC.SourceCodePath, '\$', 5) elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
SSH.command('cd scripts', '\$', 5) Target = EPC.MmeIPAddress
# In case of a docker-based deployment, we need to ping from the trf-gen container elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE):
launchFromTrfContainer = False Target = "172.21.6.100"
if (re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE)) or (re.match('OAICN5G', EPC.Type, re.IGNORECASE)):
launchFromTrfContainer = True
if launchFromTrfContainer:
ping_status = SSH.command(f'docker exec -it prod-trf-gen /bin/bash -c "ping {self.ping_args} {ueIP}" 2>&1 | tee {ping_log_file}', '\$', int(ping_time[0])*1.5)
else:
ping_status = SSH.command(f'stdbuf -o0 ping {self.ping_args} {ueIP} 2>&1 | stdbuf -o0 tee {ping_log_file}', '\$', int(ping_time[0])*1.5)
#copy the ping log file to have it locally for analysis (ping stats)
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/{ping_log_file}', '.')
SSH.close()
else: else:
#target address is different depending on EPC type Target = EPC.IPAddress
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE): #ping from module NIC rather than IP address to make sure round trip is over the air
Target = EPC.MmeIPAddress interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE): ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {Target} &> /tmp/{ping_log_file}'
Target = EPC.MmeIPAddress cmd = cls_cmd.getConnection(ue.getHost())
elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE): response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
Target = "172.21.6.100" if response.returncode != 0:
else: ping_status = -1
Target = EPC.IPAddress else:
#ping from module NIC rather than IP address to make sure round trip is over the air #copy the ping log file to have it locally for analysis (ping stats)
interface = f'-I {ue.getIFName()}' if ue.getIFName() else '' cmd.copyin(src=f'/tmp/{ping_log_file}', tgt=ping_log_file)
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {Target} &> /tmp/{ping_log_file}'
cmd = cls_cmd.getConnection(ue.getHost())
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
if response.returncode != 0:
ping_status = -1
else:
#copy the ping log file to have it locally for analysis (ping stats)
cmd.copyin(src=f'/tmp/{ping_log_file}', tgt=ping_log_file)
cmd.close() cmd.close()
# TIMEOUT CASE # TIMEOUT CASE
ue_header = f'UE {ue.getName()} ({ueIP})' ue_header = f'UE {ue.getName()} ({ueIP})'
......
...@@ -68,7 +68,7 @@ def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype): ...@@ -68,7 +68,7 @@ def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username) print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
print(' --EPCPassword=[EPC\'s Login Password] -- ' + password) print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath) print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OAI-Rel14-CUPS] -- ' + epctype) print(' --EPCType=[EPC\'s Type: OAI or ltebox or OC-OAI-CN5G] -- ' + epctype)
def XmlHelp(filename): def XmlHelp(filename):
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename) print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)
......
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