From 0f094a5a57f98ea589e10db17ccea3a8b3d2165e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 13 May 2025 18:49:22 +0200 Subject: [PATCH] Remove any usage of UE* main.py parameters The parameter is not used. Remove them. --- ci-scripts/Jenkinsfile-tmp-full-ran | 47 +----------------------- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 47 +----------------------- ci-scripts/args_parse.py | 12 ++---- ci-scripts/cls_oaicitest.py | 12 +----- ci-scripts/helpreadme.py | 6 --- ci-scripts/main.py | 8 ++-- ci-scripts/tests/test-runner/run.sh | 4 -- 7 files changed, 13 insertions(+), 123 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran index 3aea407002..f1baa5b04d 100644 --- a/ci-scripts/Jenkinsfile-tmp-full-ran +++ b/ci-scripts/Jenkinsfile-tmp-full-ran @@ -100,15 +100,6 @@ pipeline { if (params.eNB_Credentials == null) { allParametersPresent = false } - if (params.UE_IPAddress == null) { - allParametersPresent = false - } - if (params.UE_SourceCodePath == null) { - allParametersPresent = false - } - if (params.UE_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -181,7 +172,6 @@ pipeline { } withCredentials([ [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'], ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") @@ -189,7 +179,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -197,7 +187,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } } } @@ -244,24 +234,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Build)') { - steps { - echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" - - echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("build.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "build.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (eNB - Run)') { steps { withCredentials([ @@ -285,21 +257,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Run)') { - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ue.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ue.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 5df1992bf8..5e60b199b4 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -113,15 +113,6 @@ pipeline { if (params.eNB2_Credentials == null) { allParametersPresent = false } - if (params.UE_IPAddress == null) { - allParametersPresent = false - } - if (params.UE_SourceCodePath == null) { - allParametersPresent = false - } - if (params.UE_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -196,7 +187,6 @@ pipeline { [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") @@ -204,7 +194,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -212,7 +202,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } } } @@ -238,24 +228,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Build)') { - steps { - echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" - - echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("build.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "build.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (eNB - Run)') { steps { withCredentials([ @@ -274,21 +246,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Run)') { - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ue.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ue.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index b513e3524c..0d1fa03ee6 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -206,17 +206,13 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.testXMLfiles.append(matchReg.group(1)) HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1 elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup - matchReg = re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEIPAddress = matchReg.group(1) + print("parameter --UEIPAddress ignored") elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEUserName = matchReg.group(1) + print("parameter --UEUserName ignored") elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEPassword = matchReg.group(1) + print("parameter --UEPassword ignored") elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UESourceCodePath = matchReg.group(1) + print("parameter --UESourceCodePath ignored") elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE) finalStatus = matchReg.group(1) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index cd40c807e1..4d7cf0a6fd 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -275,11 +275,6 @@ class OaiCiTest(): self.iperf_options = '' self.iperf_tcp_rate_target = '' self.finalStatus = False - self.UEIPAddress = '' - self.UEUserName = '' - self.UEPassword = '' - self.UESourceCodePath = '' - self.UELogFile = '' self.air_interface='' self.ue_ids = [] self.nodes = [] @@ -888,7 +883,7 @@ class OaiCiTest(): def LogCollectBuild(self,RAN): # Some pipelines are using "none" IP / Credentials # In that case, just forget about it - if RAN.eNBIPAddress == 'none' or self.UEIPAddress == 'none': + if RAN.eNBIPAddress == 'none': sys.exit(0) if (RAN.eNBIPAddress != '' and RAN.eNBUserName != '' and RAN.eNBPassword != ''): @@ -896,11 +891,6 @@ class OaiCiTest(): UserName = RAN.eNBUserName Password = RAN.eNBPassword SourceCodePath = RAN.eNBSourceCodePath - elif (self.UEIPAddress != '' and self.UEUserName != '' and self.UEPassword != ''): - IPAddress = self.UEIPAddress - UserName = self.UEUserName - Password = self.UEPassword - SourceCodePath = self.UESourceCodePath else: sys.exit('Insufficient Parameter') with cls_cmd.getConnection(IPAddress) as cmd: diff --git a/ci-scripts/helpreadme.py b/ci-scripts/helpreadme.py index 6f192acd9c..ce4c594f58 100644 --- a/ci-scripts/helpreadme.py +++ b/ci-scripts/helpreadme.py @@ -58,12 +58,6 @@ def eNBSrvHelp(ipaddr, username, password, sourcepath): print(' --eNBPassword=[eNB\'s Login Password] -- ' + password) print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath) -def OAIUESrvHelp(ipaddr, username, password, sourcepath): - print(' --UEIPAddress=[UE\'s IP Address] -- ' + ipaddr) - print(' --UEUserName=[UE\'s Login User Name] -- ' + username) - print(' --UEPassword=[UE\'s Login Password] -- ' + password) - print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath) - def XmlHelp(filename): print(' --XMLTestFile=[XML Test File to be run] -- ' + filename) print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 6d5448c4e0..1f0658b918 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -485,9 +485,9 @@ elif re.match('^TerminateMME$', mode, re.IGNORECASE): elif re.match('^TerminateSPGW$', mode, re.IGNORECASE): logging.warning("Option TerminateSPGW ignored") elif re.match('^LogCollectBuild$', mode, re.IGNORECASE): - if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''): - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') + if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': + logging.warning("nothing to collect (eNBIPAddress/eNBUserName/eNBPassword/eNBSourceCodePath is '')") + sys.exit(0) if RAN.eNBIPAddress == 'none': sys.exit(0) CiTestObj.LogCollectBuild(RAN) @@ -557,7 +557,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HELP.eNBSrvHelp(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath) sys.exit('Insufficient Parameter') else: - if CiTestObj.UEIPAddress == '' or CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == '': + if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '': HELP.GenericHelp(CONST.Version) sys.exit('UE: Insufficient Parameter') diff --git a/ci-scripts/tests/test-runner/run.sh b/ci-scripts/tests/test-runner/run.sh index 808bc563a7..9c02186a5f 100755 --- a/ci-scripts/tests/test-runner/run.sh +++ b/ci-scripts/tests/test-runner/run.sh @@ -26,10 +26,6 @@ python3 main.py \ --eNBUserName=NONE \ --eNBPassword=NONE \ --eNBSourceCodePath=NONE \ - --UEIPAddress=localhost \ - --UEUserName=NONE \ - --UEPassword=NONE \ - --UESourceCodePath=NONE \ --XMLTestFile=tests/test-runner/test.xml python3 main.py \