From: raviteja.karumuri Date: Wed, 4 Sep 2024 17:03:49 +0000 (+0100) Subject: Updating FTC to remove notification property from Policy Object info X-Git-Tag: l-release~13 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=d09cc68713d68ff52a65bd9fdc8ca5a61a50c417;p=nonrtric.git Updating FTC to remove notification property from Policy Object info Issue-ID: NONRTRIC-1029 Signed-off-by: Raviteja Karumuri Change-Id: I203961784abda8c5ae27f4a9e10bf29ccdf6cc62 --- diff --git a/docker-compose/policy-service/config/application-policyagent.yaml b/docker-compose/policy-service/config/application-policyagent.yaml index 60419e31..646ad326 100755 --- a/docker-compose/policy-service/config/application-policyagent.yaml +++ b/docker-compose/policy-service/config/application-policyagent.yaml @@ -64,6 +64,10 @@ app: # 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 diff --git a/test/auto-test/FTC1.sh b/test/auto-test/FTC1.sh index cabd9b78..87284dd7 100755 --- a/test/auto-test/FTC1.sh +++ b/test/auto-test/FTC1.sh @@ -246,11 +246,11 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 diff --git a/test/auto-test/FTC10.sh b/test/auto-test/FTC10.sh index effa68e0..a529c80a 100755 --- a/test/auto-test/FTC10.sh +++ b/test/auto-test/FTC10.sh @@ -142,7 +142,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -156,7 +156,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -167,7 +167,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -182,7 +182,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -192,7 +192,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -206,7 +206,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 diff --git a/test/auto-test/FTC100.sh b/test/auto-test/FTC100.sh index f910d589..fbe9fd2b 100755 --- a/test/auto-test/FTC100.sh +++ b/test/auto-test/FTC100.sh @@ -491,13 +491,13 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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" diff --git a/test/auto-test/FTC110.sh b/test/auto-test/FTC110.sh index 8f28029a..4933469a 100755 --- a/test/auto-test/FTC110.sh +++ b/test/auto-test/FTC110.sh @@ -218,10 +218,10 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -238,10 +238,9 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 @@ -295,12 +294,12 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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" diff --git a/test/auto-test/FTC2001.sh b/test/auto-test/FTC2001.sh index 0feecbba..fb18e8dc 100755 --- a/test/auto-test/FTC2001.sh +++ b/test/auto-test/FTC2001.sh @@ -178,9 +178,9 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 diff --git a/test/auto-test/FTC850.sh b/test/auto-test/FTC850.sh index 141650d9..87620800 100755 --- a/test/auto-test/FTC850.sh +++ b/test/auto-test/FTC850.sh @@ -196,7 +196,7 @@ for version in $(seq 2 $VERSIONS_TO_RUN); do 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 diff --git a/test/common/a1pms_api_functions.sh b/test/common/a1pms_api_functions.sh index feb30d40..4c61af17 100644 --- a/test/common/a1pms_api_functions.sh +++ b/test/common/a1pms_api_functions.sh @@ -1114,8 +1114,8 @@ a1pms_api_put_policy_v3() { a1pms_api_post_policy_v3() { __log_test_start $@ - if [ $# -lt 8 ] || [ $# -gt 9 ]; then - __print_err " |NOTYPE |NOTRANSIENT |NOURL []" $@ + if [ $# -lt 7 ] || [ $# -gt 8 ]; then + __print_err " |NOTYPE |NOTRANSIENT []" $@ return 1 fi @@ -1126,10 +1126,9 @@ a1pms_api_post_policy_v3() { 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 @@ -1144,9 +1143,6 @@ a1pms_api_post_policy_v3() { 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 @@ -1415,7 +1411,7 @@ a1pms_api_put_policy_parallel() { a1pms_api_post_policy_parallel() { __log_test_start $@ - if [ $# -ne 11 ]; then + if [ $# -ne 10 ]; then __print_err "These all arguments needed |NOURL " $@ return 1 fi @@ -1434,8 +1430,6 @@ a1pms_api_post_policy_parallel() { shift transient=$1 shift - noti=$1 - shift template=$1 shift count=$1 @@ -1467,7 +1461,7 @@ a1pms_api_post_policy_parallel() { 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 {}) diff --git a/test/common/create_policies_process.py b/test/common/create_policies_process.py index bc9329eb..494cd32b 100644 --- a/test/common/create_policies_process.py +++ b/test/common/create_policies_process.py @@ -138,8 +138,6 @@ try: data["policyTypeId"]=pt else: data["policyTypeId"]="" - if (noti != "NOURL"): - data["statusNotificationUri"]=noti data["policyObject"]=json.loads(payload) url_out=url