X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fauto-test%2FFTC10.sh;h=bc391d648a91fd1f9668663c07d3aca0dff1c1ee;hb=d14ce4bf82cf83574bac13b11242b48c58e82874;hp=32b6b1cd609d76febb6a89f7261887cdc50762ea;hpb=4a0fe5040891a2b1e64ff952e81c828dda6e20a6;p=nonrtric.git diff --git a/test/auto-test/FTC10.sh b/test/auto-test/FTC10.sh index 32b6b1cd..bc391d64 100755 --- a/test/auto-test/FTC10.sh +++ b/test/auto-test/FTC10.sh @@ -1,7 +1,8 @@ #!/bin/bash # ============LICENSE_START=============================================== -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved. # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,14 +18,14 @@ # ============LICENSE_END================================================= # -TC_ONELINE_DESCR="Basic use case, register service, create/update policy, delete policy, de-register service using both STD and OSC interface while mixing REST and Dmaap" +TC_ONELINE_DESCR="Basic use case, register service, create/update policy, delete policy, de-register service using both STD and OSC interface while mixing REST" #App names to include in the test when running docker, space separated list DOCKER_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list KUBE_INCLUDED_IMAGES=" MR CR A1PMS RICSIM CP KUBEPROXY NGW" -#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list +#Pre-started app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if @@ -33,7 +34,7 @@ KUBE_PRESTARTED_IMAGES="" CONDITIONALLY_IGNORED_IMAGES="NGW" #Supported test environment profiles -SUPPORTED_PROFILES="ONAP-JAKARTA ONAP-KOHN ONAP-LONDON ORAN-F-RELEASE ORAN-G-RELEASE ORAN-H-RELEASE" +SUPPORTED_PROFILES="ONAP-KOHN ONAP-LONDON ONAP-MONTREAL ORAN-G-RELEASE ORAN-H-RELEASE ORAN-I-RELEASE" #Supported run modes SUPPORTED_RUNMODES="DOCKER KUBE" @@ -43,7 +44,7 @@ setup_testenvironment #### TEST BEGIN #### -generate_policy_uuid +sim_generate_policy_uuid use_simulator_http use_mr_http @@ -60,7 +61,11 @@ start_ric_simulators ricsim_g2 5 STD_1.1.3 start_ric_simulators ricsim_g3 1 STD_2.0.0 -start_mr +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + : +else + start_mr +fi start_cr 1 @@ -86,7 +91,7 @@ else a1pms_api_put_configuration 200 ".a1pms_config.json" fi -sleep_wait 120 "Let A1PMS cofiguration take effect" +sleep_wait 120 "Let A1PMS configuration take effect" a1pms_api_get_status 200 @@ -113,8 +118,11 @@ a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notification sim_equal ricsim_g1_1 num_instances 1 - -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 @@ -128,7 +136,11 @@ a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notific sim_equal ricsim_g2_1 num_instances 1 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 @@ -140,7 +152,11 @@ a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notific sim_equal ricsim_g3_1 num_instances 1 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos_template.json 1 @@ -156,7 +172,11 @@ a1pms_api_put_policy 200 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notification sim_equal ricsim_g1_1 num_instances 2 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 200 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 @@ -171,7 +191,11 @@ a1pms_api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notific sim_equal ricsim_g2_1 num_instances 2 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 @@ -184,7 +208,11 @@ a1pms_api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notific sim_equal ricsim_g3_1 num_instances 2 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 true $notificationurl testdata/STD2/pi_qos_template.json 1 @@ -205,15 +233,27 @@ sim_equal ricsim_g3_1 num_instances 2 # Remove policies -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_delete_policy 204 2000 use_a1pms_rest_http a1pms_api_delete_policy 204 3000 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_delete_policy 204 2100 use_a1pms_rest_http a1pms_api_delete_policy 204 3100 -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_delete_policy 204 2200 use_a1pms_rest_http a1pms_api_delete_policy 204 3200 @@ -240,7 +280,11 @@ a1pms_api_get_policy 404 2200 a1pms_api_get_policy 404 3200 # Remove the service -use_a1pms_dmaap_http +if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then + use_a1pms_rest_http +else + use_a1pms_dmaap_http +fi a1pms_api_delete_services 204 "service1" a1pms_api_get_services 404 "service1"