mirror of
https://github.com/Gradiant/5g-images.git
synced 2025-10-23 08:12:12 +00:00
Added more config env to ueransim. set opc by default.
This commit is contained in:
@@ -26,3 +26,7 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000001'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
|
||||
|
@@ -26,6 +26,9 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000001'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue2:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -41,6 +44,9 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000002'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue3:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -56,6 +62,9 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000003'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue4:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -71,4 +80,7 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000004'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
|
||||
|
@@ -37,6 +37,9 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000001'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue2:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -52,6 +55,9 @@ services:
|
||||
GNB_HOSTNAME: gnb1
|
||||
APN: internet
|
||||
MSISDN: '0000000002'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue3:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -67,6 +73,9 @@ services:
|
||||
GNB_HOSTNAME: gnb2
|
||||
APN: internet
|
||||
MSISDN: '0000000003'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
ue4:
|
||||
build:
|
||||
context: ../../ueransim/
|
||||
@@ -82,4 +91,7 @@ services:
|
||||
GNB_HOSTNAME: gnb2
|
||||
APN: internet
|
||||
MSISDN: '0000000004'
|
||||
KEY: '465B5CE8B199B49FAA5F0A2EE238A6BC'
|
||||
OP_TYPE: OPC
|
||||
OP: 'E8ED289DEBA952E4283B54E88E6183CA'
|
||||
|
||||
|
@@ -4,15 +4,8 @@ CONTAINER_NAME=open5gs-and-ueransim_mongo_1
|
||||
|
||||
IMSI_LIST="001010000000001 001010000000002 001010000000003 001010000000004"
|
||||
KI=465B5CE8B199B49FAA5F0A2EE238A6BC
|
||||
OP=E8ED289DEBA952E4283B54E88E6183CA
|
||||
#OPC=
|
||||
OPC=E8ED289DEBA952E4283B54E88E6183CA
|
||||
|
||||
for IMSI in $IMSI_LIST; do
|
||||
|
||||
if [ ! -z "$OPC" ]; then
|
||||
docker exec $CONTAINER_NAME mongo --eval "db.subscribers.update({\"imsi\" : \"$IMSI\"}, { \$setOnInsert: { \"imsi\" : \"$IMSI\", \"pdn\" : [ { \"apn\" : \"internet\", \"_id\" : new ObjectId(), \"pcc_rule\" : [ ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"qos\" : { \"qci\" : NumberInt(9), \"arp\" : { \"priority_level\" : NumberInt(8), \"pre_emption_vulnerability\" : NumberInt(1), \"pre_emption_capability\" : NumberInt(0) } }, \"type\" : NumberInt(0) } ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"subscribed_rau_tau_timer\" : NumberInt(12), \"network_access_mode\" : NumberInt(2), \"subscriber_status\" : NumberInt(0), \"access_restriction_data\" : NumberInt(32), \"security\" : { \"k\" : \"$KI\", \"amf\" : \"8000\", \"op\" : null, \"opc\" : \"$OPC\" }, \"__v\" : 0 } }, upsert=true);" open5gs
|
||||
elif [ ! -z "$OP" ]; then
|
||||
docker exec $CONTAINER_NAME mongo --eval "db.subscribers.update({\"imsi\" : \"$IMSI\"}, { \$setOnInsert: { \"imsi\" : \"$IMSI\", \"pdn\" : [ { \"apn\" : \"internet\", \"_id\" : new ObjectId(), \"pcc_rule\" : [ ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"qos\" : { \"qci\" : NumberInt(9), \"arp\" : { \"priority_level\" : NumberInt(8), \"pre_emption_vulnerability\" : NumberInt(1), \"pre_emption_capability\" : NumberInt(0) } }, \"type\" : NumberInt(0) } ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"subscribed_rau_tau_timer\" : NumberInt(12), \"network_access_mode\" : NumberInt(2), \"subscriber_status\" : NumberInt(0), \"access_restriction_data\" : NumberInt(32), \"security\" : { \"k\" : \"$KI\", \"amf\" : \"8000\", \"opc\" : null, \"op\" : \"$OP\" }, \"__v\" : 0 } }, upsert=true);" open5gs
|
||||
fi
|
||||
|
||||
docker exec $CONTAINER_NAME mongo --eval "db.subscribers.update({\"imsi\" : \"$IMSI\"}, { \$setOnInsert: { \"imsi\" : \"$IMSI\", \"pdn\" : [ { \"apn\" : \"internet\", \"_id\" : new ObjectId(), \"pcc_rule\" : [ ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"qos\" : { \"qci\" : NumberInt(9), \"arp\" : { \"priority_level\" : NumberInt(8), \"pre_emption_vulnerability\" : NumberInt(1), \"pre_emption_capability\" : NumberInt(0) } }, \"type\" : NumberInt(0) } ], \"ambr\" : { \"downlink\" : NumberLong(1024000), \"uplink\" : NumberLong(1024000) }, \"subscribed_rau_tau_timer\" : NumberInt(12), \"network_access_mode\" : NumberInt(2), \"subscriber_status\" : NumberInt(0), \"access_restriction_data\" : NumberInt(32), \"security\" : { \"k\" : \"$KI\", \"amf\" : \"8000\", \"op\" : null, \"opc\" : \"$OPC\" }, \"__v\" : 0 } }, upsert=true);" open5gs
|
||||
done
|
||||
|
Reference in New Issue
Block a user