diff --git a/ci-scripts/Jenkinsfile-cluster b/ci-scripts/Jenkinsfile-cluster
index 69c72eebfa..e91b27426e 100644
--- a/ci-scripts/Jenkinsfile-cluster
+++ b/ci-scripts/Jenkinsfile-cluster
@@ -144,23 +144,6 @@ pipeline {
echo "no eNB_mergeRequest given - not merging develop"
}
- if (params.EPC_IPAddress == null) {
- echo "no EPC_IPAddress given"
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- echo "no EPC_Type given"
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- echo "no EPC_SourceCodePath given"
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- echo "no EPC_Credentials given"
- allParametersPresent = false
- }
-
if (params.OC_Credentials == null) {
echo "no OC_Credentials given"
allParametersPresent = false
@@ -206,7 +189,6 @@ pipeline {
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
@@ -214,7 +196,7 @@ pipeline {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
- sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
+ sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
diff --git a/ci-scripts/Jenkinsfile-nrue b/ci-scripts/Jenkinsfile-nrue
index 2a8f21483a..aed99b3568 100644
--- a/ci-scripts/Jenkinsfile-nrue
+++ b/ci-scripts/Jenkinsfile-nrue
@@ -141,18 +141,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
if (params.OC_Credentials == null) {
allParametersPresent = false
}
@@ -201,7 +189,6 @@ pipeline {
withCredentials([
[$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.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
@@ -210,7 +197,7 @@ pipeline {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
- sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
+ sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@@ -240,10 +227,6 @@ pipeline {
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
}
- if (fileExists("test_logs_CN.zip")){
- sh "mv test_logs_CN.zip test_logs_CN_${env.BUILD_ID}.zip"
- archiveArtifacts artifacts: "test_logs_CN_${env.BUILD_ID}.zip"
- }
if (fileExists("test_results.html")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
index 23398d6d8e..ffeff8685b 100644
--- a/ci-scripts/Jenkinsfile-physim-deploy
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -133,19 +133,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
-
if (params.OC_Credentials == null) {
allParametersPresent = false
}
@@ -193,7 +180,6 @@ pipeline {
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
@@ -202,7 +188,7 @@ pipeline {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
- sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
+ sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@@ -232,10 +218,6 @@ pipeline {
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
}
- if (fileExists("test_logs_CN.zip")){
- sh "mv test_logs_CN.zip test_logs_CN_${env.BUILD_ID}.zip"
- archiveArtifacts artifacts: "test_logs_CN_${env.BUILD_ID}.zip"
- }
if (fileExists("test_results.html")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran
index c1ed3e6b0e..3aea407002 100644
--- a/ci-scripts/Jenkinsfile-tmp-full-ran
+++ b/ci-scripts/Jenkinsfile-tmp-full-ran
@@ -141,24 +141,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- } else {
- if (params.EPC_IPAddress == "none") {
- doEpcLogCollection = false
- echo "No EPC collections (ping/iperf/hss/mme/spgw)"
- }
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
-
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
@@ -200,7 +182,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'],
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_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")
@@ -208,7 +189,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} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_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} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@@ -309,9 +290,6 @@ pipeline {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
- echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
-
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"
}
@@ -322,111 +300,6 @@ pipeline {
}
}
}
- stage('Log Collection (Ping)') {
- when {
- expression {doEpcLogCollection}
- }
- steps {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- 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}
- }
- steps {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (MME)') {
- when {
- expression {doEpcLogCollection}
- }
- steps {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (HSS)') {
- when {
- expression {doEpcLogCollection}
- }
- steps {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
}
}
}
diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb
index 778c32ecb1..2680fbe863 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb
@@ -143,19 +143,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
-
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
@@ -198,7 +185,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.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_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")
@@ -206,7 +192,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} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_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'
@@ -232,48 +218,6 @@ pipeline {
}
}
}
- stage('Terminate SPGW') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- }
- stage('Terminate MME') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- }
- stage('Terminate HSS') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- }
}
}
stage('Log Collection') {
@@ -319,116 +263,6 @@ pipeline {
}
}
}
- stage('Log Collection (SPGW)') {
- // 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 (SPGW)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (MME)') {
- // 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 (MME)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (HSS)') {
- // 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 (HSS)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (Ping)') {
- // 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 (Ping)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- 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-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
index 4ee2cf9b0e..5df1992bf8 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
@@ -154,19 +154,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
-
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
@@ -209,7 +196,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.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_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}"
@@ -218,7 +204,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} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_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} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@@ -293,9 +279,6 @@ pipeline {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
- echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
-
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"
}
@@ -306,55 +289,6 @@ pipeline {
}
}
}
- stage('Log Collection (CN)') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- script {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
- if (params.EPC_Type != 'OAICN5G') {
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
- }
- echo '\u2705 \u001B[32mLog Collection (MME or AMF)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
- if (params.EPC_Type == 'OAICN5G') {
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./amf.log.${env.BUILD_ID}.zip || true"
- } else {
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
- }
- echo '\u2705 \u001B[32mLog Collection (SPGW or SMF/UPF)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
- if (params.EPC_Type == 'OAICN5G') {
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./smf-upf.log.${env.BUILD_ID}.zip || true"
- } else {
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
- }
- }
- if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
- }
- if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
- }
- if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
- }
- if(fileExists("amf.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "amf.log.${env.BUILD_ID}.zip"
- }
- if(fileExists("smf-upf.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "smf-upf.log.${env.BUILD_ID}.zip"
- }
- echo '\u2705 \u001B[32mLog Collection for CoreNetwork Done!\u001B[0m'
- }
- }
- }
}
}
}
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index bc8c742bb5..03c0f9a0cb 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -137,19 +137,6 @@ pipeline {
}
}
- if (params.EPC_IPAddress == null) {
- allParametersPresent = false
- }
- if (params.EPC_Type == null) {
- allParametersPresent = false
- }
- if (params.EPC_SourceCodePath == null) {
- allParametersPresent = false
- }
- if (params.EPC_Credentials == null) {
- allParametersPresent = false
- }
-
if (params.Flexric_Tag != null) {
echo "This pipeline is configured to run with a FlexRIC deployment."
echo "Appending FlexRicTag option to the list of options"
@@ -196,7 +183,6 @@ pipeline {
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
@@ -204,7 +190,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} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
+ sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@@ -237,69 +223,6 @@ pipeline {
}
}
}
- stage('Terminate SPGW') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- post {
- success {
- script {
- termStatusArray[termSPGW] = true
- }
- }
- }
- }
- stage('Terminate MME') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- post {
- success {
- script {
- termStatusArray[termMME] = true
- }
- }
- }
- }
- stage('Terminate HSS') {
- // Bypassing this stage if EPC server is not defined
- when {
- expression { params.EPC_IPAddress != "none" }
- }
- steps {
- echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- post {
- success {
- script {
- termStatusArray[termHSS] = true
- }
- }
- }
- }
}
}
stage('Log Collection') {
@@ -345,116 +268,6 @@ pipeline {
}
}
}
- stage('Log Collection (SPGW)') {
- // 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 (SPGW)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (SPGW)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (MME)') {
- // 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 (MME)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (MME)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/mme.log.zip ./mme.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (HSS)') {
- // 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 (HSS)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (HSS)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/hss.log.zip ./hss.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- stage('Log Collection (Ping)') {
- // 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 (Ping)\u001B[0m'
- sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}"
-
- echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m'
- sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true"
- }
- script {
- if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
- archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
- }
- }
- }
- }
- 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"
- }
- }
- }
- }
}
}
}
@@ -484,27 +297,6 @@ pipeline {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
- if ((!termStatusArray[termSPGW]) && (params.EPC_IPAddress != "none")) {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- if ((!termStatusArray[termMME]) && (params.EPC_IPAddress != "none")) {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
- if ((!termStatusArray[termHSS]) && (params.EPC_IPAddress != "none")) {
- withCredentials([
- [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
- ]) {
- sh "python3 ci-scripts/main.py --mode=TerminateHSS --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
- }
- }
}
}
}
diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py
index cbf4159da2..4bb999bd9d 100644
--- a/ci-scripts/args_parse.py
+++ b/ci-scripts/args_parse.py
@@ -41,7 +41,7 @@ import constants as CONST
#-----------------------------------------------------------
-def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
+def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
py_param_file_present = False
@@ -52,16 +52,16 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
myArgv = argvs.pop(1) # 0th is this file's name
#--help
- if re.match('^\-\-help$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-help$', myArgv, re.IGNORECASE):
HELP.GenericHelp(CONST.Version)
sys.exit(0)
- if re.match('^\-\-local$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-local$', myArgv, re.IGNORECASE):
force_local = True
#--apply= as parameters file, to replace inline parameters
- elif re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
py_params_file = matchReg.group(1)
with open(py_params_file,'r') as file:
# The FullLoader parameter handles the conversion from YAML
@@ -71,14 +71,14 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
#AssignParams(py_params) #to be uncommented once validated
#consider inline parameters
- elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
mode = matchReg.group(1)
- elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
else:
- matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
+ matchReg = re.match(r'^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.ranRepository = matchReg.group(1)
RAN.ranRepository=matchReg.group(1)
HTML.ranRepository=matchReg.group(1)
@@ -86,11 +86,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
SCA.ranRepository=matchReg.group(1)
PHYSIM.ranRepository=matchReg.group(1)
CLUSTER.ranRepository=matchReg.group(1)
- elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
else:
- matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
+ matchReg = re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
doMerge = matchReg.group(1)
if ((doMerge == 'true') or (doMerge == 'True')):
CiTestObj.ranAllowMerge = True
@@ -100,11 +100,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
SCA.ranAllowMerge=True
PHYSIM.ranAllowMerge=True
CLUSTER.ranAllowMerge=True
- elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
else:
- matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
+ matchReg = re.match(r'^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.ranBranch = matchReg.group(1)
RAN.ranBranch=matchReg.group(1)
HTML.ranBranch=matchReg.group(1)
@@ -112,11 +112,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
SCA.ranBranch=matchReg.group(1)
PHYSIM.ranBranch=matchReg.group(1)
CLUSTER.ranBranch=matchReg.group(1)
- elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
else:
- matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
+ matchReg = re.match(r'^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
CiTestObj.ranCommitID = matchReg.group(1)
RAN.ranCommitID=matchReg.group(1)
HTML.ranCommitID=matchReg.group(1)
@@ -124,11 +124,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
SCA.ranCommitID=matchReg.group(1)
PHYSIM.ranCommitID=matchReg.group(1)
CLUSTER.ranCommitID=matchReg.group(1)
- elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
else:
- matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
+ matchReg = re.match(r'^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
CiTestObj.ranTargetBranch = matchReg.group(1)
RAN.ranTargetBranch=matchReg.group(1)
HTML.ranTargetBranch=matchReg.group(1)
@@ -136,140 +136,127 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
SCA.ranTargetBranch=matchReg.group(1)
PHYSIM.ranTargetBranch=matchReg.group(1)
CLUSTER.ranTargetBranch=matchReg.group(1)
- elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBIPAddress=matchReg.group(1)
CONTAINERS.eNBIPAddress=matchReg.group(1)
SCA.eNBIPAddress=matchReg.group(1)
PHYSIM.eNBIPAddress=matchReg.group(1)
CLUSTER.eNBIPAddress=matchReg.group(1)
- elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1IPAddress=matchReg.group(1)
CONTAINERS.eNB1IPAddress=matchReg.group(1)
- elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2IPAddress=matchReg.group(1)
CONTAINERS.eNB2IPAddress=matchReg.group(1)
- elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBUserName=matchReg.group(1)
CONTAINERS.eNBUserName=matchReg.group(1)
SCA.eNBUserName=matchReg.group(1)
PHYSIM.eNBUserName=matchReg.group(1)
CLUSTER.eNBUserName=matchReg.group(1)
- elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1UserName=matchReg.group(1)
CONTAINERS.eNB1UserName=matchReg.group(1)
- elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2UserName=matchReg.group(1)
CONTAINERS.eNB2UserName=matchReg.group(1)
- elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBPassword=matchReg.group(1)
CONTAINERS.eNBPassword=matchReg.group(1)
SCA.eNBPassword=matchReg.group(1)
PHYSIM.eNBPassword=matchReg.group(1)
CLUSTER.eNBPassword=matchReg.group(1)
- elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1Password=matchReg.group(1)
CONTAINERS.eNB1Password=matchReg.group(1)
- elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2Password=matchReg.group(1)
CONTAINERS.eNB2Password=matchReg.group(1)
- elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBSourceCodePath=matchReg.group(1)
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
SCA.eNBSourceCodePath=matchReg.group(1)
PHYSIM.eNBSourceCodePath=matchReg.group(1)
CLUSTER.eNBSourceCodePath=matchReg.group(1)
- EPC.eNBSourceCodePath=matchReg.group(1)
- elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1SourceCodePath=matchReg.group(1)
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
- elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2SourceCodePath=matchReg.group(1)
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
- elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
- EPC.IPAddress=matchReg.group(1)
- elif re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE)
- EPC.UserName=matchReg.group(1)
- elif re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE)
- EPC.Password=matchReg.group(1)
- elif re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
- EPC.SourceCodePath=matchReg.group(1)
- elif 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-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE):
- EPC.Type=matchReg.group(1)
- else:
- 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):
- matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
- EPC.ContainerPrefix=matchReg.group(1)
- elif re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCIPAddress ignored")
+ elif re.match(r'^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCUserName ignored")
+ elif re.match(r'^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCPassword ignored")
+ elif re.match(r'^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCSourceCodePath ignored")
+ elif re.match(r'^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCType ignored")
+ elif re.match(r'^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
+ print("parameter --EPCContainerPrefix ignored")
+ elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.testXMLfiles.append(matchReg.group(1))
HTML.testXMLfiles.append(matchReg.group(1))
HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1
- elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup
+ matchReg = re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.UEIPAddress = matchReg.group(1)
- elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.UEUserName = matchReg.group(1)
- elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.UEPassword = matchReg.group(1)
- elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.UESourceCodePath = matchReg.group(1)
- elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
finalStatus = matchReg.group(1)
if ((finalStatus == 'true') or (finalStatus == 'True')):
CiTestObj.finalStatus = True
- elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCUserName = matchReg.group(1)
CLUSTER.OCUserName = matchReg.group(1)
- EPC.OCUserName = matchReg.group(1)
- elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCPassword = matchReg.group(1)
CLUSTER.OCPassword = matchReg.group(1)
- EPC.OCPassword = matchReg.group(1)
- elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCProjectName = matchReg.group(1)
CLUSTER.OCProjectName = matchReg.group(1)
- EPC.OCProjectName = matchReg.group(1)
- elif re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE)
CLUSTER.OCUrl = matchReg.group(1)
- elif re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
CLUSTER.OCRegistry = matchReg.group(1)
- elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
RAN.BuildId = matchReg.group(1)
- elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
CONTAINERS.flexricTag = matchReg.group(1)
else:
HELP.GenericHelp(CONST.Version)
diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml
index 0a4e78e4b5..4d1a87ddba 100644
--- a/ci-scripts/ci_infra.yaml
+++ b/ci-scripts/ci_infra.yaml
@@ -63,58 +63,87 @@ adb_ue_2:
oc-cn5g:
Host: avra
- Namespace: "oaicicd-core-for-ci-ran"
- CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.102"
RunIperf3Server: False
+ Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
+ Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
+ LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran %%log_dir%%"
oc-cn5g-20897:
Host: cacofonix
- Namespace: "oaicicd-core-for-fhi72"
- CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
+ Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
+ Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
+ LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72 %%log_dir%%"
oc-cn5g-20897-aerial2:
Host: aerial2
- Namespace: "oaicicd-core-for-nvidia-aerial"
- CNPath: "/opt/oai-cn5g-fed-develop-2025-jan"
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
+ Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
+ Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
+ LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial %%log_dir%%"
matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
- CmdPrefix: docker exec prod-trf-gen
RunIperf3Server: False
+ Deploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type start-basic"
+ Undeploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type stop-basic"
+ LogCollect:
+ - "docker logs oai-smf > %%log_dir%%/oai-smf.log"
+ - "docker logs oai-amf > %%log_dir%%/oai-amf.log"
+ - "docker logs oai-upf > %%log_dir%%/oai-upf.log"
porcepix-cn4g:
Host: porcepix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
CmdPrefix: docker exec prod-trf-gen
-
-porcepix-cn5g:
- Host: porcepix
- NetworkScript: docker exec prod-trf-gen ip a show dev eth0
- CmdPrefix: docker exec prod-trf-gen
- RunIperf3Server: False
+ Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
+ Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
+ LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
nano-cn4g:
Host: nano
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
CmdPrefix: docker exec prod-trf-gen
+ Deploy: "! scripts/magma-epc-deploy.sh /opt/oai-epc-magma/docker-compose.yml"
+ Undeploy: "docker compose -f /opt/oai-epc-magma/docker-compose.yml down"
+ LogCollect: "! scripts/magma-epc-logcollect.sh %%log_dir%%"
ltebox-nano:
Host: nano
NetworkScript: ip a show dev tun1
+ Deploy:
+ - "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
+ - "sleep 1"
+ - "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
+ - "sleep 1"
+ Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
+ LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
sabox-nepes:
Host: nepes
NetworkScript: ip a show dev tun1
+ Deploy:
+ - "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
+ - "sleep 1"
+ - "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
+ - "sleep 1"
+ LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
+ Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
ltebox-nepes:
Host: nepes
NetworkScript: ip a show dev tun1
+ Deploy:
+ - "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
+ - "sleep 1"
+ - "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
+ - "sleep 1"
+ Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
+ LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
amarisoft_ue:
Host: amariue
@@ -357,6 +386,15 @@ rfsim5g_ext_dn:
NetworkScript: docker exec rfsim5g-oai-ext-dn ip a show dev eth0
CmdPrefix: docker exec rfsim5g-oai-ext-dn
+oai_ext_dn:
+ Host: "%%current_host%%"
+ NetworkScript: docker exec oai-ext-dn ip a show dev eth0
+ CmdPrefix: docker exec oai-ext-dn
+
+rfsim5g_5gc_fixed_ip:
+ Host: "%%current_host%%"
+ NetworkScript: echo "inet 12.1.1.1"
+
rfsim4g_ue:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_ue1
@@ -385,9 +423,9 @@ rfsim4g_enb_fembms:
rfsim4g_ue_fembms:
Host: "%%current_host%%"
- NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem1
+ NetworkScript: docker exec rfsim4g-oai-lte-ue0 ip a show dev oaitun_uem2
CmdPrefix: docker exec rfsim4g-oai-lte-ue0
- IF: oaitun_uem1
+ IF: oaitun_uem2
l2sim4g_ue:
Host: "%%current_host%%"
@@ -402,7 +440,3 @@ l2sim4g_ext_dn:
Host: "%%current_host%%"
NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0
CmdPrefix: docker exec l2sim4g-trf-gen
-
-test:
- Host: localhost
- NetworkScript: echo "inet 127.0.0.1 mtu 1500"
diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py
index 0b80f5884e..ed7c638195 100644
--- a/ci-scripts/cls_cluster.py
+++ b/ci-scripts/cls_cluster.py
@@ -43,9 +43,6 @@ NAMESPACE = "oaicicd-ran"
OCUrl = "https://api.oai.cs.eurecom.fr:6443"
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
-CN_IMAGES = ["mysql", "oai-nrf", "oai-amf", "oai-smf", "oai-upf", "oai-ausf", "oai-udm", "oai-udr", "oai-traffic-server"]
-CN_CONTAINERS = ["", "-c nrf", "-c amf", "-c smf", "-c upf", "-c ausf", "-c udm", "-c udr", ""]
-
def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
@@ -67,49 +64,6 @@ def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
def OC_logout(cmd):
cmd.run(f'oc logout')
-def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
- logging.debug(f'OC OAI CN5G: Deploying OAI CN5G on Openshift Cluster: {ocNamespace}')
- succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
- if not succeeded:
- return False, CONST.OC_LOGIN_FAIL
- cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
- ret = cmd.run(f'helm install --wait oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
- if ret.returncode != 0:
- logging.error('OC OAI CN5G: Deployment failed')
- OC_logout(cmd)
- return False, CONST.OC_PROJECT_FAIL
- report = cmd.run('oc get pods')
- OC_logout(cmd)
- return True, report
-
-def OC_undeploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
- logging.debug(f'OC OAI CN5G: Terminating CN on Openshift Cluster: {ocNamespace}')
- succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
- if not succeeded:
- return False, CONST.OC_LOGIN_FAIL
- cmd.run(f'rm -Rf {path}/logs')
- cmd.run(f'mkdir -p {path}/logs')
- logging.debug('OC OAI CN5G: Collecting log files to workspace')
- cmd.run(f'oc describe pod &> {path}/logs/describe-pods-post-test.log')
- cmd.run(f'oc get pods.metrics.k8s &> {path}/logs/nf-resource-consumption.log')
- for ii, ci in zip(CN_IMAGES, CN_CONTAINERS):
- podName = cmd.run(f"oc get pods | grep {ii} | awk \'{{print $1}}\'").stdout.strip()
- if not podName:
- logging.debug(f'{ii} pod not found!')
- else:
- cmd.run(f'oc logs -f {podName} {ci} &> {path}/logs/{ii}.log &')
- cmd.run(f'cd {path}/logs && zip -r -qq test_logs_CN.zip *.log')
- cmd.copyin(f'{path}/logs/test_logs_CN.zip','test_logs_CN.zip')
- ret = cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
- if ret.returncode != 0:
- logging.error('OC OAI CN5G: Undeployment failed')
- cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
- OC_logout(cmd)
- return False, CONST.OC_PROJECT_FAIL
- report = cmd.run('oc get pods')
- OC_logout(cmd)
- return True, report
-
class Cluster:
def __init__(self):
self.eNBIPAddress = ""
@@ -140,7 +94,7 @@ class Cluster:
self._retag_image_statement(name, name, newTag, filename)
self.cmd.run(f'oc delete -f {filename}')
ret = self.cmd.run(f'oc create -f {filename}')
- if re.search('buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
+ if re.search(r'buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
return True
logging.error('error while creating buildconfig: ' + ret.stdout)
return False
@@ -210,7 +164,7 @@ class Cluster:
def _deploy_pod(self, filename, timeout = 120):
ret = self.cmd.run(f'oc create -f {filename}')
- result = re.search(f'pod/(?P[a-zA-Z0-9_\-]+) created', ret.stdout)
+ result = re.search(r'pod/(?P[a-zA-Z0-9_\-]+) created', ret.stdout)
if result is None:
logging.error(f'could not deploy pod: {ret.stdout}')
return None
@@ -368,7 +322,7 @@ class Cluster:
self.cmd.run(f'oc logs {ranbuild_job} &> cmake_targets/log/ran-build.log')
self.cmd.run(f'oc logs {physim_job} &> cmake_targets/log/oai-physim.log')
self.cmd.run(f'oc logs {clang_job} &> cmake_targets/log/oai-clang.log')
- self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
+ self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
if status:
self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml')
@@ -428,7 +382,7 @@ class Cluster:
self.cmd.run(f'oc logs {nr_cuup_job} &> cmake_targets/log/oai-nr-cuup.log')
self.cmd.run(f'oc logs {lteue_job} &> cmake_targets/log/oai-lte-ue.log')
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
- self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
+ self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
if status:
self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml')
@@ -441,7 +395,7 @@ class Cluster:
if not wait: logging.error('error during build of ranbuildfhi72_job')
status = status and wait
self.cmd.run(f'oc logs {ranbuildfhi72_job} &> cmake_targets/log/ran-build-fhi72.log')
- self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
+ self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
if status:
self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml')
@@ -456,7 +410,7 @@ class Cluster:
status = status and wait
# recover logs
self.cmd.run(f'oc logs {gnb_fhi72_job} &> cmake_targets/log/oai-gnb-fhi72.log')
- self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
+ self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
# split and analyze logs
imageSize = {}
@@ -472,9 +426,9 @@ class Cluster:
imageSize[image] = f'{sizeMb:.1f} Mbytes (uncompressed: ~{sizeMb*2.5:.1f} Mbytes)'
logging.info(f'\u001B[1m{image} size is {imageSize[image]}\u001B[0m')
- grep_exp = "\|".join(attemptedImages)
+ grep_exp = r"\|".join(attemptedImages)
self.cmd.run(f'oc get images | grep -e \'{grep_exp}\' &> cmake_targets/log/image_registry.log');
- self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done', '\$', 60)
+ self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done')
build_log_name = f'build_log_{self.testCase_id}'
cls_containerize.CopyLogsToExecutor(self.cmd, lSourcePath, build_log_name)
diff --git a/ci-scripts/cls_cmd.py b/ci-scripts/cls_cmd.py
index b338a6938f..fb074bdfce 100644
--- a/ci-scripts/cls_cmd.py
+++ b/ci-scripts/cls_cmd.py
@@ -124,12 +124,12 @@ class LocalCmd(Cmd):
ret.args += f" &> {redirect}"
ret.stdout = ""
if not silent:
- logging.info(f"local> {ret.args}")
+ logging.debug(f"local> {ret.args}")
return ret
def run(self, line, timeout=300, silent=False, reportNonZero=True):
if not silent:
- logging.info(f"local> {line}")
+ logging.debug(f"local> {line}")
try:
if line.strip().endswith('&'):
# if we wait for stdout, subprocess does not return before the end of the command
@@ -244,7 +244,7 @@ class RemoteCmd(Cmd):
p = parameters if parameters else ""
r = f"> {redirect}" if redirect else ""
if not silent:
- logging.info(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
+ logging.debug(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
client = RemoteCmd._ssh_init()
cfg = RemoteCmd._lookup_ssh_config(host)
client.connect(**cfg)
@@ -264,7 +264,7 @@ class RemoteCmd(Cmd):
def run(self, line, timeout=300, silent=False, reportNonZero=True):
if not silent:
- logging.info(f"ssh[{self.hostname}]> {line}")
+ logging.debug(f"ssh[{self.hostname}]> {line}")
if self.cwd:
line = f"cd {self.cwd} && {line}"
try:
diff --git a/ci-scripts/cls_corenetwork.py b/ci-scripts/cls_corenetwork.py
new file mode 100644
index 0000000000..7bb508d86b
--- /dev/null
+++ b/ci-scripts/cls_corenetwork.py
@@ -0,0 +1,169 @@
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+# Required Python Version
+# Python 3.x
+#
+#---------------------------------------------------------------------
+
+import logging
+import yaml
+import re
+
+import cls_cmd
+
+def listify(s):
+ if s is None:
+ return None
+ if isinstance(s, list):
+ return [str(x) for x in s]
+ return [str(s)]
+
+class CoreNetwork:
+
+ def __init__(self, cn_name, node=None, d=None, filename="ci_infra.yaml"):
+ with open(filename, "r") as f:
+ all_cns = yaml.load(f, Loader=yaml.FullLoader) # TODO why full?
+ c = all_cns.get(cn_name)
+ if c is None:
+ raise Exception(f'no such core network name "{cn_name}" in "{filename}"')
+ self._cn_name = cn_name
+ self._host = c.get('Host').strip()
+ if self._host == "%%current_host%%":
+ if node is None:
+ raise Exception(f"core network {self} requires node, but none provided (cannot replace %%current_host%%)")
+ self._host = node
+ if d is not None:
+ raise Exception("directory handling not implemented")
+ self._deploy = listify(c.get('Deploy'))
+ self._undeploy = listify(c.get('Undeploy'))
+ self._logCollect = listify(c.get('LogCollect'))
+ # check if at least one command contains "%%log_dir%%"
+ if self._logCollect and not any(filter(lambda s: "%%log_dir%%" in s, self._logCollect)):
+ raise ValueError(f"(At least one) LogCollect expression for {cn_name} must contain \"%%log_dir%%\"")
+ self._getNetwork = listify(c.get('NetworkScript'))
+ self._cmd_prefix = c.get('CmdPrefix')
+ iperf = c.get('RunIperf3Server')
+ self._run_iperf = bool(iperf if iperf is not None else True)
+ logging.info(f'initialized core {self} from {filename}')
+
+ def __str__(self):
+ return f"{self._cn_name}@{self._host} [IP: {self.getIP()}]"
+
+ def __repr__(self):
+ return self.__str__()
+
+ def _exec_script(host, line, silent):
+ # take off "!", split in words
+ words = line[1:].strip().split(" ")
+ script_name = words[0]
+ options = " ".join(words[1:])
+ ret = cls_cmd.runScript(host, script_name, 300, parameters=options, silent=silent)
+ return ret
+
+ def _command(self, cmd_list, must_succeed=False, silent=False):
+ succeeded = True
+ output = ""
+ with cls_cmd.getConnection(self._host) as c:
+ for cmd in cmd_list:
+ cmd = cmd.strip()
+ if cmd.startswith("!"):
+ ret = CoreNetwork._exec_script(self._host, cmd, silent=silent)
+ else:
+ ret = c.run(cmd, silent=silent)
+ output += ret.stdout
+ if ret.returncode != 0:
+ logging.warn(f"cmd \"{cmd}\" returned code {ret.returncode}, stdout {ret.stdout}")
+ if ret.returncode != 0 and must_succeed:
+ succeeded = False
+ break
+ return succeeded, output
+
+ def deploy(self):
+ # we first undeploy to make sure the core has been stopped
+ logging.info(f'undeploy core network {self} before deployment')
+ self._command(self._undeploy)
+ logging.info(f'deploy core network {self}')
+ success, output = self._command(self._deploy, must_succeed=True)
+ if not success:
+ logging.error(f'failure during deployment of core network {self}:\n{output}')
+ return False, output
+ logging.info(f'retrieve IP address')
+ ip = self.getIP()
+ if ip is None:
+ logging.error(f'could not retrieve pingable address of core network {self}')
+ return False, output
+ logging.info(f'deployed core network {self}, pingable IP address {ip}')
+ return True, output
+
+ def _collect_logs(self, log_dir):
+ logging.info(f'collecting logs into (local) {log_dir}')
+ remote_dir = "/tmp/cn-undeploy-logs"
+ with cls_cmd.getConnection(self._host) as c:
+ # create a directory for log collection
+ c.run(f'rm -rf {remote_dir}')
+ ret = c.run(f'mkdir {remote_dir}')
+ if ret.returncode != 0:
+ logging.error("cannot create directory for log collection")
+ return []
+ # inform core network implementation where to store logs
+ # (remote_dir), and trigger log collection
+ log_cmd = [s.replace('%%log_dir%%', remote_dir) for s in self._logCollect]
+ self._command(log_cmd)
+ # enumerate collected files
+ ret = c.run(f'ls {remote_dir}/*')
+ if ret.returncode != 0:
+ logging.error("cannot enumerate log files")
+ return []
+ log_files = []
+ # copy them to the executor one by one, and store in log_dir
+ for f in ret.stdout.split("\n"):
+ l = f.replace(remote_dir, log_dir)
+ c.copyin(f, l)
+ log_files.append(l)
+ c.run(f'rm -rf {remote_dir}')
+ return log_files
+
+ def undeploy(self, log_dir=None):
+ log_files = []
+ if log_dir is not None:
+ log_files = self._collect_logs(log_dir)
+ else:
+ logging.warning("no directory for log collection specified, cannot retrieve core network logs")
+ logging.info(f'undeploy core network {self}')
+ _, output = self._command(self._undeploy)
+ return log_files, output
+
+ def getIP(self):
+ success, output = self._command(self._getNetwork)
+ result = re.search(r'inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output)
+ if success and result and result.group('ip'):
+ return result.group('ip')
+ return None
+
+ def getCmdPrefix(self):
+ return self._cmd_prefix or ""
+
+ def getHost(self):
+ return self._host
+
+ def runIperf3Server(self):
+ return self._run_iperf
diff --git a/ci-scripts/cls_module.py b/ci-scripts/cls_module.py
index 731dd5776a..3ec6ffc9e5 100644
--- a/ci-scripts/cls_module.py
+++ b/ci-scripts/cls_module.py
@@ -62,10 +62,7 @@ class Module_UE:
self.trace = m.get('trace') == True
self.logStore = m.get('LogStore')
self.cmd_prefix = m.get('CmdPrefix')
- self.runIperf3Server = m.get('RunIperf3Server', True)
- self.namespace = m.get('Namespace')
- self.cnPath = m.get('CNPath')
- logging.info(f'initialized {self.module_name}@{self.host} from {filename}')
+ logging.info(f'initialized UE {self} from {filename}')
def __str__(self):
return f"{self.module_name}@{self.host} [IP: {self.getIP()}]"
@@ -165,7 +162,7 @@ class Module_UE:
def getIP(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
- result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
+ result = re.search(r'inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
if result and result.group('ip'):
ip = result.group('ip')
return ip
@@ -173,7 +170,7 @@ class Module_UE:
def checkMTU(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
- result = re.search('mtu (?P[0-9]+)', output.stdout)
+ result = re.search(r'mtu (?P[0-9]+)', output.stdout)
if result and result.group('mtu') and int(result.group('mtu')) == self.MTU:
logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m')
return True
@@ -190,15 +187,6 @@ class Module_UE:
def getHost(self):
return self.host
- def getNamespace(self):
- return self.namespace
-
- def getCNPath(self):
- return self.cnPath
-
- def getRunIperf3Server(self):
- return self.runIperf3Server
-
def getCmdPrefix(self):
return self.cmd_prefix if self.cmd_prefix else ""
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 5268a73e9a..038449870d 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -45,13 +45,14 @@ import helpreadme as HELP
import constants as CONST
import cls_module
+import cls_corenetwork
import cls_cmd
#-----------------------------------------------------------
# Helper functions used here and in other classes
#-----------------------------------------------------------
def Iperf_ComputeModifiedBW(idx, ue_num, profile, args):
- result = re.search('-b\s*(?P[0-9\.]+)(?P[KMG])', str(args))
+ result = re.search(r'-b\s*(?P[0-9\.]+)(?P[KMG])', str(args))
if result is None:
raise ValueError(f'requested iperf bandwidth not found in iperf options "{args}"')
iperf_bandwidth = float(result.group('iperf_bandwidth'))
@@ -77,7 +78,7 @@ def Iperf_ComputeModifiedBW(idx, ue_num, profile, args):
return iperf_bandwidth_new, args_new
def Iperf_ComputeTime(args):
- result = re.search('-t\s*(?P\d+)', str(args))
+ result = re.search(r'-t\s*(?P\d+)', str(args))
if result is None:
raise Exception('Iperf time not found!')
return int(result.group('iperf_time'))
@@ -183,11 +184,10 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
return (False, 'Iperf UDP: Server report not found!')
if (os.path.getsize(server_filename)==0):
return (False, 'Iperf UDP: Log file is empty')
- # Computing the requested bandwidth in float
- statusTemplate = r'(?:|\[ *\d+\].*) +0\.0-\s*(?P[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P[0-9\.]+) (?P[kKMG])bits\/sec +(?P[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P[0-9\.]+)%\))'
+ statusTemplate = r'(?:|\[ *\d+\].*) +0\.0+-\s*(?P[0-9\.]+) +sec +[0-9\.]+ [kKMG]Bytes +(?P[0-9\.]+) (?P[kKMG])bits\/sec +(?P[0-9\.]+) ms +(\d+\/ *\d+) +(\((?P[0-9\.]+)%\))'
with open(server_filename, 'r') as server_file:
for line in server_file.readlines():
- result = re.search(statusTemplate, str(line))
+ result = re.search(statusTemplate, str(line)) or result
if result is None:
return (False, 'Could not parse server report!')
bitrate = float(result.group('bitrate'))
@@ -363,29 +363,21 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
return True
- def Ping_common(self, EPC, ue, logPath):
- # Launch ping on the EPC side (true for ltebox and old open-air-cn)
+ def Ping_common(self, cn, ue, logPath):
ping_status = 0
ueIP = ue.getIP()
if not ueIP:
return (False, f"UE {ue.getName()} has no IP address")
+ svrIP = cn.getIP()
+ if not svrIP:
+ return (False, f"CN {cn.getName()} has no IP address")
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
- ping_time = re.findall("-c *(\d+)",str(self.ping_args))
+ ping_time = re.findall(r"-c *(\d+)",str(self.ping_args))
local_ping_log_file = f'{logPath}/{ping_log_file}'
- # if has pattern %cn_ip%, replace with core IP address, else we assume the IP is present
- if re.search('%cn_ip%', self.ping_args):
- #target address is different depending on EPC type
- if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
- self.ping_args = re.sub('%cn_ip%', EPC.MmeIPAddress, self.ping_args)
- elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
- self.ping_args = re.sub('%cn_ip%', EPC.MmeIPAddress, self.ping_args)
- elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE):
- self.ping_args = re.sub('%cn_ip%', '172.21.6.100', self.ping_args)
- else:
- self.ping_args = re.sub('%cn_ip%', EPC.IPAddress, self.ping_args)
- #ping from module NIC rather than IP address to make sure round trip is over the air
+ if re.search('%cn_ip%', self.ping_args) or re.search(r'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+', self.ping_args):
+ raise Exception(f"ping_args should not have IP address: {self.ping_args}")
interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
- ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} 2>&1 | tee /tmp/{ping_log_file}'
+ ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {svrIP} 2>&1 | tee /tmp/{ping_log_file}'
cmd = cls_cmd.getConnection(ue.getHost())
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
ue_header = f'UE {ue.getName()} ({ueIP})'
@@ -399,12 +391,12 @@ class OaiCiTest():
with open(local_ping_log_file, 'r') as f:
ping_output = "".join(f.readlines())
- result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
+ result = re.search(r', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
if result is None:
message = ue_header + ': Packet Loss Not Found!'
return (False, message)
packetloss = result.group('packetloss')
- result = re.search('rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', ping_output)
+ result = re.search(r'rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', ping_output)
if result is None:
message = ue_header + ': Ping RTT_Min RTT_Avg RTT_Max Not Found!'
return (False, message)
@@ -434,22 +426,18 @@ class OaiCiTest():
return (True, message)
- def Ping(self, HTML, EPC, CONTAINERS):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
-
- if self.ue_ids == []:
- raise Exception("no module names in self.ue_ids provided")
+ def Ping(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
+ if self.ue_ids == [] or self.svr_id == None:
+ raise Exception("no module names in self.ue_ids or/and self.svr_id provided")
# Creating destination log folder if needed on the python executor workspace
with cls_cmd.getConnection('localhost') as local:
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
local.run(f'mkdir -p {logPath}', silent=True)
- ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
- logging.debug(ues)
+ ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
+ cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
- futures = [executor.submit(self.Ping_common, EPC, ue, logPath) for ue in ues]
+ futures = [executor.submit(self.Ping_common, cn, ue, logPath) for ue in ues]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
@@ -470,15 +458,14 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', messages)
return success
- def Iperf_Module(self, EPC, ue, svr, idx, ue_num, logPath):
+ def Iperf_Module(self, cn, ue, idx, ue_num, logPath):
ueIP = ue.getIP()
if not ueIP:
return (False, f"UE {ue.getName()} has no IP address")
- svrIP = svr.getIP()
+ svrIP = cn.getIP()
if not svrIP:
return (False, f"Iperf server {ue.getName()} has no IP address")
- runIperf3Server = svr.getRunIperf3Server()
iperf_opt = self.iperf_args
jsonReport = "--json"
serverReport = ""
@@ -495,13 +482,13 @@ class OaiCiTest():
# hack: the ADB UEs don't have iperf in $PATH, so we need to hardcode for the moment
iperf_ue = '/data/local/tmp/iperf3' if re.search('adb', ue.getName()) else 'iperf3'
ue_header = f'UE {ue.getName()} ({ueIP})'
- with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
+ with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
port = 5002 + idx
# note: some core setups start an iperf3 server automatically, indicated in ci_infra by runIperf3Server: False`
t = iperf_time * 2.5
cmd_ue.run(f'rm /tmp/{client_filename}', reportNonZero=False, silent=True)
- if runIperf3Server:
- cmd_svr.run(f'{svr.getCmdPrefix()} nohup timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} &', timeout=t)
+ if cn.runIperf3Server():
+ cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} >> /dev/null &', timeout=t)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> /tmp/{client_filename}', timeout=t)
# note: copy iperf3 log to the current directory for log analysis and log collection
dest_filename = f'{logPath}/{client_filename}'
@@ -516,11 +503,7 @@ class OaiCiTest():
return (status, f'{ue_header}\n{msg}')
- def Iperf(self,HTML,EPC,CONTAINERS):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
-
+ def Iperf(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
logging.debug(f'Iperf: iperf_args "{self.iperf_args}" iperf_packetloss_threshold "{self.iperf_packetloss_threshold}" iperf_bitrate_threshold "{self.iperf_bitrate_threshold}" iperf_profile "{self.iperf_profile}" iperf_options "{self.iperf_options}"')
if self.ue_ids == [] or self.svr_id == None:
@@ -530,11 +513,10 @@ class OaiCiTest():
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
local.run(f'mkdir -p {logPath}', silent=True)
- ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
- svr = cls_module.Module_UE(self.svr_id,self.svr_node)
- logging.debug(ues)
+ ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
+ cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
- futures = [executor.submit(self.Iperf_Module, EPC, ue, svr, i, len(ues), logPath) for i, ue in enumerate(ues)]
+ futures = [executor.submit(self.Iperf_Module, cn, ue, i, len(ues), logPath) for i, ue in enumerate(ues)]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
@@ -555,17 +537,17 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
return success
- def Iperf2_Unidir(self,HTML,EPC,CONTAINERS):
+ def Iperf2_Unidir(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
if self.ue_ids == [] or self.svr_id == None or len(self.ue_ids) != 1:
raise Exception("no module names in self.ue_ids or/and self.svr_id provided, multi UE scenario not supported")
- ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip())
- svr = cls_module.Module_UE(self.svr_id,self.svr_node)
+ ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip(), infra_file)
+ cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
ueIP = ue.getIP()
if not ueIP:
- return (False, f"UE {ue.getName()} has no IP address")
- svrIP = svr.getIP()
+ return False
+ svrIP = cn.getIP()
if not svrIP:
- return (False, f"Iperf server {ue.getName()} has no IP address")
+ return False
server_filename = f'iperf_server_{self.testCase_id}_{ue.getName()}.log'
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
@@ -574,17 +556,15 @@ class OaiCiTest():
t = iperf_time*2.5
with cls_cmd.getConnection('localhost') as local:
local.run(f'mkdir -p {logPath}')
- with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(EPC.IPAddress) as cmd_svr:
+ with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} iperf -B {ueIP} -s -u -i1 >> /tmp/{server_filename} &', timeout=t)
- cmd_svr.run(f'{svr.getCmdPrefix()} timeout -vk3 {t} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1', timeout=t)
+ cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1 >> /dev/null', timeout=t)
localPath = f'{os.getcwd()}'
# note: copy iperf2 log to the directory for log collection
- cmd_ue.copyin(f'/tmp/{server_filename}', f'{localPath}/{logPath}/{server_filename}')
- # note: copy iperf2 log to the current directory for log analysis and log collection
- cmd_ue.copyin(f'/tmp/{server_filename}', f'{localPath}/{server_filename}')
+ cmd_ue.copyin(f'/tmp/{server_filename}', f'{logPath}/{server_filename}')
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
- success, msg = Iperf_analyzeV2UDP(server_filename, self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
+ success, msg = Iperf_analyzeV2UDP(f'{logPath}/{server_filename}', self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
ue_header = f'UE {ue.getName()} ({ueIP})'
logging.info(f'\u001B[1;37;45m iperf result for {ue_header}\u001B[0m')
for l in msg.split('\n'):
@@ -698,7 +678,7 @@ class OaiCiTest():
result = re.search('TRIED TO PUSH MBMS DATA', str(line))
if result is not None:
mbms_messages += 1
- result = re.search("MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P\d{1,3}), N_RB_DL (?P\d{1,3}), PHICH DURATION (?P\d), PHICH RESOURCE (?P.{1,4}), TX_ANT (?P\d)", str(line))
+ result = re.search(r"MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P\d{1,3}), N_RB_DL (?P\d{1,3}), PHICH DURATION (?P\d), PHICH RESOURCE (?P.{1,4}), TX_ANT (?P\d)", str(line))
if result is not None and (not mib_found):
try:
mibMsg = "MIB Information: " + result.group(1) + ', ' + result.group(2)
@@ -731,7 +711,7 @@ class OaiCiTest():
frequency_found = True
except Exception as e:
logging.error(f'\033[91m UE did not find PBCH\033[0m')
- result = re.search("PLMN MCC (?P\d{1,3}), MNC (?P\d{1,3}), TAC", str(line))
+ result = re.search(r"PLMN MCC (?P\d{1,3}), MNC (?P\d{1,3}), TAC", str(line))
if result is not None and (not plmn_found):
try:
mibMsg = f"PLMN MCC = {result.group('mcc')} MNC = {result.group('mnc')}"
@@ -740,7 +720,7 @@ class OaiCiTest():
plmn_found = True
except Exception as e:
logging.error(f'\033[91m PLMN not found \033[0m')
- result = re.search("Found (?P[\w,\s]{1,15}) \(name from internal table\)", str(line))
+ result = re.search(r"Found (?P[\w,\s]{1,15}) \(name from internal table\)", str(line))
if result is not None:
try:
mibMsg = f"The operator is: {result.group('operator')}"
@@ -756,7 +736,7 @@ class OaiCiTest():
logging.debug(f'\033[94m{mibMsg}\033[0m')
except Exception as e:
logging.error(f'\033[91m SIB5 InterFreqCarrierFreq element not found \033[0m')
- result = re.search("DL Carrier Frequency/ARFCN : \-*(?P\d{1,15}/\d{1,4})", str(line))
+ result = re.search(r"DL Carrier Frequency/ARFCN : \-*(?P\d{1,15}/\d{1,4})", str(line))
if result is not None:
try:
freq = result.group('carrier_frequency')
@@ -766,7 +746,7 @@ class OaiCiTest():
logging.debug(f'\033[94m DL Carrier Frequency is: {freq}\033[0m')
except Exception as e:
logging.error(f'\033[91m DL Carrier Frequency not found \033[0m')
- result = re.search("AllowedMeasBandwidth : (?P\d{1,7})", str(line))
+ result = re.search(r"AllowedMeasBandwidth : (?P\d{1,7})", str(line))
if result is not None:
try:
prb = result.group('allowed_bandwidth')
@@ -876,6 +856,35 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(f'N/A', 'OK', messages)
return True
+ def DeployCoreNetwork(cn_id, HTML):
+ core_name = cn_id.strip()
+ cn = cls_corenetwork.CoreNetwork(core_name)
+ success, output = cn.deploy()
+ logging.info(f"deployment core network {core_name} success {success}, output:\n{output}")
+ if success:
+ msg = f"Started {cn}"
+ HTML.CreateHtmlTestRowQueue(core_name, 'OK', [msg])
+ else:
+ msg = f"deployment of core network {core_name} FAILED"
+ logging.error(msg)
+ HTML.CreateHtmlTestRowQueue(core_name, 'KO', [msg])
+ return success
+
+ def UndeployCoreNetwork(cn_id, HTML):
+ # Ping, Iperf, DeployObject put logs into a path based on YAML. We
+ # can't do this here (because there is no yaml), so hardcode a path for
+ # "cn_logs" for the moment
+ logPath = f'{os.getcwd()}/../cmake_targets/log/cn_logs'
+ with cls_cmd.getConnection('localhost') as local:
+ local.run(f'mkdir -p {logPath}', silent=True)
+ core_name = cn_id.strip()
+ cn = cls_corenetwork.CoreNetwork(core_name)
+ logs, output = cn.undeploy(log_dir=logPath)
+ logging.info(f"undeployed core network {core_name}, logs {logs}, output:\n{output}")
+ message = "Log files: " + ", ".join([os.path.basename(l) for l in logs])
+ HTML.CreateHtmlTestRowQueue(core_name, 'OK', [message])
+ return True
+
def LogCollectBuild(self,RAN):
# Some pipelines are using "none" IP / Credentials
# In that case, just forget about it
@@ -899,39 +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 LogCollectPing(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}/ping.log.zip')
- cmd.run(f'cd {d} && zip ping.log.zip ping*.log')
- cmd.run(f'rm {d}/ping*.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 LogCollectOAIUE(self):
- # Some pipelines are using "none" IP / Credentials
- # In that case, just forget about it
- if self.UEIPAddress == 'none':
- sys.exit(0)
- with cls_cmd.getConnection(self.UEIPAddress) as cmd:
- d = f'{self.UESourceCodePath}/cmake_targets'
- cmd.run(f'echo {self.UEPassword} | sudo -S rm -f {d}/ue.log.zip')
- cmd.run(f'cd {d} && echo {self.UEPassword} | sudo -S zip ue.log.zip ue*.log core* ue_*record.raw ue_*.pcap ue_*txt')
- cmd.run(f'echo {self.UEPassword} | sudo -S rm {d}/ue*.log {d}/core* {d}/ue_*record.raw {d}/ue_*.pcap {d}/ue_*txt')
-
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/epc.py b/ci-scripts/epc.py
deleted file mode 100644
index e025c514d9..0000000000
--- a/ci-scripts/epc.py
+++ /dev/null
@@ -1,934 +0,0 @@
-#/*
-# * 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
-# */
-#---------------------------------------------------------------------
-# Python for CI of OAI-eNB + COTS-UE
-#
-# Required Python Version
-# Python 3.x
-#
-# Required Python Package
-# pexpect
-#---------------------------------------------------------------------
-
-#-----------------------------------------------------------
-# Import
-#-----------------------------------------------------------
-import sys # arg
-import re # reg
-import logging
-import os
-import time
-import signal
-
-#-----------------------------------------------------------
-# OAI Testing modules
-#-----------------------------------------------------------
-import sshconnection as SSH
-import helpreadme as HELP
-import constants as CONST
-import cls_cluster as OC
-import cls_cmd
-import cls_module
-#-----------------------------------------------------------
-# Class Declaration
-#-----------------------------------------------------------
-
-
-class EPCManagement():
-
- def __init__(self):
-
- self.IPAddress = ''
- self.UserName = ''
- self.Password = ''
- self.SourceCodePath = ''
- self.Type = ''
- self.PcapFileName = ''
- self.testCase_id = ''
- self.MmeIPAddress = ''
- self.containerPrefix = 'prod'
- self.mmeConfFile = 'mme.conf'
- self.yamlPath = ''
- self.isMagmaUsed = False
- self.cfgDeploy = '--type start-mini --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py
- self.cfgUnDeploy = '--type stop-mini --scenario 1' #from xml, 'mini' is default normal for docker-network.py
- self.OCUrl = "https://api.oai.cs.eurecom.fr:6443"
- self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr"
- self.OCUserName = ''
- self.OCPassword = ''
- self.cnID = ''
- self.imageToPull = ''
- self.eNBSourceCodePath = ''
-
-#-----------------------------------------------------------
-# EPC management functions
-#-----------------------------------------------------------
-
- def InitializeHSS(self, HTML):
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- HELP.GenericHelp(CONST.Version)
- HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
- sys.exit('Insufficient EPC Parameters')
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS in Docker')
- mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
- mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup tshark -i eth0 -i eth1 -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
- time.sleep(5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup ./bin/oai_hss -j ./etc/hss_rel14.json --reloadkey true > hss_check_run.log 2>&1"', '\$', 5)
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS')
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- logging.debug('\u001B[1m Launching tshark on all interfaces \u001B[0m')
- self.PcapFileName = 'epc_' + self.testCase_id + '.pcap'
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ' + self.PcapFileName, '\$', 5)
- mySSH.command('echo $USER; nohup sudo tshark -f "tcp port not 22 and port not 53" -i any -w ' + self.SourceCodePath + '/scripts/' + self.PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.UserName, 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S mkdir -p logs', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss_' + self.testCase_id + '.log logs/hss*.*', '\$', 5)
- mySSH.command('echo "oai_hss -j /usr/local/etc/oai/hss_rel14.json" > ./my-hss.sh', '\$', 5)
- mySSH.command('chmod 755 ./my-hss.sh', '\$', 5)
- mySSH.command('sudo daemon --unsafe --name=hss_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/hss_' + self.testCase_id + '.log ./my-hss.sh', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC HSS')
- mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
- mySSH.command('source oaienv', '\$', 5)
- mySSH.command('cd scripts', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./run_hss 2>&1 | stdbuf -o0 awk \'{ print strftime("[%Y/%m/%d %H:%M:%S] ",systime()) $0 }\' | stdbuf -o0 tee -a hss_' + self.testCase_id + '.log &', 'Core state: 2 -> 3', 35)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- logging.debug('Using the ltebox simulated HSS')
- mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
- mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
- result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall hss_sim', '\$', 5)
- mySSH.command('ps aux | grep --colour=never xGw | grep -v grep', '\$', 5, silent=True)
- result = re.search('root.*xGw', mySSH.getBefore())
- if result is not None:
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_ltebox', '\$', 5)
- mySSH.command('cd /opt/hss_sim0609', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_hss ./starthss"', '\$', 5)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
- HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def InitializeMME(self, HTML):
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- HELP.GenericHelp(CONST.Version)
- HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
- sys.exit('Insufficient EPC Parameters')
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 MME in Docker')
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -f "not port 2152" -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
- time.sleep(5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/' + self.mmeConfFile + ' > mme_check_run.log 2>&1"', '\$', 5)
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 MME')
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f mme_' + self.testCase_id + '.log', '\$', 5)
- mySSH.command('echo "./run_mme --config-file /usr/local/etc/oai/mme.conf --set-virt-if" > ./my-mme.sh', '\$', 5)
- mySSH.command('chmod 755 ./my-mme.sh', '\$', 5)
- mySSH.command('sudo daemon --unsafe --name=mme_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/mme_' + self.testCase_id + '.log ./my-mme.sh', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
- mySSH.command('source oaienv', '\$', 5)
- mySSH.command('cd scripts', '\$', 5)
- mySSH.command('stdbuf -o0 hostname', '\$', 5)
- result = re.search('hostname\\\\r\\\\n(?P[a-zA-Z0-9\-\_]+)\\\\r\\\\n', mySSH.getBefore())
- if result is None:
- logging.debug('\u001B[1;37;41m Hostname Not Found! \u001B[0m')
- sys.exit(1)
- host_name = result.group('host_name')
- mySSH.command('echo ' + self.Password + ' | sudo -S ./run_mme 2>&1 | stdbuf -o0 tee -a mme_' + self.testCase_id + '.log &', 'MME app initialization complete', 100)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- # Clean-up the logs from previous runs
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ../var/log/*.0', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./start_mme', '\$', 5)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
- HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def SetMmeIPAddress(self):
- # Not an error if we don't need an EPC
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- return
- if self.IPAddress == 'none':
- return
- # Only in case of Docker containers, MME IP address is not the EPC HOST IP address
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- self.isMagmaUsed = False
- mySSH.command('docker ps -a', '\$', 5)
- result = re.search('magma', mySSH.getBefore())
- if result is not None:
- self.isMagmaUsed = True
- if self.isMagmaUsed:
- mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-magma-mme', '\$', 5)
- else:
- mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
- result = re.search('MME_IP_ADDR = (?P[0-9\.]+)', mySSH.getBefore())
- if result is not None:
- self.MmeIPAddress = result.group('mme_ip_addr')
- logging.debug('MME IP Address is ' + self.MmeIPAddress)
- mySSH.close()
- else:
- self.MmeIPAddress = self.IPAddress
-
- def InitializeSPGW(self, HTML):
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- HELP.GenericHelp(CONST.Version)
- HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
- sys.exit('Insufficient EPC Parameters')
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 SPGW-CUPS in Docker')
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup tshark -i eth0 -i lo:p5c -i lo:s5c -f "not port 2152" -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup tshark -i eth0 -f "not port 2152" -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
- time.sleep(5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup ./bin/oai_spgwc -o -c ./etc/spgw_c.conf > spgwc_check_run.log 2>&1"', '\$', 5)
- time.sleep(5)
- mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup ./bin/oai_spgwu -o -c ./etc/spgw_u.conf > spgwu_check_run.log 2>&1"', '\$', 5)
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- logging.debug('Using the OAI EPC Release 14 SPGW-CUPS')
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f spgwc_' + self.testCase_id + '.log spgwu_' + self.testCase_id + '.log', '\$', 5)
- mySSH.command('echo "spgwc -c /usr/local/etc/oai/spgw_c.conf" > ./my-spgwc.sh', '\$', 5)
- mySSH.command('chmod 755 ./my-spgwc.sh', '\$', 5)
- mySSH.command('sudo daemon --unsafe --name=spgwc_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwc_' + self.testCase_id + '.log ./my-spgwc.sh', '\$', 5)
- time.sleep(5)
- mySSH.command('echo "spgwu -c /usr/local/etc/oai/spgw_u.conf" > ./my-spgwu.sh', '\$', 5)
- mySSH.command('chmod 755 ./my-spgwu.sh', '\$', 5)
- mySSH.command('sudo daemon --unsafe --name=spgwu_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwu_' + self.testCase_id + '.log ./my-spgwu.sh', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
- mySSH.command('source oaienv', '\$', 5)
- mySSH.command('cd scripts', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./run_spgw 2>&1 | stdbuf -o0 tee -a spgw_' + self.testCase_id + '.log &', 'Initializing SPGW-APP task interface: DONE', 30)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./start_xGw', '\$', 5)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
- HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def Initialize5GCN(self, HTML):
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.Type == '':
- HELP.GenericHelp(CONST.Version)
- HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.Type)
- logging.error('Insufficient EPC Parameters')
- return False
- mySSH = cls_cmd.getConnection(self.IPAddress)
- html_cell = ''
- if re.match('ltebox', self.Type, re.IGNORECASE):
- logging.debug('Using the SABOX simulated HSS')
- mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
- mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('cd /opt/hss_sim0609', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_5g_hss ./start_5g_hss"', '\$', 5)
- logging.debug('Using the sabox')
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./start_sabox', '\$', 5)
- html_cell += 'N/A\n'
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- logging.debug('Starting OAI CN5G')
- mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
- mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
- mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
- if re.search('start-mini-as-ue', self.cfgDeploy):
- dFile = 'docker-compose-mini-nrf-asue.yaml'
- elif re.search('basic', self.cfgDeploy):\
- dFile = 'docker-compose-basic-nrf.yaml'
- else:
- dFile = 'docker-compose-mini-nrf.yaml'
- mySSH.command('docker-compose -f ' + dFile + ' ps -a', '\$', 60)
- if mySSH.getBefore().count('Up (healthy)') != 6:
- logging.error('Not all container healthy')
- else:
- logging.debug('OK --> all containers are healthy')
- mySSH.command('docker-compose -f ' + dFile + ' config | grep --colour=never image', '\$', 10)
- listOfImages = mySSH.getBefore()
- for imageLine in listOfImages.split('\\r\\n'):
- res1 = re.search('image: (?P[a-zA-Z0-9\-/]+):(?P[a-zA-Z0-9\-]+)', str(imageLine))
- res2 = re.search('mysql', str(imageLine))
- if res1 is not None and res2 is None:
- html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
- nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
- while (nbChars < 32):
- html_cell += ' '
- nbChars += 1
- mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
- res3 = re.search('Size *= *(?P[0-9\-]*) *bytes', mySSH.getBefore())
- if res3 is not None:
- imageSize = int(res3.group('size'))
- imageSize = int(imageSize/(1024*1024))
- html_cell += str(imageSize) + ' MBytes '
- mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
- res4 = re.search('Date *= *(?P[0-9\-]*)T', mySSH.getBefore())
- if res4 is not None:
- html_cell += '(' + res4.group('date') + ')'
- html_cell += '\n'
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- cn = cls_module.Module_UE(self.cnID)
- succeeded, report = OC.OC_deploy_CN(mySSH, self.OCUserName, self.OCPassword, cn.getNamespace(), cn.getCNPath())
- if not succeeded:
- HTML.CreateHtmlTestRow('N/A', 'KO', report)
- HTML.CreateHtmlTabFooter(False)
- mySSH.close()
- logging.error("OC OAI CN5G: CN deployment failed!")
- return False
- for line in report.stdout.split('\n')[1:]:
- columns = line.strip().split()
- name = columns[0]
- status = columns[2]
- html_cell += status + ' ' + name
- html_cell += '\n'
- else:
- logging.error('This option should not occur!')
- mySSH.close()
- HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [html_cell])
- return True
-
- def SetAmfIPAddress(self):
- # Not an error if we don't need an 5GCN
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- return
- if self.IPAddress == 'none':
- return
- if re.match('ltebox', self.Type, re.IGNORECASE):
- self.MmeIPAddress = self.IPAddress
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- response=mySSH.command3('docker container ls -f name=oai-amf', 10)
- if len(response)>1:
- response=mySSH.command3('docker inspect --format=\'{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}\' oai-amf', 10)
- tmp = str(response[0],'utf-8')
- self.MmeIPAddress = tmp.rstrip()
- logging.debug('AMF IP Address ' + self.MmeIPAddress)
- else:
- logging.error('no container with name oai-amf found, could not retrieve AMF IP address')
- mySSH.close()
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- response=mySSH.command3('oc pods ls -f name=oai-amf', 10)
-
- def CheckHSSProcess(self, status_queue):
- try:
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker top ' + self.containerPrefix + '-oai-hss', '\$', 5)
- else:
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
- if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- result = re.search('oai_hss -j', mySSH.getBefore())
- elif re.match('OAI', self.Type, re.IGNORECASE):
- result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
- else:
- logging.error('This should not happen!')
- if result is None:
- logging.debug('\u001B[1;37;41m HSS Process Not Found! \u001B[0m')
- status_queue.put(CONST.HSS_PROCESS_FAILED)
- else:
- status_queue.put(CONST.HSS_PROCESS_OK)
- mySSH.close()
- except:
- os.kill(os.getppid(),signal.SIGUSR1)
-
- def CheckMMEProcess(self, status_queue):
- try:
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- self.isMagmaUsed = False
- mySSH.command('docker ps -a', '\$', 5)
- result = re.search('magma', mySSH.getBefore())
- if result is not None:
- self.isMagmaUsed = True
- if self.isMagmaUsed:
- mySSH.command('docker top ' + self.containerPrefix + '-magma-mme', '\$', 5)
- else:
- mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
- else:
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- result = re.search('oai_mme -c ', mySSH.getBefore())
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- result = re.search('mme -c', mySSH.getBefore())
- elif re.match('OAI', self.Type, re.IGNORECASE):
- result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- result = re.search('mme|amf', mySSH.getBefore())
- else:
- logging.error('This should not happen!')
- if result is None:
- logging.debug('\u001B[1;37;41m MME|AMF Process Not Found! \u001B[0m')
- status_queue.put(CONST.MME_PROCESS_FAILED)
- else:
- status_queue.put(CONST.MME_PROCESS_OK)
- mySSH.close()
- except:
- os.kill(os.getppid(),signal.SIGUSR1)
-
- def CheckSPGWProcess(self, status_queue):
- try:
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwc', '\$', 5)
- result = re.search('oai_spgwc -', mySSH.getBefore())
- if result is not None:
- mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwu-tiny', '\$', 5)
- result = re.search('oai_spgwu -', mySSH.getBefore())
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
- result = re.search('spgwu -c ', mySSH.getBefore())
- elif re.match('OAI', self.Type, re.IGNORECASE):
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
- result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep', '\$', 5)
- result = re.search('xGw|upf', mySSH.getBefore())
- else:
- logging.error('This should not happen!')
- if result is None:
- logging.debug('\u001B[1;37;41m SPGW|UPF Process Not Found! \u001B[0m')
- status_queue.put(CONST.SPGW_PROCESS_FAILED)
- else:
- status_queue.put(CONST.SPGW_PROCESS_OK)
- mySSH.close()
- except:
- os.kill(os.getppid(),signal.SIGUSR1)
-
- def TerminateHSS(self, HTML):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
- time.sleep(2)
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5)
- result = re.search('oai_hss -j ', mySSH.getBefore())
- if result is not None:
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGKILL oai_hss"', '\$', 5)
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT oai_hss || true', '\$', 5)
- time.sleep(2)
- mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
- result = re.search('oai_hss -j', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL oai_hss || true', '\$', 5)
- mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-hss.sh', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE):
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_hss oai_hss || true', '\$', 5)
- time.sleep(2)
- mySSH.command('stdbuf -o0 ps -aux | grep --colour=never hss | grep -v grep', '\$', 5)
- result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_hss oai_hss || true', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
- mySSH.command('cd scripts', '\$', 5)
- time.sleep(1)
- mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_hss -X quit', '\$', 5)
- time.sleep(5)
- mySSH.command('ps aux | grep --colour=never hss_sim | grep -v grep', '\$', 5, silent=True)
- result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall hss_sim', '\$', 5)
- else:
- logging.error('This should not happen!')
- mySSH.close()
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def TerminateMME(self, HTML):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGINT oai_mme tshark"', '\$', 5)
- time.sleep(2)
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5)
- result = re.search('oai_mme -c ', mySSH.getBefore())
- if result is not None:
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGKILL oai_mme"', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_mme mme || true', '\$', 5)
- time.sleep(2)
- mySSH.command('stdbuf -o0 ps -aux | grep mme | grep -v grep', '\$', 5)
- result = re.search('mme -c', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_mme mme || true', '\$', 5)
- mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-mme.sh', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_mme', '\$', 5)
- time.sleep(5)
- else:
- logging.error('This should not happen!')
- mySSH.close()
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def TerminateSPGW(self, HTML):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT oai_spgwu tshark"', '\$', 5)
- time.sleep(2)
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5)
- result = re.search('oai_spgwc -o -c ', mySSH.getBefore())
- if result is not None:
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGKILL oai_spgwc"', '\$', 5)
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5)
- result = re.search('oai_spgwu -o -c ', mySSH.getBefore())
- if result is not None:
- mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGKILL oai_spgwu"', '\$', 5)
- elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT spgwc spgwu || true', '\$', 5)
- time.sleep(2)
- mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
- result = re.search('spgwc -c |spgwu -c ', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL spgwc spgwu || true', '\$', 5)
- mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-spgw*.sh', '\$', 5)
- mySSH.command('stdbuf -o0 ps -aux | grep tshark | grep -v grep', '\$', 5)
- result = re.search('-w ', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT tshark || true', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S chmod 666 ' + self.SourceCodePath + '/scripts/*.pcap', '\$', 5)
- elif re.match('OAI', self.Type, re.IGNORECASE):
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_spgw spgw || true', '\$', 5)
- time.sleep(2)
- mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
- result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
- if result is not None:
- mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_spgw spgw || true', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_xGw', '\$', 5)
- else:
- logging.error('This should not happen!')
- mySSH.close()
- HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
- return True
-
- def Terminate5GCN(self, HTML):
- mySSH = cls_cmd.getConnection(self.IPAddress)
- message = ''
- if re.match('ltebox', self.Type, re.IGNORECASE):
- logging.debug('Terminating SA BOX')
- mySSH.command('cd /opt/ltebox/tools', '\$', 5)
- mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_sabox', '\$', 5)
- time.sleep(1)
- mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
- mySSH.command('cd scripts', '\$', 5)
- time.sleep(1)
- mySSH.command('echo ' + self.Password + ' | sudo -S screen -S simulated_5g_hss -X quit', '\$', 5)
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- logging.debug('OAI CN5G Collecting Log files to workspace')
- mySSH.command('echo ' + self.Password + ' | sudo rm -rf ' + self.SourceCodePath + '/logs', '\$', 5)
- mySSH.command('mkdir ' + self.SourceCodePath + '/logs','\$', 5)
- containers_list=['oai-smf','oai-spgwu','oai-amf','oai-nrf']
- for c in containers_list:
- mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
-
- logging.debug('Terminating OAI CN5G')
- mySSH.command(f'cd {self.SourceCodePath}/docker-compose', '\$', 5)
- mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
- mySSH.command('docker volume prune --force || true', '\$', 60)
- time.sleep(2)
- mySSH.command('tshark -r /tmp/oai-cn5g-v1.5.pcap | grep -E --colour=never "Tracking area update" ','\$', 30)
- result = re.search('Tracking area update request', mySSH.getBefore())
- if result is not None:
- message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
- else:
- message = 'No Tracking area update request'
- mySSH.run(f'cd {self.SourceCodePath}/logs && zip -r -qq test_logs_CN.zip *.log')
- mySSH.copyin(f'{self.SourceCodePath}/logs/test_logs_CN.zip','test_logs_CN.zip')
- logging.debug(message)
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- cn = cls_module.Module_UE(self.cnID)
- succeeded, report = OC.OC_undeploy_CN(mySSH, self.OCUserName, self.OCPassword, cn.getNamespace(), cn.getCNPath())
- if not succeeded:
- HTML.CreateHtmlTestRow('N/A', 'KO', report)
- HTML.CreateHtmlTabFooter(False)
- logging.error("OC OAI CN5G: CN undeployment failed!")
- return False
- else:
- message = report.stdout
- else:
- logging.error('This should not happen!')
- mySSH.close()
- HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [message])
- return True
-
- def DeployEpc(self, HTML):
- logging.debug('Trying to deploy')
- if not re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
- HTML.CreateHtmlTabFooter(False)
- logging.error('Deploy not possible with this EPC type: ' + self.Type)
- return False
-
- if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
- HELP.GenericHelp(CONST.Version)
- HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
- logging.error('Insufficient EPC Parameters')
- return False
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- mySSH.command('docker-compose --version', '\$', 5)
- result = re.search('docker-compose version 1|Docker Compose version v2', mySSH.getBefore())
- if result is None:
- mySSH.close()
- HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
- HTML.CreateHtmlTabFooter(False)
- logging.error('docker-compose not installed on ' + self.IPAddress)
- return False
-
- # Checking if it is a MAGMA deployment
- self.isMagmaUsed = False
- if os.path.isfile('./' + self.yamlPath + '/redis_extern.conf'):
- self.isMagmaUsed = True
- logging.debug('MAGMA MME is used!')
-
- mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
- mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
- mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
- mySSH.command('rm -f ' + self.SourceCodePath + '/*.log', '\$', 5)
-
- # deploying and configuring the cassandra database
- # container names and services are currently hard-coded.
- # they could be recovered by:
- # - docker-compose config --services
- # - docker-compose config | grep container_name
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
- if self.isMagmaUsed:
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme_fd.sprint.conf', self.SourceCodePath + '/scripts')
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/redis_extern.conf', self.SourceCodePath + '/scripts')
- mySSH.command('chmod a+x ' + self.SourceCodePath + '/scripts/entrypoint.sh', '\$', 5)
- else:
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/entrypoint.sh', self.SourceCodePath + '/scripts')
- mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/mme.conf', self.SourceCodePath + '/scripts')
- mySSH.command('chmod 775 entrypoint.sh', '\$', 60)
- mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
- mySSH.command('docker-compose down -v', '\$', 60)
- mySSH.command('docker-compose up -d db_init', '\$', 60)
- # databases take time...
- time.sleep(10)
- cnt = 0
- db_init_status = False
- while (cnt < 10):
- mySSH.command('docker logs prod-db-init', '\$', 5)
- result = re.search('OK', mySSH.getBefore())
- if result is not None:
- cnt = 10
- db_init_status = True
- else:
- time.sleep(5)
- cnt += 1
- mySSH.command('docker rm -f prod-db-init', '\$', 5)
- if not db_init_status:
- HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
- HTML.CreateHtmlTabFooter(False)
- logging.error('Cassandra DB deployment/configuration went wrong!')
- return True
-
- # deploying EPC cNFs
- mySSH.command('docker-compose up -d oai_spgwu', '\$', 60)
- if self.isMagmaUsed:
- listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
- expectedHealthyContainers = 6
- else:
- listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
- expectedHealthyContainers = 5
-
- # Checking for additional services
- mySSH.command('docker-compose config', '\$', 5)
- configResponse = mySSH.getBefore()
- if configResponse.count('trf_gen') == 1:
- mySSH.command('docker-compose up -d trf_gen', '\$', 60)
- listOfContainers += ' prod-trf-gen'
- expectedHealthyContainers += 1
-
- mySSH.command('docker-compose config | grep --colour=never image', '\$', 10)
- html_cell = ''
- listOfImages = mySSH.getBefore()
- for imageLine in listOfImages.split('\\r\\n'):
- res1 = re.search('image: (?P[a-zA-Z0-9\-]+):(?P[a-zA-Z0-9\-]+)', str(imageLine))
- res2 = re.search('cassandra|redis', str(imageLine))
- if res1 is not None and res2 is None:
- html_cell += res1.group('name') + ':' + res1.group('tag') + ' '
- nbChars = len(res1.group('name')) + len(res1.group('tag')) + 2
- while (nbChars < 32):
- html_cell += ' '
- nbChars += 1
- mySSH.command('docker image inspect --format="Size = {{.Size}} bytes" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
- res3 = re.search('Size *= *(?P[0-9\-]*) *bytes', mySSH.getBefore())
- if res3 is not None:
- imageSize = int(res3.group('size'))
- imageSize = int(imageSize/(1024*1024))
- html_cell += str(imageSize) + ' MBytes '
- mySSH.command('docker image inspect --format="Date = {{.Created}}" ' + res1.group('name') + ':' + res1.group('tag'), '\$', 10)
- res4 = re.search('Date *= *(?P[0-9\-]*)T', mySSH.getBefore())
- if res4 is not None:
- html_cell += '(' + res4.group('date') + ')'
- html_cell += '\n'
- # Checking if all are healthy
- cnt = 0
- while (cnt < 3):
- mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
- unhealthyNb = mySSH.getBefore().count('unhealthy')
- healthyNb = mySSH.getBefore().count('healthy') - unhealthyNb
- startingNb = mySSH.getBefore().count('starting')
- if healthyNb == expectedHealthyContainers:
- cnt = 10
- else:
- time.sleep(10)
- cnt += 1
- logging.debug(' -- ' + str(healthyNb) + ' healthy container(s)')
- logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
- logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
- if healthyNb == expectedHealthyContainers:
- mySSH.command('docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f \'port 9042 or port 3868\' -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
- if self.isMagmaUsed:
- mySSH.command('docker exec -d prod-magma-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
- else:
- mySSH.command('docker exec -d prod-oai-mme /bin/bash -c "nohup tshark -i any -f \'port 3868 or port 2123 or port 36412\' -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
- mySSH.command('docker exec -d prod-oai-spgwc /bin/bash -c "nohup tshark -i any -f \'port 2123 or port 8805\' -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
- # on SPGW-U, not capturing on SGI to avoid huge file
- mySSH.command('docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f \'port 8805\' -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 10)
- mySSH.close()
- logging.debug('Deployment OK')
- HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [html_cell])
- return True
- else:
- mySSH.close()
- logging.debug('Deployment went wrong')
- HTML.CreateHtmlTestRowQueue(self.Type, 'KO', [html_cell])
- return False
-
- def UndeployEpc(self, HTML):
- logging.debug('Trying to undeploy')
- # No check down, we suppose everything done before.
-
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- # Checking if it is a MAGMA deployment.
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('docker-compose ps -a', '\$', 5)
- self.isMagmaUsed = False
- result = re.search('magma', mySSH.getBefore())
- if result is not None:
- self.isMagmaUsed = True
- logging.debug('MAGMA MME is used!')
- # Recovering logs and pcap files
- mySSH.command('cd ' + self.SourceCodePath + '/logs', '\$', 5)
- mySSH.command('docker exec -it prod-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
- if self.isMagmaUsed:
- mySSH.command('docker exec -it prod-magma-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
- else:
- mySSH.command('docker exec -it prod-oai-mme /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
- mySSH.command('docker exec -it prod-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
- mySSH.command('docker exec -it prod-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT tshark"', '\$', 5)
- mySSH.command('docker logs prod-oai-hss > hss_' + self.testCase_id + '.log', '\$', 5)
- if self.isMagmaUsed:
- mySSH.command('docker cp --follow-link prod-magma-mme:/var/log/mme.log mme_' + self.testCase_id + '.log', '\$', 15)
- else:
- mySSH.command('docker logs prod-oai-mme > mme_' + self.testCase_id + '.log', '\$', 5)
- mySSH.command('docker logs prod-oai-spgwc > spgwc_' + self.testCase_id + '.log', '\$', 5)
- mySSH.command('docker logs prod-oai-spgwu-tiny > spgwu_' + self.testCase_id + '.log', '\$', 5)
- mySSH.command('docker cp prod-oai-hss:/tmp/hss_check_run.pcap hss_' + self.testCase_id + '.pcap', '\$', 60)
- if self.isMagmaUsed:
- mySSH.command('docker cp prod-magma-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
- else:
- mySSH.command('docker cp prod-oai-mme:/tmp/mme_check_run.pcap mme_' + self.testCase_id + '.pcap', '\$', 60)
- mySSH.command('tshark -r mme_' + self.testCase_id + '.pcap | grep -E --colour=never "Tracking area update"', '\$', 60)
- result = re.search('Tracking area update request', mySSH.getBefore())
- if result is not None:
- message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
- else:
- message = 'No Tracking area update request'
- logging.debug(message)
- mySSH.command('docker cp prod-oai-spgwc:/tmp/spgwc_check_run.pcap spgwc_' + self.testCase_id + '.pcap', '\$', 60)
- mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
- # Remove all
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- if self.isMagmaUsed:
- listOfContainers = 'prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis'
- nbContainers = 6
- else:
- listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
- nbContainers = 5
- # Checking for additional services
- mySSH.command('docker-compose config', '\$', 5)
- configResponse = mySSH.getBefore()
- if configResponse.count('trf_gen') == 1:
- listOfContainers += ' prod-trf-gen'
- nbContainers += 1
-
- mySSH.command('docker-compose down -v', '\$', 60)
- mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
- noMoreContainerNb = mySSH.getBefore().count('No such object')
- mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
- noMoreNetworkNb = mySSH.getBefore().count('No such object')
- mySSH.close()
- if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
- logging.debug('Undeployment OK')
- HTML.CreateHtmlTestRowQueue(self.Type, 'OK', [message])
- return True
- else:
- logging.debug('Undeployment went wrong')
- HTML.CreateHtmlTestRowQueue(self.Type, 'KO', [message])
- return False
-
- def LogCollectHSS(self):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('rm -f hss.log.zip', '\$', 5)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker inspect prod-oai-hss', '\$', 10)
- result = re.search('No such object', mySSH.getBefore())
- if result is not None:
- mySSH.command('cd ../logs', '\$', 5)
- mySSH.command('rm -f hss.log.zip', '\$', 5)
- mySSH.command('zip hss.log.zip hss_*.*', '\$', 60)
- mySSH.command('mv hss.log.zip ../scripts', '\$', 60)
- else:
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
- mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- logging.debug('LogCollect is bypassed for that variant')
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- logging.debug('LogCollect is bypassed for that variant')
- elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
- if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('zip hss.log.zip logs/hss*.* *.pcap', '\$', 60)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm -f logs/hss*.* *.pcap', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cp /opt/hss_sim0609/hss.log .', '\$', 60)
- mySSH.command('zip hss.log.zip hss.log', '\$', 60)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
-
- def LogCollectMME(self):
- if self.Type != 'OC-OAI-CN5G':
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('rm -f mme.log.zip', '\$', 5)
- else:
- mySSH = cls_cmd.getConnection(self.IPAddress)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker inspect prod-oai-mme', '\$', 10)
- result = re.search('No such object', mySSH.getBefore())
- if result is not None:
- mySSH.command('cd ../logs', '\$', 5)
- mySSH.command('rm -f mme.log.zip', '\$', 5)
- mySSH.command('zip mme.log.zip mme_*.*', '\$', 60)
- mySSH.command('mv mme.log.zip ../scripts', '\$', 60)
- else:
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
- mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
- mySSH.command('cp -f /tmp/oai-cn5g-v1.5.pcap .','\$', 30)
- mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30)
- mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- mySSH.run('cd ' + self.SourceCodePath + '/logs')
- mySSH.run('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap')
- mySSH.run('mv mme.log.zip ' + self.SourceCodePath + '/scripts')
- elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
- mySSH.command('zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0 amfLog.0 ngapcLog.0 ngapcommonLog.0 ngapsLog.0', '\$', 60)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
-
- def LogCollectSPGW(self):
- mySSH = SSH.SSHConnection()
- mySSH.open(self.IPAddress, self.UserName, self.Password)
- mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
- mySSH.command('rm -f spgw.log.zip', '\$', 5)
- if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
- mySSH.command('docker inspect prod-oai-mme', '\$', 10)
- result = re.search('No such object', mySSH.getBefore())
- if result is not None:
- mySSH.command('cd ../logs', '\$', 5)
- mySSH.command('rm -f spgw.log.zip', '\$', 5)
- mySSH.command('zip spgw.log.zip spgw*.*', '\$', 60)
- mySSH.command('mv spgw.log.zip ../scripts', '\$', 60)
- else:
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/openair-spgwc/spgwc_check_run.log .', '\$', 60)
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/openair-spgwu-tiny/spgwu_check_run.log .', '\$', 60)
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
- mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
- mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
- elif re.match('OAICN5G', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
- mySSH.command('zip spgw.log.zip oai-smf.log oai-spgwu.log','\$', 30)
- mySSH.command('mv spgw.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
- elif re.match('OC-OAI-CN5G', self.Type, re.IGNORECASE):
- mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
- mySSH.command('zip spgw.log.zip oai-smf.log oai-spgwu.log','\$', 30)
- mySSH.command('mv spgw.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
- elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
- mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
- mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
- elif re.match('ltebox', self.Type, re.IGNORECASE):
- mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
- mySSH.command('zip spgw.log.zip xGwLog.0 upfLog.0', '\$', 60)
- else:
- logging.error('This option should not occur!')
- mySSH.close()
diff --git a/ci-scripts/helpreadme.py b/ci-scripts/helpreadme.py
index e1640fc899..6f192acd9c 100644
--- a/ci-scripts/helpreadme.py
+++ b/ci-scripts/helpreadme.py
@@ -42,7 +42,6 @@ def GenericHelp(vers):
print(' TesteNB')
print(' InitiateHtml, FinalizeHtml')
print(' TerminateeNB, TerminateHSS, TerminateMME, TerminateSPGW')
- print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
print(' --local Force local execution: rewrites the test xml script before running to always execute on localhost. Assumes')
print(' images are available locally, will not remove any images and will run inside the current repo directory')
@@ -65,13 +64,6 @@ def OAIUESrvHelp(ipaddr, username, password, sourcepath):
print(' --UEPassword=[UE\'s Login Password] -- ' + password)
print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath)
-def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
- print(' --EPCIPAddress=[EPC\'s IP Address] -- ' + ipaddr)
- print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
- print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
- print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
- print(' --EPCType=[EPC\'s Type: OAI or ltebox or OC-OAI-CN5G] -- ' + epctype)
-
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 472cb2665f..6d5448c4e0 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -45,7 +45,6 @@ import cls_physim1 #class PhySim for physical simulators deploy and run
import cls_cluster # class for building/deploying on cluster
import cls_native # class for all native/source-based operations
-import epc
import ran
import cls_oai_html
@@ -94,7 +93,6 @@ def AssignParams(params_dict):
setattr(HTML, key, value)
def ExecuteActionWithParam(action):
- global EPC
global RAN
global HTML
global CONTAINERS
@@ -180,7 +178,7 @@ def ExecuteActionWithParam(action):
cmd_prefix = test.findtext('cmd_prefix')
if cmd_prefix is not None: RAN.cmd_prefix = cmd_prefix
- success = RAN.InitializeeNB(HTML, EPC)
+ success = RAN.InitializeeNB(HTML)
elif action == 'Terminate_eNB':
eNB_instance=test.findtext('eNB_instance')
@@ -208,7 +206,7 @@ def ExecuteActionWithParam(action):
RAN.air_interface[RAN.eNB_instance] = 'lte-softmodem'
else:
RAN.air_interface[RAN.eNB_instance] = air_interface.lower() +'-softmodem'
- success = RAN.TerminateeNB(HTML, EPC)
+ success = RAN.TerminateeNB(HTML)
elif action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Terminate_UE' or action == 'CheckStatusUE' or action == 'DataEnable_UE' or action == 'DataDisable_UE':
CiTestObj.ue_ids = test.findtext('id').split(' ')
@@ -242,6 +240,9 @@ def ExecuteActionWithParam(action):
CiTestObj.ping_args = test.findtext('ping_args')
CiTestObj.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
CiTestObj.ue_ids = test.findtext('id').split(' ')
+ CiTestObj.svr_id = test.findtext('svr_id') or None
+ if test.findtext('svr_node'):
+ CiTestObj.svr_node = test.findtext('svr_node') if not force_local else 'localhost'
if force_local:
# Change all execution targets to localhost
CiTestObj.nodes = ['localhost'] * len(CiTestObj.ue_ids)
@@ -254,7 +255,7 @@ def ExecuteActionWithParam(action):
else:
CiTestObj.nodes = [None] * len(CiTestObj.ue_ids)
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold') or ''
- success = CiTestObj.Ping(HTML,EPC,CONTAINERS)
+ success = CiTestObj.Ping(HTML, CONTAINERS)
elif action == 'Iperf' or action == 'Iperf2_Unidir':
CiTestObj.iperf_args = test.findtext('iperf_args')
@@ -285,9 +286,9 @@ def ExecuteActionWithParam(action):
logging.error('test-case has wrong option ' + CiTestObj.iperf_options)
CiTestObj.iperf_options = 'check'
if action == 'Iperf':
- success = CiTestObj.Iperf(HTML, EPC, CONTAINERS)
+ success = CiTestObj.Iperf(HTML, CONTAINERS)
elif action == 'Iperf2_Unidir':
- success = CiTestObj.Iperf2_Unidir(HTML, EPC, CONTAINERS)
+ success = CiTestObj.Iperf2_Unidir(HTML, CONTAINERS)
elif action == 'IdleSleep':
st = test.findtext('idle_sleep_time_in_sec') or "5"
@@ -296,47 +297,10 @@ def ExecuteActionWithParam(action):
elif action == 'Deploy_Run_PhySim':
success = PHYSIM.Deploy_PhySim(HTML)
- elif action == 'Initialize_MME':
- string_field = test.findtext('option')
- if (string_field is not None):
- EPC.mmeConfFile = string_field
- success = EPC.InitializeMME(HTML)
-
- elif action == 'Initialize_HSS' or action == 'Initialize_SPGW':
- if action == 'Initialize_HSS':
- success = EPC.InitializeHSS(HTML)
- elif action == 'Initialize_SPGW':
- success = EPC.InitializeSPGW(HTML)
- elif action == 'Terminate_HSS' or action == 'Terminate_MME' or action == 'Terminate_SPGW':
- if action == 'Terminate_HSS':
- success = EPC.TerminateHSS(HTML)
- elif action == 'Terminate_MME':
- success = EPC.TerminateMME(HTML)
- elif action == 'Terminate_SPGW':
- success = EPC.TerminateSPGW(HTML)
-
- elif action == 'Deploy_EPC':
- string_field = test.findtext('parameters')
- if (string_field is not None):
- EPC.yamlPath = string_field
- success = EPC.DeployEpc(HTML)
-
- elif action == 'Undeploy_EPC':
- success = EPC.UndeployEpc(HTML)
-
- elif action == 'Initialize_5GCN':
- string_field = test.findtext('args')
- if (string_field is not None):
- EPC.cfgDeploy = string_field
- EPC.cnID = test.findtext('cn_id')
- success = EPC.Initialize5GCN(HTML)
-
- elif action == 'Terminate_5GCN':
- string_field = test.findtext('args')
- if (string_field is not None):
- EPC.cfgUnDeploy = string_field
- EPC.cnID = test.findtext('cn_id')
- success = EPC.Terminate5GCN(HTML)
+ elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork':
+ cn_id = test.findtext('cn_id')
+ core_op = getattr(cls_oaicitest.OaiCiTest, action)
+ success = core_op(cn_id, HTML)
elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace":
eNB_instance=test.findtext('eNB_instance')
@@ -474,7 +438,6 @@ mode = ''
CiTestObj = cls_oaicitest.OaiCiTest()
-EPC = epc.EPCManagement()
RAN = ran.RANManagement()
HTML = cls_oai_html.HTMLManagement()
CONTAINERS = cls_containerize.Containerize()
@@ -489,7 +452,7 @@ CLUSTER = cls_cluster.Cluster()
import args_parse
# Force local execution, move all execution targets to localhost
force_local = False
-py_param_file_present, py_params, mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)
+py_param_file_present, py_params, mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)
@@ -514,22 +477,13 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
RAN.eNB_instance=0
RAN.eNB_serverId[0]='0'
RAN.eNBSourceCodePath='/tmp/'
- RAN.TerminateeNB(HTML, EPC)
+ RAN.TerminateeNB(HTML)
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.TerminateHSS(HTML)
+ logging.warning("Option TerminateHSS ignored")
elif re.match('^TerminateMME$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.TerminateMME(HTML)
+ logging.warning("Option TerminateMME ignored")
elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath== '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.TerminateSPGW(HTML)
+ 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)
@@ -552,35 +506,17 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
sys.exit(0)
RAN.LogCollecteNB()
elif re.match('^LogCollectHSS$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.LogCollectHSS()
+ logging.warning("Option LogCollectHSS ignored")
elif re.match('^LogCollectMME$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.LogCollectMME()
+ logging.warning("Option LogCollectMME ignored")
elif re.match('^LogCollectSPGW$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- EPC.LogCollectSPGW()
+ logging.warning("Option LogCollectSPGW ignored")
elif re.match('^LogCollectPing$', mode, re.IGNORECASE):
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- CiTestObj.LogCollectPing(EPC)
+ 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):
- if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == '':
- HELP.GenericHelp(CONST.Version)
- sys.exit('Insufficient Parameter')
- CiTestObj.LogCollectOAIUE()
+ logging.warning("Option LogCollectOAIUE ignored")
elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
count = 0
foundCount = 0
@@ -613,10 +549,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
logging.info('\u001B[1m----------------------------------------\u001B[0m')
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 == '':
+ if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
HELP.GenericHelp(CONST.Version)
- if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or EPC.Type == '':
- HELP.EPCSrvHelp(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath, EPC.Type)
if RAN.ranRepository == '':
HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch)
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
@@ -667,9 +601,6 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
else:
logging.error('requested test is invalidly formatted: ' + test)
sys.exit(1)
- if (EPC.IPAddress != '') and (EPC.IPAddress != 'none'):
- EPC.SetMmeIPAddress()
- EPC.SetAmfIPAddress()
#get the list of tests to be done
todo_tests=[]
@@ -694,12 +625,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
continue
CiTestObj.testCase_id = id
HTML.testCase_id=CiTestObj.testCase_id
- EPC.testCase_id=CiTestObj.testCase_id
CiTestObj.desc = test.findtext('desc')
always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes']
HTML.desc=CiTestObj.desc
action = test.findtext('class')
if (CheckClassValidity(xml_class_list, action, id) == False):
+ task_set_succeeded = False
continue
CiTestObj.ShowTestID()
if not task_set_succeeded and not always_exec:
diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py
index 96ec6306e9..6f58478476 100644
--- a/ci-scripts/ran.py
+++ b/ci-scripts/ran.py
@@ -102,7 +102,7 @@ class RANManagement():
# RAN management functions
#-----------------------------------------------------------
- def InitializeeNB(self, HTML, EPC):
+ def InitializeeNB(self, HTML):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
@@ -127,20 +127,6 @@ class RANManagement():
mySSH = SSH.SSHConnection()
cwd = os.getcwd()
- # If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB
- if EPC.IPAddress != "none":
- localEpcIpAddr = EPC.IPAddress
- localEpcUserName = EPC.UserName
- localEpcPassword = EPC.Password
- mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
- eth_interface = 'any'
- fltr = 'sctp'
- logging.debug('\u001B[1m Launching tshark on EPC on interface ' + eth_interface + ' with filter "' + fltr + '"\u001B[0m')
- self.epcPcapFile = 'enb_' + self.testCase_id + '_s1log.pcap'
- mySSH.command('echo ' + localEpcPassword + ' | sudo -S rm -f /tmp/' + self.epcPcapFile , '\$', 5)
- mySSH.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -f "' + fltr + '" -w /tmp/' + self.epcPcapFile + ' > /tmp/tshark.log 2>&1 &', localEpcUserName, 5)
- mySSH.close()
-
mySSH.open(lIpAddr, lUserName, lPassWord)
mySSH.command('cd ' + lSourcePath, '\$', 5)
# Initialize_eNB_args usually start with -O and followed by the location in repository
@@ -166,10 +152,7 @@ class RANManagement():
result = re.search('^rru|^rcc|^du.band', str(config_file))
if result is not None:
rruCheck = True
- # Make a copy and adapt to EPC / eNB IP addresses
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
- localMmeIpAddr = EPC.MmeIPAddress
- mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_GNB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
@@ -225,20 +208,6 @@ class RANManagement():
doLoop = False
logging.error('\u001B[1;37;41m eNB/gNB logging system did not show got sync! \u001B[0m')
HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' -O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
- # In case of T tracer recording, we need to kill tshark on EPC side
- localEpcIpAddr = EPC.IPAddress
- localEpcUserName = EPC.UserName
- localEpcPassword = EPC.Password
- mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
- logging.debug('\u001B[1m Stopping tshark on EPC \u001B[0m')
- mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
- if self.epcPcapFile != '':
- mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
- mySSH.close()
- if self.epcPcapFile != '':
- copyin_res = mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
- if (copyin_res == 0):
- mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
return False
else:
mySSH.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | grep -E --text --color=never -i "wait|sync|Starting|Started"', '\$', 4)
@@ -316,7 +285,7 @@ class RANManagement():
mySSH.close()
return success
- def TerminateeNB(self, HTML, EPC):
+ def TerminateeNB(self, HTML):
if self.eNB_serverId[self.eNB_instance] == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
@@ -359,20 +328,6 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
time.sleep(1)
mySSH.close()
- if EPC.IPAddress != "none" and EPC.IPAddress != '':
- localEpcIpAddr = EPC.IPAddress
- localEpcUserName = EPC.UserName
- localEpcPassword = EPC.Password
- logging.debug('\u001B[1m Stopping tshark on EPC (' + localEpcIpAddr + ') \u001B[0m')
- mySSH.open(localEpcIpAddr, localEpcUserName, localEpcPassword)
- mySSH.command('echo ' + localEpcPassword + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
- time.sleep(1)
- if self.epcPcapFile != '':
- mySSH.command('echo ' + localEpcPassword + ' | sudo -S chmod 666 /tmp/' + self.epcPcapFile, '\$', 5)
- mySSH.copyin(localEpcIpAddr, localEpcUserName, localEpcPassword, '/tmp/' + self.epcPcapFile, '.')
- mySSH.copyout(lIpAddr, lUserName, lPassWord, self.epcPcapFile, lSourcePath + '/cmake_targets/.')
- mySSH.command('killall --signal SIGKILL record', '\$', 5)
- mySSH.close()
# if T tracer was run with option 0 (no logs), analyze logs
# from textlog, otherwise do normal analysis (e.g., option 2)
result = re.search('T_stdout 0', str(self.Initialize_eNB_args))
diff --git a/ci-scripts/run_locally.sh b/ci-scripts/run_locally.sh
index c8e9a289f0..60010ea30a 100755
--- a/ci-scripts/run_locally.sh
+++ b/ci-scripts/run_locally.sh
@@ -29,7 +29,5 @@ docker tag oai-gnb oai-ci/oai-gnb:develop-${SHORT_COMMIT_SHA}
python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
--ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \
- --eNBSourceCodePath=NONE --EPCIPAddress=NONE --EPCType=OAI --eNBPassword=NONE \
- --eNBSourceCodePath=${REPO_PATH} --EPCIPAddress=NONE \
- --EPCUserName=NONE --EPCPassword=NONE --EPCSourceCodePath=NONE \
+ --eNBSourceCodePath=${REPO_PATH} \
--XMLTestFile=xml_files/${TESTCASE} --local
diff --git a/ci-scripts/scripts/magma-epc-deploy.sh b/ci-scripts/scripts/magma-epc-deploy.sh
new file mode 100755
index 0000000000..dd0459ed29
--- /dev/null
+++ b/ci-scripts/scripts/magma-epc-deploy.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+function die() { echo "${@}"; exit 1; }
+
+[ $# -eq 1 ] || die "usage: $0 "
+
+DOCKERFILE="${1}"
+
+function wait_for() {
+ local timeout=${1}
+ local condition=${2}
+ echo "wait up to ${timeout} seconds for condition \"${condition}\""
+ while [ $timeout -gt 0 ]; do
+ eval ${condition} && return
+ sleep 1
+ let timeout=$timeout-1
+ done
+ die "ERROR: timed out waiting for condition \"${condition}\""
+}
+
+# start database
+docker compose -f ${DOCKERFILE} up -d db_init cassandra
+wait_for 30 "docker logs prod-db-init 2> /dev/null | grep OK"
+
+# start EPC
+docker compose -f ${DOCKERFILE} up -d oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen
+wait_for 20 "docker inspect --format='{{.State.Health.Status}}' prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis prod-trf-gen | grep healthy | wc -l | grep 7"
+echo "deployment OK"
diff --git a/ci-scripts/scripts/magma-epc-logcollect.sh b/ci-scripts/scripts/magma-epc-logcollect.sh
new file mode 100755
index 0000000000..d840b094f3
--- /dev/null
+++ b/ci-scripts/scripts/magma-epc-logcollect.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+function die() { echo "${@}"; exit 1; }
+
+[ $# -eq 1 ] || die "usage: $0 "
+
+DIR=${1}
+
+docker logs prod-oai-hss &> ${DIR}/oai-hss.log
+docker logs prod-magma-mme &> ${DIR}/magme-mme.log
+docker logs prod-oai-spgwc &> ${DIR}/oai-spgwc.log
+docker logs prod-oai-spgwu-tiny &> ${DIR}/oai-spgwu.log
diff --git a/ci-scripts/scripts/oc-cn5g-deploy.sh b/ci-scripts/scripts/oc-cn5g-deploy.sh
new file mode 100755
index 0000000000..99ba768898
--- /dev/null
+++ b/ci-scripts/scripts/oc-cn5g-deploy.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+function die() { echo $@; exit 1; }
+[ $# -eq 2 ] || die "usage: $0 "
+
+OC_DIR=${1}
+OC_NS=${2}
+
+cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
+oc project ${OC_NS} > /dev/null
+helm install --wait oai5gcn ${OC_DIR}/ci-scripts/charts/oai-5g-basic/.
+oc logout > /dev/null
diff --git a/ci-scripts/scripts/oc-cn5g-logcollect.sh b/ci-scripts/scripts/oc-cn5g-logcollect.sh
new file mode 100755
index 0000000000..52cc5a8f8d
--- /dev/null
+++ b/ci-scripts/scripts/oc-cn5g-logcollect.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+function die() { echo $@; exit 1; }
+[ $# -eq 3 ] || die "usage: $0 "
+
+OC_DIR=${1}
+OC_NS=${2}
+DIR=${3}
+
+cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
+oc project ${OC_NS} > /dev/null
+oc describe pod > ${DIR}/describe-pods-post-test.log
+oc get pods.metrics.k8s &> ${DIR}/nf-resource-consumption.log
+for p in nrf amf smf upf ausf udm udr; do
+ oc logs -l app.kubernetes.io/name=oai-${p} -c ${p} --tail=-1 > ${DIR}/oai-${p}.log
+done
+oc logs -l app.kubernetes.io/name=mysql --tail=-1 > ${DIR}/mysql.log
+oc logs -l app.kubernetes.io/name=oai-traffic-server --tail=-1 > ${DIR}/oai-traffic-server.log
+oc logout > /dev/null
diff --git a/ci-scripts/scripts/oc-cn5g-undeploy.sh b/ci-scripts/scripts/oc-cn5g-undeploy.sh
new file mode 100755
index 0000000000..e9cf421f6b
--- /dev/null
+++ b/ci-scripts/scripts/oc-cn5g-undeploy.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+function die() { echo $@; exit 1; }
+[ $# -eq 2 ] || die "usage: $0 "
+
+OC_DIR=${1}
+OC_NS=${2}
+
+cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
+oc project ${OC_NS} > /dev/null
+helm uninstall oai5gcn --wait
+oc logout > /dev/null
diff --git a/ci-scripts/tests/README.md b/ci-scripts/tests/README.md
index 364cf031d3..f583c51c08 100644
--- a/ci-scripts/tests/README.md
+++ b/ci-scripts/tests/README.md
@@ -12,6 +12,7 @@ To run individual unit tests, start them like so:
python tests/build.py -v
python tests/cmd.py -v
+ python tests/corenetwork.py -v
python tests/deployment.py -v
python tests/iperf-analysis.py -v
python tests/ping-iperf.py -v
diff --git a/ci-scripts/tests/config/infra_ping_iperf.yaml b/ci-scripts/tests/config/infra_ping_iperf.yaml
new file mode 100644
index 0000000000..ac09c9e412
--- /dev/null
+++ b/ci-scripts/tests/config/infra_ping_iperf.yaml
@@ -0,0 +1,3 @@
+test:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
diff --git a/ci-scripts/tests/config/test_core_infra.yaml b/ci-scripts/tests/config/test_core_infra.yaml
new file mode 100644
index 0000000000..dfa0b4817d
--- /dev/null
+++ b/ci-scripts/tests/config/test_core_infra.yaml
@@ -0,0 +1,46 @@
+test:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
+ Deploy: echo deploy
+ Undeploy: echo undeploy
+ LogCollect: echo logs > %%log_dir%%/logs
+
+test_list:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
+ Deploy:
+ - echo deploy
+ - echo multistep deploy!!
+ Undeploy:
+ - "echo undeploy"
+ - "echo terminated"
+ LogCollect:
+ - echo logs > %%log_dir%%/logs
+ RunIperf3Server: false
+
+test_fail:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
+ Deploy:
+ - echo deploy
+ - "false"
+ - echo multistep deploy!!
+ Undeploy:
+ - "echo undeploy"
+ - "echo terminated"
+ LogCollect:
+ - echo logs > %%log_dir%%/logs
+
+test_script:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
+ Deploy: ! tests/scripts/deploy-core.sh
+ Undeploy: "echo undeploy"
+ LogCollect: echo logs > %%log_dir%%/logs
+
+test_script_fail:
+ Host: localhost
+ NetworkScript: echo "inet 127.0.0.1 mtu 1500"
+ Deploy: ! tests/scripts/deploy-core.sh WILLFAIL
+ Undeploy: "echo undeploy"
+ LogCollect: echo logs > %%log_dir%%/logs
diff --git a/ci-scripts/tests/corenetwork.py b/ci-scripts/tests/corenetwork.py
new file mode 100644
index 0000000000..77e5c7629e
--- /dev/null
+++ b/ci-scripts/tests/corenetwork.py
@@ -0,0 +1,66 @@
+import sys
+import logging
+logging.basicConfig(
+ level=logging.DEBUG,
+ stream=sys.stdout,
+ format="[%(asctime)s] %(levelname)8s: %(message)s"
+)
+import os
+
+import unittest
+
+sys.path.append('./') # to find OAI imports below
+import cls_corenetwork
+import cls_cmd
+
+class TestCoreNetwork(unittest.TestCase):
+ def test_simple_core(self):
+ c = cls_corenetwork.CoreNetwork("test", filename="tests/config/test_core_infra.yaml")
+ success, output = c.deploy()
+ self.assertTrue(success)
+ self.assertEqual(output, "deploy")
+ # should not have it set in config
+ self.assertTrue(c.runIperf3Server())
+ self.assertEqual(c.getIP(), "127.0.0.1")
+ log_files, output = c.undeploy(log_dir="/tmp")
+ self.assertEqual(output, "undeploy")
+ with cls_cmd.LocalCmd() as cmd:
+ # there must be one log file for this (test) core
+ self.assertEqual(len(log_files), 1)
+ # test core writes to %%log_dir%%/logs, which expands to /tmp/logs
+ l = log_files[0]
+ self.assertEqual(l, "/tmp/logs")
+ ret = cmd.run(f"cat {l}")
+ self.assertEqual(ret.returncode, 0) # command must succeed
+ self.assertEqual(ret.stdout, "logs") # output should be "logs"
+
+ def test_core_list(self):
+ c = cls_corenetwork.CoreNetwork("test_list", filename="tests/config/test_core_infra.yaml")
+ success, _ = c.deploy()
+ self.assertTrue(success)
+ self.assertFalse(c.runIperf3Server())
+ c.undeploy(log_dir="/tmp")
+
+ def test_core_fail(self):
+ c = cls_corenetwork.CoreNetwork("test_fail", filename="tests/config/test_core_infra.yaml")
+ success, _ = c.deploy()
+ self.assertFalse(success)
+ # undeployment should still work
+ c.undeploy(log_dir="/tmp")
+
+ def test_core_script(self):
+ c = cls_corenetwork.CoreNetwork("test_script", filename="tests/config/test_core_infra.yaml")
+ success, output = c.deploy()
+ self.assertTrue(success)
+ self.assertEqual(output, "deployment from script")
+ c.undeploy()
+
+ def test_core_script_fail(self):
+ c = cls_corenetwork.CoreNetwork("test_script_fail", filename="tests/config/test_core_infra.yaml")
+ success, output = c.deploy()
+ self.assertFalse(success)
+ self.assertEqual(output, "deployment from script\nfailing")
+ c.undeploy()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/ci-scripts/tests/iperf-analysis.py b/ci-scripts/tests/iperf-analysis.py
index 53d5bdda1d..af261d6e4d 100644
--- a/ci-scripts/tests/iperf-analysis.py
+++ b/ci-scripts/tests/iperf-analysis.py
@@ -73,5 +73,17 @@ class TestIperfAnalysis(unittest.TestCase):
self.assertEqual(msg, "Iperf3 UDP: Log file not present")
self.assertFalse(success)
+ def test_iperf_analyzeV2UDP(self):
+ filename_ok = "tests/log/iperf_udp_v2_ok.log"
+ msg_filename_ok = "tests/log/iperf_udp_v2_ok.txt"
+ target_bitrate = "2.00"
+ bitrate_thresh = 80
+ packetloss_thresh = 25
+ with open(msg_filename_ok, 'r') as file:
+ expected_msg_ok = file.read().strip()
+ success, msg = cls_oaicitest.Iperf_analyzeV2UDP(filename_ok, bitrate_thresh, packetloss_thresh, target_bitrate)
+ self.assertEqual(msg, expected_msg_ok)
+ self.assertTrue(success)
+
if __name__ == '__main__':
unittest.main()
diff --git a/ci-scripts/tests/log/iperf_udp_v2_ok.log b/ci-scripts/tests/log/iperf_udp_v2_ok.log
new file mode 100644
index 0000000000..ce53e36f4f
--- /dev/null
+++ b/ci-scripts/tests/log/iperf_udp_v2_ok.log
@@ -0,0 +1,39 @@
+------------------------------------------------------------
+Server listening on UDP port 5001
+Binding to local address 10.0.2.2
+Receiving 1470 byte datagrams
+UDP buffer size: 208 KByte (default)
+------------------------------------------------------------
+[ 3] local 10.0.2.2 port 5001 connected with 10.0.2.1 port 45771
+[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
+[ 3] 0.0- 1.0 sec 258 KBytes 2.12 Mbits/sec 7.930 ms 0/ 180 (0%)
+[ 3] 1.0- 2.0 sec 257 KBytes 2.11 Mbits/sec 7.839 ms 0/ 179 (0%)
+[ 3] 2.0- 3.0 sec 256 KBytes 2.09 Mbits/sec 7.154 ms 0/ 178 (0%)
+[ 3] 3.0- 4.0 sec 257 KBytes 2.11 Mbits/sec 7.834 ms 0/ 179 (0%)
+[ 3] 4.0- 5.0 sec 258 KBytes 2.12 Mbits/sec 7.943 ms 0/ 180 (0%)
+[ 3] 5.0- 6.0 sec 256 KBytes 2.09 Mbits/sec 6.986 ms 0/ 178 (0%)
+[ 3] 6.0- 7.0 sec 250 KBytes 2.05 Mbits/sec 8.111 ms 0/ 174 (0%)
+[ 3] 7.0- 8.0 sec 257 KBytes 2.11 Mbits/sec 8.026 ms 0/ 179 (0%)
+[ 3] 8.0- 9.0 sec 258 KBytes 2.12 Mbits/sec 7.993 ms 0/ 180 (0%)
+[ 3] 9.0-10.0 sec 258 KBytes 2.12 Mbits/sec 7.997 ms 0/ 180 (0%)
+[ 3] 10.0-11.0 sec 251 KBytes 2.06 Mbits/sec 7.973 ms 0/ 175 (0%)
+[ 3] 11.0-12.0 sec 258 KBytes 2.12 Mbits/sec 7.871 ms 0/ 180 (0%)
+[ 3] 12.0-13.0 sec 257 KBytes 2.11 Mbits/sec 8.005 ms 0/ 179 (0%)
+[ 3] 13.0-14.0 sec 258 KBytes 2.12 Mbits/sec 7.890 ms 0/ 180 (0%)
+[ 3] 14.0-15.0 sec 250 KBytes 2.05 Mbits/sec 8.119 ms 0/ 174 (0%)
+[ 3] 15.0-16.0 sec 260 KBytes 2.13 Mbits/sec 7.940 ms 0/ 181 (0%)
+[ 3] 16.0-17.0 sec 258 KBytes 2.12 Mbits/sec 8.078 ms 0/ 180 (0%)
+[ 3] 17.0-18.0 sec 251 KBytes 2.06 Mbits/sec 7.839 ms 0/ 175 (0%)
+[ 3] 18.0-19.0 sec 257 KBytes 2.11 Mbits/sec 8.033 ms 0/ 179 (0%)
+[ 3] 19.0-20.0 sec 260 KBytes 2.13 Mbits/sec 7.936 ms 0/ 181 (0%)
+[ 3] 20.0-21.0 sec 250 KBytes 2.05 Mbits/sec 8.032 ms 0/ 174 (0%)
+[ 3] 21.0-22.0 sec 260 KBytes 2.13 Mbits/sec 8.089 ms 0/ 181 (0%)
+[ 3] 22.0-23.0 sec 256 KBytes 2.09 Mbits/sec 7.889 ms 0/ 178 (0%)
+[ 3] 23.0-24.0 sec 258 KBytes 2.12 Mbits/sec 8.115 ms 0/ 180 (0%)
+[ 3] 24.0-25.0 sec 253 KBytes 2.07 Mbits/sec 7.976 ms 0/ 176 (0%)
+[ 3] 25.0-26.0 sec 256 KBytes 2.09 Mbits/sec 7.597 ms 0/ 178 (0%)
+[ 3] 26.0-27.0 sec 258 KBytes 2.12 Mbits/sec 7.924 ms 0/ 180 (0%)
+[ 3] 27.0-28.0 sec 254 KBytes 2.08 Mbits/sec 7.957 ms 0/ 177 (0%)
+[ 3] 28.0-29.0 sec 257 KBytes 2.11 Mbits/sec 7.276 ms 0/ 179 (0%)
+[ 3] 29.0-30.0 sec 253 KBytes 2.07 Mbits/sec 21.383 ms 0/ 176 (0%)
+[ 3] 0.0-30.2 sec 7.50 MBytes 2.08 Mbits/sec 21.383 ms 0/ 5350 (0%)
diff --git a/ci-scripts/tests/log/iperf_udp_v2_ok.txt b/ci-scripts/tests/log/iperf_udp_v2_ok.txt
new file mode 100644
index 0000000000..edf56efbde
--- /dev/null
+++ b/ci-scripts/tests/log/iperf_udp_v2_ok.txt
@@ -0,0 +1,5 @@
+Req Bitrate : 2.00
+Bitrate : 2.08
+Bitrate Perf: 104.00 %
+Jitter : 21.383
+Packet Loss : 0.0
diff --git a/ci-scripts/tests/ping-iperf.py b/ci-scripts/tests/ping-iperf.py
index 6ba35d04d3..225fe4e868 100644
--- a/ci-scripts/tests/ping-iperf.py
+++ b/ci-scripts/tests/ping-iperf.py
@@ -14,7 +14,6 @@ sys.path.append('./') # to find OAI imports below
import cls_oai_html
import cls_oaicitest
import cls_containerize
-import epc
class TestPingIperf(unittest.TestCase):
def setUp(self):
@@ -24,17 +23,14 @@ class TestPingIperf(unittest.TestCase):
self.ci.ue_ids = ["test"]
self.ci.nodes = ["localhost"]
self.cont = cls_containerize.Containerize()
- self.epc = epc.EPCManagement()
- self.epc.IPAddress = "localhost"
- self.epc.UserName = None
- self.epc.Password = None
- self.epc.SourceCodePath = os.getcwd()
def test_ping(self):
- self.ci.ping_args = "-c3 127.0.0.1"
+ self.ci.ping_args = "-c3"
self.ci.ping_packetloss_threshold = "0"
+ self.ci.svr_id = "test"
+ infra_file = "tests/config/infra_ping_iperf.yaml"
# TODO Should need nothing but options and UE(s) to use
- success = self.ci.Ping(self.html, self.epc, self.cont)
+ success = self.ci.Ping(self.html, self.cont, infra_file=infra_file)
self.assertTrue(success)
def test_iperf(self):
@@ -47,8 +43,21 @@ class TestPingIperf(unittest.TestCase):
self.ci.iperf_packetloss_threshold = "0"
self.ci.iperf_bitrate_threshold = "0"
self.ci.iperf_profile = "balanced"
+ infra_file = "tests/config/infra_ping_iperf.yaml"
# TODO Should need nothing but options and UE(s) to use
- success = self.ci.Iperf(self.html, self.epc, self.cont)
+ success = self.ci.Iperf(self.html, self.cont, infra_file=infra_file)
+ self.assertTrue(success)
+
+ def test_iperf2_unidir(self):
+ self.ci.iperf_args = "-u -t 5 -b 1M"
+ self.ci.svr_id = "test"
+ self.ci.svr_node = "localhost"
+ self.ci.iperf_packetloss_threshold = "0"
+ self.ci.iperf_bitrate_threshold = "0"
+ self.ci.iperf_profile = "balanced"
+ infra_file = "tests/config/infra_ping_iperf.yaml"
+ # TODO Should need nothing but options and UE(s) to use
+ success = self.ci.Iperf2_Unidir(self.html, self.cont, infra_file=infra_file)
self.assertTrue(success)
if __name__ == '__main__':
diff --git a/ci-scripts/tests/scripts/deploy-core.sh b/ci-scripts/tests/scripts/deploy-core.sh
new file mode 100755
index 0000000000..215ee15f70
--- /dev/null
+++ b/ci-scripts/tests/scripts/deploy-core.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+function die() {
+ echo $@
+ exit 1
+}
+
+echo "deployment from script"
+
+[ $# -gt 0 ] && die "failing"
+
+exit 0
diff --git a/ci-scripts/tests/test-runner/run.sh b/ci-scripts/tests/test-runner/run.sh
index 40d0289453..808bc563a7 100755
--- a/ci-scripts/tests/test-runner/run.sh
+++ b/ci-scripts/tests/test-runner/run.sh
@@ -30,11 +30,6 @@ python3 main.py \
--UEUserName=NONE \
--UEPassword=NONE \
--UESourceCodePath=NONE \
- --EPCIPAddress=localhost \
- --EPCType=OAI \
- --EPCUserName=NONE \
- --EPCPassword=NONE \
- --EPCSourceCodePath=NONE \
--XMLTestFile=tests/test-runner/test.xml
python3 main.py \
diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml
index a526058af0..211e02d4c1 100755
--- a/ci-scripts/xml_class_list.yml
+++ b/ci-scripts/xml_class_list.yml
@@ -15,16 +15,8 @@
- Ping
- Iperf
- Iperf2_Unidir
- - Deploy_EPC
- - Undeploy_EPC
- - Initialize_HSS
- - Terminate_HSS
- - Initialize_MME
- - Terminate_MME
- - Initialize_SPGW
- - Terminate_SPGW
- - Initialize_5GCN
- - Terminate_5GCN
+ - DeployCoreNetwork
+ - UndeployCoreNetwork
- IdleSleep
- Build_Image
- Build_Run_Tests
@@ -32,8 +24,6 @@
- Undeploy_Object
- Cppcheck_Analysis
- Deploy_Run_PhySim
- - DeployGenObject
- - UndeployGenObject
- LicenceAndFormattingCheck
- Push_Local_Registry
- Pull_Local_Registry
diff --git a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
index 6a0e5ae00f..98e0ec7d08 100644
--- a/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
+++ b/ci-scripts/xml_files/container_4g_l2sim_tdd.xml
@@ -101,7 +101,9 @@
Ping trf-gen from LTE-UE 1
l2sim4g_ue
obelix
- -c 20 192.168.61.11
+ l2sim4g_ext_dn
+ obelix
+ -c 20
0
@@ -110,7 +112,9 @@
Ping LTE-UE 1 from trf-gen
l2sim4g_ext_dn
obelix
- -c 20 12.0.0.2
+ l2sim4g_ue
+ obelix
+ -c 20
0
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
index 12f8f13a5b..aa80d4b5dc 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz.xml
@@ -116,7 +116,9 @@
Ping Traffic-Gen from LTE-UE
rfsim4g_ue
cacofonix
- -c 20 192.168.61.11
+ rfsim4g_ext_dn
+ cacofonix
+ -c 20
5
@@ -124,8 +126,10 @@
Ping
Ping LTE-UE from Traffic-Gen
rfsim4g_ext_dn
- -c 20 12.0.0.2
cacofonix
+ rfsim4g_ue
+ cacofonix
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
index 031a308a5c..bfcade47ab 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_05MHz_noS1.xml
@@ -87,7 +87,9 @@
Ping Traffic-Gen from LTE-UE
rfsim4g_ue
cacofonix
- -c 20 10.0.1.1
+ rfsim4g_enb_nos1
+ cacofonix
+ -c 20
5
@@ -96,7 +98,9 @@
Ping LTE-UE from eNB
rfsim4g_enb_nos1
cacofonix
- -c 20 10.0.1.2
+ rfsim4g_ue
+ cacofonix
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
index d56aeb231e..0cf4944a6c 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_10MHz.xml
@@ -116,7 +116,9 @@
Ping Traffic-Gen from LTE-UE
rfsim4g_ue
cacofonix
- -c 20 192.168.61.11
+ rfsim4g_ext_dn
+ cacofonix
+ -c 20
5
@@ -125,7 +127,9 @@
Ping LTE-UE from Traffic-Gen
rfsim4g_ext_dn
cacofonix
- -c 20 12.0.0.2
+ rfsim4g_ue
+ cacofonix
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
index e957417f1c..069db0c585 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_fdd_20MHz.xml
@@ -116,7 +116,9 @@
Ping Traffic-Gen from LTE-UE
rfsim4g_ue
cacofonix
- -c 20 192.168.61.11
+ rfsim4g_ext_dn
+ cacofonix
+ -c 20
5
@@ -125,7 +127,9 @@
Ping LTE-UE from Traffic-Gen
rfsim4g_ext_dn
cacofonix
- -c 20 12.0.0.2
+ rfsim4g_ue
+ cacofonix
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
index e292958576..df44214af9 100644
--- a/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
+++ b/ci-scripts/xml_files/container_4g_rfsim_tdd_05MHz.xml
@@ -109,7 +109,9 @@
Ping Traffic-Gen from LTE-UE
rfsim4g_ue
cacofonix
- -c 20 192.168.61.11
+ rfsim4g_ext_dn
+ cacofonix
+ -c 20
5
@@ -118,7 +120,9 @@
Ping LTE-UE from Traffic-Gen
rfsim4g_ext_dn
cacofonix
- -c 20 12.0.0.2
+ rfsim4g_ue
+ cacofonix
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_5g_e1_rfsim.xml b/ci-scripts/xml_files/container_5g_e1_rfsim.xml
index 8128fca08c..95ae2f7b0a 100644
--- a/ci-scripts/xml_files/container_5g_e1_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_e1_rfsim.xml
@@ -88,7 +88,9 @@
Ping ext-dn from all NR-UEs
rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3
cacofonix cacofonix cacofonix
- -c 20 12.1.1.1 -i0.25
+ rfsim5g_5gc_fixed_ip
+ cacofonix
+ -c 20 -i0.25
5
diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
index a9bd7b761e..f45265db43 100644
--- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml
@@ -117,7 +117,9 @@
Ping ext-dn from all NR-UEs
rfsim5g_ue
cacofonix
- -c 20 192.168.72.135 -i0.25
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i0.25
5
@@ -163,19 +165,12 @@
Ping
- Ping ext-dn from all NR-UEs
+ Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 192.168.72.135 -i0.5 -w25
- 80
-
-
-
- Ping
- Ping ext-dn from all NR-UEs
- rfsim5g_ue
- cacofonix
- -c 5 192.168.72.135 -i0.5 -w25
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i0.5 -w25
80
diff --git a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
index 1c43120131..2c9fd04544 100644
--- a/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_fdd_rfsim.xml
@@ -81,7 +81,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -90,7 +92,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i 0.25
5
diff --git a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml
index ef28c06bbf..d0d3446f41 100644
--- a/ci-scripts/xml_files/container_5g_flexric_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_flexric_rfsim.xml
@@ -134,7 +134,9 @@
Ping ext-dn from both UEs
rfsim5g_ue rfsim5g_ue2
carabe carabe
- -c 20 192.168.70.135
+ oai_ext_dn
+ carabe
+ -c 20
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim.xml b/ci-scripts/xml_files/container_5g_rfsim.xml
index 6388a3fe3e..f20820629b 100644
--- a/ci-scripts/xml_files/container_5g_rfsim.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim.xml
@@ -48,7 +48,7 @@
020005
444444
333333
- 020006
+ 020005
100001
222222
@@ -141,7 +141,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -150,16 +152,20 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i 0.25
5
Ping
Ping ext-dn from Second NR-UE
- rfsim5g_ue
+ rfsim5g_ue2
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -168,7 +174,9 @@
Ping Second NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.3
+ rfsim5g_ue2
+ cacofonix
+ -c 20 -i 0.25
5
@@ -177,16 +185,9 @@
Ping ext-dn from both UEs
rfsim5g_ue rfsim5g_ue2
cacofonix cacofonix
- -c 20 -i 0.25 192.168.72.135
- 5
-
-
-
- Ping
- Ping ext-dn from both UEs
- rfsim5g_ue rfsim5g_ue2
- cacofonix cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -195,7 +196,9 @@
Ping ext-dn from all UEs
rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10
cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix
- -c 20 192.168.72.135 -i 0.25 -s 1016
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25 -s 1016
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
index fe80891678..f4ee341c94 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml
@@ -90,7 +90,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i0.2 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i0.2
5
@@ -99,7 +101,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 12.1.1.2 -i0.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i0.2
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
index 3b7a1d738e..77d39a3c55 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_2x2.xml
@@ -81,7 +81,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -90,7 +92,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i 0.25
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
index 100465614d..cd908d0d82 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_fdd_phytest.xml
@@ -81,7 +81,9 @@
Ping gNB from NR-UE
rfsim5g_ue
cacofonix
- -c20 -i0.2 10.0.1.1
+ rfsim5g_gnb_nos1
+ cacofonix
+ -c20 -i0.2
0
@@ -90,7 +92,9 @@
Ping NR-UE from gNB
rfsim5g_gnb_nos1
cacofonix
- -c20 -i0.2 10.0.1.2
+ rfsim5g_ue
+ cacofonix
+ -c20 -i0.2
0
diff --git a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
index d700862689..db10ff6478 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_fr2_32prb.xml
@@ -73,7 +73,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i0.2 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i0.2
0
@@ -82,7 +84,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 12.1.1.2 -i0.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i0.2
0
diff --git a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
index 5e3c4bedb5..72a6836882 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_ntn_geo.xml
@@ -81,7 +81,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -90,7 +92,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i 0.25
5
diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
index 861158c08f..bf71fc98ab 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml
@@ -80,7 +80,9 @@
Ping gNB from NR-UE
rfsim5g_ue
cacofonix
- -c20 -i0.2 10.0.1.1
+ rfsim5g_gnb_nos1
+ cacofonix
+ -c20 -i0.2
0
@@ -89,7 +91,9 @@
Ping NR-UE from gNB
rfsim5g_gnb_nos1
cacofonix
- -c20 -i0.2 10.0.1.2
+ rfsim5g_ue
+ cacofonix
+ -c20 -i0.2
0
diff --git a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
index ee4c334cee..bedb40799e 100644
--- a/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
+++ b/ci-scripts/xml_files/container_5g_rfsim_u0_25prb.xml
@@ -81,7 +81,9 @@
Ping ext-dn from NR-UE
rfsim5g_ue
cacofonix
- -c 20 -i 0.25 192.168.72.135
+ rfsim5g_ext_dn
+ cacofonix
+ -c 20 -i 0.25
5
@@ -90,7 +92,9 @@
Ping NR-UE from ext-dn
rfsim5g_ext_dn
cacofonix
- -c 20 -i 0.25 12.1.1.2
+ rfsim5g_ue
+ cacofonix
+ -c 20 -i 0.25
5
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
index 01e1cfc4ed..a6d39d3f98 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1.xml
@@ -121,9 +121,10 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
index c13952094f..3e306844de 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
@@ -129,9 +129,10 @@
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
index 4bfcb02258..9d54eceaeb 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_no_rrc_activity.xml
@@ -159,17 +159,19 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1_rrc_inactivity_no_flexran.xm
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
index 6b1afaf079..2889101ee8 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1.xml
@@ -115,9 +115,10 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Ping
ping (10MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
index 1469918617..fb18ce090f 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_cdrx.xml
@@ -108,9 +108,10 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Ping
ping (10MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
index f978d14cf9..5501ad86fb 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_10Mhz_tm1_oaiue.xml
@@ -144,9 +144,10 @@
Ping
ping (10MHz - 20 sec)
- -c 20 192.168.61.200
+ -c 20
5
lte_oai_ue_carabe
+ nano-cn4g
diff --git a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
index a830803f9f..3a64107484 100644
--- a/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_fdd_20Mhz_tm1.xml
@@ -114,9 +114,10 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Ping
ping (20MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
5
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
index dc85ee5813..bb6359d636 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1.xml
@@ -122,9 +122,10 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
25
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
index f5467c2623..0d4d1cae81 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
@@ -129,9 +129,10 @@
Ping
ping (5MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
25
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml b/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml
deleted file mode 100644
index 1a3bfa6692..0000000000
--- a/ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm2.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
- test-tdd-05-tm2
- Test-TDD-05MHz-TM2
- tasks
-
-100000
-111110
-040101
-800813
-030105
-040301 040502 040606 040608 040646 040648 040401 040201
-030205
-200000
-
-
-
-
- Pull_Local_Registry
- Pull Images from Local Registry
- 0
- oai-enb
-
-
- Custom_Command
- Disable Sleep States
- starsky
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- true
- Enable Sleep States
- starsky
- sudo cpupower idle-set -E
-
-
- Create_Workspace
- Create new Workspace for server 0
- 0
- 0
-
-
- Deploy_Object
- Deploy eNB (TDD/Band40/5MHz/B200) in a container
- ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2
- 0
- 0
-
-
-
- IdleSleep
- Sleep
- 5
-
-
-
- Undeploy_Object
- true
- Undeploy eNB
- ci-scripts/yaml_files/lte_b200_tdd_05Mhz_tm2
- 0
- 0
-
-
-
- Initialize_UE
- Initialize UE
- adb_ue_1 adb_ue_2
-
-
- Terminate_UE
- true
- Terminate UE
- adb_ue_1 adb_ue_2
-
-
- Attach_UE
- Attach UE
- adb_ue_1 adb_ue_2
-
-
- Detach_UE
- true
- Detach UE
- adb_ue_1 adb_ue_2
-
-
-
- Ping
- ping (5MHz - 20 sec)
- -c 20 %cn_ip%
- 25
- adb_ue_1 adb_ue_2
-
-
-
- Iperf
- iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced)
- -u -b 6.5M -t 30 -R
- 50
- balanced
- adb_ue_1 adb_ue_2
-
-
-
- Iperf
- iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue)
- -u -b 6.5M -t 30 -R
- 50
- adb_ue_1
-
-
-
- Iperf
- iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(unbalanced)
- -u -b 6.5M -t 30
- 50
- unbalanced
- adb_ue_1 adb_ue_2
-
-
-
- Iperf
- iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)
- -t 30 -R
- adb_ue_1
-
-
-
- Iperf
- iperf (5MHz - DL/TCP)(30 sec)
- -t 30 -R
- adb_ue_1 adb_ue_2
-
-
-
- Iperf
- iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced)
- -u -b 2M -t 30
- 50
- balanced
- adb_ue_1 adb_ue_2
- ltebox-nano
-
-
-
- Iperf
- iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue)
- -u -b 2M -t 30
- 50
- adb_ue_1
- ltebox-nano
-
-
-
- Iperf
- iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)
- -u -b 2M -t 30
- 50
- unbalanced
- adb_ue_1 adb_ue_2
- ltebox-nano
-
-
-
- Iperf
- iperf (5MHz - UL/TCP)(30 sec)(single-ue)
- -t 30
- adb_ue_1
- ltebox-nano
-
-
-
- Iperf
- iperf (5MHz - UL/TCP)(30 sec)
- -t 30
- adb_ue_1 adb_ue_2
- ltebox-nano
-
-
-
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
index 4d34ff1434..e261a3a057 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_10Mhz_tm1.xml
@@ -113,9 +113,10 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml
Ping
ping (10MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
25
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
index 2620296bde..dd8ef337b8 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1.xml
@@ -113,9 +113,10 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
Ping
ping (20MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
25
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
index 5dc0ab9585..1719ad2691 100644
--- a/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
+++ b/ci-scripts/xml_files/container_lte_b200_tdd_20Mhz_tm1_default_scheduler.xml
@@ -114,9 +114,10 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
Ping
ping (20MHz - 20 sec)
- -c 20 %cn_ip%
+ -c 20
25
adb_ue_1 adb_ue_2
+ ltebox-nano
diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
index 5234e2d35c..f127601e39 100644
--- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
+++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm1.xml
@@ -95,7 +95,8 @@
Ping
Ping: 20 pings
up2
- -c 20 %cn_ip%
+ porcepix-cn4g
+ -c 20
1
60
@@ -104,7 +105,8 @@
Ping
Ping: 100 pings, size 1024
up2
- -c 100 -s 1024 -i 0.2 %cn_ip%
+ porcepix-cn4g
+ -c 100 -s 1024 -i 0.2
1
60
diff --git a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
index a02d0c48ef..af3299061a 100644
--- a/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
+++ b/ci-scripts/xml_files/container_lte_n3xx_tdd_2x2_tm2.xml
@@ -95,7 +95,8 @@
Ping
Ping: 20 pings
up2
- -c 20 %cn_ip%
+ porcepix-cn4g
+ -c 20
1
60
@@ -104,7 +105,8 @@
Ping
Ping: 100 pings, size 1024
up2
- -c 100 -s 1024 -i 0.2 %cn_ip%
+ porcepix-cn4g
+ -c 100 -s 1024 -i 0.2
1
60
diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
index 7b43dc609b..035163f3db 100644
--- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml
@@ -168,7 +168,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ ltebox-nepes
+ -c 20
1
15
@@ -177,7 +178,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ ltebox-nepes
+ -c 100 -i 0.2
1
15
@@ -186,7 +188,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ ltebox-nepes
+ -c 20
1
15
@@ -195,7 +198,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ ltebox-nepes
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/container_sa_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_aerial_quectel.xml
index 0b110cab3b..07c0c095a2 100644
--- a/ci-scripts/xml_files/container_sa_aerial_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_aerial_quectel.xml
@@ -42,7 +42,7 @@
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5G Core
oc-cn5g-20897-aerial2
@@ -89,7 +89,8 @@
Ping
Ping: 100pings in 20sec
up2-aerial
- -c 100 -i 0.2 172.21.6.104
+ oc-cn5g-20897-aerial2
+ -c 100 -i 0.2
5
@@ -140,7 +141,7 @@
- Terminate_5GCN
+ UndeployCoreNetwork
true
Terminate 5G Core
oc-cn5g-20897-aerial2
diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml
index 701d4c23d5..7eb6411827 100644
--- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml
+++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml
@@ -225,7 +225,8 @@
Ping
Ping: 50 pings in 10sec, multi-ue
amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15
- -c 50 -i 0.2 %cn_ip%
+ oc-cn5g
+ -c 50 -i 0.2
5
25
@@ -240,7 +241,8 @@
Ping
Ping: 50pings in 10sec, multi-ue
amarisoft_ue_16
- -c 50 -i 0.2 %cn_ip%
+ oc-cn5g
+ -c 50 -i 0.2
5
30
diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
index 9f6a373eca..739534be21 100644
--- a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
+++ b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml
@@ -222,7 +222,8 @@
Ping
Ping: 20pings in 20sec, multi-ue
amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15
- -c 20 %cn_ip%
+ oc-cn5g
+ -c 20
5
25
@@ -237,7 +238,8 @@
Ping
Ping: 50pings in 10sec, multi-ue
amarisoft_ue_16
- -c 50 -i 0.2 %cn_ip%
+ oc-cn5g
+ -c 50 -i 0.2
5
30
diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml
index 51d9c314b4..f4f415acdf 100644
--- a/ci-scripts/xml_files/container_sa_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml
@@ -130,7 +130,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ sabox-nepes
+ -c 20
1
15
@@ -139,7 +140,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ sabox-nepes
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
index f93da0e890..1718eb3152 100644
--- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
@@ -131,7 +131,8 @@
Ping
Ping: 50pings in 10sec
idefix
- -c 20 -i 0.2 %cn_ip%
+ sabox-nepes
+ -c 20 -i 0.2
1
25
diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
index 82f3cc84e5..614b9ac57e 100644
--- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
@@ -143,7 +143,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ sabox-nepes
+ -c 20
1
25
@@ -152,7 +153,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ sabox-nepes
+ -c 100 -i 0.2
1
110
@@ -161,7 +163,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ sabox-nepes
+ -c 20
1
110
@@ -170,7 +173,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ sabox-nepes
+ -c 100 -i 0.2
1
110
diff --git a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml
index 197a75e6b2..e71ec3e37c 100644
--- a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml
+++ b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml
@@ -84,7 +84,8 @@
Ping
Ping: 100 pings in 10 sec
up2-fhi72
- -c 100 -i 0.1 172.21.6.104
+ oc-cn5g-20897
+ -c 100 -i 0.1
1
15
diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
index 927fe1a3e7..28abfb3871 100644
--- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
+++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
@@ -83,7 +83,8 @@
Ping
Ping: 100 pings in 10 sec
up2-fhi72
- -c 100 -i 0.1 172.21.6.104
+ oc-cn5g-20897
+ -c 100 -i 0.1
1
15
diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
index 15a9ad4065..94e97176ff 100644
--- a/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_2X2_100MHz_quectel.xml
@@ -108,7 +108,8 @@
Ping
Ping: 100pings in 20sec
up2
- -c 100 -i 0.2 %cn_ip%
+ matix-cn5g
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
index 52b05df661..a701fc5ab9 100644
--- a/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_2X2_60MHz_quectel.xml
@@ -108,7 +108,8 @@
Ping
Ping: 100pings in 20sec
up2
- -c 100 -i 0.2 %cn_ip%
+ matix-cn5g
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
index 9ec5b37245..7f5a926948 100644
--- a/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_n310_4X4_60MHz_quectel.xml
@@ -108,7 +108,8 @@
Ping
Ping: 100pings in 20sec
up2
- -c 100 -i 0.2 %cn_ip%
+ matix-cn5g
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/container_sa_n310_nrue.xml b/ci-scripts/xml_files/container_sa_n310_nrue.xml
index e6b1ba1643..7d093be3d7 100644
--- a/ci-scripts/xml_files/container_sa_n310_nrue.xml
+++ b/ci-scripts/xml_files/container_sa_n310_nrue.xml
@@ -127,7 +127,8 @@
Ping
Ping: 20pings in 20sec
oai_ue_caracal
- -c 20 %cn_ip%
+ oc-cn5g
+ -c 20
1
25
@@ -136,7 +137,8 @@
Ping
Ping: 100pings in 20sec
oai_ue_caracal
- -c 100 -i 0.2 %cn_ip%
+ oc-cn5g
+ -c 100 -i 0.2
1
30
diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
index 0c76a17eb9..f72dafee06 100644
--- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
+++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml
@@ -124,7 +124,8 @@
Ping
Ping: 20pings in 20sec
idefix
- -c 20 %cn_ip%
+ sabox-nepes
+ -c 20
1
15
@@ -133,7 +134,8 @@
Ping
Ping: 100pings in 20sec
idefix
- -c 100 -i 0.2 %cn_ip%
+ sabox-nepes
+ -c 100 -i 0.2
1
15
diff --git a/ci-scripts/xml_files/fr1_5gc_closure.xml b/ci-scripts/xml_files/fr1_5gc_closure.xml
index e5e57fa694..fa524a60aa 100644
--- a/ci-scripts/xml_files/fr1_5gc_closure.xml
+++ b/ci-scripts/xml_files/fr1_5gc_closure.xml
@@ -30,8 +30,9 @@
- Terminate_5GCN
+ UndeployCoreNetwork
Terminate 5GC
+ sabox-nepes
diff --git a/ci-scripts/xml_files/fr1_5gc_start.xml b/ci-scripts/xml_files/fr1_5gc_start.xml
index 8758b761cd..14bb55f612 100644
--- a/ci-scripts/xml_files/fr1_5gc_start.xml
+++ b/ci-scripts/xml_files/fr1_5gc_start.xml
@@ -31,8 +31,9 @@
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5GC
+ sabox-nepes
diff --git a/ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml b/ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml
index 0ea2311a1f..3561d11fc9 100644
--- a/ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml
+++ b/ci-scripts/xml_files/fr1_cn5g_basic_deploy.xml
@@ -26,20 +26,13 @@
log-in
000100
- 000200
- Terminate_5GCN
- Terminate 5G Core
- --type stop-basic
-
-
-
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5G Core
- --type start-basic
+ matix-cn5g
diff --git a/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml b/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml
index 190b58ac1b..56d7cf74c0 100644
--- a/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml
+++ b/ci-scripts/xml_files/fr1_cn5g_basic_undeploy.xml
@@ -31,9 +31,9 @@
- Terminate_5GCN
+ UndeployCoreNetwork
Terminate 5G Core
- --type stop-basic
+ matix-cn5g
diff --git a/ci-scripts/xml_files/fr1_epc_closure.xml b/ci-scripts/xml_files/fr1_epc_closure.xml
index 2fd8031936..8f0349073c 100644
--- a/ci-scripts/xml_files/fr1_epc_closure.xml
+++ b/ci-scripts/xml_files/fr1_epc_closure.xml
@@ -25,23 +25,14 @@
EPC-Closure
log-out
-060000 060001 060002
+060000
- Terminate_HSS
- Terminate HSS
-
-
-
- Terminate_MME
- Terminate MME
-
-
-
- Terminate_SPGW
- Terminate SPGW
+ UndeployCoreNetwork
+ Terminate EPC
+ ltebox-nano
diff --git a/ci-scripts/xml_files/fr1_epc_start.xml b/ci-scripts/xml_files/fr1_epc_start.xml
index 5cef2b5a6a..0efaca6d57 100644
--- a/ci-scripts/xml_files/fr1_epc_start.xml
+++ b/ci-scripts/xml_files/fr1_epc_start.xml
@@ -25,24 +25,15 @@
EPC-Start
log-in
- 000100 000101 000102
+ 000100
- Initialize_HSS
- Initialize HSS
-
-
-
- Initialize_MME
- Initialize MME
-
-
-
- Initialize_SPGW
- Initialize SPGW
+ DeployCoreNetwork
+ Initialize EPC
+ ltebox-nano
diff --git a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml b/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml
deleted file mode 100644
index adef26b7c6..0000000000
--- a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
- TEST-NSA-FR1-TM2-Tab1
- NSA 2x2 Ping DL UL with QUECTEL
- tasks
-
- 100000
- 700000
- 010002
- 300000
- 030000
- 040000
- 000002
- 010000 010010
- 000001
- 050000
- 050001
- 000002
- 070000
- 070001
- 070002
- 000001
- 010011 010002
- 080001
- 080000
- 200000
- 800000
-
-
-
-
- Custom_Command
- Disable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- true
- Enable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -E
-
-
- Custom_Command
- Disable Sleep States (asterix)
- asterix
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- true
- Enable Sleep States (asterix)
- asterix
- sudo cpupower idle-set -E
-
-
-
- Initialize_UE
- Initialize Quectel
- nrmodule2_quectel
-
-
- Terminate_UE
- true
- Terminate Quectel
- nrmodule2_quectel
-
-
- Attach_UE
- Attach Quectel
- nrmodule2_quectel
-
-
- Detach_UE
- true
- Detach Quectel
- nrmodule2_quectel
-
-
-
-
- Initialize_eNB
- Initialize eNB
- -O ci-scripts/conf_files/enb.band38.nsa_2x2.100prb.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6 --log_config.global_log_options level,nocolor,time,line_num,function
- 0
- 0
- lte
- 172.21.19.13
-
-
-
-
- Initialize_eNB
- Initialize gNB
- -O ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf --nsa -q --usrp-tx-thread-config 1 --T_stdout 2 --log_config.global_log_options level,nocolor,time,line_num,function
- 1
- 1
- nr
- datalog_rt_stats.2x2.yaml
- 172.21.19.14
-
-
- Custom_Command
- Reboot USRP
- asterix
- ssh root@172.21.19.14 reboot ; sleep 45
-
-
- IdleSleep
- Sleep
- 60
-
-
-
- IdleSleep
- Sleep
- 20
-
-
-
-
- Ping
- Ping: 20pings in 20sec
- nrmodule2_quectel
- -c 20 %cn_ip%
- 5
-
-
-
- Ping
- Ping: 100pings in 20sec
- nrmodule2_quectel
- -c 100 -i 0,2 %cn_ip%
- 5
-
-
-
- Iperf
- iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)
- -u -b 125M -t 60 -R
- nrmodule2_quectel
- 15
- 85
-
-
-
- Iperf
- iperf (UL/1Mbps/UDP)(20 sec)(single-ue profile)
- -u -b 3M -t 60
- nrmodule2_quectel
- 5
-
-
-
- Iperf
- iperf (BIDIR TCP)(10 sec)(single-ue profile)
- -t 10 --bidir
- nrmodule2_quectel
-
-
-
-
-
- Terminate_eNB
- true
- Terminate eNB
- 0
- 0
- lte
-
-
-
- Terminate_eNB
- true
- Terminate gNB
- 1
- 1
- nr
-
-
-
-
diff --git a/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml
deleted file mode 100644
index f59f883319..0000000000
--- a/ci-scripts/xml_files/fr1_nsa_2x2_quectel_attach_detach.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
- TEST-NSA-FR1-TM2-Tab2
- NSA 2x2 Attach-Detach with QUECTEL
- tasks
-
- 100000
- 300000
- 010002
- 031000
- 041000
- 000002
- 010000
- 000001
- 050000
- 000002
- 010004
- 000002
- 010003
- 000001
- 050000
- 000002
- 010004
- 000002
- 010003
- 000001
- 050000
- 000002
- 010002
- 080001
- 080000
- 200000
- 400000
-
-
-
-
- Initialize_UE
- Initialize Quectel
- nrmodule2_quectel
-
-
- Terminate_UE
- true
- Terminate Quectel
- nrmodule2_quectel
-
-
- Attach_UE
- Attach Quectel
- nrmodule2_quectel
-
-
- Detach_UE
- Detach Quectel
- nrmodule2_quectel
-
-
-
- Custom_Command
- Disable Sleep States (asterix)
- asterix
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- true
- Enable Sleep States (asterix)
- asterix
- sudo cpupower idle-set -E
-
-
- Custom_Command
- Disable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- true
- Enable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -E
-
-
-
- Initialize_eNB
- Initialize eNB
- -O ci-scripts/conf_files/enb.band38.nsa_2x2.100prb.usrpn310.conf --usrp-tx-thread-config 1 --thread-pool 0,2,4,6 --log_config.global_log_options level,nocolor,time,line_num,function
- 0
- 0
- lte
- 172.21.19.13
-
-
-
-
- Initialize_eNB
- Initialize gNB
- -O ci-scripts/conf_files/gnb.nsa.band78.106prb.usrpn310.2x2.conf --nsa -q --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time,line_num,function
- 1
- 1
- nr
- datalog_rt_stats.2x2.yaml
- 172.21.19.14
-
-
-
- IdleSleep
- Sleep
- 60
-
-
-
- IdleSleep
- Sleep
- 20
-
-
-
-
- Ping
- Ping: 20pings in 20sec
- nrmodule2_quectel
- -c 20 %cn_ip%
- 5
-
-
-
-
-
- Terminate_eNB
- true
- Terminate eNB
- 0
- 0
- lte
-
-
-
- Terminate_eNB
- true
- Terminate gNB
- 1
- 1
- nr
-
-
-
-
diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml
deleted file mode 100644
index 7f824010d9..0000000000
--- a/ci-scripts/xml_files/fr1_nsa_quectel.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
- TEST-NSA-FR1-TM1
- NSA Ping DL UL with QUECTEL
- tasks
-
- 100000
- 200000
- 400000
- 010002
- 030000
- 040000
- 000002
- 010000
- 010010
- 000001
- 050000
- 050001
- 000001
- 070000
- 070001
- 000001
- 050000
- 050001
- 010011
- 010002
- 080001
- 080000
- 300000
- 500000
-
-
-
-
- Custom_Command
- To reset USRP
- obelix
- sudo -S b2xx_fx3_utils --reset-device
-
-
-
- Custom_Command
- Disable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- Enable Sleep States (obelix)
- obelix
- sudo cpupower idle-set -E
-
-
- Custom_Command
- Disable Sleep States (nepes)
- nepes
- sudo cpupower idle-set -D 0
-
-
- Custom_Command
- Enable Sleep States (nepes)
- nepes
- sudo cpupower idle-set -E
-
-
-
- Initialize_UE
- Initialize Quectel
- idefix
-
-
- Terminate_UE
- true
- Terminate Quectel
- idefix
-
-
- Attach_UE
- Attach Quectel
- idefix
-
-
- Detach_UE
- true
- Detach Quectel
- idefix
-
-
-
- Initialize_eNB
- Initialize eNB
- -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time,line_num,function
- 0
- 0
- lte
-
-
-
- Initialize_eNB
- Initialize gNB
- -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --RUs.[0].sdr_addrs "serial=30C51D4" --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
- 1
- 1
- nr
-
-
-
- IdleSleep
- Sleep
- 5
-
-
-
- IdleSleep
- Sleep
- 20
-
-
-
- Ping
- Ping: 20pings in 20sec
- idefix
- -c 20 %cn_ip%
- 1
- 15
-
-
-
- Ping
- Ping: 100pings in 20sec
- idefix
- -c 100 -i 0.2 %cn_ip%
- 1
- 15
-
-
-
- Iperf
- iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)
- -u -b 125M -t 60 -R
- idefix
- 25
- 80
-
-
-
- Iperf
- iperf (UL/8Mbps/UDP)(60 sec)(single-ue profile)
- -u -b 8M -t 60
- idefix
- 1
- 95
-
-
-
- Terminate_eNB
- true
- Terminate eNB
- 0
- 0
- lte
-
-
-
- Terminate_eNB
- true
- Terminate gNB
- 1
- 1
- nr
-
-
-
-
diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml
deleted file mode 100644
index faa365a105..0000000000
--- a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
- TEST-NSA-FR1-TM1
- NSA Ping Attach Detach with QUECTEL
- tasks
-
- 030000
- 040000
- 000002
- 010000
- 000001
- 050000
- 000001
- 010004
- 000001
- 010003
- 000001
- 050000
- 000001
- 010004
- 000001
- 010003
- 000001
- 050000
- 000001
- 010002
- 080001
- 080000
-
-
-
-
- Initialize_UE
- Initialize Quectel
- idefix
-
-
- Terminate_UE
- true
- Terminate Quectel
- idefix
-
-
- Attach_UE
- Attach Quectel
- idefix
-
-
- Detach_UE
- Detach Quectel
- idefix
-
-
-
- Initialize_eNB
- Initialize eNB
- -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time,line_num,function
- 0
- 0
- lte
-
-
-
-
- Initialize_eNB
- Initialize gNB
- -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --log_config.global_log_options level,nocolor,time,line_num,function
- 1
- 1
- nr
-
-
-
- IdleSleep
- Sleep
- 5
-
-
-
- IdleSleep
- Sleep
- 20
-
-
-
-
- Ping
- Ping: 20pings in 20sec
- idefix
- -c 20 %cn_ip%
- 50
-
-
-
- Ping
- Ping: 100pings in 20sec
- idefix
- -c 100 -i 0.2 %cn_ip%
- 50
-
-
-
- Iperf
- iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile)
- -u -b 20M -t 60 -R
- idefix
- 50
-
-
-
- Iperf
- iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)
- -u -b 3M -t 60
- idefix
- 50
-
-
-
-
- Terminate_eNB
- true
- Terminate eNB
- 0
- 0
- lte
-
-
-
- Terminate_eNB
- true
- Terminate gNB
- 1
- 1
- nr
-
-
-
-
diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_long.xml b/ci-scripts/xml_files/fr1_nsa_quectel_long.xml
deleted file mode 100644
index 7687363d78..0000000000
--- a/ci-scripts/xml_files/fr1_nsa_quectel_long.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-
-
- TEST-NSA-FR1-TM1
- NSA Ping DL UL with QUECTEL (Longer)
- tasks
-
- 030000
- 040000
- 000002
- 010000 010010
- 000001
- 050000
- 050001
- 000001
- 070000
- 000001
- 070001
- 000001
- 010011
- 010002
- 080001
- 080000
-
-
-
-
- Initialize_UE
- Initialize Quectel
- idefix
-
-
-
-
- Terminate_UE
- true
- Terminate Quectel
- idefix
-
-
- Attach_UE
- Attach Quectel
- idefix
-
-
- Detach_UE
- true
- Detach Quectel
- idefix
-
-
-
-
- Initialize_eNB
- Initialize eNB
- -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf --log_config.global_log_options level,nocolor,time,line_num,function
- 0
- 0
- lte
-
-
-
-
- Initialize_eNB
- Initialize gNB
- -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --log_config.global_log_options level,nocolor,time,line_num,function
- 1
- 1
- nr
-
-
-
- IdleSleep
- Sleep
- 5
-
-
-
- IdleSleep
- Sleep
- 20
-
-
-
-
- Ping
- Ping: 20pings in 20sec
- idefix
- -c 20 %cn_ip%
- 50
-
-
-
- Ping
- Ping: 100pings in 20sec
- idefix
- -c 100 -i 0.2 %cn_ip%
- 50
-
-
-
- Iperf
- iperf (DL/20Mbps/UDP)(600 sec)(single-ue profile)
- -u -b 20M -t 600 -R
- idefix
- 50
-
-
-
- Iperf
- iperf (UL/3Mbps/UDP)(600 sec)(single-ue profile)
- -u -b 3M -t 600
- idefix
- 50
-
-
-
-
- Terminate_eNB
- true
- Terminate eNB
- 0
- 0
- lte
-
-
-
- Terminate_eNB
- true
- Terminate gNB
- 1
- 1
- nr
-
-
-
-
diff --git a/ci-scripts/xml_files/fr1_oai_cn_deploy.xml b/ci-scripts/xml_files/fr1_oai_cn_deploy.xml
index 26dbebc329..9cfec6ef58 100644
--- a/ci-scripts/xml_files/fr1_oai_cn_deploy.xml
+++ b/ci-scripts/xml_files/fr1_oai_cn_deploy.xml
@@ -31,9 +31,9 @@
- Deploy_EPC
- Deploy all EPC containers
- yaml_files/magma_nsa_20897
+ DeployCoreNetwork
+ Deploy EPC
+ porcepix-cn4g
diff --git a/ci-scripts/xml_files/fr1_oai_cn_undeploy.xml b/ci-scripts/xml_files/fr1_oai_cn_undeploy.xml
index 76192efea1..1be07ec180 100644
--- a/ci-scripts/xml_files/fr1_oai_cn_undeploy.xml
+++ b/ci-scripts/xml_files/fr1_oai_cn_undeploy.xml
@@ -31,8 +31,9 @@
- Undeploy_EPC
- Undeploy all EPC containers
+ UndeployCoreNetwork
+ Undeploy EPC
+ porcepix-cn4g
diff --git a/ci-scripts/xml_files/lte_oai_cn_deploy.xml b/ci-scripts/xml_files/lte_oai_cn_deploy.xml
index 0279c1f3b3..3e4ea86e61 100644
--- a/ci-scripts/xml_files/lte_oai_cn_deploy.xml
+++ b/ci-scripts/xml_files/lte_oai_cn_deploy.xml
@@ -31,9 +31,9 @@
- Deploy_EPC
- Deploy all EPC containers
- yaml_files/magma_lte_20892
+ DeployCoreNetwork
+ Deploy EPC
+ nano-cn4g
diff --git a/ci-scripts/xml_files/lte_oai_cn_undeploy.xml b/ci-scripts/xml_files/lte_oai_cn_undeploy.xml
index 76192efea1..b81aa01a1f 100644
--- a/ci-scripts/xml_files/lte_oai_cn_undeploy.xml
+++ b/ci-scripts/xml_files/lte_oai_cn_undeploy.xml
@@ -31,8 +31,9 @@
- Undeploy_EPC
- Undeploy all EPC containers
+ UndeployCoreNetwork
+ Undeploy EPC
+ nano-cn4g
diff --git a/ci-scripts/xml_files/nsa_epc_closure.xml b/ci-scripts/xml_files/nsa_epc_closure.xml
index 2fd8031936..23181ec674 100644
--- a/ci-scripts/xml_files/nsa_epc_closure.xml
+++ b/ci-scripts/xml_files/nsa_epc_closure.xml
@@ -25,23 +25,14 @@
EPC-Closure
log-out
-060000 060001 060002
+060000
- Terminate_HSS
- Terminate HSS
-
-
-
- Terminate_MME
- Terminate MME
-
-
-
- Terminate_SPGW
- Terminate SPGW
+ UndeployCoreNetwork
+ Terminate EPC
+ ltebox-nepes
diff --git a/ci-scripts/xml_files/nsa_epc_start.xml b/ci-scripts/xml_files/nsa_epc_start.xml
index 5cef2b5a6a..89761ddb74 100644
--- a/ci-scripts/xml_files/nsa_epc_start.xml
+++ b/ci-scripts/xml_files/nsa_epc_start.xml
@@ -25,24 +25,15 @@
EPC-Start
log-in
- 000100 000101 000102
+ 000100
- Initialize_HSS
- Initialize HSS
-
-
-
- Initialize_MME
- Initialize MME
-
-
-
- Initialize_SPGW
- Initialize SPGW
+ DeployCoreNetwork
+ Start EPC
+ ltebox-nepes
diff --git a/ci-scripts/xml_files/sa_cn5g_20897_closure.xml b/ci-scripts/xml_files/sa_cn5g_20897_closure.xml
index 685775c1a4..eeab1b32dc 100644
--- a/ci-scripts/xml_files/sa_cn5g_20897_closure.xml
+++ b/ci-scripts/xml_files/sa_cn5g_20897_closure.xml
@@ -30,7 +30,7 @@
- Terminate_5GCN
+ UndeployCoreNetwork
Terminate 5G Core
oc-cn5g-20897
diff --git a/ci-scripts/xml_files/sa_cn5g_20897_start.xml b/ci-scripts/xml_files/sa_cn5g_20897_start.xml
index 2d60baedc1..9c29b83563 100644
--- a/ci-scripts/xml_files/sa_cn5g_20897_start.xml
+++ b/ci-scripts/xml_files/sa_cn5g_20897_start.xml
@@ -31,7 +31,7 @@
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5G Core
oc-cn5g-20897
diff --git a/ci-scripts/xml_files/sa_cn5g_asue_closure.xml b/ci-scripts/xml_files/sa_cn5g_asue_closure.xml
deleted file mode 100644
index f0448d528d..0000000000
--- a/ci-scripts/xml_files/sa_cn5g_asue_closure.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
- cn5g-closure
- CN5G-Closure
- log-out
-
-060000
-
-
-
-
- Terminate_5GCN
- Terminate 5G Core
- --type stop-mini-as-ue --scenario 1
-
-
-
diff --git a/ci-scripts/xml_files/sa_cn5g_closure.xml b/ci-scripts/xml_files/sa_cn5g_closure.xml
index 727e208d4c..beb490dbed 100644
--- a/ci-scripts/xml_files/sa_cn5g_closure.xml
+++ b/ci-scripts/xml_files/sa_cn5g_closure.xml
@@ -30,7 +30,7 @@
- Terminate_5GCN
+ UndeployCoreNetwork
Terminate 5G Core
oc-cn5g
diff --git a/ci-scripts/xml_files/sa_cn5g_start.xml b/ci-scripts/xml_files/sa_cn5g_start.xml
index 3de615330a..a49a2cda18 100644
--- a/ci-scripts/xml_files/sa_cn5g_start.xml
+++ b/ci-scripts/xml_files/sa_cn5g_start.xml
@@ -31,7 +31,7 @@
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5G Core
oc-cn5g
diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml
index 3de615330a..a49a2cda18 100644
--- a/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml
+++ b/ci-scripts/xml_files/sa_oaiue_cn5g_deploy.xml
@@ -31,7 +31,7 @@
- Initialize_5GCN
+ DeployCoreNetwork
Initialize 5G Core
oc-cn5g
diff --git a/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml b/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml
index 727e208d4c..beb490dbed 100644
--- a/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml
+++ b/ci-scripts/xml_files/sa_oaiue_cn5g_undeploy.xml
@@ -30,7 +30,7 @@
- Terminate_5GCN
+ UndeployCoreNetwork
Terminate 5G Core
oc-cn5g
diff --git a/ci-scripts/xml_files/test_case_list_template.xml b/ci-scripts/xml_files/test_case_list_template.xml
index fddf8ad0e4..bcc8f94c09 100644
--- a/ci-scripts/xml_files/test_case_list_template.xml
+++ b/ci-scripts/xml_files/test_case_list_template.xml
@@ -102,36 +102,4 @@
Detach UE
-
-
-
- Initialize_HSS
- Initialize HSS
-
-
-
- Terminate_HSS
- Terminate HSS
-
-
-
- Initialize_MME
- Initialize MME
-
-
-
- Terminate_MME
- Terminate MME
-
-
-
- Initialize_SPGW
- Initialize SPGW
-
-
-
- Terminate_SPGW
- Terminate SPGW
-
-
diff --git a/ci-scripts/yaml_files/magma_nsa_20897/oai_db.cql b/ci-scripts/yaml_files/magma_nsa_20897/oai_db.cql
new file mode 100644
index 0000000000..2be0a8e2e9
--- /dev/null
+++ b/ci-scripts/yaml_files/magma_nsa_20897/oai_db.cql
@@ -0,0 +1,93 @@
+CREATE KEYSPACE IF NOT EXISTS vhss WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '1'};
+
+CREATE TABLE IF NOT EXISTS vhss.users_imsi (
+ imsi text PRIMARY KEY,
+ access_restriction int,
+ idmmeidentity int,
+ imei text,
+ imei_sv text,
+ key text,
+ lipa_permissions text,
+ mme_cap int,
+ mmehost text,
+ mmeidentity_idmmeidentity int,
+ mmerealm text,
+ ms_ps_status text,
+ msisdn bigint,
+ niddvalidity text,
+ nir_dest_host text,
+ nir_dest_realm text,
+ opc text,
+ pgw_id int,
+ rand text,
+ rfsp_index varint,
+ sqn bigint,
+ subscription_data text,
+ ue_reachability varint,
+ urrp_mme varint,
+ user_identifier text,
+ visited_plmnid text);
+
+CREATE TABLE IF NOT EXISTS vhss.msisdn_imsi (
+ msisdn bigint PRIMARY KEY,
+ imsi text
+);
+
+CREATE TABLE IF NOT EXISTS vhss.global_ids (
+ table_name text PRIMARY KEY,
+ id counter);
+
+CREATE TABLE IF NOT EXISTS vhss.mmeidentity_host (
+ mmehost text PRIMARY KEY,
+ idmmeidentity int,
+ mmerealm text,
+ ue_reachability varint,
+ mmeisdn text);
+
+CREATE TABLE IF NOT EXISTS vhss.mmeidentity (
+ idmmeidentity int PRIMARY KEY,
+ mmehost text,
+ mmerealm text,
+ ue_reachability varint,
+ mmeisdn text);
+
+CREATE TABLE IF NOT EXISTS vhss.events (
+ scef_id text,
+ scef_ref_id bigint,
+ extid text,
+ monitoring_event_configuration text,
+ monitoring_type int,
+ msisdn bigint,
+ user_identifier text,
+ primary key (scef_id, scef_ref_id)
+);
+
+CREATE TABLE IF NOT EXISTS vhss.events_msisdn (
+ msisdn bigint,
+ scef_id text,
+ scef_ref_id bigint,
+ primary key (msisdn, scef_id, scef_ref_id)
+);
+
+CREATE TABLE IF NOT EXISTS vhss.events_extid (
+ extid text,
+ scef_id text,
+ scef_ref_id bigint,
+ primary key (extid, scef_id, scef_ref_id)
+);
+
+CREATE TABLE IF NOT EXISTS vhss.extid (
+ extid text primary key
+);
+
+CREATE TABLE IF NOT EXISTS vhss.extid_imsi (
+ extid text,
+ imsi text,
+ primary key (extid, imsi)
+);
+
+CREATE TABLE IF NOT EXISTS vhss.extid_imsi_xref (
+ imsi text,
+ extid text,
+ primary key (imsi, extid)
+);
diff --git a/common/platform_types.h b/common/platform_types.h
index b44efb6c7e..8cbd502fda 100644
--- a/common/platform_types.h
+++ b/common/platform_types.h
@@ -69,6 +69,11 @@ typedef bool sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO false
#define SL_DISCOVERY_FLAG_YES true
+typedef enum {
+ TDD = 1,
+ FDD = 0
+} frame_type_t;
+
typedef enum link_direction_e { UNKNOWN_DIR = 0, DIR_UPLINK = 1, DIR_DOWNLINK = 2 } link_direction_t;
typedef enum rb_type_e { UNKNOWN_RADIO_BEARER = 0, SIGNALLING_RADIO_BEARER = 1, RADIO_ACCESS_BEARER = 2 } rb_type_t;
diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c
index f389fbf33b..69e095878f 100644
--- a/common/utils/nr/nr_common.c
+++ b/common/utils/nr/nr_common.c
@@ -33,8 +33,9 @@
#include
#include "assertions.h"
#include "common/utils/assertions.h"
+#include "common/utils/LOG/log.h"
#include "nr_common.h"
-#include
+#include
#define C_SRS_NUMBER (64)
#define B_SRS_NUMBER (4)
@@ -124,36 +125,6 @@ static const uint8_t bit_reverse_table_256[] = {
0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF};
-simde__m128i byte2bit16_lut[256];
-void init_byte2bit16(void)
-{
- for (int s = 0; s < 256; s++) {
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], s & 1, 0);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 1) & 1, 1);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 2) & 1, 2);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 3) & 1, 3);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 4) & 1, 4);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 5) & 1, 5);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 6) & 1, 6);
- byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 7) & 1, 7);
- }
-}
-
-simde__m128i byte2m128i[256];
-void init_byte2m128i(void) {
-
- for (int s=0;s<256;s++) {
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*(s&1)),0);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>1)&1)),1);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>2)&1)),2);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>3)&1)),3);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>4)&1)),4);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>5)&1)),5);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>6)&1)),6);
- byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>7)&1)),7);
- }
-}
-
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
{
DevAssert(in != NULL);
@@ -1349,20 +1320,6 @@ int get_delay_idx(int delay, int max_delay_comp)
return delay_idx;
}
-void init_delay_table(uint16_t ofdm_symbol_size,
- int max_delay_comp,
- int max_ofdm_symbol_size,
- c16_t delay_table[][max_ofdm_symbol_size])
-{
- for (int delay = -max_delay_comp; delay <= max_delay_comp; delay++) {
- for (int k = 0; k < ofdm_symbol_size; k++) {
- double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / ofdm_symbol_size));
- delay_table[max_delay_comp + delay][k].r = (int16_t)round(256 * creal(delay_cexp));
- delay_table[max_delay_comp + delay][k].i = (int16_t)round(256 * cimag(delay_cexp));
- }
- }
-}
-
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe)
{
// ta_offset_samples : ta_offset = samples_per_subframe : (Δf_max x N_f / 1000)
diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h
index dcacea4ff0..4c1dfb619d 100644
--- a/common/utils/nr/nr_common.h
+++ b/common/utils/nr/nr_common.h
@@ -36,7 +36,7 @@
#include
#include
#include "assertions.h"
-#include "PHY/defs_common.h"
+#include "common/utils/utils.h"
#define NR_MAX_PDSCH_TBS 3824
#define MAX_NUM_BEAM_PERIODS 4
@@ -83,7 +83,7 @@ static inline const char *rnti_types(nr_rnti_type_t rr)
#define MU_SCS(m) (15 << m)
#define MAX_GSCN_BAND 620 // n78 has the highest GSCN range of 619
-
+#define NR_NUMBER_OF_SYMBOLS_PER_SLOT 14
#define NR_MAX_NB_LAYERS 4 // 8
// Since the IQ samples are represented by SQ15 R+I (see https://en.wikipedia.org/wiki/Q_(number_format)) we need to compensate when
@@ -212,15 +212,6 @@ uint32_t nr_timer_elapsed_time(const NR_timer_t *timer);
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe);
-extern simde__m128i byte2bit16_lut[256];
-void init_byte2bit16(void);
-void init_byte2m128i(void);
-
-static inline simde__m128i byte2bit16(uint8_t b)
-{
- return byte2bit16_lut[b];
-}
-
static inline int get_num_dmrs(uint16_t dmrs_mask )
{
int num_dmrs=0;
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 4dabe78b15..482da9a1cf 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -51,7 +51,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/TOOLS/phy_scope_interface.h"
-#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_common.h"
#include "PHY/phy_vars.h"
diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
index 46919e1983..ebd1ddf2dd 100644
--- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
+++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
@@ -19,10 +19,9 @@
* contact@openairinterface.org
*/
-#include "PHY/defs_common.h"
#include "PHY/sse_intrin.h"
-
#include "nr_rate_matching.h"
+#include "common/utils/LOG/log.h"
// #define RM_DEBUG 1
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index b0b447e087..b6619efc6e 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -85,7 +85,6 @@
#define LTE_CE_OFFSET LTE_CE_FILTER_LENGTH
#define TX_RX_SWITCH_SYMBOL (NUMBER_OF_SYMBOLS_PER_FRAME>>1)
#define PBCH_PDU_SIZE 3 //bytes
-#define NR_NUMBER_OF_SYMBOLS_PER_SLOT 14
#define PRACH_SYMBOL 3 //position of the UL PSS wrt 2nd slot of special subframe
@@ -101,8 +100,6 @@
#define TC_NSEC_x32768 16667
-typedef enum {TDD=1,FDD=0} frame_type_t;
-
typedef enum {EXTENDED=1,NORMAL=0} lte_prefix_type_t;
typedef enum {LOCALIZED=0,DISTRIBUTED=1} vrb_t;
diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index 0c5a96e6db..59d92444d5 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -39,12 +39,10 @@
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/impl_defs_top.h"
-#include "PHY/defs_common.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
#include "nfapi_nr_interface_scf.h"
-#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#define MAX_NUM_RU_PER_gNB 8
#define MAX_PUCCH0_NID 8
diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h
index 7a3f59504d..d125e382ff 100644
--- a/openair1/PHY/defs_nr_common.h
+++ b/openair1/PHY/defs_nr_common.h
@@ -34,14 +34,10 @@
#define __PHY_DEFS_NR_COMMON__H__
#include "PHY/impl_defs_top.h"
-#include "defs_common.h"
#include "nfapi_nr_interface_scf.h"
#include "impl_defs_nr.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
-#define nr_subframe_t lte_subframe_t
-#define nr_slot_t lte_subframe_t
-
#define MAX_NUM_SUBCARRIER_SPACING 5
#define NR_MAX_OFDM_SYMBOL_SIZE 8192
diff --git a/openair1/PHY/nr_phy_common/inc/nr_phy_common.h b/openair1/PHY/nr_phy_common/inc/nr_phy_common.h
index e0bc2aaa15..9ae785d8ff 100644
--- a/openair1/PHY/nr_phy_common/inc/nr_phy_common.h
+++ b/openair1/PHY/nr_phy_common/inc/nr_phy_common.h
@@ -26,6 +26,15 @@
#include "PHY/NR_REFSIG/nr_refsig_common.h"
#include "PHY/MODULATION/nr_modulation.h"
+extern simde__m128i byte2bit16_lut[256];
+void init_byte2bit16(void);
+void init_byte2m128i(void);
+
+static inline simde__m128i byte2bit16(uint8_t b)
+{
+ return byte2bit16_lut[b];
+}
+
typedef struct {
int size;
int ports;
diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common.c b/openair1/PHY/nr_phy_common/src/nr_phy_common.c
index 140d6a043a..e1580ca9f0 100644
--- a/openair1/PHY/nr_phy_common/src/nr_phy_common.c
+++ b/openair1/PHY/nr_phy_common/src/nr_phy_common.c
@@ -20,12 +20,57 @@
*/
#include "nr_phy_common.h"
+#include
#ifdef __aarch64__
#define USE_128BIT
#endif
#define PEAK_DETECT_THRESHOLD 15
+simde__m128i byte2bit16_lut[256];
+void init_byte2bit16(void)
+{
+ for (int s = 0; s < 256; s++) {
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], s & 1, 0);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 1) & 1, 1);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 2) & 1, 2);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 3) & 1, 3);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 4) & 1, 4);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 5) & 1, 5);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 6) & 1, 6);
+ byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 7) & 1, 7);
+ }
+}
+
+simde__m128i byte2m128i[256];
+void init_byte2m128i(void) {
+
+ for (int s=0;s<256;s++) {
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*(s&1)),0);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>1)&1)),1);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>2)&1)),2);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>3)&1)),3);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>4)&1)),4);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>5)&1)),5);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>6)&1)),6);
+ byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>7)&1)),7);
+ }
+}
+
+void init_delay_table(uint16_t ofdm_symbol_size,
+ int max_delay_comp,
+ int max_ofdm_symbol_size,
+ c16_t delay_table[][max_ofdm_symbol_size])
+{
+ for (int delay = -max_delay_comp; delay <= max_delay_comp; delay++) {
+ for (int k = 0; k < ofdm_symbol_size; k++) {
+ double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / ofdm_symbol_size));
+ delay_table[max_delay_comp + delay][k].r = (int16_t)round(256 * creal(delay_cexp));
+ delay_table[max_delay_comp + delay][k].i = (int16_t)round(256 * cimag(delay_cexp));
+ }
+ }
+}
+
int16_t saturating_sub(int16_t a, int16_t b)
{
int32_t result = (int32_t)a - (int32_t)b;
diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c
index 80b38182a1..5570b329fd 100644
--- a/openair1/SCHED_NR/fapi_nr_l1.c
+++ b/openair1/SCHED_NR/fapi_nr_l1.c
@@ -63,7 +63,7 @@ void handle_nfapi_nr_csirs_pdu(processingData_L1tx_t *msgTx, int frame, int slot
{
int found = 0;
- for (int id = 0; id < NR_SYMBOLS_PER_SLOT; id++) {
+ for (int id = 0; id < NR_NUMBER_OF_SYMBOLS_PER_SLOT; id++) {
NR_gNB_CSIRS_t *csirs = &msgTx->csirs_pdu[id];
if (csirs->active == 0) {
LOG_D(NR_PHY,"Frame %d Slot %d CSI_RS with ID %d is now active\n",frame,slot,id);
diff --git a/openair1/SIMULATION/LTE_PHY/common_sim.h b/openair1/SIMULATION/LTE_PHY/common_sim.h
index aaea26c5bb..cfbe7fcaa7 100644
--- a/openair1/SIMULATION/LTE_PHY/common_sim.h
+++ b/openair1/SIMULATION/LTE_PHY/common_sim.h
@@ -1,3 +1,25 @@
+/*
+ * 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
+ */
+
+#include "PHY/defs_common.h"
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 95c32bdb94..398923b655 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -56,7 +56,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/TOOLS/tools_defs.h"
#include "PHY/defs_RU.h"
-#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_common.h"
diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c
index 93f77649e2..ed872be341 100644
--- a/openair1/SIMULATION/NR_PHY/prachsim.c
+++ b/openair1/SIMULATION/NR_PHY/prachsim.c
@@ -42,7 +42,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/TOOLS/tools_defs.h"
#include "PHY/defs_RU.h"
-#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_common.h"
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index 276b1f3500..1b26869568 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -56,7 +56,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/TOOLS/tools_defs.h"
#include "PHY/defs_RU.h"
-#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_common.h"
diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c
index 24da0a04f4..deb8835157 100644
--- a/openair2/GNB_APP/gnb_config.c
+++ b/openair2/GNB_APP/gnb_config.c
@@ -40,7 +40,6 @@
#include "L1_nr_paramdef.h"
#include "MACRLC_nr_paramdef.h"
#include "PHY/INIT/nr_phy_init.h"
-#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_common.h"
#include "RRC/NR/nr_rrc_config.h"
@@ -71,7 +70,6 @@
#include "ngap_messages_types.h"
#include "nr_common.h"
#include "oai_asn1.h"
-#include "openair1/PHY/defs_common.h"
#include "prs_nr_paramdef.h"
#include "radio/ETHERNET/if_defs.h"
#include "rrc_messages_types.h"
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
index 3ce0867383..96819378f0 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
@@ -26,6 +26,7 @@
#define INDEX_MAX_TBS_TABLE (93)
#include "common/utils/nr/nr_common.h"
+#include "common/utils/LOG/log.h"
#include
//Table 5.1.2.2-2
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
index a83c85dd25..007976a1a5 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
@@ -38,8 +38,10 @@
#include
#include
#include "common/utils/nr/nr_common.h"
+#include "common/utils/LOG/log.h"
#include "NR_CellGroupConfig.h"
+#define MAX_FRAME_NUMBER 0x400
#define NR_SHORT_BSR_TABLE_SIZE 32
#define NR_LONG_BSR_TABLE_SIZE 256
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
index 49709543e6..13da4c8b35 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -30,6 +30,7 @@
*/
+#include
#include "nr_mac.h"
#include "nr_mac_common.h"
#include "common/utils/nr/nr_common.h"
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index c0cda918d1..94fb077fe2 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -927,22 +927,24 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac,
const uint16_t feedback_ti = 1 + dci->pdsch_to_harq_feedback_timing_indicator.val + ntn_ue_koffset;
if (rnti_type != TYPE_RA_RNTI_ && rnti_type != TYPE_SI_RNTI_) {
- AssertFatal(feedback_ti > GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing),
- "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%ld).\n",
- feedback_ti,
- GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing));
- // set the harq status at MAC for feedback
- const int tpc[] = {-1, 0, 1, 3};
- set_harq_status(mac,
- dci->pucch_resource_indicator,
- dci->harq_pid.val,
- tpc[dci->tpc],
- feedback_ti,
- dci->dai[0].val,
- dci_ind->n_CCE,
- dci_ind->N_CCE,
- frame,
- slot);
+ if (!get_FeedbackDisabled(mac->sc_info.downlinkHARQ_FeedbackDisabled_r17, dci->harq_pid.val)) {
+ AssertFatal(feedback_ti > GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing),
+ "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%ld).\n",
+ feedback_ti,
+ GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing));
+ // set the harq status at MAC for feedback
+ const int tpc[] = {-1, 0, 1, 3};
+ set_harq_status(mac,
+ dci->pucch_resource_indicator,
+ dci->harq_pid.val,
+ tpc[dci->tpc],
+ feedback_ti,
+ dci->dai[0].val,
+ dci_ind->n_CCE,
+ dci_ind->N_CCE,
+ frame,
+ slot);
+ }
if (dlsch_pdu->new_data_indicator)
current_harq->round = 0;
else
@@ -1220,24 +1222,26 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac,
const int ntn_ue_koffset = GET_NTN_UE_K_OFFSET(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing);
const uint16_t feedback_ti = pucch_Config->dl_DataToUL_ACK->list.array[dci->pdsch_to_harq_feedback_timing_indicator.val][0] + ntn_ue_koffset;
- AssertFatal(feedback_ti > GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing),
- "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%ld). Min feedback time set in config "
- "file (min_rxtxtime).\n",
- feedback_ti,
- GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing));
+ if (!get_FeedbackDisabled(mac->sc_info.downlinkHARQ_FeedbackDisabled_r17, dci->harq_pid.val)) {
+ AssertFatal(feedback_ti > GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing),
+ "PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%ld). Min feedback time set in config "
+ "file (min_rxtxtime).\n",
+ feedback_ti,
+ GET_DURATION_RX_TO_TX(&mac->ntn_ta, dlsch_pdu->SubcarrierSpacing));
- // set the harq status at MAC for feedback
- const int tpc[] = {-1, 0, 1, 3};
- set_harq_status(mac,
- dci->pucch_resource_indicator,
- dci->harq_pid.val,
- tpc[dci->tpc],
- feedback_ti,
- dci->dai[0].val,
- dci_ind->n_CCE,
- dci_ind->N_CCE,
- frame,
- slot);
+ // set the harq status at MAC for feedback
+ const int tpc[] = {-1, 0, 1, 3};
+ set_harq_status(mac,
+ dci->pucch_resource_indicator,
+ dci->harq_pid.val,
+ tpc[dci->tpc],
+ feedback_ti,
+ dci->dai[0].val,
+ dci_ind->n_CCE,
+ dci_ind->N_CCE,
+ frame,
+ slot);
+ }
if (dlsch_pdu->new_data_indicator)
current_harq->round = 0;
else
@@ -2321,7 +2325,7 @@ bool get_downlink_ack(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, PUCCH_sche
LOG_E(NR_MAC, "DLSCH ACK/NACK reporting initiated for harq pid %d before DLSCH decoding completed\n", dl_harq_pid);
if (get_FeedbackDisabled(mac->sc_info.downlinkHARQ_FeedbackDisabled_r17, dl_harq_pid)) {
- LOG_D(NR_MAC, "skipping DLSCH ACK/NACK reporting for harq pid %d\n", dl_harq_pid);
+ LOG_W(NR_MAC, "skipping DLSCH ACK/NACK reporting for harq pid %d\n", dl_harq_pid);
current_harq->active = false;
current_harq->ack_received = false;
continue;
diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c
index 2d6ae1ba75..a34edd18cd 100644
--- a/openair2/LAYER2/NR_MAC_gNB/config.c
+++ b/openair2/LAYER2/NR_MAC_gNB/config.c
@@ -43,8 +43,6 @@
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_MIB.h"
-#include "PHY/TOOLS/tools_defs.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/nr_rrc_config.h"
#include "SCHED_NR/phy_frame_config_nr.h"
#include "T.h"
diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c
index a8fe8de79c..ccf812c751 100644
--- a/openair2/LAYER2/NR_MAC_gNB/main.c
+++ b/openair2/LAYER2/NR_MAC_gNB/main.c
@@ -53,7 +53,6 @@
#include "NR_ServingCellConfig.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_TAG.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "RRC/NR/nr_rrc_config.h"
#include "assertions.h"
diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
index 96701dbb83..5dcc631776 100644
--- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
+++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
@@ -29,7 +29,6 @@
#include "NR_PDCP-Config.h"
#include "NR_QFI.h"
#include "NR_SDAP-Config.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/nr_rrc_common.h"
#include "SDAP/nr_sdap/nr_sdap_entity.h"
#include "asn_internal.h"
diff --git a/openair2/M2AP/m2ap_timers.c b/openair2/M2AP/m2ap_timers.c
index 13ec6423ac..f4d4f473c5 100644
--- a/openair2/M2AP/m2ap_timers.c
+++ b/openair2/M2AP/m2ap_timers.c
@@ -21,7 +21,6 @@
#include "m2ap_timers.h"
#include "assertions.h"
-#include "PHY/defs_common.h" /* TODO: try to not include this */
#include "m2ap_messages_types.h"
#include "m2ap_eNB_defs.h"
#include "m2ap_ids.h"
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
index 666b691951..e82a185ba8 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
@@ -35,7 +35,6 @@
#include
#include
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
-#include "PHY/defs_common.h"
#include "common/platform_constants.h"
#include "common/utils/T/T.h"
#include "executables/softmodem-common.h"
diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
index 64de7b4560..14916062b2 100644
--- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
@@ -1190,7 +1190,7 @@ void update_harq_status(NR_UE_MAC_INST_t *mac, uint8_t harq_pid, uint8_t ack_nac
current_harq->ack_received = true;
}
}
- else {
+ else if (!get_FeedbackDisabled(mac->sc_info.downlinkHARQ_FeedbackDisabled_r17, harq_pid)) {
//shouldn't get here
LOG_E(NR_MAC, "Trying to process acknack for an inactive harq process (%d)\n", harq_pid);
}
diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/RRC/NR/nr_rrc_config.h
index b72acf9770..707e46cd66 100644
--- a/openair2/RRC/NR/nr_rrc_config.h
+++ b/openair2/RRC/NR/nr_rrc_config.h
@@ -38,8 +38,8 @@
#include "NR_CellGroupConfig.h"
#include "NR_UE-NR-Capability.h"
#include "NR_UL-CCCH-Message.h"
-#include "PHY/defs_common.h"
#include "f1ap_messages_types.h"
+#include "common/platform_types.h"
struct NR_MeasurementTimingConfiguration;
struct NR_PDSCH_TimeDomainResourceAllocationList;
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 22bf766716..01db036e22 100644
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -48,7 +48,6 @@
#include "NGAP_CauseRadioNetwork.h"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "RRC/NR/mac_rrc_dl.h"
#include "RRC/NR/nr_rrc_common.h"
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c
index c1715c438c..fa6d6e03bc 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.c
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.c
@@ -52,7 +52,6 @@
#include "NR_UERadioAccessCapabilityInformation.h"
#include "MAC/mac.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "RRC/NR/nr_rrc_common.h"
#include "RRC/NR/nr_rrc_defs.h"
diff --git a/openair2/RRC/NR/rrc_gNB_du.c b/openair2/RRC/NR/rrc_gNB_du.c
index 402e245dac..6c7c157374 100644
--- a/openair2/RRC/NR/rrc_gNB_du.c
+++ b/openair2/RRC/NR/rrc_gNB_du.c
@@ -26,7 +26,6 @@
#include "F1AP_CauseMisc.h"
#include "F1AP_CauseProtocol.h"
#include "F1AP_CauseRadioNetwork.h"
-#include "PHY/defs_common.h"
#include "T.h"
#include "asn_codecs.h"
#include "assertions.h"
diff --git a/openair2/RRC/NR/rrc_gNB_internode.c b/openair2/RRC/NR/rrc_gNB_internode.c
index 4fbca5f8f0..843eaca250 100644
--- a/openair2/RRC/NR/rrc_gNB_internode.c
+++ b/openair2/RRC/NR/rrc_gNB_internode.c
@@ -34,7 +34,6 @@
#include
#include
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/nr_rrc_proto.h"
#include "T.h"
#include "asn_codecs.h"
diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c
index 595e380846..e41875027e 100644
--- a/openair2/RRC/NR/rrc_gNB_nsa.c
+++ b/openair2/RRC/NR/rrc_gNB_nsa.c
@@ -40,7 +40,6 @@
#include
#include "MESSAGES/asn1_msg.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/nr_rrc_config.h"
#include "T.h"
#include "asn_codecs.h"
diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.c b/openair2/RRC/NR/rrc_gNB_radio_bearers.c
index 8255ccdb38..35ae278b2a 100644
--- a/openair2/RRC/NR/rrc_gNB_radio_bearers.c
+++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.c
@@ -22,7 +22,6 @@
#include "rrc_gNB_radio_bearers.h"
#include
#include "E1AP_RLC-Mode.h"
-#include "PHY/defs_common.h"
#include "RRC/NR/nr_rrc_defs.h"
#include "T.h"
#include "asn_internal.h"
diff --git a/openair2/SDAP/nr_sdap/nr_sdap_entity.c b/openair2/SDAP/nr_sdap/nr_sdap_entity.c
index bf9eb97666..aae6b81540 100644
--- a/openair2/SDAP/nr_sdap/nr_sdap_entity.c
+++ b/openair2/SDAP/nr_sdap/nr_sdap_entity.c
@@ -25,7 +25,6 @@
#include
#include
#include
-#include "PHY/defs_common.h"
#include "T.h"
#include "assertions.h"
#include "common/utils/T/T.h"
diff --git a/openair2/X2AP/x2ap_timers.c b/openair2/X2AP/x2ap_timers.c
index 98674de51b..ac619d5b0f 100644
--- a/openair2/X2AP/x2ap_timers.c
+++ b/openair2/X2AP/x2ap_timers.c
@@ -21,7 +21,6 @@
#include "x2ap_timers.h"
#include "assertions.h"
-#include "PHY/defs_common.h" /* TODO: try to not include this */
#include "x2ap_messages_types.h"
#include "x2ap_eNB_defs.h"
#include "x2ap_ids.h"
diff --git a/openair3/M3AP/m3ap_timers.c b/openair3/M3AP/m3ap_timers.c
index 39498cc8eb..98d3c43348 100644
--- a/openair3/M3AP/m3ap_timers.c
+++ b/openair3/M3AP/m3ap_timers.c
@@ -21,7 +21,6 @@
#include "m3ap_timers.h"
#include "assertions.h"
-#include "PHY/defs_common.h" /* TODO: try to not include this */
#include "m3ap_messages_types.h"
#include "m3ap_MCE_defs.h"
#include "m3ap_ids.h"
diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/CMakeLists.txt b/openair3/NAS/NR_UE/5GS/5GMM/MSG/CMakeLists.txt
index be84772da6..6947a3421c 100644
--- a/openair3/NAS/NR_UE/5GS/5GMM/MSG/CMakeLists.txt
+++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/CMakeLists.txt
@@ -1,5 +1,7 @@
add_library(fgs_5gmm_lib OBJECT
+ fgmm_lib.c
fgs_service_request.c
+ fgmm_service_accept.c
RegistrationRequest.c
RegistrationAccept.c
FGSIdentityResponse.c
diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c
new file mode 100644
index 0000000000..e21bc141c4
--- /dev/null
+++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c
@@ -0,0 +1,152 @@
+/*
+ * 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
+ */
+
+#include "fgmm_lib.h"
+#include
+#include // For htons and ntohs
+#include // For malloc and free
+#include "common/utils/ds/byte_array.h"
+
+#define GPRS_TIMER_LENGTH 3 // octets
+
+/**
+ * Encode PDU Session Status and PDU session reactivation result (optional IEs)
+ * According to 9.11.3.42 and 9.11.3.44 of 3GPP TS 24.501, both IEs share the same
+ * structure, therefore this function covers them both.
+ * @param iei IE identifier to distinguish between PDU Session Status and PDU session reactivation result.
+ * @param psi pointer to PDU Session Status IE buffer to be encoded: index i corresponds to PDU Session i
+ */
+int encode_pdu_session_ie(byte_array_t *buffer, nas_service_IEI_t iei, const uint8_t *psi)
+{
+ if (buffer->len < MIN_PDU_SESSION_CONTENTS_LEN + 2) {
+ PRINT_NAS_ERROR("%s failed: buffer is too small", __func__);
+ return -1;
+ }
+
+ uint8_t *buf = buffer->buf;
+ int encoded = 0;
+ buf[encoded++] = iei;
+ buf[encoded++] = MIN_PDU_SESSION_CONTENTS_LEN; // no spare octets
+
+ // Initialize the PDU session status octets to zero
+ buf[encoded] = 0x00;
+ buf[encoded + 1] = 0x00;
+
+ /* Encode Octet 3 (PSI 1-7) and Octet 4 (PSI 8-15).
+ Set each PSI bit according to the psi array containing the content IEs.
+ Start from bit 1 of octet 3 (i.e. PSI(0)), which is spare and shall be coded as zero.
+ The enabled bit translates to either PDU Session Active or PDU Session Reactivation Result */
+ for (int i = 1; i < 8; i++) { // skip spare bit
+ buf[encoded] |= psi[i] << i;
+ }
+ encoded++;
+
+ for (int i = 8; i < MAX_NUM_PSI; i++) {
+ buf[encoded] |= psi[i] << i % 8;
+ }
+ encoded++;
+
+ return encoded;
+}
+
+/**
+ * Decode PDU Session Status and PDU session reactivation result (optional IEs)
+ * According to 9.11.3.42 and 9.11.3.44 of 3GPP TS 24.501, both IEs share the same
+ * structure, therefore this function covers them both.
+ * @param psi pointer to buffer for the PDU Session Status IE to be decoded
+ */
+int decode_pdu_session_ie(uint8_t *psi, const byte_array_t *buffer)
+{
+ int decoded = 0;
+ uint8_t *buf = buffer->buf;
+
+ if (buffer->len < MIN_PDU_SESSION_CONTENTS_LEN + 2) {
+ PRINT_NAS_ERROR("%s failed: buffer length is too small", __func__);
+ return -1;
+ }
+
+ // start decoding from length IE (IEI is decoded in the caller)
+ uint8_t pdu_session_status_len = buf[decoded++];
+ if (pdu_session_status_len > MAX_PDU_SESSION_CONTENTS_LEN) {
+ PRINT_NAS_ERROR("decoded length is out of bound for PDU Session Status/Reactivation result\n");
+ return -1;
+ }
+
+ /* Decode PDU Session Status content IEs bits in octet 3 (PSI 1-7).
+ Store the result psi array.
+ Skip bit 1 of octet 3 (i.e. PSI(0)), which is spare and shall be coded as zero. */
+ for (int i = 1; i < 8; i++) { // skip spare bit
+ psi[i] = (buf[decoded] >> i) & 0x01;
+ }
+ decoded++;
+
+ /* Decode PDU Session Status content IEs bits in octet 4 (PSI 8-15).
+ Store the result psi array. */
+ for (int i = 8; i < MAX_NUM_PSI; i++) {
+ psi[i] = (buf[decoded] >> i % 8) & 0x01;
+ }
+ decoded++;
+
+ return decoded;
+}
+
+/* Encode GPRS Timer IE (3GPP TS 24.008 10.5.7.3) */
+int encode_gprs_timer_ie(byte_array_t *buffer, nas_service_IEI_t iei, const gprs_timer_t *timer)
+{
+ if (buffer->len < GPRS_TIMER_LENGTH) {
+ PRINT_NAS_ERROR("Buffer length is too short to encode the GPRS Timer IE\n");
+ return -1;
+ }
+
+ uint8_t *buf = buffer->buf;
+
+ int encoded = 0;
+ // IEI
+ buf[encoded++] = iei;
+ // length
+ buf[encoded++] = 1; // length field (1 octet)
+ // Unit and value (1 octet)
+ uint8_t encoded_byte = 0;
+ encoded_byte |= (timer->unit & 0x07) << 5;
+ encoded_byte |= timer->value & 0x1F;
+ buf[encoded++] = encoded_byte;
+
+ return encoded;
+}
+
+/* Decode GPRS Timer IE (3GPP TS 24.008 10.5.7.3) */
+int decode_gprs_timer_ie(gprs_timer_t *timer, const byte_array_t *buffer)
+{
+ int decoded = 1; // Skip length ie (1 octet)
+ // Extract unit and value
+ uint8_t *buf = buffer->buf;
+ timer->unit = (buf[decoded] >> 5) & 0x07;
+ timer->value = buf[decoded++] & 0x1F;
+ return decoded;
+}
+
+/* Decode EAP Message (todo) */
+int decode_eap_msg_ie(const byte_array_t *buffer)
+{
+ int eap_msg_len = (buffer->buf[0] << 8) | buffer->buf[1];
+ PRINT_NAS_ERROR("EAP message IE in NAS Service Reject is not handled\n");
+ return eap_msg_len + 2; // content length + 2 octets for the length IE
+}
diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h
new file mode 100644
index 0000000000..b09f19b828
--- /dev/null
+++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h
@@ -0,0 +1,166 @@
+/*
+ * 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
+ */
+
+/*
+ * This header file defines structures, macros,
+ * and functions for the handling of common NAS 5GMM IEs.
+ * This library is intended for use within the 5GMM encode/decode library only.
+ */
+
+#ifndef FGS_LIB_H
+#define FGS_LIB_H
+
+#include
+#include
+#include "fgs_nas_utils.h"
+#include "common/utils/ds/byte_array.h"
+
+/* The following defines are valide for
+both PDU Session Status and PDU session Reactivation Result IEs */
+#define MIN_PDU_SESSION_CONTENTS_LEN 2
+#define MAX_PDU_SESSION_CONTENTS_LEN 32
+#define MAX_NUM_PSI 16
+#define MAX_NUM_PDU_ERRORS 256
+
+/* This macro updates the local copy of
+ a byte_array_t pointer used for enc/dec */
+#define UPDATE_BYTE_ARRAY(ba, shift) \
+ do { \
+ (ba).buf += (shift); \
+ (ba).len -= (shift); \
+ } while (0)
+
+/* This macro checks the result of the encoder.
+ If successful, it updates the encoded bytes counter
+ and the local copy of the byte_array_t pointer.
+ Otherwise, it returns -1. */
+#define ENCODE_NAS_IE(ba, exp, encoded) \
+ do { \
+ int ret = (exp); \
+ if (ret < 0) { \
+ return -1; \
+ } \
+ (encoded) += ret; \
+ UPDATE_BYTE_ARRAY((ba), ret); \
+ } while (0)
+
+/* This macro checks the result of the decoder.
+ If successful, it updates the decoded bytes counter
+ and the local copy of the byte_array_t pointer.
+ Otherwise, it returns -1. */
+#define DECODE_NAS_IE(ba, exp, decoded) \
+ do { \
+ int ret = (exp); \
+ if (ret < 0) { \
+ return -1; \
+ } \
+ (decoded) += ret; \
+ UPDATE_BYTE_ARRAY((ba), ret); \
+ } while (0)
+
+/* Timer value is incremented in multiples of 2 seconds,
+ 1 minute, etc (10.5.7.3 of 3GPP TS 24.008) */
+#define FOREACH_TIMER_UNIT(TIMER_UNIT) \
+ TIMER_UNIT(TWO_SECONDS, 0x00) \
+ TIMER_UNIT(ONE_MINUTE, 0x01) \
+ TIMER_UNIT(DECIHOURS, 0x02) \
+ TIMER_UNIT(DEACTIVATED, 0x07)
+
+typedef enum { FOREACH_TIMER_UNIT(TO_ENUM) } GPRS_Timer_t;
+
+typedef enum { PDU_SESSION_INACTIVE = 0, PDU_SESSION_ACTIVE } PSI_status_t;
+
+typedef enum { REACTIVATION_SUCCESS = 0, REACTIVATION_FAILED } PSI_reactivation_t;
+
+#define FOREACH_SA_IEI(IEI_DEF) \
+ IEI_DEF(IEI_PDU_SESSION_STATUS, 0x50) \
+ IEI_DEF(IEI_PDU_SESSION_REACT_RESULT, 0x26) \
+ IEI_DEF(IEI_PDU_SESSION_REACT_RESULT_ERROR_CAUSE, 0x72) \
+ IEI_DEF(IEI_EAPMSG, 0x78) \
+ IEI_DEF(IEI_CAG_INFO_LIST, 0x75) \
+ IEI_DEF(IEI_T3448_VALUE, 0x6B) \
+ IEI_DEF(IEI_T3446_VALUE, 0x5F)
+
+// Enum for Service Accept IEIs
+typedef enum { FOREACH_SA_IEI(TO_ENUM) } nas_service_IEI_t;
+
+static const text_info_t sa_iei_s[] = {FOREACH_SA_IEI(TO_TEXT)};
+
+// table 9.11.3.2.1
+#define FOREACH_CAUSE(CAUSE_DEF) \
+ CAUSE_DEF(Illegal_UE, 0x3) \
+ CAUSE_DEF(PEI_not_accepted, 0x5) \
+ CAUSE_DEF(Illegal_ME, 0x6) \
+ CAUSE_DEF(SGS_services_not_allowed, 0x7) \
+ CAUSE_DEF(UE_identity_cannot_be_derived_by_the_network, 0x9) \
+ CAUSE_DEF(Implicitly_de_registered, 0x0a) \
+ CAUSE_DEF(PLMN_not_allowed, 0x0b) \
+ CAUSE_DEF(Tracking_area_not_allowed, 0x0c) \
+ CAUSE_DEF(Roaming_not_allowed_in_this_tracking_area, 0x0d) \
+ CAUSE_DEF(No_suitable_cells_in_tracking_area, 0x0f) \
+ CAUSE_DEF(MAC_failure, 0x14) \
+ CAUSE_DEF(Synch_failure, 0x15) \
+ CAUSE_DEF(Congestion, 0x16) \
+ CAUSE_DEF(UE_security_capabilities_mismatch, 0x17) \
+ CAUSE_DEF(Security_mode_rejected_unspecified, 0x18) \
+ CAUSE_DEF(Non_5G_authentication_unacceptable, 0x1a) \
+ CAUSE_DEF(N1_mode_not_allowed, 0x1b) \
+ CAUSE_DEF(Restricted_service_area, 0x1c) \
+ CAUSE_DEF(Redirection_to_EPC_required, 0x1f) \
+ CAUSE_DEF(LADN_not_available, 0x2b) \
+ CAUSE_DEF(No_network_slices_available, 0x3e) \
+ CAUSE_DEF(Maximum_number_of_PDU_sessions_reached, 0x41) \
+ CAUSE_DEF(Insufficient_resources_for_specific_slice_and_DNN, 0x43) \
+ CAUSE_DEF(Insufficient_resources_for_specific_slice, 0x45) \
+ CAUSE_DEF(ngKSI_already_in_use, 0x47) \
+ CAUSE_DEF(Non_3GPP_access_to_5GCN_not_allowed, 0x48) \
+ CAUSE_DEF(Serving_network_not_authorized, 0x49) \
+ CAUSE_DEF(Temporarily_not_authorized_for_this_SNPN, 0x4A) \
+ CAUSE_DEF(Permanently_not_authorized_for_this_SNPN, 0x4b) \
+ CAUSE_DEF(Not_authorized_for_this_CAG_or_authorized_for_CAG_cells_only, 0x4c) \
+ CAUSE_DEF(Wireline_access_area_not_allowed, 0x4d) \
+ CAUSE_DEF(Payload_was_not_forwarded, 0x5a) \
+ CAUSE_DEF(DNN_not_supported_or_not_subscribed_in_the_slice, 0x5b) \
+ CAUSE_DEF(Insufficient_user_plane_resources_for_the_PDU_session, 0x5c) \
+ CAUSE_DEF(Semantically_incorrect_message, 0x5f) \
+ CAUSE_DEF(Invalid_mandatory_information, 0x60) \
+ CAUSE_DEF(Message_type_non_existent_or_not_implemented, 0x61) \
+ CAUSE_DEF(Message_type_not_compatible_with_the_protocol_state, 0x62) \
+ CAUSE_DEF(Information_element_non_existent_or_not_implemented, 0x63) \
+ CAUSE_DEF(Conditional_IE_error, 0x64) \
+ CAUSE_DEF(Message_not_compatible_with_the_protocol_state, 0x65) \
+ CAUSE_DEF(Protocol_error_unspecified, 0x67)
+
+typedef enum { FOREACH_CAUSE(TO_ENUM) } cause_id_t;
+
+/* 10.5.7.3 3GPP TS 24.008 */
+typedef struct {
+ uint8_t value;
+ uint8_t unit;
+} gprs_timer_t;
+
+int encode_pdu_session_ie(byte_array_t *buffer, nas_service_IEI_t iei, const uint8_t *psi);
+int decode_pdu_session_ie(uint8_t *psi, const byte_array_t *buffer);
+int encode_gprs_timer_ie(byte_array_t *buffer, nas_service_IEI_t iei, const gprs_timer_t *timer);
+int decode_gprs_timer_ie(gprs_timer_t *timer, const byte_array_t *buffer);
+int decode_eap_msg_ie(const byte_array_t *buffer);
+
+#endif /* FGS_LIB_H */
\ No newline at end of file
diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.c b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.c
new file mode 100644
index 0000000000..7130586326
--- /dev/null
+++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.c
@@ -0,0 +1,184 @@
+/*
+ * 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
+ */
+
+#include "fgmm_service_accept.h"
+#include
+#include // For htons and ntohs
+#include // For malloc and free
+#include "common/utils/utils.h" // For malloc_or_fail
+#include "common/utils/ds/byte_array.h" // For byte_array_t
+#include "fgmm_lib.h"
+
+/** @brief Encode Service Accept (8.2.17 of 3GPP TS 24.501) */
+int encode_fgs_service_accept(byte_array_t *buffer, const fgs_service_accept_msg_t *msg)
+{
+ if (buffer->len < 1)
+ return -1; // No IEs present
+
+ byte_array_t ba = *buffer; // Local copy of buffer
+ uint32_t encoded = 0;
+
+ // Encode PDU Session Status (Optional)
+ if (msg->has_psi_status) {
+ ENCODE_NAS_IE(ba, encode_pdu_session_ie(&ba, IEI_PDU_SESSION_STATUS, msg->psi_status), encoded);
+ }
+
+ // Encode PDU Session Reactivation Result (Optional)
+ if (msg->has_psi_res) {
+ ENCODE_NAS_IE(ba, encode_pdu_session_ie(&ba, IEI_PDU_SESSION_REACT_RESULT, msg->psi_res), encoded);
+ }
+
+ // Encode PDU Session Reactivation Result Error Cause (Optional)
+ if (msg->num_errors) {
+ int start = encoded;
+ buffer->buf[encoded++] = IEI_PDU_SESSION_REACT_RESULT_ERROR_CAUSE;
+ // encode length of PDU session reactivation result error cause
+ uint16_t error_len = msg->num_errors * sizeof(msg->cause[0]);
+ if (error_len > MAX_NUM_PDU_ERRORS) {
+ PRINT_NAS_ERROR("encoded length is out of bound (IEI_PDU_SESSION_REACT_RESULT_ERROR_CAUSE)\n");
+ return -1;
+ }
+ uint16_t n_len = htons(error_len);
+ memcpy(&buffer->buf[encoded], &n_len, sizeof(n_len)); // length payload PDU Session Status
+ encoded += sizeof(error_len);
+ // encode PDU Session IDs and Causes
+ for (int i = 0; i < msg->num_errors; i++) {
+ buffer->buf[encoded++] = msg->cause[i].pdu_session_id;
+ buffer->buf[encoded++] = msg->cause[i].cause;
+ }
+ UPDATE_BYTE_ARRAY(ba, encoded - start);
+ }
+
+ /* Encode T3448 Timer (Optional)
+ 3GPP TS 24.008 10.5.7.3 GPRS Timer */
+ if (msg->t3448) {
+ ENCODE_NAS_IE(ba, encode_gprs_timer_ie(&ba, IEI_T3448_VALUE, msg->t3448), encoded);
+ }
+
+ return encoded;
+}
+
+/** @brief Decode Service Accept (8.2.17 of 3GPP TS 24.501) */
+int decode_fgs_service_accept(fgs_service_accept_msg_t *msg, const byte_array_t *buffer)
+{
+ if (buffer->len < 1)
+ return -1; // nothing to decode
+
+ byte_array_t ba = *buffer; // Local copy of buffer (to be used in the decoding sub-functions)
+ uint32_t decoded = 0;
+
+ // Default output message before decoding
+ msg->has_psi_res = false;
+ msg->has_psi_status = false;
+ msg->num_errors = 0;
+ msg->t3448 = NULL;
+
+ // Decode Optional IEs
+ while (decoded < buffer->len) {
+ uint8_t iei = buffer->buf[decoded++];
+ UPDATE_BYTE_ARRAY(ba, 1);
+
+ switch (iei) {
+ case IEI_PDU_SESSION_STATUS:
+ msg->has_psi_status = true;
+ DECODE_NAS_IE(ba, decode_pdu_session_ie(msg->psi_status, &ba), decoded);
+ break;
+
+ case IEI_PDU_SESSION_REACT_RESULT:
+ msg->has_psi_res = true;
+ DECODE_NAS_IE(ba, decode_pdu_session_ie(msg->psi_res, &ba), decoded);
+ break;
+
+ case IEI_PDU_SESSION_REACT_RESULT_ERROR_CAUSE: {
+ int start = decoded;
+ // Decode the length of the IE
+ uint16_t tmp;
+ memcpy(&tmp, &buffer->buf[decoded], sizeof(tmp));
+ uint16_t error_len = ntohs(tmp);
+ decoded += sizeof(error_len);
+ if (error_len > MAX_NUM_PDU_ERRORS * sizeof(msg->cause[0])) {
+ PRINT_NAS_ERROR("IEI_PDU_SESSION_REACT_RESULT_ERROR_CAUSE: decoded length is out of bound\n");
+ return -1;
+ }
+ // Decode each PDU Session ID and Cause
+ for (int i = 0; i < error_len; i += 2) {
+ msg->cause[msg->num_errors].pdu_session_id = buffer->buf[decoded++];
+ msg->cause[msg->num_errors].cause = buffer->buf[decoded++];
+ msg->num_errors++;
+ }
+ UPDATE_BYTE_ARRAY(ba, decoded - start);
+ } break;
+
+ case IEI_T3448_VALUE:
+ msg->t3448 = malloc_or_fail(sizeof(*msg->t3448));
+ DECODE_NAS_IE(ba, decode_gprs_timer_ie(msg->t3448, &ba), decoded);
+ break;
+
+ case IEI_EAPMSG:
+ DECODE_NAS_IE(ba, decode_eap_msg_ie(&ba), decoded);
+ break;
+
+ default:
+ PRINT_NAS_ERROR("Unkwown or invalid IEI %d\n", iei);
+ return -1;
+ }
+ }
+
+ return decoded;
+}
+
+/**
+ * @brief Equality check for Service Accept (enc/dec)
+ */
+bool eq_service_accept(const fgs_service_accept_msg_t *a, const fgs_service_accept_msg_t *b)
+{
+ _NAS_EQ_CHECK_INT(a->has_psi_status, b->has_psi_status);
+ if (a->has_psi_status && b->has_psi_status) {
+ for (int i = 0; i < MAX_NUM_PSI; i++)
+ _NAS_EQ_CHECK_INT(a->psi_status[i], b->psi_status[i]);
+ }
+ _NAS_EQ_CHECK_INT(a->has_psi_res, b->has_psi_res);
+ if (a->has_psi_res && b->has_psi_res) {
+ for (int i = 0; i < MAX_NUM_PSI; i++)
+ _NAS_EQ_CHECK_INT(a->psi_res[i], b->psi_res[i]);
+ }
+ _NAS_EQ_CHECK_INT(a->num_errors, b->num_errors);
+ if (a->num_errors && b->num_errors) {
+ for (int i = 0; i < a->num_errors; i++) {
+ _NAS_EQ_CHECK_INT(a->cause[i].cause, b->cause[i].cause);
+ _NAS_EQ_CHECK_INT(a->cause[i].pdu_session_id, b->cause[i].pdu_session_id);
+ }
+ }
+ if (a->t3448 != NULL || b->t3448 != NULL) {
+ if (a->t3448 == NULL || b->t3448 == NULL) {
+ PRINT_NAS_ERROR("t3448 equality check failed\n");
+ return false;
+ }
+ _NAS_EQ_CHECK_INT(a->t3448->value, b->t3448->value);
+ _NAS_EQ_CHECK_INT(a->t3448->unit, b->t3448->unit);
+ }
+ return true;
+}
+
+void free_fgs_service_accept(fgs_service_accept_msg_t *msg)
+{
+ free(msg->t3448);
+}
diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.h b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.h
new file mode 100644
index 0000000000..9f82f47eb1
--- /dev/null
+++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_service_accept.h
@@ -0,0 +1,57 @@
+/*
+ * 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
+ */
+
+#ifndef FGS_SERVICE_ACCEPT_H
+#define FGS_SERVICE_ACCEPT_H
+
+#include
+#include "fgs_nas_utils.h"
+#include "common/utils/ds/byte_array.h"
+#include "fgmm_lib.h"
+
+typedef struct {
+ uint8_t pdu_session_id;
+ uint8_t cause;
+} pdu_error_cause_t;
+
+typedef struct {
+ // PDU Session Status (Optional)
+ uint8_t psi_status[MAX_NUM_PSI]; // index 0 is spare
+ bool has_psi_status;
+
+ // PDU Session Reactivation Result (Optional)
+ uint8_t psi_res[MAX_NUM_PSI]; // index 0 is spare
+ bool has_psi_res;
+
+ // PDU Session Reactivation Result Error Cause (Optional)
+ pdu_error_cause_t cause[MAX_NUM_PDU_ERRORS];
+ uint16_t num_errors;
+
+ // T3448 Value (Optional)
+ gprs_timer_t *t3448;
+} fgs_service_accept_msg_t;
+
+int decode_fgs_service_accept(fgs_service_accept_msg_t *msg, const byte_array_t *buffer);
+int encode_fgs_service_accept(byte_array_t *buffer, const fgs_service_accept_msg_t *msg);
+void free_fgs_service_accept(fgs_service_accept_msg_t *msg);
+bool eq_service_accept(const fgs_service_accept_msg_t *a, const fgs_service_accept_msg_t *b);
+
+#endif /* FGS_SERVICE_ACCEPT_H */
diff --git a/openair3/NAS/NR_UE/5GS/5GSM/MSG/PduSessionEstablishmentAccept.c b/openair3/NAS/NR_UE/5GS/5GSM/MSG/PduSessionEstablishmentAccept.c
index 50b66845c6..cb12e5dc6c 100644
--- a/openair3/NAS/NR_UE/5GS/5GSM/MSG/PduSessionEstablishmentAccept.c
+++ b/openair3/NAS/NR_UE/5GS/5GSM/MSG/PduSessionEstablishmentAccept.c
@@ -94,7 +94,7 @@ int decode_pdu_session_establishment_accept_msg(pdu_session_establishment_accept
{
qos_rules->rule[0] = decode_qos_rule(curPtr);
rules_tot_len += get_len_qos_rule(&qos_rules->rule[0]);
- curPtr += rules_tot_len;
+ curPtr += get_len_qos_rule(&qos_rules->rule[0]);
}
// Session-AMBR (M)
psea_msg->sess_ambr.length = *curPtr++;
diff --git a/openair3/NAS/NR_UE/5GS/NR_NAS_defs.h b/openair3/NAS/NR_UE/5GS/NR_NAS_defs.h
index babda98aaa..94e7f38a57 100644
--- a/openair3/NAS/NR_UE/5GS/NR_NAS_defs.h
+++ b/openair3/NAS/NR_UE/5GS/NR_NAS_defs.h
@@ -25,6 +25,7 @@
#include
#include "openair3/UICC/usim_interface.h"
#include "fgs_nas_utils.h"
+#include "fgmm_lib.h"
#include "FGSAuthenticationResponse.h"
#include "FGSDeregistrationRequestUEOriginating.h"
#include "FGSIdentityResponse.h"
@@ -111,51 +112,6 @@ typedef enum { FOREACH_HEADER(TO_ENUM) } Security_header_t;
static const text_info_t security_header_type_s[] = {FOREACH_HEADER(TO_TEXT)};
-// table 9.11.3.2.1
-#define FOREACH_CAUSE(CAUSE_DEF) \
- CAUSE_DEF(Illegal_UE,0x3 )\
- CAUSE_DEF(PEI_not_accepted,0x5 )\
- CAUSE_DEF(Illegal_ME,0x6 )\
- CAUSE_DEF(SGS_services_not_allowed,0x7 )\
- CAUSE_DEF(UE_identity_cannot_be_derived_by_the_network,0x9 )\
- CAUSE_DEF(Implicitly_de_registered,0x0a )\
- CAUSE_DEF(PLMN_not_allowed,0x0b )\
- CAUSE_DEF(Tracking_area_not_allowed,0x0c )\
- CAUSE_DEF(Roaming_not_allowed_in_this_tracking_area,0x0d )\
- CAUSE_DEF(No_suitable_cells_in_tracking_area,0x0f )\
- CAUSE_DEF(MAC_failure,0x14 )\
- CAUSE_DEF(Synch_failure,0x15 )\
- CAUSE_DEF(Congestion,0x16 )\
- CAUSE_DEF(UE_security_capabilities_mismatch,0x17 )\
- CAUSE_DEF(Security_mode_rejected_unspecified,0x18 )\
- CAUSE_DEF(Non_5G_authentication_unacceptable,0x1a )\
- CAUSE_DEF(N1_mode_not_allowed,0x1b )\
- CAUSE_DEF(Restricted_service_area,0x1c )\
- CAUSE_DEF(Redirection_to_EPC_required,0x1f )\
- CAUSE_DEF(LADN_not_available,0x2b )\
- CAUSE_DEF(No_network_slices_available,0x3e )\
- CAUSE_DEF(Maximum_number_of_PDU_sessions_reached,0x41 )\
- CAUSE_DEF(Insufficient_resources_for_specific_slice_and_DNN,0x43 )\
- CAUSE_DEF(Insufficient_resources_for_specific_slice,0x45 )\
- CAUSE_DEF(ngKSI_already_in_use,0x47 )\
- CAUSE_DEF(Non_3GPP_access_to_5GCN_not_allowed,0x48 )\
- CAUSE_DEF(Serving_network_not_authorized,0x49 )\
- CAUSE_DEF(Temporarily_not_authorized_for_this_SNPN,0x4A )\
- CAUSE_DEF(Permanently_not_authorized_for_this_SNPN,0x4b )\
- CAUSE_DEF(Not_authorized_for_this_CAG_or_authorized_for_CAG_cells_only,0x4c )\
- CAUSE_DEF(Wireline_access_area_not_allowed,0x4d )\
- CAUSE_DEF(Payload_was_not_forwarded,0x5a )\
- CAUSE_DEF(DNN_not_supported_or_not_subscribed_in_the_slice,0x5b )\
- CAUSE_DEF(Insufficient_user_plane_resources_for_the_PDU_session,0x5c )\
- CAUSE_DEF(Semantically_incorrect_message,0x5f )\
- CAUSE_DEF(Invalid_mandatory_information,0x60 )\
- CAUSE_DEF(Message_type_non_existent_or_not_implemented,0x61 )\
- CAUSE_DEF(Message_type_not_compatible_with_the_protocol_state,0x62 )\
- CAUSE_DEF(Information_element_non_existent_or_not_implemented,0x63 )\
- CAUSE_DEF(Conditional_IE_error,0x64 )\
- CAUSE_DEF(Message_not_compatible_with_the_protocol_state,0x65 )\
- CAUSE_DEF(Protocol_error_unspecified,0x67 )
-
/* Map task id to printable name. */
#define CAUSE_TEXT(LabEl, nUmID) {nUmID, #LabEl},
@@ -163,11 +119,8 @@ static const text_info_t cause_text_info[] = {
FOREACH_CAUSE(TO_TEXT)
};
-#define CAUSE_ENUM(LabEl, nUmID ) LabEl = nUmID,
+#define CAUSE_ENUM(LabEl, nUmID) LabEl = nUmID,
//! Tasks id of each task
-typedef enum {
- FOREACH_CAUSE(TO_ENUM)
-} cause_id_t;
//_table_9.11.4.2.1:_5GSM_cause_information_element
#define FOREACH_CAUSE_SECU(CAUSE_SECU_DEF) \
diff --git a/openair3/NAS/NR_UE/5GS/fgs_nas_utils.h b/openair3/NAS/NR_UE/5GS/fgs_nas_utils.h
index 09754e9903..7df312a757 100644
--- a/openair3/NAS/NR_UE/5GS/fgs_nas_utils.h
+++ b/openair3/NAS/NR_UE/5GS/fgs_nas_utils.h
@@ -25,6 +25,7 @@
#include
#include
#include // For memcpy
+#include
#define PRINT_NAS_ERROR(...) fprintf(stderr, ##__VA_ARGS__)
diff --git a/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c b/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c
index 41865051cd..12e69c1581 100644
--- a/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c
+++ b/openair3/NAS/NR_UE/5GS/tests/nas_lib_test.c
@@ -2,7 +2,9 @@
#include
#include
#include
+#include "common/utils/ds/byte_array.h"
#include "fgs_service_request.h"
+#include "fgmm_service_accept.h"
#include "nr_nas_msg.h"
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
@@ -75,8 +77,59 @@ static void test_service_request(void)
"test_service_request() failed: original and decoded messages do not match\n");
}
+/**
+ * @brief Test NAS Service Accept enc/dec
+ */
+static void test_service_accept(void)
+{
+ // Dummy NAS Service Accept message
+ fgs_service_accept_msg_t orig = {
+ .has_psi_status = true,
+ .has_psi_res = true,
+ .num_errors = 1,
+ .t3448 = malloc_or_fail(sizeof(*orig.t3448)),
+ };
+ orig.psi_status[1] = PDU_SESSION_ACTIVE;
+ orig.psi_status[2] = PDU_SESSION_INACTIVE;
+ orig.psi_status[3] = PDU_SESSION_ACTIVE;
+ orig.psi_res[1] = REACTIVATION_FAILED;
+ orig.psi_res[2] = REACTIVATION_SUCCESS;
+ orig.cause[0].cause = Illegal_UE;
+ orig.cause[0].pdu_session_id = 1;
+ orig.t3448->value = 16;
+ orig.t3448->unit = TWO_SECONDS;
+
+ // Expected encoded data
+ uint8_t expected_enc[] = {0x50, 0x02, 0x0a, 0x00, 0x26, 0x02, 0x02, 0x00, 0x72, 0x00, 0x00, 0x01, 0x03, 0x6B, 0x01, 0x10};
+ uint16_t len_status = 2;
+ expected_enc[9] = (len_status >> 8) & 0xFF;
+ expected_enc[10] = len_status & 0xFF;
+
+ // Buffer
+ uint8_t buf[64] = {0};
+ byte_array_t buffer = {.buf = &buf[0], .len = sizeof(expected_enc)};
+
+ // Encode NAS Service Accept
+ int encoded_length = encode_fgs_service_accept(&buffer, &orig);
+ AssertFatal(encoded_length == sizeofArray(expected_enc), "encode_fgs_service_accept() failed\n");
+
+ // Compare the raw encoded buffer with expected encoded data
+ AssertFatal(memcmp(buffer.buf, expected_enc, buffer.len) == 0, "Encoding mismatch!\n");
+
+ // Decode NAS Service Accept
+ fgs_service_accept_msg_t dec = {0};
+ int decoded_length = decode_fgs_service_accept(&dec, &buffer);
+ AssertFatal(decoded_length >= 0, "decode_fgs_service_accept() failed\n");
+
+ // Compare original and decoded messages
+ AssertFatal(eq_service_accept(&orig, &dec), "test_service_accept() failed: original and decoded messages do not match\n");
+ free_fgs_service_accept(&dec);
+ free_fgs_service_accept(&orig);
+}
+
int main()
{
test_service_request();
+ test_service_accept();
return 0;
}
diff --git a/openair3/NAS/NR_UE/nr_nas_msg.c b/openair3/NAS/NR_UE/nr_nas_msg.c
index 95548da714..b9b90ab339 100644
--- a/openair3/NAS/NR_UE/nr_nas_msg.c
+++ b/openair3/NAS/NR_UE/nr_nas_msg.c
@@ -36,6 +36,7 @@
#include
#include
#include
+#include "common/utils/ds/byte_array.h"
#include "AuthenticationResponseParameter.h"
#include "FGCNasMessageContainer.h"
#include "FGSDeregistrationRequestUEOriginating.h"
@@ -64,6 +65,7 @@
#include "utils.h"
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
#include "fgs_nas_utils.h"
+#include "fgmm_service_accept.h"
#define MAX_NAS_UE 4
@@ -114,6 +116,16 @@ static void servingNetworkName(uint8_t *msg, char *imsiStr, int mnc_size)
snprintf((char *)msg, size, "5G:mnc%3s.mcc%3s.3gppnetwork.org", mnc, mcc);
}
+static const char *print_info(uint8_t id, const text_info_t *array, uint8_t array_size)
+{
+ for (uint8_t i = 0; i < array_size; i++) {
+ if (array[i].id == id) {
+ return array[i].text;
+ }
+ }
+ return "N/A";
+}
+
static security_state_t nas_security_rx_process(nr_ue_nas_t *nas, uint8_t *pdu_buffer, int pdu_length)
{
if (nas->security_container == NULL)
@@ -1130,7 +1142,12 @@ static void handle_pdu_session_accept(uint8_t *pdu_buffer, uint32_t msg_length)
LOG_E(NAS, "decode_pdu_session_establishment_accept_msg failure\n");
// process PDU Session
- process_pdu_session_addr(&msg);
+
+ if (msg.pdu_addr_ie.pdu_length)
+ process_pdu_session_addr(&msg);
+ else
+ LOG_W(NAS, "Optional PDU Address IE was not provided\n");
+
set_qfi_pduid(msg.qos_rules.rule->qfi, sm_header.pdu_session_id);
}
@@ -1472,6 +1489,48 @@ static void handle_registration_accept(nr_ue_nas_t *nas, const uint8_t *pdu_buff
}
}
+/* 3GPP TS 24.008 10.5.7.3 GPRS Timer */
+static int process_gprs_timer(gprs_timer_t *timer)
+{
+ if (!timer)
+ return -1;
+
+ int factor = 0;
+ switch (timer->unit) {
+ case TWO_SECONDS:
+ factor = 2;
+ break;
+ case ONE_MINUTE:
+ factor = 60;
+ break;
+ case DECIHOURS:
+ factor = 360; // 6 minutes
+ break;
+ case DEACTIVATED:
+ return -1;
+ default:
+ factor = 60; // default is 60 seconds
+ break;
+ }
+
+ return timer->value * factor;
+}
+
+static void handle_service_accept(nr_ue_nas_t *nas, const byte_array_t *buffer)
+{
+ LOG_I(NAS, "Received NAS Service Accept message\n");
+ fgs_service_accept_msg_t msg = {0};
+ decode_fgs_service_accept(&msg, buffer);
+ // Extract timer t3448 in seconds (optional IE)
+ nas->t3448 = process_gprs_timer(msg.t3448);
+ // Extract possible reactivation errors
+ for (int i = 0; i < msg.num_errors; i++)
+ LOG_E(NAS,
+ "Received PDU Session %d reactivation result error cause %s\n",
+ msg.cause->pdu_session_id,
+ print_info(msg.cause->cause, cause_text_info, sizeofArray(cause_text_info)));
+}
+
void *nas_nrue(void *args_p)
{
// Wait for a message or an event
@@ -1673,6 +1732,11 @@ void *nas_nrue(void *args_p)
LOG_E(NAS, "Received Registration reject cause: %s\n", cause_text_info[pdu_buffer[17]].text);
exit(1);
break;
+ case FGS_SERVICE_ACCEPT: {
+ byte_array_t buffer = {.buf = pdu_buffer, .len = pdu_length};
+ handle_service_accept(nas, &buffer);
+ break;
+ }
default:
LOG_W(NR_RRC, "unknown message type %d\n", msg_type);
break;
diff --git a/openair3/NAS/NR_UE/nr_nas_msg.h b/openair3/NAS/NR_UE/nr_nas_msg.h
index c46ba6fcd4..3bba6b1cec 100644
--- a/openair3/NAS/NR_UE/nr_nas_msg.h
+++ b/openair3/NAS/NR_UE/nr_nas_msg.h
@@ -98,6 +98,8 @@ typedef struct {
bool is_rrc_inactive;
/* Timer T3512 */
int t3512;
+ // Timer t3448 in seconds (-1 = disabled)
+ int t3448;
} nr_ue_nas_t;
nr_ue_nas_t *get_ue_nas_info(module_id_t module_id);
diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c
index b60ac1c13c..de466daddf 100644
--- a/openair3/NGAP/ngap_gNB.c
+++ b/openair3/NGAP/ngap_gNB.c
@@ -37,7 +37,6 @@
#include "BIT_STRING.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "T.h"
#include "asn_internal.h"
#include "assertions.h"
diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c
index 6309485e2d..97f15ef658 100644
--- a/openair3/NGAP/ngap_gNB_handlers.c
+++ b/openair3/NGAP/ngap_gNB_handlers.c
@@ -35,7 +35,6 @@
#include "INTEGER.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "T.h"
#include "assertions.h"
#include "common/utils/T/T.h"
diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c
index 83daacf758..83c004fc74 100644
--- a/openair3/NGAP/ngap_gNB_nas_procedures.c
+++ b/openair3/NGAP/ngap_gNB_nas_procedures.c
@@ -39,7 +39,6 @@
#include "INTEGER.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
-#include "PHY/defs_common.h"
#include "T.h"
#include "aper_encoder.h"
#include "asn_application.h"
diff --git a/openair3/NGAP/ngap_gNB_ue_context.c b/openair3/NGAP/ngap_gNB_ue_context.c
index 894491ebbe..c4b7b012ef 100644
--- a/openair3/NGAP/ngap_gNB_ue_context.c
+++ b/openair3/NGAP/ngap_gNB_ue_context.c
@@ -30,7 +30,6 @@
#include "ngap_gNB_ue_context.h"
#include
#include
-#include "PHY/defs_common.h"
#include "T.h"
#include "common/utils/T/T.h"
#include "ngap_common.h"
diff --git a/openair3/SCTP/sctp_common.c b/openair3/SCTP/sctp_common.c
index 66ffbec18a..5d22f19908 100644
--- a/openair3/SCTP/sctp_common.c
+++ b/openair3/SCTP/sctp_common.c
@@ -63,6 +63,13 @@ int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams,
return -1;
}
+ int flag = 1;
+ if (setsockopt(sd, IPPROTO_SCTP, SCTP_NODELAY, &flag, sizeof(flag)) < 0) {
+ SCTP_ERROR("setsockopt SCTP_NODELAY failed: %d:%s\n", errno, strerror(errno));
+ close(sd);
+ return -1;
+ }
+
/* Allow socket reuse */
if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) {
SCTP_ERROR("setsockopt SO_REUSEADDR failed (%d:%s)\n", errno, strerror(errno));