3 # ============LICENSE_START===============================================
4 # Copyright (C) 2022 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
20 docker network create nonrtric-docker-net 2> /dev/null
22 DIR="$( cd "$( dirname "$0" )" && pwd )"
25 docker run --detach --rm -v $DIR/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json -p $PMS_PORT:$PMS_PORT -p 8433:8433 --network=nonrtric-docker-net --name=policy-agent-container nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-plt-a1policymanagementservice:2.5.0
27 docker run --detach --rm -p $SIM_PORT:$SIM_PORT -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator:2.3.1
29 docker run --detach --rm -p 8086:$SIM_PORT -p 8186:8185 -e A1_VERSION=STD_1.1.3 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator:2.3.1
32 while [ $retcode -ne 0 ]; do
33 RES=$(curl -s -w '%{http_code}' -X PUT -v http://localhost:$SIM_PORT/a1-p/policytypes/2 -H Content-Type:application/json --data-binary @sim_hw.json)
35 if [ $retcode -eq 0 ]; then
36 status=${RES:${#RES}-3}
37 if [ $status -ne 201 ]; then
42 if [ $retcode -ne 0 ]; then
49 while [ $retcode -ne 0 ]; do
50 echo "Checking that type is available"
51 RES=$(curl -s -w '%{http_code}' localhost:$PMS_PORT/a1-policy/v2/rics)
53 if [ $retcode -eq 0 ]; then
54 if [[ "$RES" != *'"policytype_ids":["2"]'* ]]; then
58 if [ $retcode -ne 0 ]; then