Commit d399a794 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci-aw2s-add-iperf' into integration_2023_w21

parents 28c015db 4514244f
...@@ -49,7 +49,7 @@ adb_ue_2: ...@@ -49,7 +49,7 @@ adb_ue_2:
amarisoft_ue: amarisoft_ue:
Host: amariue Host: amariue
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897.cfg & InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg &
TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}' TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}'
amarisoft_ue_1: amarisoft_ue_1:
Host: amariue Host: amariue
......
...@@ -42,7 +42,8 @@ IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc" ...@@ -42,7 +42,8 @@ IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc"
NAMESPACE = "oaicicd-ran" NAMESPACE = "oaicicd-ran"
OCUrl = "https://api.oai.cs.eurecom.fr:6443" OCUrl = "https://api.oai.cs.eurecom.fr:6443"
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/" OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
CI_OC_CORE_NAMESPACE = "oaicicd-core-for-ci-ran"
def OC_login(cmd, ocUserName, ocPassword, ocProjectName): def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
if ocUserName == '' or ocPassword == '' or ocProjectName == '': if ocUserName == '' or ocPassword == '' or ocProjectName == '':
...@@ -198,23 +199,22 @@ class Cluster: ...@@ -198,23 +199,22 @@ class Cluster:
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.imageToPull) HELP.EPCSrvHelp(self.imageToPull)
sys.exit('Insufficient eNB Parameters') sys.exit('Insufficient eNB Parameters')
lIpAddr = self.eNBIPAddress
self.testCase_id = HTML.testCase_id self.testCase_id = HTML.testCase_id
cmd = cls_cmd.getConnection(lIpAddr) cmd = cls_cmd.getConnection(self.eNBIPAddress)
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, self.OCProjectName) succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
if not succeeded: if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False return False
ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}') ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
if ret.returncode != 0: if ret.returncode != 0:
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') logging.error(f'\u001B[1m Unable to access OC project {CI_OC_RAN_NAMESPACE}\u001B[0m')
OC_logout(cmd) OC_logout(cmd)
cmd.close() cmd.close()
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False return False
for image in self.imageToPull: for image in self.imageToPull:
imagePrefix = f'{self.OCRegistry}{self.OCProjectName}' imagePrefix = f'{self.OCRegistry}{CI_OC_RAN_NAMESPACE}'
imageTag = cls_containerize.ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) imageTag = cls_containerize.ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}') ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}')
if ret.returncode != 0: if ret.returncode != 0:
......
...@@ -800,7 +800,7 @@ class Containerize(): ...@@ -800,7 +800,7 @@ class Containerize():
logging.debug('Removing test images locally') logging.debug('Removing test images locally')
myCmd = cls_cmd.LocalCmd() myCmd = cls_cmd.LocalCmd()
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup', 'oai-gnb-aw2s']
for image in imageNames: for image in imageNames:
imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge) imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
cmd = f'docker rmi oai-ci/{imageTag}' cmd = f'docker rmi oai-ci/{imageTag}'
......
...@@ -49,6 +49,7 @@ import concurrent.futures ...@@ -49,6 +49,7 @@ import concurrent.futures
#import our libs #import our libs
import helpreadme as HELP import helpreadme as HELP
import constants as CONST import constants as CONST
import cls_cluster as OC
import sshconnection import sshconnection
import cls_module_ue import cls_module_ue
...@@ -231,7 +232,6 @@ class OaiCiTest(): ...@@ -231,7 +232,6 @@ class OaiCiTest():
[f.result() for f in futures] [f.result() for f in futures]
HTML.CreateHtmlTestRowQueue('N/A', 'OK', messages) HTML.CreateHtmlTestRowQueue('N/A', 'OK', messages)
def InitializeOAIUE(self,HTML,RAN,EPC,CONTAINERS): def InitializeOAIUE(self,HTML,RAN,EPC,CONTAINERS):
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
...@@ -995,7 +995,9 @@ class OaiCiTest(): ...@@ -995,7 +995,9 @@ class OaiCiTest():
cn_target_ip = result.group('trf_ip_addr') cn_target_ip = result.group('trf_ip_addr')
SSH.close() SSH.close()
cn_iperf_prefix = "docker exec prod-trf-gen" # -w /iperf-2.0.13 necessary? cn_iperf_prefix = "docker exec prod-trf-gen" # -w /iperf-2.0.13 necessary?
else: # ltebox, sabox if (re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE)):
cn_target_ip = "172.21.6.102"
else: # lteboix, sabox
cn_target_ip = "192.172.0.1" cn_target_ip = "192.172.0.1"
cn_iperf_prefix = "" cn_iperf_prefix = ""
...@@ -1077,6 +1079,20 @@ class OaiCiTest(): ...@@ -1077,6 +1079,20 @@ class OaiCiTest():
self.Iperf_analyzeV2BIDIR(lock, ue.getHost(), ue.getName(), statusQueue, server_filename, client_filename) self.Iperf_analyzeV2BIDIR(lock, ue.getHost(), ue.getName(), statusQueue, server_filename, client_filename)
elif self.iperf_direction == "IPERF3":
cmd = cls_cmd.getConnection(ue.getHost())
cmd.run(f'rm /tmp/{server_filename}', reportNonZero=False)
port = f'{5002+idx}'
cmd.run(f'{ue.getCmdPrefix()} iperf3 -c {cn_target_ip} -p {port} {iperf_opt} --get-server-output &> /tmp/{server_filename}', timeout=iperf_time*1.5)
cmd.copyin(f'/tmp/{server_filename}', server_filename)
cmd.close()
if udpIperf:
self.Iperf_analyzeV2Server(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, server_filename, 1)
else:
cmd = cls_cmd.getConnection(EPC.IPAddress)
self.Iperf_analyzeV2TCPOutput(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, EPC, cmd, f'/tmp/{server_filename}')
cmd.close()
else : else :
raise Exception("Incorrect or missing IPERF direction in XML") raise Exception("Incorrect or missing IPERF direction in XML")
...@@ -1216,7 +1232,6 @@ class OaiCiTest(): ...@@ -1216,7 +1232,6 @@ class OaiCiTest():
#result = re.search('iperf version 2.0.10', str(iperfStdout.strip())) #result = re.search('iperf version 2.0.10', str(iperfStdout.strip()))
#if result is not None: #if result is not None:
# dummyIperfVersion = '2.0.10' # dummyIperfVersion = '2.0.10'
multi_jobs = [] multi_jobs = []
ue_num = len(ues) ue_num = len(ues)
i = 0 i = 0
......
...@@ -200,7 +200,7 @@ MACRLCs = ( ...@@ -200,7 +200,7 @@ MACRLCs = (
pusch_TargetSNRx10 = 200; pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200; pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 10; ulsch_max_frame_inactivity = 10;
ul_max_mcs = 15; ul_max_mcs = 28;
} }
); );
......
...@@ -75,7 +75,6 @@ class EPCManagement(): ...@@ -75,7 +75,6 @@ class EPCManagement():
self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/" self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
self.OCUserName = '' self.OCUserName = ''
self.OCPassword = '' self.OCPassword = ''
self.OCProjectName = ''
self.imageToPull = '' self.imageToPull = ''
self.eNBSourceCodePath = '' self.eNBSourceCodePath = ''
...@@ -240,9 +239,9 @@ class EPCManagement(): ...@@ -240,9 +239,9 @@ class EPCManagement():
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def Initialize5GCN(self, HTML): def Initialize5GCN(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '': if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.Type == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type) HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.Type)
sys.exit('Insufficient EPC Parameters') sys.exit('Insufficient EPC Parameters')
mySSH = cls_cmd.getConnection(self.IPAddress) mySSH = cls_cmd.getConnection(self.IPAddress)
html_cell = '' html_cell = ''
...@@ -299,8 +298,8 @@ class EPCManagement(): ...@@ -299,8 +298,8 @@ class EPCManagement():
imageNames = ["oai-nrf", "oai-amf", "oai-smf", "oai-spgwu-tiny", "oai-ausf", "oai-udm", "oai-udr", "mysql","oai-traffic-server"] imageNames = ["oai-nrf", "oai-amf", "oai-smf", "oai-spgwu-tiny", "oai-ausf", "oai-udm", "oai-udr", "mysql","oai-traffic-server"]
logging.debug('Deploying OAI CN5G on Openshift Cluster') logging.debug('Deploying OAI CN5G on Openshift Cluster')
lIpAddr = self.IPAddress lIpAddr = self.IPAddress
lSourcePath = self.SourceCodePath lSourcePath = "/opt/oai-cn5g-fed-develop-2023-04-28-20897"
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName) succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, OC.CI_OC_CORE_NAMESPACE)
if not succeeded: if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
...@@ -599,7 +598,7 @@ class EPCManagement(): ...@@ -599,7 +598,7 @@ class EPCManagement():
mySSH.run(f'rm -Rf {lSourcePath}/logs') mySSH.run(f'rm -Rf {lSourcePath}/logs')
mySSH.run(f'mkdir -p {lSourcePath}/logs') mySSH.run(f'mkdir -p {lSourcePath}/logs')
logging.debug('OC OAI CN5G - Collecting Log files to workspace') logging.debug('OC OAI CN5G - Collecting Log files to workspace')
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName) succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, OC.CI_OC_CORE_NAMESPACE)
if not succeeded: if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
...@@ -618,7 +617,7 @@ class EPCManagement(): ...@@ -618,7 +617,7 @@ class EPCManagement():
mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq test_logs_CN.zip *.log') mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq test_logs_CN.zip *.log')
mySSH.copyin(f'{lSourcePath}/logs/test_logs_CN.zip','test_logs_CN.zip') mySSH.copyin(f'{lSourcePath}/logs/test_logs_CN.zip','test_logs_CN.zip')
ret = mySSH.run(f'oc get pods', silent=True) ret = mySSH.run(f'oc get pods', silent=True)
res = re.search('No resources found in oaicicd-ran namespace.', ret.stdout) res = re.search(f'No resources found in {OC.CI_OC_CORE_NAMESPACE} namespace.', ret.stdout)
if res is not None: if res is not None:
logging.debug('OC OAI CN5G components uninstalled') logging.debug('OC OAI CN5G components uninstalled')
message = 'OC OAI CN5G components uninstalled' message = 'OC OAI CN5G components uninstalled'
......
...@@ -30,8 +30,14 @@ ...@@ -30,8 +30,14 @@
001000 001000
020000 020000
002000 002000
002001
002002 002002
002003
002004
002005
000100 000100
000010
000020
000200 000200
003000 003000
004000 004000
...@@ -43,6 +49,7 @@ ...@@ -43,6 +49,7 @@
<testCase id="010000"> <testCase id="010000">
<class>Pull_Cluster_Image</class> <class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc> <desc>Pull Images from Cluster</desc>
<oc_project>oaicicd-ran</oc_project>
<images_to_pull>oai-gnb-aw2s</images_to_pull> <images_to_pull>oai-gnb-aw2s</images_to_pull>
</testCase> </testCase>
...@@ -60,7 +67,7 @@ ...@@ -60,7 +67,7 @@
<id>amarisoft_ue</id> <id>amarisoft_ue</id>
</testCase> </testCase>
<testCase id="002000"> <testCase id="002001">
<class>Attach_UE</class> <class>Attach_UE</class>
<desc>Attach UE</desc> <desc>Attach UE</desc>
<id>amarisoft_ue_1</id> <id>amarisoft_ue_1</id>
...@@ -72,28 +79,68 @@ ...@@ -72,28 +79,68 @@
<id>amarisoft_ue_2</id> <id>amarisoft_ue_2</id>
</testCase> </testCase>
<testCase id="002003">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_3</id>
</testCase>
<testCase id="002004">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_4</id>
</testCase>
<testCase id="002005">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_5</id>
</testCase>
<testCase id="000010">
<class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 60M -t 30 -i 1 -R</iperf_args>
<direction>IPERF3</direction>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="000020">
<class>Iperf</class>
<desc>iperf (UL/5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1 </iperf_args>
<direction>IPERF3</direction>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="000100"> <testCase id="000100">
<class>Ping</class> <class>Ping</class>
<desc>Ping: 20pings in 20sec</desc> <desc>Ping: 20pings in 20sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2</id> <id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
<ping_args>-c 20</ping_args> <ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold> <ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold> <ping_rttavg_threshold>25</ping_rttavg_threshold>
</testCase> </testCase>
<testCase id="000200"> <testCase id="000200">
<class>Ping</class> <class>Ping</class>
<desc>Ping: 100pings in 20sec</desc> <desc>Ping: 100pings in 20sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2</id> <id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
<ping_args>-c 100 -i 0.2</ping_args> <ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold> <ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold> <ping_rttavg_threshold>30</ping_rttavg_threshold>
</testCase> </testCase>
<testCase id="003000"> <testCase id="003000">
<class>Detach_UE</class> <class>Detach_UE</class>
<desc>Detach UE</desc> <desc>Detach UE</desc>
<id>amarisoft_ue_1 amarisoft_ue_2</id> <id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
</testCase> </testCase>
<testCase id="004000"> <testCase id="004000">
...@@ -119,4 +166,3 @@ ...@@ -119,4 +166,3 @@
</testCase> </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-aw2s-cleanup</htmlTabRef>
<htmlTabName>CleanUp AW2S ASUE</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
111111
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
<testCase id="222222">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
<id>amarisoft_ue</id>
</testCase>
</testCaseList>
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