# Location of the component configuration file. The file will only be used if the Consul database is not used;
# configuration from the Consul will override the file.
filepath: /opt/app/policy-agent/data/application_configuration.json
+ # Postgres database usage is enabled using the below parameter.
+ # If this is enabled, the application will use postgres database for storage.
+ # This overrides the s3(s3.bucket) or file store(vardata-directory) configuration if enabled.
+ database-enabled: false
webclient:
# Configuration of the trust store used for the HTTP client (outgoing requests)
# The file location and the password for the truststore is only relevant if trust-store-used == true
notificationurl=$CR_SERVICE_APP_PATH_0"/test"
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
a1pms_api_put_policy_v3 200 5000 testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json
+ a1pms_api_post_policy_v3 201 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true testdata/STD2/pi_qos_template.json
a1pms_api_put_policy_v3 200 5200 testdata/STD2/pi_qos_template.json
- a1pms_api_post_policy_v3 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
+ a1pms_api_post_policy_v3 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
a1pms_api_put_policy_v3 200 5100 testdata/STD/pi1_template.json
else
a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
a1pms_api_put_service 201 "service1" 3600 "$CR_SERVICE_APP_PATH_0/1"
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1
fi
fi
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT testdata/OSC/pi1_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1
fi
use_a1pms_rest_http
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT testdata/STD/pi1_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1
fi
fi
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT testdata/STD/pi1_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1
fi
use_a1pms_rest_http
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true testdata/STD2/pi_qos_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1
fi
fi
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos_template.json 1
+ a1pms_api_post_policy_v3 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT testdata/STD2/pi_qos_template.json 1
else
a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos_template.json 1
fi
a1pms_api_get_policy_types_v3 404 dummy-ric
- a1pms_api_post_policy_v3 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT NONOTIFYURL testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT NONOTIFYURL testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 NOSERVICE ricsim_g2_1 NOTYPE 5100 NOTRANSIENT NONOTIFYURL testdata/STD/pi1_template.json
+ a1pms_api_post_policy_v3 201 NOSERVICE ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
- a1pms_api_post_policy_v3 201 NOSERVICE ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT NONOTIFYURL testdata/STD2/pi_qos2_template.json
+ a1pms_api_post_policy_v3 201 NOSERVICE ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT testdata/STD2/pi_qos2_template.json
fi
a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1"
if [ "$A1PMS_VERSION" == "V3" ]; then
a1pms_equal json:policy-types 3 120
- a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
- a1pms_api_post_policy_v3 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT testdata/STD2/pi_qos2_template.json
else
a1pms_equal json:policy-types 3 120
sim_equal ricsim_g2_1 num_instances 1
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service10" ricsim_g2_1 NOTYPE 5101 true $notificationurl testdata/STD/pi1_template.json
-
- a1pms_api_post_policy_v3 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5201 true $notificationurl testdata/STD2/pi_qos2_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g1_1 1 5001 true testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g2_1 NOTYPE 5101 true testdata/STD/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5201 true testdata/STD2/pi_qos2_template.json
else
a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json
a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5101 true $notificationurl testdata/STD/pi1_template.json
if [ "$A1PMS_VERSION" == "V3" ]; then
a1pms_api_put_service 201 "service-1" 0 "$CR_SERVICE_APP_PATH_0/service-1"
a1pms_api_put_service 201 "service-2" 0 "$CR_SERVICE_APP_PATH_0/service-2"
- a1pms_api_post_policy_v3 201 "service-1" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service-1" ricsim_g1_1 1 5002 false $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service-2" ricsim_g1_1 1 6001 true $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 "service-2" ricsim_g1_1 1 6002 false $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 " " ricsim_g1_1 1 5003 true $notificationurl testdata/OSC/pi1_template.json
- a1pms_api_post_policy_v3 201 " " ricsim_g1_1 1 6003 false $notificationurl testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service-1" ricsim_g1_1 1 5001 true testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service-1" ricsim_g1_1 1 5002 false testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service-2" ricsim_g1_1 1 6001 true testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 "service-2" ricsim_g1_1 1 6002 false testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 " " ricsim_g1_1 1 5003 true testdata/OSC/pi1_template.json
+ a1pms_api_post_policy_v3 201 " " ricsim_g1_1 1 6003 false testdata/OSC/pi1_template.json
a1pms_equal json:policies 6 120
a1pms_api_get_services 200 "service-1" "service-1" 0 "$CR_SERVICE_APP_PATH_0/service-1"
a1pms_api_get_services 200 "service-2" "service-2" 0 "$CR_SERVICE_APP_PATH_0/service-2"
do
sim_generate_policy_uuid
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_v3 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT demo-testdata/STD2/pi1_template.json 1
sim_generate_policy_uuid
- a1pms_api_post_policy_v3 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1
+ a1pms_api_post_policy_v3 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT demo-testdata/STD2/pi1_template.json 1
else
a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1
sim_generate_policy_uuid
start_timer "Create $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using $__httpx and V$version policymanagementservice"
if [ "$A1PMS_VERSION" == "V3" ]; then
- a1pms_api_post_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES_PER_RIC 7
+ a1pms_api_post_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $START_ID NOTRANSIENT testdata/OSC/pi1_template.json $NUM_POLICIES_PER_RIC 7
else
a1pms_api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES_PER_RIC 7
fi
a1pms_api_post_policy_v3() {
__log_test_start $@
- if [ $# -lt 8 ] || [ $# -gt 9 ]; then
- __print_err "<response-code> <service-name> <ric-id> <policytype-id>|NOTYPE <policy-id> <transient>|NOTRANSIENT <notification-url>|NOURL <template-file> [<count>]" $@
+ if [ $# -lt 7 ] || [ $# -gt 8 ]; then
+ __print_err "<response-code> <service-name> <ric-id> <policytype-id>|NOTYPE <policy-id> <transient>|NOTRANSIENT <template-file> [<count>]" $@
return 1
fi
pt=$4
pid=$5
trans=$6
- noti=$7
- temp=$8
- if [ $# -eq 9 ]; then
- max=$9
+ temp=$7
+ if [ $# -eq 8 ]; then
+ max=$8
fi
while [ $count -lt $max ]; do
if [ $serv != "NOSERVICE" ]; then
inputJson=$inputJson", \"serviceId\":\"$serv\""
fi
- if [ $noti != "NONOTIFYURL" ]; then
- inputJson=$inputJson", \"statusNotificationUri\":\"$noti\""
- fi
if [ $trans != "NOTRANSIENT" ]; then
inputJson=$inputJson", \"transient\":\"$trans\""
fi
a1pms_api_post_policy_parallel() {
__log_test_start $@
- if [ $# -ne 11 ]; then
+ if [ $# -ne 10 ]; then
__print_err "These all arguments needed <response-code> <service-name> <ric-id-base> <number-of-rics> <policytype-id> <policy-start-id> <transient> <notification-url>|NOURL <template-file> <count-per-ric> <number-of-threads>" $@
return 1
fi
shift
transient=$1
shift
- noti=$1
- shift
template=$1
shift
count=$1
uuid="NOUUID"
fi
echo "" >"./tmp/.pid${i}.res.txt"
- echo $resp_code $urlbase $ric_base $num_rics $uuid $start_id $serv $type $transient $noti $template $count $pids $i $httpproxy >"./tmp/.pid${i}.txt"
+ echo $resp_code $urlbase $ric_base $num_rics $uuid $start_id $serv $type $transient "noValue" $template $count $pids $i $httpproxy >"./tmp/.pid${i}.txt"
echo $i
done | xargs -n 1 -I{} -P $pids bash -c '{
arg=$(echo {})
data["policyTypeId"]=pt
else:
data["policyTypeId"]=""
- if (noti != "NOURL"):
- data["statusNotificationUri"]=noti
data["policyObject"]=json.loads(payload)
url_out=url