Skip to content
Snippets Groups Projects
Commit cf53f2e6 authored by turletti's avatar turletti
Browse files

Merge branch 'r2-helm-charts' into r2-helm-charts-r2lab

parents c8fd3bb0 eb13e1ad
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ spec:
{{- if .Values.multus.f1cInterface.create }}
,{
"name": "{{ .Chart.Name }}-f1c",
"interface": "f1c"
"interface": "f1"
}
{{- end }}
]
......@@ -78,6 +78,7 @@ spec:
command: [ "/bin/bash", "-c" ]
args:
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi)
N2_IP_ADDRESS=$(ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
F1_IP_ADDRESS=$(ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
CUCP_IP_ADDRESS=$(ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
......
......@@ -72,8 +72,8 @@ config:
amfhost: "oai-amf" # amf ip-address or service-name oai-amf-svc or 172.21.6.94
n2IfName: "eth0" # if multus.n2Interface.create is true then use n2
n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0
f1IfName: "eth0" #if multus.f1Interface.create is true then use multus.f1Interface.Ipadd
e1IfName: "eth0" #if multus.f1Interface.create is true then use multus.f1Interface.Ipadd
f1IfName: "eth0" #if multus.f1Interface.create is true then use f1
e1IfName: "eth0" #if multus.f1Interface.create is true then use e1
f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
......
......@@ -35,7 +35,7 @@ spec:
{{- if .Values.multus.f1uInterface.create }}
,{
"name": "{{ .Chart.Name }}-f1u",
"interface": "f1u"
"interface": "f1"
}
{{- end }}
]
......@@ -81,6 +81,7 @@ spec:
apt update && apt install iproute2 -y;
{{- end }}
CU_CP_IP_ADDRESS=$(getent hosts $CU_CP_HOST | awk '{print $1}');
CU_CP_IP_ADDRESS=$(if [[ $CU_CP_IP_ADDRESS ]]; then echo $CU_CP_IP_ADDRESS; else echo $CU_CP_HOST;fi)
CU_UP_IP_ADDRESS=$(ip -f inet addr show $E1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N2_IP_ADDRESS=$(ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N3_IP_ADDRESS=$(ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
......
......@@ -71,8 +71,8 @@ config:
cuCpHost: "oai-cu" #
n2IfName: "eth0" # if multus.n2Interface.create is true then use n2
n3IfName: "eth0" #if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0
f1IfName: "eth0" #if multus.f1uInterface.create is true then use multus.f1uInterface.Ipadd
e1IfName: "eth0" #if multus.e1Interface.create is true then use multus.e1Interface.Ipadd
f1IfName: "eth0" #if multus.f1uInterface.create is true then use f1
e1IfName: "eth0" #if multus.e1Interface.create is true then use e1
f1cuPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
f1duPort: "2153" #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
......
......@@ -78,6 +78,7 @@ spec:
command: [ "/bin/bash", "-c" ]
args:
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi)
N2_IP_ADDRESS=$(ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N3_IP_ADDRESS=$(ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
F1_IP_ADDRESS=$(ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
......
......@@ -68,7 +68,8 @@ spec:
{{- if .Values.start.gnbdu}}
command: [ "/bin/bash", "-c" ]
args:
- CU_IP_ADDRESS=$(getent hosts $CU_HOST | awk '{print $1}');
- CU_IP_ADDRESS=$(getent hosts $CU_HOST | awk '{print $1}')
CU_IP_ADDRESS=$(if [[ $CU_IP_ADDRESS ]]; then echo $CU_IP_ADDRESS; else echo $CU_HOST;fi)
F1_DU_IP_ADDRESS=$(ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
sed -e s/@F1_DU_IP_ADDRESS@/$F1_DU_IP_ADDRESS/g
-e s/@CU_IP_ADDRESS@/$CU_IP_ADDRESS/g
......
......@@ -93,6 +93,7 @@ spec:
command: [ "/bin/bash", "-c" ]
args:
- AMF_IP_ADDRESS=$(getent hosts $AMF_HOST | awk '{print $1}');
AMF_IP_ADDRESS=$(if [[ $AMF_IP_ADDRESS ]]; then echo $AMF_IP_ADDRESS; else echo $AMF_HOST;fi);
N2_IP_ADDRESS=$(ip -f inet addr show $N2_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
N3_IP_ADDRESS=$(ip -f inet addr show $N3_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
sed -e s/@N2_IP_ADDRESS@/$N2_IP_ADDRESS/g
......
......@@ -57,11 +57,10 @@ spec:
securityContext:
privileged: true
{{- if .Values.start.nrue}}
command:
- sh
- "-c"
- |
RFSIM_IP_ADDRESS=$(getent hosts {{ .Values.config.rfSimServer }} | awk '{print $1}')
command: [ "/bin/bash", "-c" ]
args:
- RFSIM_IP_ADDRESS=$(getent hosts $RFSIM_HOST | awk '{print $1}');
RFSIM_IP_ADDRESS=$(if [[ $RFSIM_IP_ADDRESS ]]; then echo $RFSIM_IP_ADDRESS; else echo $RFSIM_HOST;fi);
{{- if eq .Values.config.usrp "b2xx"}}
/opt/oai-gnb/bin/uhd_images_downloader.py -t b2xx;
{{- else if eq .Values.config.usrp "n3xx" }}
......@@ -74,7 +73,6 @@ spec:
{{- else}}
exec /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf $USE_ADDITIONAL_OPTIONS;
{{- end }}
EOF
{{- else}}
command:
- /bin/sleep
......@@ -83,6 +81,8 @@ spec:
env:
- name: TZ
value: {{ .Values.config.timeZone }}
- name: RFSIM_HOST
value: {{ .Values.config.rfSimServer }}
- name: USE_ADDITIONAL_OPTIONS
value: {{ .Values.config.useAdditionalOptions }}
{{- if .Values.includeTcpDumpContainer }}
......
......@@ -20,7 +20,7 @@ set -eo pipefail
## Usage ./ci-scripts/checkHelmChartsMinikube.sh $tag $parent_repo
# TAG=$1
# PARENT=$2
NAMESPACE='helm-triall'
NAMESPACE='helm-trial'
if ! command -v helm &> /dev/null
then
......
################################################################################
# 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 terms found in the LICENSE file in the root of this source tree.
#
# 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
##################################################################################
#/bin/bash
set -eo pipefail
## Usage ./ci-scripts/checkHelmChartsOpenshift.sh $tag $parent_repo
# TAG=$1
# PARENT=$2
NAMESPACE='helm-trial'
if ! command -v helm &> /dev/null
then
echo "helm is not installed, install it from --> https://helm.sh/docs/intro/install/"
exit 1
fi
function cleanup {
namespace=$1
echo "Removing the namespace"
oc delete project $namespace
}
function deployCorebasic {
namespace=$1
s=("oai-amf" "oai-smf" "oai-nrf" "oai-udr" "oai-udm" "oai-ausf" "oai-upf")
for n in ${s[@]};
do
sed -i 's/$n/$n-ubi/g' charts/oai-5g-core/oai-5g-basic/values.yaml
done
helm dependency update charts/oai-5g-core/oai-5g-basic
helm install basic charts/oai-5g-core/oai-5g-basic -n $namespace
sleep 1
## Wait for all core network NFs to be ready
echo "----------Sanity Check: Ongoing ----------"
s=("basic-mysql" "oai-amf" "oai-smf" "oai-nrf" "oai-udr" "oai-udm" "oai-ausf" "oai-upf")
for n in ${s[@]};
do
kubectl wait --for=condition=ready pod -n $namespace -l app.kubernetes.io/name=$n --timeout=3m || check="KO"
if [[ $check == "KO" ]]; then
echo "----------Sanity Check $n: KO ----------"
exit 1
else
echo "----------Sanity Check $n: OK ----------"
fi
done
}
function checkCoreConfiguration {
namespace=$1
echo "----------Checking Core Configuration: Ongoing ----------"
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-smf'| awk '{print $1}') | grep 'handle_receive'
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-upf'| awk '{print $1}') | grep 'handle_receive'
echo "----------PFCP Session: OK ----------"
s=("AMF" "SMF" "UPF" "UDR" "UDM" "AUSF")
for n in ${s[@]};
do
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-nrf'| awk '{print $1}') | grep OAI-$n || check="KO"
if [[ $check == "KO" ]]; then
echo "----------NRF-$n: KO ----------"
exit 1
else
echo "----------NRF-$n: OK ----------"
fi
done
}
function useCaseOneTesting {
namespace=$1
check="OK"
echo "----------Testing Use Case 1 Monolithic RAN: Ongoing ----------"
s=("oai-gnb" "oai-nr-ue")
for n in ${s[@]};
do
sed -i 's/$n/$n-ubi/g' charts/oai-5g-ran/$n/values.yaml
done
helm install gnb charts/oai-5g-ran/oai-gnb -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-gnb --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-gnb'| awk '{print $1}') | grep 'associated AMF 1' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------NGAP Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------NGAP Setup: KO ----------"
exit 1
fi
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-gnb'| awk '{print $1}') | grep 'I Frame.Slot' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------RFSimulator Started: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------RFSimulator Setup: KO ----------"
exit 1
fi
sleep 2
helm install nrue charts/oai-5g-ran/oai-nr-ue -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-nr-ue --timeout=5m -n $namespace
sleep 2
for n in {1..5};
do
sleep 1
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep 'nr-ue' | awk '{print $1}') -- ifconfig | grep 12.1.1 || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE Connected: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE Connected: KO ----------"
exit 1
fi
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep 'nr-ue' | awk '{print $1}') -- ping -I oaitun_ue1 12.1.1.1 -c4 || check="KO"
if [[ $check == "KO" ]]; then
echo "----------Ping to UPF: KO ----------"
exit 1
else
echo "----------Ping to UPF: OK ----------"
fi
helm uninstall nrue -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep 'oai-amf'| awk '{print $1}') | grep '5GMM-DEREGISTERED' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE De-registered: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE De-registered: KO ----------"
exit 1
fi
helm uninstall gnb -n $namespace
for n in {1..10};
do
sleep 1
check="OK"
kubectl get pods -n $namespace | grep 'oai-gnb' || check="KO"
if [[ $check == "KO" ]]; then
echo "----------gNB Removed: OK ----------"
check="OK"
break
else
continue
fi
done
if [[ $check == "KO" ]]; then
echo "----------gNB Removed: KO ----------"
exit 1
fi
}
function useCaseTwoTesting {
namespace=$1
check="OK"
echo "----------Testing Use Case 2 F1 Split RAN: Ongoing ----------"
sed -i 's/oai-gnb/oai-gnb-ubi/g' charts/oai-5g-ran/oai-cu/values.yaml
sed -i 's/oai-gnb/oai-gnb-ubi/g' charts/oai-5g-ran/oai-du/values.yaml
sed -i 's/oai-nr-ue/oai-nr-ue-ubi/g' charts/oai-5g-ran/oai-nr-ue/values.yaml
helm install cu charts/oai-5g-ran/oai-cu -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-cu --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-cu| awk '{print $1}') | grep 'associated AMF 1' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------NGAP Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------NGAP Setup: KO ----------"
exit 1
fi
helm install du charts/oai-5g-ran/oai-du -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-du --timeout=5m -n $namespace
sleep 2
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-cu| awk '{print $1}') | grep 'Received F1 Setup Request' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------F1 Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------F1 Setup: KO ----------"
exit 1
fi
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-du| awk '{print $1}') | grep 'I Frame.Slot' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------RFSimulator Started: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------RFSimulator Setup: KO ----------"
exit 1
fi
sleep 5
helm install nrue charts/oai-5g-ran/oai-nr-ue -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-nr-ue --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep nr-ue | awk '{print $1}') -- ifconfig | grep 12.1.1 || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE Connected: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE Connected: KO ----------"
exit 1
fi
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep nr-ue | awk '{print $1}') -- ping -I oaitun_ue1 12.1.1.1 -c4 || check="KO"
if [[ $check == "KO" ]]; then
echo "----------Ping to UPF: KO ----------"
exit 1
else
echo "----------Ping to UPF: OK ----------"
fi
helm uninstall nrue -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-amf| awk '{print $1}') | grep '5GMM-DEREGISTERED' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE De-registered: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE De-registered: KO ----------"
exit 1
fi
helm uninstall cu -n $namespace
helm uninstall du -n $namespace
}
function useCaseThreeTesting {
namespace=$1
check="OK"
echo "----------Testing Use Case 3 E1-F1 Split RAN: Ongoing ----------"
sed -i 's/oai-gnb/oai-gnb-ubi/g' charts/oai-5g-ran/oai-cu-cp/values.yaml
sed -i 's/oai-gnb/oai-cu-up-ubi/g' charts/oai-5g-ran/oai-cu-up/values.yaml
sed -i 's/oai-gnb/oai-gnb-ubi/g' charts/oai-5g-ran/oai-du/values.yaml
sed -i 's/oai-nr-ue/oai-nr-ue-ubi/g' charts/oai-5g-ran/oai-nr-ue/values.yaml
helm install cucp charts/oai-5g-ran/oai-cu-cp -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-cu-cp --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-cu-cp| awk '{print $1}') | grep 'associated AMF 1' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------NGAP Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------NGAP Setup: KO ----------"
exit 1
fi
helm install cuup charts/oai-5g-ran/oai-cu-up -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-cu-up --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-cu-cp| awk '{print $1}') | grep "Accepting new CU-UP ID" || check="KO"
echo "Testing--------------"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------E1 Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------E1 Setup: KO ----------"
exit 1
fi
helm install du charts/oai-5g-ran/oai-du -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-du --timeout=5m -n $namespace
sleep 2
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-cu-cp| awk '{print $1}') | grep 'Received F1 Setup Request' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------F1 Setup: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------F1 Setup: KO ----------"
exit 1
fi
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-du| awk '{print $1}') | grep 'I Frame.Slot' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------RFSimulator Started: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------RFSimulator Setup: KO ----------"
exit 1
fi
sleep 5
helm install nrue charts/oai-5g-ran/oai-nr-ue -n $namespace
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=oai-nr-ue --timeout=5m -n $namespace
for n in {1..5};
do
sleep 1
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep nr-ue | awk '{print $1}') -- ifconfig | grep 12.1.1 || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE Connected: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE Connected: KO ----------"
exit 1
fi
kubectl exec -it -n $namespace $(kubectl get pods -n $namespace -l app.kubernetes.io/name=oai-nr-ue | grep nr-ue | awk '{print $1}') -- ping -I oaitun_ue1 12.1.1.1 -c4 || check="KO"
if [[ $check == "KO" ]]; then
echo "----------Ping to UPF: KO ----------"
exit 1
else
echo "----------Ping to UPF: OK ----------"
fi
helm uninstall nrue -n $namespace
for n in {1..5};
do
sleep 1
kubectl logs -n $namespace $(kubectl get pods -n $namespace | grep oai-amf| awk '{print $1}') | grep '5GMM-DEREGISTERED' || check="KO"
if [[ $check == "KO" ]]; then
if [[ $check == "KO" ]] && [[ $n != 5 ]]; then check="OK";continue;fi
else
echo "----------UE De-registered: OK ----------"
break
fi
done
if [[ $check == "KO" ]]; then
echo "----------UE De-registered: KO ----------"
exit 1
fi
helm uninstall cucp -n $namespace
helm uninstall cuup -n $namespace
helm uninstall du -n $namespace
}
trap cleanup $NAMESPACE EXIT
## Testing only operators without nephio
echo "----------Test Started ----------"
#create namespace
oc create project $NAMESPACE
#Deploy core network
deployCorebasic $NAMESPACE
##Configuration check
checkCoreConfiguration $NAMESPACE
#test usecase 1
useCaseOneTesting $NAMESPACE
#test usecase 2
sleep 30
useCaseTwoTesting $NAMESPACE
sleep 30
useCaseThreeTesting $NAMESPACE
## Clean up
oc delete project $NAMESPACE
#minikube delete
echo "----------Test Done ----------"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment