From b8020204a9731a10e71ed09c994a039f7c829bb9 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 14 Nov 2024 18:56:01 +0100 Subject: [PATCH] Remove LogCollectIperf option: not used --- ci-scripts/Jenkinsfile-tmp-full-ran | 21 --------------------- ci-scripts/Jenkinsfile-tmp-multi-enb | 22 ---------------------- ci-scripts/Jenkinsfile-tmp-ran | 22 ---------------------- ci-scripts/cls_oaicitest.py | 11 ----------- ci-scripts/main.py | 5 +---- 5 files changed, 1 insertion(+), 80 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran index 32a47dff9d..31a652cbda 100644 --- a/ci-scripts/Jenkinsfile-tmp-full-ran +++ b/ci-scripts/Jenkinsfile-tmp-full-ran @@ -319,27 +319,6 @@ pipeline { } } } - stage('Log Collection (Iperf)') { - when { - expression {doEpcLogCollection} - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("iperf.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "iperf.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (SPGW)') { when { expression {doEpcLogCollection} diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb index 7bdaf9a35e..0b3ec1001a 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb @@ -385,28 +385,6 @@ pipeline { } } } - stage('Log Collection (Iperf)') { - // Bypassing this stage if EPC server is not defined - when { - expression { params.EPC_IPAddress != "none" } - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("iperf.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "iperf.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 52545349e7..89f3735b9e 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -411,28 +411,6 @@ pipeline { } } } - stage('Log Collection (Iperf)') { - // Bypassing this stage if EPC server is not defined - when { - expression { params.EPC_IPAddress != "none" } - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectIperf --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Iperf)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/iperf.log.zip ./iperf.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("iperf.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "iperf.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 73e8d538a0..c01587688a 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -908,17 +908,6 @@ class OaiCiTest(): cmd.run(f'rm -f {d}/build.log.zip') cmd.run(f'cd {d} && zip -r build.log.zip build_log_*/*') - def LogCollectIperf(self,EPC): - # Some pipelines are using "none" IP / Credentials - # In that case, just forget about it - if EPC.IPAddress == 'none': - sys.exit(0) - with cls_cmd.getConnection(EPC.IPAddress) as cmd: - d = f"{EPC.SourceCodePath}/scripts" - cmd.run(f'rm -f {d}/iperf.log.zip') - cmd.run(f'cd {d} && zip iperf.log.zip iperf*.log') - cmd.run(f'rm {d}/iperf*.log') - def ShowTestID(self): logging.info(f'\u001B[1m----------------------------------------\u001B[0m') logging.info(f'\u001B[1m Test ID: {self.testCase_id} \u001B[0m') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 2a61f030a4..d9523c0c00 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -574,10 +574,7 @@ elif re.match('^LogCollectSPGW$', mode, re.IGNORECASE): elif re.match('^LogCollectPing$', mode, re.IGNORECASE): logging.warning("Option LogCollectPing ignored") elif re.match('^LogCollectIperf$', mode, re.IGNORECASE): - if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - CiTestObj.LogCollectIperf(EPC) + logging.warning("Option LogCollectIperf ignored") elif re.match('^LogCollectOAIUE$', mode, re.IGNORECASE): logging.warning("Option LogCollectOAIUE ignored") elif re.match('^InitiateHtml$', mode, re.IGNORECASE):