Commit 4fa4140d authored by Luhan Wang's avatar Luhan Wang

add verify

parent 8841918f
#/bin/bash
ALL_VMS=$(sudo uvt-kvm list)
VM_NAME="vmtest"
echo $ALL_VMS
result=$(echo $ALL_VMS | grep "${VM_NAME}")
echo $result
if [ "$result" != "" ];then
uvt-kvm destroy $VM_NAME ## if exist testing vm, then remove it
fi
#ALL_VMS=$(sudo uvt-kvm list)
#VM_NAME="vmtest"
#echo $ALL_VMS
#result=$(echo $ALL_VMS | grep "${VM_NAME}")
#echo $result
#if [ "$result" != "" ];then
# uvt-kvm destroy $VM_NAME ## if exist testing vm, then remove it
#fi
##创建一个虚拟机用于承载测试;
uvt-kvm create vmtest release=bionic --memory 8192 --disk 80 --cpu 4 --ssh-public-key-file ~/.ssh/id_rsa.pub
uvt-kvm wait $VM_NAME
#uvt-kvm create vmtest release=bionic --memory 8192 --disk 80 --cpu 4 --ssh-public-key-file ~/.ssh/id_rsa.pub
#uvt-kvm wait $VM_NAME
echo "successfully created VM, name is vmtest"
mcc: '466' # Mobile Country Code value
mnc: '92' # Mobile Network Code value (2 or 3 digits)
nci: '0x000000010' # NR Cell Identity (36-bit)
idLength: 32 # NR gNB ID length in bits [22...32]
tac: 100 # Tracking Area Code
linkIp: 127.0.0.1 # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
ngapIp: 172.11.200.2 # gNB's local IP address for N2 Interface (Usually same with local IP)
gtpIp: 172.11.200.2 # gNB's local IP address for N3 Interface (Usually same with local IP)
# List of AMF address information
amfConfigs:
- address: 172.11.200.14
port: 38412
# List of supported S-NSSAIs by this gNB
slices:
- sst: 1
sd: 0
# Indicates whether or not SCTP stream number errors should be ignored.
ignoreStreamIds: true
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
supi: 'imsi-466920000000001'
# Mobile Country Code value of HPLMN
mcc: '466'
# Mobile Network Code value of HPLMN (2 or 3 digits)
mnc: '92'
# Permanent subscription key
key: '00112233445566778899aabbccddeeff'
# Operator code (OP or OPC) of the UE
op: '000102030405060708090a0b0c0d0e0f'
# This value specifies the OP type and it can be either 'OP' or 'OPC'
opType: 'OPC'
# Authentication Management Field (AMF) value
amf: '9001'
# IMEI number of the device. It is used if no SUPI is provided
imei: '356938035643803'
# IMEISV number of the device. It is used if no SUPI and IMEI is provided
imeiSv: '4370816125816151'
# List of gNB IP addresses for Radio Link Simulation
gnbSearchList:
- 127.0.0.1
# UAC Access Identities Configuration
uacAic:
mps: false
mcs: false
# UAC Access Control Class
uacAcc:
normalClass: 0
class11: false
class12: false
class13: false
class14: false
class15: false
# Initial PDU sessions to be established
sessions:
- type: 'IPv4'
apn: 'internet'
slice:
sst: 1
sd: 0
# Configured NSSAI for this UE by HPLMN
configured-nssai:
- sst: 1
sd: 0
# Default Configured NSSAI for this UE
default-nssai:
- sst: 1
sd: 0
# Supported integrity algorithms by this UE
integrity:
IA1: true
IA2: true
IA3: true
# Supported encryption algorithms by this UE
ciphering:
EA1: true
EA2: true
EA3: true
# Integrity protection maximum data rate for user plane
integrityMaxRate:
uplink: 'full'
downlink: 'full'
#!/bin/bash
#!/bin/bash
ALL_VMS=$(sudo uvt-kvm list)
VM_NAME="vmtest"
CURRENT_PATH=`pwd`
echo $ALL_VMS
result=$(echo $ALL_VMS | grep "${VM_NAME}")
if [ "$result" == "" ];then
echo "target VM doesn't exist.."
exit 1 ## VM doesn't exist
fi
VM_IP=`sudo uvt-kvm ip ${VM_NAME}`
COMMAND="cd openxg-5gcs-release/ci-scripts;\
sudo docker pull hogostan/ueransim;\
sudo docker run -d -ti -v /home/ubuntu/openxg-5gcs-release/ci-scripts/etc:/etc/openxg/ --privileged=true --net=docker-openxg --name=openxg-ueransim --ip=172.11.200.2 hogostan/ueransim:1.0 /UERANSIM/build/nr-gnb -c /etc/openxg/gnb.yaml ;\
sleep 1;\
sudo docker exec -ti openxg-ueransim /UERANSIM/build/nr-ue -c /etc/openxg/ue.yaml;\
sleep 5;\
line=sudo docker exec -ti openxg-ueransim ping www.baidu.com -c 1 -s 1 -W 1 -I uerantun0| grep \"0% packet loss\" | wc -l ; \
if [ $line == \"1\" ];then
echo \"successfully ping\"
else
echo \"cannot ping\"
exit 1 ## VM doesn't exist
fi
"
ssh -T -o StrictHostKeyChecking=no ubuntu@${VM_IP} $COMMAND
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment