Function test updates 89/10889/2
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 11 Apr 2023 08:32:56 +0000 (10:32 +0200)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 11 Apr 2023 09:31:41 +0000 (11:31 +0200)
Removal of dmaap interface for A1PMS
Removal of old ICS interface
Optimized image sizes for simulators
Integrated ric mediator to the test env
Added testcase for ric mediator
Added testcase for custom adapter in A1PMS

Issue-ID: NONRTRIC-827
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I49baf0146204a1602fdc411d7187e816997a54db

66 files changed:
test/auto-test/.gitignore
test/auto-test/FTC1.sh
test/auto-test/FTC10.sh
test/auto-test/FTC100.sh
test/auto-test/FTC110.sh
test/auto-test/FTC1100.sh
test/auto-test/FTC150.sh
test/auto-test/FTC1800.sh
test/auto-test/FTC1_A1PMS_ADAPTER.sh [new file with mode: 0755]
test/auto-test/FTC1_RICMEDIATOR.sh [new file with mode: 0755]
test/auto-test/FTC2001.sh
test/auto-test/FTC2002.sh
test/auto-test/FTC2003.sh
test/auto-test/FTC300.sh
test/auto-test/FTC3000.sh
test/auto-test/FTC3001.sh
test/auto-test/FTC310.sh
test/auto-test/FTC350.sh
test/auto-test/FTC800.sh
test/auto-test/FTC805.sh
test/auto-test/FTC810.sh
test/auto-test/FTC850.sh
test/auto-test/FTC900.sh
test/auto-test/FTC_HELM_E_RELEASE.sh
test/auto-test/ONAP_UC.sh
test/auto-test/PM_DEMO.sh
test/auto-test/PM_EI_DEMO.sh
test/auto-test/Suite-alternative-a1pms.sh
test/auto-test/Suite-policy-interfaces.sh
test/auto-test/Suite-short-alternative-a1pms.sh
test/auto-test/override-adapter.sh [new file with mode: 0644]
test/common/README.md
test/common/a1pms_api_functions.sh
test/common/chartmus_api_functions.sh
test/common/format_endpoint_stats.sh
test/common/ics_api_functions.sh
test/common/prodstub_api_functions.sh
test/common/ricmediatorsim_api_functions.sh [new file with mode: 0644]
test/common/ricsim_api_functions.sh
test/common/sdnc_api_functions.sh
test/common/test_env-onap-jakarta.sh
test/common/test_env-onap-kohn.sh
test/common/test_env-onap-london.sh
test/common/test_env-oran-f-release.sh
test/common/test_env-oran-g-release.sh
test/common/test_env-oran-h-release.sh
test/common/testcase_common.sh
test/common/testengine_config.sh
test/cr/Dockerfile
test/cr/app/nginx.conf
test/cr/app/start.sh
test/http-https-proxy/Dockerfile
test/mrstub/Dockerfile
test/mrstub/app/nginx.conf
test/mrstub/app/start.sh
test/prodstub/Dockerfile
test/prodstub/app/nginx.conf
test/prodstub/app/start.sh
test/simulator-group/dmaapmr/app.yaml
test/simulator-group/ric/docker-compose.yml
test/simulator-group/ricmediator/.gitignore [new file with mode: 0644]
test/simulator-group/ricmediator/app.yaml [new file with mode: 0644]
test/simulator-group/ricmediator/docker-compose.yml [new file with mode: 0644]
test/simulator-group/ricmediator/svc.yaml [new file with mode: 0644]
test/simulator-group/sdnc/.gitignore
test/simulator-group/sdnc/app2.yaml

index c40137d..5b7bf90 100644 (file)
@@ -7,6 +7,7 @@ logs
 .image-list
 .tmp.curl.json
 .consul*
+.a1pms*
 .ext.consul*
 .dockererr
 .output.*
index 092efe5..4ab8aff 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -18,7 +18,7 @@
 #
 
 
-TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and A1PMS REST/DMAAP with/without SDNC controller"
+TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and A1PMS REST with/without SDNC controller"
 
 #App names to include in the test when running docker, space separated list
 DOCKER_INCLUDED_IMAGES="CP CR MR DMAAPMR A1PMS RICSIM SDNC NGW KUBEPROXY"
@@ -44,7 +44,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 # Tested variants of REST/DMAAP/SDNC config
 TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
@@ -86,7 +86,12 @@ for __httpx in $TESTED_PROTOCOLS ; do
             use_cr_https
             use_simulator_https
             if [[ $interface = *"SDNC"* ]]; then
-                use_sdnc_https
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
             fi
             if [[ $interface = *"DMAAP"* ]]; then
                 use_a1pms_dmaap_https
@@ -137,6 +142,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface = *"SDNC"* ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC    ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
index 32b6b1c..e109d83 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============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"
@@ -43,7 +43,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 use_simulator_http
 use_mr_http
@@ -60,7 +60,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
 
@@ -113,8 +117,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 +135,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 +151,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 +171,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 +190,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 +207,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 +232,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 +279,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"
index c7c80aa..a5348a8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -18,7 +18,7 @@
 #
 
 
-TC_ONELINE_DESCR="Full a1pms API walkthrough using a1pms REST/DMAAP and with/without SDNC A1 Controller"
+TC_ONELINE_DESCR="Full a1pms API walkthrough using a1pms REST and with/without SDNC A1 Controller"
 
 USE_ISTIO=0
 
@@ -50,11 +50,15 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 if [ $USE_ISTIO -eq 0 ]; then
     # Tested variants of REST/DMAAP/SDNC config
-    TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
+    if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+        TESTED_VARIANTS="REST   REST+SDNC"
+    else
+        TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
+    fi
 
     #Test a1pms and simulator protocol versions (others are http only)
     TESTED_PROTOCOLS="HTTP HTTPS"
@@ -66,7 +70,11 @@ else
         echo -e $RED"#########################################"$ERED
     fi
     # Tested variants of REST/DMAAP/SDNC config
-    TESTED_VARIANTS="REST   DMAAP"
+    if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+        TESTED_VARIANTS="REST   DMAAP"
+    else
+        TESTED_VARIANTS="REST"
+    fi
 
     #Test a1pms and simulator protocol versions (others are http only)
     TESTED_PROTOCOLS="HTTP"
@@ -179,7 +187,12 @@ for __httpx in $TESTED_PROTOCOLS ; do
             use_simulator_https
             use_mr_https
             if [[ $interface = *"SDNC"* ]]; then
-                use_sdnc_https
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
             fi
             if [[ $interface = *"DMAAP"* ]]; then
                 use_a1pms_dmaap_https
@@ -209,7 +222,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
         sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
         sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
 
-        start_mr
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            start_mr
+        fi
 
         start_cr 1
 
@@ -222,6 +239,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface = *"SDNC"* ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC    ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
@@ -270,7 +288,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
         cr_equal 0 received_callbacks 3 120
         cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
 
-        mr_equal requests_submitted 0
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            mr_equal requests_submitted 0
+        fi
 
 
         echo "############################################"
@@ -560,7 +582,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
             mr_equal current_requests 0
             mr_equal current_responses 0
         else
-            mr_equal requests_submitted 0
+            if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+                :
+            else
+                mr_equal requests_submitted 0
+            fi
         fi
         if [ $USE_ISTIO -eq 0 ]; then
             if [[ $interface = *"SDNC"* ]]; then
index e3f3c85..6d14589 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -44,7 +44,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 use_cr_http
 use_simulator_http
@@ -59,7 +59,11 @@ start_ric_simulators ricsim_g1 1  OSC_2.1.0
 start_ric_simulators ricsim_g2 1  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
 
@@ -82,7 +86,11 @@ fi
 
 set_a1pms_debug
 
-mr_equal requests_submitted 0
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    mr_equal requests_submitted 0
+fi
 
 sleep_wait 120 "Let A1PMS cofiguration take effect"
 
@@ -228,7 +236,11 @@ sim_equal ricsim_g3_1 num_instances 0
 
 a1pms_api_get_service_ids 200
 
-mr_equal requests_submitted 0
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    mr_equal requests_submitted 0
+fi
 
 check_a1pms_logs
 
index 2c3cd3b..749b725 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -50,8 +50,6 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-FLAT_A1_EI="1"
-
 clean_environment
 
 if [ $RUNMODE != "KUBE" ]; then
@@ -336,313 +334,174 @@ ics_api_a1_get_type_ids 200 EMPTY
 ics_api_a1_get_type 404 test-type
 
 ics_api_edp_get_type_ids 200 EMPTY
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_type 404 test-type
-else
-    ics_api_edp_get_type_2 404 test-type
-fi
+ics_api_edp_get_type_2 404 test-type
+
+ics_api_edp_get_producer_ids_2 200 NOTYPE EMPTY
+ics_api_edp_get_producer_2 404 test-prod
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 EMPTY
-    ics_api_edp_get_producer 404 test-prod
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE EMPTY
-    ics_api_edp_get_producer_2 404 test-prod
-fi
 ics_api_edp_get_producer_status 404 test-prod
 
 ics_api_edp_delete_producer 404 test-prod
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_ids 404 test-type NOWNER
-    ics_api_a1_get_job_ids 404 test-type test-owner
+ics_api_a1_get_job_ids 200 test-type NOWNER EMPTY
+ics_api_a1_get_job_ids 200 test-type test-owner EMPTY
 
-    ics_api_a1_get_job 404 test-type test-job
+ics_api_a1_get_job 404 test-job
 
-    ics_api_a1_get_job_status 404 test-type test-job
-else
-    ics_api_a1_get_job_ids 200 test-type NOWNER EMPTY
-    ics_api_a1_get_job_ids 200 test-type test-owner EMPTY
-
-    ics_api_a1_get_job 404 test-job
-
-    ics_api_a1_get_job_status 404 test-job
-fi
+ics_api_a1_get_job_status 404 test-job
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_delete_job 404 test-type test-job
-else
-    ics_api_a1_delete_job 404 test-job
-fi
+ics_api_a1_delete_job 404 test-job
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_jobs 404 test-prod
-else
-    ics_api_edp_get_producer_jobs_2 404 test-prod
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE EMPTY
+ics_api_edp_get_producer_2 404 test-prod
 
-if [ $ICS_VERSION == "V1-2" ]; then
-    ics_api_edp_get_type_2 404 test-type
-    ics_api_edp_delete_type_2 404 test-type
-fi
+ics_api_edp_get_type_2 404 test-type
+ics_api_edp_delete_type_2 404 test-type
 
 ### Setup of producer/job and testing apis ###
 
 ## Setup prod-a
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-    ics_api_edp_put_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-else
-    #V1-2
-    ics_api_edp_get_type_ids 200 EMPTY
-    ics_api_edp_get_type_2 404 type1
-    ics_api_edp_put_producer_2 404 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_get_type_ids 200 EMPTY
+ics_api_edp_get_type_2 404 type1
+ics_api_edp_put_producer_2 404 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
-    # Create type, delete and create again
+# Create type, delete and create again
+ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
+ics_api_edp_get_type_2 200 type1
+ics_api_edp_get_type_ids 200 type1
+ics_api_edp_delete_type_2 204 type1
+ics_api_edp_get_type_2 404 type1
+ics_api_edp_get_type_ids 200 EMPTY
+if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+    ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
+else
     ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
-    ics_api_edp_get_type_2 200 type1
-    ics_api_edp_get_type_ids 200 type1
-    ics_api_edp_delete_type_2 204 type1
-    ics_api_edp_get_type_2 404 type1
-    ics_api_edp_get_type_ids 200 EMPTY
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-        ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
-    else
-        ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
-    fi
-    ics_api_edp_get_type_ids 200 type1
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
-    else
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
-    fi
-
-    ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-    ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-
-    if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
-        cr_equal 0 received_callbacks 3 30
-        cr_equal 0 received_callbacks?id=type-status1 3
-        cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json REGISTERED type1 testdata/ics/ei-type-1.json DEREGISTERED type1 testdata/ics/ei-type-1.json REGISTERED
-    else
-        cr_equal 0 received_callbacks 0
-    fi
+fi
+ics_api_edp_get_type_ids 200 type1
+if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
+else
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
 fi
 
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
-ics_api_a1_get_type_ids 200 type1
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_type 200 type1 testdata/ics/ei-type-1.json
+if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+    cr_equal 0 received_callbacks 3 30
+    cr_equal 0 received_callbacks?id=type-status1 3
+    cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json REGISTERED type1 testdata/ics/ei-type-1.json DEREGISTERED type1 testdata/ics/ei-type-1.json REGISTERED
 else
-    ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
+    cr_equal 0 received_callbacks 0
 fi
 
+ics_api_a1_get_type_ids 200 type1
+ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
+
 ics_api_edp_get_type_ids 200 type1
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_type 200 type1 testdata/ics/ei-type-1.json prod-a
+if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
 else
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
-    else
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
-    fi
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
 fi
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a
-    ics_api_edp_get_producer_ids_2 200 type1 prod-a
-    ics_api_edp_get_producer_ids_2 200 type2 EMPTY
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a
+ics_api_edp_get_producer_ids_2 200 type1 prod-a
+ics_api_edp_get_producer_ids_2 200 type2 EMPTY
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-else
-    ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-fi
+ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 
 ics_api_a1_get_job_ids 200 type1 NOWNER EMPTY
 ics_api_a1_get_job_ids 200 type1 test-owner EMPTY
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job 404 type1 test-job
+ics_api_a1_get_job 404 test-job
 
-    ics_api_a1_get_job_status 404 type1 test-job
-else
-    ics_api_a1_get_job 404 test-job
+ics_api_a1_get_job_status 404 test-job
 
-    ics_api_a1_get_job_status 404 test-job
-fi
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_jobs 200 prod-a EMPTY
-else
-    ics_api_edp_get_producer_jobs_2 200 prod-a EMPTY
-fi
+ics_api_edp_get_producer_jobs_2 200 prod-a EMPTY
 
 ## Create a job for prod-a
 ## job1 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
 
 ics_api_a1_get_job_ids 200 type1 NOWNER job1
 ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
 
-if [ ! -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1
-fi
+ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job 200 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
+ics_api_a1_get_job 200 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
 
-    ics_api_a1_get_job_status 200 type1 job1 ENABLED
-else
-    ics_api_a1_get_job 200 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
-
-    ics_api_a1_get_job_status 200 job1 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 ENABLED
 
 prodstub_equal create/prod-a/job1 1
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-fi
+ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
+
 
 ## Create a second job for prod-a
 ## job2 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
 ics_api_a1_get_job_ids 200 type1 NOWNER job1 job2
 ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
 ics_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2
-if [ ! -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
-fi
-
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job 200 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
+ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
 
-    ics_api_a1_get_job_status 200 type1 job2 ENABLED
-else
-    ics_api_a1_get_job 200 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
+ics_api_a1_get_job 200 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
 
-    ics_api_a1_get_job_status 200 job2 ENABLED
-fi
+ics_api_a1_get_job_status 200 job2 ENABLED
 
 prodstub_equal create/prod-a/job2 1
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-fi
+ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
 
 ## Setup prod-b
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
+ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
+ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
+if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+    cr_equal 0 received_callbacks 4 30
+    cr_equal 0 received_callbacks?id=type-status1 4
+    cr_api_check_all_ics_subscription_events 200 0 type-status1 type2 testdata/ics/ei-type-2.json REGISTERED
 else
-    ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
-    ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
-    if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
-        cr_equal 0 received_callbacks 4 30
-        cr_equal 0 received_callbacks?id=type-status1 4
-        cr_api_check_all_ics_subscription_events 200 0 type-status1 type2 testdata/ics/ei-type-2.json REGISTERED
-    else
-        cr_equal 0 received_callbacks 0
-    fi
+    cr_equal 0 received_callbacks 0
 fi
 
 
 ics_api_a1_get_type_ids 200 type1 type2
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_type 200 type1 testdata/ics/ei-type-1.json
-    ics_api_a1_get_type 200 type2 testdata/ics/ei-type-2.json
-else
-    ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
-    ics_api_a1_get_type 200 type2 testdata/ics/empty-type.json
-fi
+
+ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
+ics_api_a1_get_type 200 type2 testdata/ics/empty-type.json
 
 ics_api_edp_get_type_ids 200 type1 type2
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_type 200 type1 testdata/ics/ei-type-1.json prod-a
-    ics_api_edp_get_type 200 type2 testdata/ics/ei-type-2.json prod-b
+if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
 else
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
-    else
-        ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
-    fi
-    ics_api_edp_get_type_2 200 type2 testdata/ics/ei-type-2.json
+    ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
 fi
+ics_api_edp_get_type_2 200 type2 testdata/ics/ei-type-2.json
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-    ics_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
-else
-    ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-    ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
-fi
+ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
 
 ics_api_edp_get_producer_status 200 prod-b ENABLED
 
 ## Create job for prod-b
 ##  job3 - prod-b
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
 
 prodstub_equal create/prod-b/job3 1
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
 
 ics_api_a1_get_job_ids 200 type1 NOWNER job1 job2
 ics_api_a1_get_job_ids 200 type2 NOWNER job3
@@ -650,46 +509,22 @@ ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
 ics_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2
 ics_api_a1_get_job_ids 200 type2 ricsim_g3_3 job3
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job 200 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
+ics_api_a1_get_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
 
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-else
-    ics_api_a1_get_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
+ics_api_a1_get_job_status 200 job3 ENABLED
 
-    ics_api_a1_get_job_status 200 job3 ENABLED
-fi
+ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
+ics_api_edp_get_producer_jobs_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    ics_api_edp_get_producer_jobs 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-else
-    ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    ics_api_edp_get_producer_jobs_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-fi
 
 ## Setup prod-c (no types)
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE
-else
-    ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE
-fi
+ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-    ics_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
-    ics_api_edp_get_producer 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY
-else
-    ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-    ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
-    ics_api_edp_get_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY
-fi
+ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
+ics_api_edp_get_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY
 
 ics_api_edp_get_producer_status 200 prod-c ENABLED
 
@@ -698,92 +533,40 @@ ics_api_edp_get_producer_status 200 prod-c ENABLED
 
 # Delete job then producer
 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_delete_job 204 type2 job3
-else
-    ics_api_a1_delete_job 204 job3
-fi
+ics_api_a1_delete_job 204 job3
 
 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
 
 ics_api_edp_delete_producer 204 prod-b
 
 ics_api_edp_get_producer_status 404 prod-b
 
 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
 
 prodstub_equal delete/prod-b/job3 1
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 404 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
-else
-    if [ $ICS_VERSION == "V1-1" ]; then
-        ics_api_a1_put_job 404 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
-    else
-        ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
-        ics_api_a1_get_job_status 200 job3 DISABLED
-    fi
-fi
+ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
+ics_api_a1_get_job_status 200 job3 DISABLED
 
 # Put producer then job
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
-else
-    ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
-fi
+ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
 
 ics_api_edp_get_producer_status 200 prod-b ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-else
-    if [ $ICS_VERSION == "V1-1" ]; then
-        ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template2.json
-    else
-        ics_api_a1_put_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template2.json
-    fi
-    ics_api_a1_get_job_status 200 job3 ENABLED
-fi
+    ics_api_a1_put_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template2.json
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-    else
-        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-    fi
-fi
+ics_api_a1_get_job_status 200 job3 ENABLED
+
+prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
 
 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_equal create/prod-b/job3 2
-else
-    prodstub_equal create/prod-b/job3 3
-fi
+prodstub_equal create/prod-b/job3 3
 prodstub_equal delete/prod-b/job3 1
 
 # Delete only the producer
@@ -792,17 +575,9 @@ ics_api_edp_delete_producer 204 prod-b
 ics_api_edp_get_producer_status 404 prod-b
 
 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-c
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type2 job3 DISABLED
-else
-    ics_api_a1_get_job_status 200 job3 DISABLED
-fi
+ics_api_a1_get_job_status 200 job3 DISABLED
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 5 30
@@ -816,19 +591,11 @@ else
 fi
 
 # Re-create the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
-else
-    ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
-fi
+ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
 
 ics_api_edp_get_producer_status 200 prod-b ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-else
-    ics_api_a1_get_job_status 200 job3 ENABLED
-fi
+ics_api_a1_get_job_status 200 job3 ENABLED
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 6 30
@@ -841,23 +608,11 @@ else
     cr_api_check_all_ics_events 200 0 job3-status ENABLED
 fi
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-    else
-        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
 
 ## Setup prod-d
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json
-else
-    ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
-    ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
-fi
+ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
+ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 7 30
@@ -867,52 +622,24 @@ fi
 
 ics_api_a1_get_job_ids 200 type4 NOWNER EMPTY
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type4 job8 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job8 type4 $TARGET8 ricsim_g3_4 $STATUS8 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job8 type4 $TARGET8 ricsim_g3_4 $STATUS8 testdata/ics/job-template.json
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
 
 prodstub_equal create/prod-d/job8 1
 prodstub_equal delete/prod-d/job8 0
 
 ics_api_a1_get_job_ids 200 type4 NOWNER job8
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-else
-    ics_api_a1_get_job_status 200 job8 ENABLED
-fi
+ics_api_a1_get_job_status 200 job8 ENABLED
 
 # Re-PUT the producer with zero types
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE
-else
-    ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE
-fi
+ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_ids 404 type4 NOWNER
-else
-    ics_api_a1_get_job_ids 200 type4 NOWNER job8
-    ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
-fi
+ics_api_a1_get_job_ids 200 type4 NOWNER job8
+ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type4 job8 DISABLED
-else
-    ics_api_a1_get_job_status 200 job8 DISABLED
-fi
+ics_api_a1_get_job_status 200 job8 DISABLED
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 8 30
@@ -929,25 +656,13 @@ prodstub_equal create/prod-d/job8 1
 prodstub_equal delete/prod-d/job8 0
 
 ## Re-setup prod-d
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json
-else
-    ics_api_edp_put_type_2 200 type4 testdata/ics/ei-type-4.json
-    ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
-fi
+ics_api_edp_put_type_2 200 type4 testdata/ics/ei-type-4.json
+ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_ids 404 type4 NOWNER
-else
-    ics_api_a1_get_job_ids 200 type4 NOWNER job8
-    ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
-fi
+ics_api_a1_get_job_ids 200 type4 NOWNER job8
+ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-else
-    ics_api_a1_get_job_status 200 job8 ENABLED
-fi
+ics_api_a1_get_job_status 200 job8 ENABLED
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -971,12 +686,8 @@ prodstub_equal create/prod-d/job8 2
 prodstub_equal delete/prod-d/job8 0
 
 ## Setup prod-e
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 testdata/ics/ei-type-6.json
-else
-    ics_api_edp_put_type_2 201 type6 testdata/ics/ei-type-6.json
-    ics_api_edp_put_producer_2 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6
-fi
+ics_api_edp_put_type_2 201 type6 testdata/ics/ei-type-6.json
+ics_api_edp_put_producer_2 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 11 30
@@ -986,40 +697,20 @@ fi
 
 ics_api_a1_get_job_ids 200 type6 NOWNER EMPTY
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type6 job10 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template.json
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
 
 prodstub_equal create/prod-e/job10 1
 prodstub_equal delete/prod-e/job10 0
 
 ics_api_a1_get_job_ids 200 type6 NOWNER job10
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 ## Setup prod-f
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 testdata/ics/ei-type-6.json
-else
-    ics_api_edp_put_type_2 200 type6 testdata/ics/ei-type-6.json
-    ics_api_edp_put_producer_2 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6
-fi
+ics_api_edp_put_type_2 200 type6 testdata/ics/ei-type-6.json
+ics_api_edp_put_producer_2 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 12 30
@@ -1029,34 +720,18 @@ fi
 
 ics_api_a1_get_job_ids 200 type6 NOWNER job10
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
 
 prodstub_equal create/prod-f/job10 1
 prodstub_equal delete/prod-f/job10 0
 
 ics_api_a1_get_job_ids 200 type6 NOWNER job10
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 ## Status updates prod-a and jobs
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1071,11 +746,7 @@ prodstub_arm_producer 200 prod-a 400
 # Wait for producer prod-a to go disabled
 ics_api_edp_get_producer_status 200 prod-a DISABLED 360
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d  prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d  prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d  prod-e prod-f
 
 ics_api_edp_get_producer_status 200 prod-a DISABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1085,19 +756,11 @@ ics_api_edp_get_producer_status 200 prod-e ENABLED
 ics_api_edp_get_producer_status 200 prod-f ENABLED
 
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 ENABLED
-    ics_api_a1_get_job_status 200 type1 job2 ENABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 ENABLED
-    ics_api_a1_get_job_status 200 job2 ENABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 ENABLED
+ics_api_a1_get_job_status 200 job2 ENABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 # Arm producer prod-a for supervision
 prodstub_arm_producer 200 prod-a 200
@@ -1105,11 +768,7 @@ prodstub_arm_producer 200 prod-a 200
 # Wait for producer prod-a to go enabled
 ics_api_edp_get_producer_status 200 prod-a ENABLED 360
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1118,19 +777,11 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 ics_api_edp_get_producer_status 200 prod-e ENABLED
 ics_api_edp_get_producer_status 200 prod-f ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 ENABLED
-    ics_api_a1_get_job_status 200 type1 job2 ENABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 ENABLED
-    ics_api_a1_get_job_status 200 job2 ENABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 ENABLED
+ics_api_a1_get_job_status 200 job2 ENABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 # Arm producer prod-a for supervision failure
 prodstub_arm_producer 200 prod-a 400
@@ -1138,11 +789,7 @@ prodstub_arm_producer 200 prod-a 400
 # Wait for producer prod-a to go disabled
 ics_api_edp_get_producer_status 200 prod-a DISABLED 360
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
 
 ics_api_edp_get_producer_status 200 prod-a DISABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1151,32 +798,16 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 ics_api_edp_get_producer_status 200 prod-e ENABLED
 ics_api_edp_get_producer_status 200 prod-f ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 ENABLED
-    ics_api_a1_get_job_status 200 type1 job2 ENABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 ENABLED
-    ics_api_a1_get_job_status 200 job2 ENABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 ENABLED
+ics_api_a1_get_job_status 200 job2 ENABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 # Wait for producer prod-a to be removed
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 5 1000
-else
-    ics_equal json:ei-producer/v1/eiproducers 5 1000
-fi
+ics_equal json:data-producer/v1/info-producers 5 1000
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
 
 
 ics_api_edp_get_producer_status 404 prod-a
@@ -1186,19 +817,11 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 ics_api_edp_get_producer_status 200 prod-e ENABLED
 ics_api_edp_get_producer_status 200 prod-f ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 DISABLED
-    ics_api_a1_get_job_status 200 type1 job2 DISABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 DISABLED
-    ics_api_a1_get_job_status 200 job2 DISABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 DISABLED
+ics_api_a1_get_job_status 200 job2 DISABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 14 30
@@ -1218,11 +841,7 @@ prodstub_arm_producer 200 prod-e 400
 
 ics_api_edp_get_producer_status 200 prod-e DISABLED 1000
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
 
 ics_api_edp_get_producer_status 404 prod-a
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1231,69 +850,37 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 ics_api_edp_get_producer_status 200 prod-e DISABLED
 ics_api_edp_get_producer_status 200 prod-f ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 DISABLED
-    ics_api_a1_get_job_status 200 type1 job2 DISABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 DISABLED
-    ics_api_a1_get_job_status 200 job2 DISABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 DISABLED
+ics_api_a1_get_job_status 200 job2 DISABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 #Disable create for job10 in prod-e
 prodstub_arm_job_create 200 prod-e job10 400
 
 #Update tjob 10 - only prod-f will be updated
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 200 type6 job10 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
-else
-    ics_api_a1_put_job 200 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template2.json
-fi
+ics_api_a1_put_job 200 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template2.json
 #Reset producer and job responses
 prodstub_arm_producer 200 prod-e 200
 prodstub_arm_job_create 200 prod-e job10 200
 
 ics_api_edp_get_producer_status 200 prod-e ENABLED 360
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
 
 #Wait for job to be updated
 sleep_wait 120
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
-    else
-        prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
 
 prodstub_arm_producer 200 prod-f 400
 
 ics_api_edp_get_producer_status 200 prod-f DISABLED 360
 
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 4 1000
-else
-    ics_equal json:ei-producer/v1/eiproducers 4 1000
-fi
+ics_equal json:data-producer/v1/info-producers 4 1000
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e
-else
-    ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e
-fi
+ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e
 
 ics_api_edp_get_producer_status 404 prod-a
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -1302,19 +889,11 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 ics_api_edp_get_producer_status 200 prod-e ENABLED
 ics_api_edp_get_producer_status 404 prod-f
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 DISABLED
-    ics_api_a1_get_job_status 200 type1 job2 DISABLED
-    ics_api_a1_get_job_status 200 type2 job3 ENABLED
-    ics_api_a1_get_job_status 200 type4 job8 ENABLED
-    ics_api_a1_get_job_status 200 type6 job10 ENABLED
-else
-    ics_api_a1_get_job_status 200 job1 DISABLED
-    ics_api_a1_get_job_status 200 job2 DISABLED
-    ics_api_a1_get_job_status 200 job3 ENABLED
-    ics_api_a1_get_job_status 200 job8 ENABLED
-    ics_api_a1_get_job_status 200 job10 ENABLED
-fi
+ics_api_a1_get_job_status 200 job1 DISABLED
+ics_api_a1_get_job_status 200 job2 DISABLED
+ics_api_a1_get_job_status 200 job3 ENABLED
+ics_api_a1_get_job_status 200 job8 ENABLED
+ics_api_a1_get_job_status 200 job10 ENABLED
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 14 30
@@ -1323,21 +902,6 @@ else
 fi
 
 
-if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-
-    # End test if info types is not impl in tested version
-    check_ics_logs
-
-    store_logs END
-
-    #### TEST COMPLETE ####
-
-    print_result
-
-    auto_clean_environment
-fi
-
-
 ############################################
 # Test of info types
 ############################################
@@ -1863,11 +1427,7 @@ ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
 
 # Wait for producer prod-ia to be removed
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 9 1000
-else
-    ics_equal json:ei-producer/v1/eiproducers 9 1000
-fi
+ics_equal json:data-producer/v1/info-producers 9 1000
 
 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if  prod-b prod-c prod-d prod-e
 
@@ -1945,11 +1505,7 @@ prodstub_arm_producer 200 prod-if 400
 
 ics_api_edp_get_producer_status 200 prod-if DISABLED 360
 
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 8 1000
-else
-    ics_equal json:ei-producer/v1/eiproducers 8 1000
-fi
+ics_equal json:data-producer/v1/info-producers 8 1000
 
 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-b prod-c prod-d prod-e
 
index a0110d9..f30f3e9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -43,7 +43,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 #Test a1pms and simulator protocol versions (others are http only)
 NB_TESTED_PROTOCOLS="HTTP HTTPS"
@@ -68,16 +68,23 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
         start_ric_simulators ricsim_g2 1  STD_1.1.3
         start_ric_simulators ricsim_g3 1  STD_2.0.0
 
-        start_sdnc
 
         if [ $__nb_httpx == "HTTPS" ]; then
             # "Using secure ports towards SDNC"
-            use_sdnc_https
+            if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                deviation "SDNC does not support NB https"
+                use_sdnc_http
+            else
+                use_sdnc_https
+                fi
         else
             #"Using non-secure ports towards SDNC"
             use_sdnc_http
         fi
 
+        start_sdnc
+        controller_api_wait_for_status_ok 200 ricsim_g1_1
+
         if [ $__sb_httpx == "HTTPS" ]; then
             # "Using secure ports towards SDNC"
             use_simulator_https
index 8447049..d6215c7 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -44,8 +44,6 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-FLAT_A1_EI="1"
-
 clean_environment
 
 start_kube_proxy
@@ -72,12 +70,7 @@ CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
 TARGET="http://localhost:80/target"  # Dummy target
 
-NUM_JOBS=10000
-use_info_jobs=false  #Set flag if interface supporting info-types is used
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    use_info_jobs=true
-    NUM_JOBS=5000 # 5K ei jobs and 5K info jobs
-fi
+NUM_JOBS=5000 # 5K ei jobs and 5K info jobs
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     #Type registration status callbacks
@@ -134,129 +127,110 @@ do
     fi
 done
 
-if [ $use_info_jobs ]; then
-    prodstub_arm_producer 200 prod-a
-    prodstub_arm_producer 200 prod-b
-    prodstub_arm_producer 200 prod-c
-    prodstub_arm_producer 200 prod-d
-
-    prodstub_arm_type 200 prod-a type101
-
-    prodstub_arm_type 200 prod-b type101
-    prodstub_arm_type 200 prod-b type102
-
-    prodstub_arm_type 200 prod-c type101
-    prodstub_arm_type 200 prod-c type102
-    prodstub_arm_type 200 prod-c type103
-
-    prodstub_arm_type 200 prod-d type104
-    prodstub_arm_type 200 prod-d type105
-
-    for ((i=1; i<=$NUM_JOBS; i++))
-    do
-        if [ $(($i%5)) -eq 0 ]; then
-            prodstub_arm_job_create 200 prod-a job$(($i+$NUM_JOBS))
-            prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
-            prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
-        fi
-        if [ $(($i%5)) -eq 1 ]; then
-            prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
-            prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
-        fi
-        if [ $(($i%5)) -eq 2 ]; then
-            prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
-        fi
-        if [ $(($i%5)) -eq 3 ]; then
-            prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
-        fi
-        if [ $(($i%5)) -eq 4 ]; then
-            prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
-        fi
-    done
-fi
+prodstub_arm_producer 200 prod-a
+prodstub_arm_producer 200 prod-b
+prodstub_arm_producer 200 prod-c
+prodstub_arm_producer 200 prod-d
 
+prodstub_arm_type 200 prod-a type101
 
-if [ $ICS_VERSION == "V1-1" ]; then
+prodstub_arm_type 200 prod-b type101
+prodstub_arm_type 200 prod-b type102
 
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
+prodstub_arm_type 200 prod-c type101
+prodstub_arm_type 200 prod-c type102
+prodstub_arm_type 200 prod-c type103
 
-    ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json
+prodstub_arm_type 200 prod-d type104
+prodstub_arm_type 200 prod-d type105
 
-    ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json type3 testdata/ics/ei-type-3.json
+for ((i=1; i<=$NUM_JOBS; i++))
+do
+    if [ $(($i%5)) -eq 0 ]; then
+        prodstub_arm_job_create 200 prod-a job$(($i+$NUM_JOBS))
+        prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
+        prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
+    fi
+    if [ $(($i%5)) -eq 1 ]; then
+        prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
+        prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
+    fi
+    if [ $(($i%5)) -eq 2 ]; then
+        prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
+    fi
+    if [ $(($i%5)) -eq 3 ]; then
+        prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
+    fi
+    if [ $(($i%5)) -eq 4 ]; then
+        prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
+    fi
+done
 
-    ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json type5 testdata/ics/ei-type-5.json
 
-else
 
-    ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
-    ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
-    ics_api_edp_put_type_2 201 type3 testdata/ics/ei-type-3.json
-    ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
-    ics_api_edp_put_type_2 201 type5 testdata/ics/ei-type-5.json
+ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
+ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
+ics_api_edp_put_type_2 201 type3 testdata/ics/ei-type-3.json
+ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
+ics_api_edp_put_type_2 201 type5 testdata/ics/ei-type-5.json
 
-    ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
-    ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
+ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
 
-    ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
+ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
 
-    ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
+ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
 
-    if [ $use_info_jobs ]; then
-        ics_api_edp_put_type_2 201 type101 testdata/ics/info-type-1.json
-        ics_api_edp_put_type_2 201 type102 testdata/ics/info-type-2.json
-        ics_api_edp_put_type_2 201 type103 testdata/ics/info-type-3.json
-        ics_api_edp_put_type_2 201 type104 testdata/ics/info-type-4.json
-        ics_api_edp_put_type_2 201 type105 testdata/ics/info-type-5.json
+ics_api_edp_put_type_2 201 type101 testdata/ics/info-type-1.json
+ics_api_edp_put_type_2 201 type102 testdata/ics/info-type-2.json
+ics_api_edp_put_type_2 201 type103 testdata/ics/info-type-3.json
+ics_api_edp_put_type_2 201 type104 testdata/ics/info-type-4.json
+ics_api_edp_put_type_2 201 type105 testdata/ics/info-type-5.json
 
 
 
-        if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
-            cr_equal 0 received_callbacks 20 30
-            cr_equal 0 received_callbacks?id=type-status1 10
-            cr_equal 0 received_callbacks?id=type-status2 10
+if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+    cr_equal 0 received_callbacks 20 30
+    cr_equal 0 received_callbacks?id=type-status1 10
+    cr_equal 0 received_callbacks?id=type-status2 10
 
-            cr_api_check_all_ics_subscription_events 200 0 type-status1 \
-                type1 testdata/ics/ei-type-1.json REGISTERED \
-                type2 testdata/ics/ei-type-2.json REGISTERED \
-                type3 testdata/ics/ei-type-3.json REGISTERED \
-                type4 testdata/ics/ei-type-4.json REGISTERED \
-                type5 testdata/ics/ei-type-5.json REGISTERED \
-                type101 testdata/ics/info-type-1.json REGISTERED \
-                type102 testdata/ics/info-type-2.json REGISTERED \
-                type103 testdata/ics/info-type-3.json REGISTERED \
-                type104 testdata/ics/info-type-4.json REGISTERED \
-                type105 testdata/ics/info-type-5.json REGISTERED
+    cr_api_check_all_ics_subscription_events 200 0 type-status1 \
+        type1 testdata/ics/ei-type-1.json REGISTERED \
+        type2 testdata/ics/ei-type-2.json REGISTERED \
+        type3 testdata/ics/ei-type-3.json REGISTERED \
+        type4 testdata/ics/ei-type-4.json REGISTERED \
+        type5 testdata/ics/ei-type-5.json REGISTERED \
+        type101 testdata/ics/info-type-1.json REGISTERED \
+        type102 testdata/ics/info-type-2.json REGISTERED \
+        type103 testdata/ics/info-type-3.json REGISTERED \
+        type104 testdata/ics/info-type-4.json REGISTERED \
+        type105 testdata/ics/info-type-5.json REGISTERED
+
+    cr_api_check_all_ics_subscription_events 200 0 type-status2 \
+        type1 testdata/ics/ei-type-1.json REGISTERED \
+        type2 testdata/ics/ei-type-2.json REGISTERED \
+        type3 testdata/ics/ei-type-3.json REGISTERED \
+        type4 testdata/ics/ei-type-4.json REGISTERED \
+        type5 testdata/ics/ei-type-5.json REGISTERED \
+        type101 testdata/ics/info-type-1.json REGISTERED \
+        type102 testdata/ics/info-type-2.json REGISTERED \
+        type103 testdata/ics/info-type-3.json REGISTERED \
+        type104 testdata/ics/info-type-4.json REGISTERED \
+        type105 testdata/ics/info-type-5.json REGISTERED
 
-            cr_api_check_all_ics_subscription_events 200 0 type-status2 \
-                type1 testdata/ics/ei-type-1.json REGISTERED \
-                type2 testdata/ics/ei-type-2.json REGISTERED \
-                type3 testdata/ics/ei-type-3.json REGISTERED \
-                type4 testdata/ics/ei-type-4.json REGISTERED \
-                type5 testdata/ics/ei-type-5.json REGISTERED \
-                type101 testdata/ics/info-type-1.json REGISTERED \
-                type102 testdata/ics/info-type-2.json REGISTERED \
-                type103 testdata/ics/info-type-3.json REGISTERED \
-                type104 testdata/ics/info-type-4.json REGISTERED \
-                type105 testdata/ics/info-type-5.json REGISTERED
+fi
 
-        fi
+ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
 
-        ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
+ics_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
 
-        ics_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
+ics_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
 
-        ics_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
+ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
 
-        ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
-    fi
-fi
 
-if [ $use_info_jobs ]; then
-    ics_equal json:data-producer/v1/info-producers 4
-else
-    ics_equal json:ei-producer/v1/eiproducers 4
-fi
+ics_equal json:data-producer/v1/info-producers 4
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -267,86 +241,46 @@ for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
         ics_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1_$(($i+$NUM_JOBS)) testdata/ics/job-template.json
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type1 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
     fi
     if [ $(($i%5)) -eq 1 ]; then
         ics_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1_$(($i+$NUM_JOBS)) testdata/ics/job-template.json
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type2 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
     fi
     if [ $(($i%5)) -eq 2 ]; then
         ics_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1_$(($i+$NUM_JOBS)) testdata/ics/job-template.json
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type3 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
     fi
     if [ $(($i%5)) -eq 3 ]; then
         ics_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1_$(($i+$NUM_JOBS)) testdata/ics/job-template.json
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type4 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
     fi
     if [ $(($i%5)) -eq 4 ]; then
         ics_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1_$(($i+$NUM_JOBS)) testdata/ics/job-template.json
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type5 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner$(($i+$NUM_JOBS)) testdata/ics/job-template.json VALIDATE
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
     fi
 done
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
-else
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
-fi
-if [ $use_info_jobs ]; then
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
-fi
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 20 30
@@ -364,11 +298,7 @@ if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
     ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
 
-    if [ $use_info_jobs ]; then
-        ics_equal json:data-producer/v1/info-types 10 1000
-    else
-        ics_equal json:ei-producer/v1/eitypes 5 1000
-    fi
+    ics_equal json:data-producer/v1/info-types 10 1000
 
 fi
 
@@ -387,11 +317,7 @@ if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
     ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
 
-    if [ $use_info_jobs ]; then
-        ics_equal json:data-producer/v1/info-types 10 1000
-    else
-        ics_equal json:ei-producer/v1/eitypes 5 1000
-    fi
+    ics_equal json:data-producer/v1/info-types 10 1000
 fi
 
 cr_equal 0 received_callbacks 0
@@ -402,37 +328,27 @@ do
         prodstub_delete_jobdata 204 prod-a job$i
         prodstub_delete_jobdata 204 prod-b job$i
         prodstub_delete_jobdata 204 prod-c job$i
-        if [ $use_info_jobs ]; then
-            prodstub_delete_jobdata 204 prod-a job$(($i+$NUM_JOBS))
-            prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
-            prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
-        fi
+        prodstub_delete_jobdata 204 prod-a job$(($i+$NUM_JOBS))
+        prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
+        prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 1 ]; then
         prodstub_delete_jobdata 204 prod-b job$i
         prodstub_delete_jobdata 204 prod-c job$i
-        if [ $use_info_jobs ]; then
-            prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
-            prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
-        fi
+        prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
+        prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 2 ]; then
         prodstub_delete_jobdata 204 prod-c job$i
-        if [ $use_info_jobs ]; then
-            prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
-        fi
+        prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 3 ]; then
         prodstub_delete_jobdata 204 prod-d job$i
-        if [ $use_info_jobs ]; then
-            prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
-        fi
+        prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 4 ]; then
         prodstub_delete_jobdata 204 prod-d job$i
-        if [ $use_info_jobs ]; then
-            prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
-        fi
+        prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
     fi
 done
 
@@ -444,93 +360,36 @@ ics_api_edp_get_producer_status 404 prod-d
 for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type1 job$i DISABLED
-        else
-            ics_api_a1_get_job_status 200 job$i DISABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
-        fi
+        ics_api_a1_get_job_status 200 job$i DISABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
     fi
     if [ $(($i%5)) -eq 1 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type2 job$i DISABLED
-        else
-            ics_api_a1_get_job_status 200 job$i DISABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
-        fi
+        ics_api_a1_get_job_status 200 job$i DISABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
     fi
     if [ $(($i%5)) -eq 2 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type3 job$i DISABLED
-        else
-            ics_api_a1_get_job_status 200 job$i DISABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
-        fi
+        ics_api_a1_get_job_status 200 job$i DISABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
     fi
     if [ $(($i%5)) -eq 3 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type4 job$i DISABLED
-        else
-            ics_api_a1_get_job_status 200 job$i DISABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
-        fi
+        ics_api_a1_get_job_status 200 job$i DISABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
     fi
     if [ $(($i%5)) -eq 4 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type5 job$i DISABLED
-        else
-            ics_api_a1_get_job_status 200 job$i DISABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
-        fi
+        ics_api_a1_get_job_status 200 job$i DISABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
     fi
 done
 
-if [ $ICS_VERSION == "V1-1" ]; then
-
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-
-    ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json
-
-    ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json type3 testdata/ics/ei-type-3.json
-
-    ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json type5 testdata/ics/ei-type-5.json
-
-else
-    if [ $use_info_jobs ]; then
-        ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1  type101
-
-        ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2  type101 type102
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1  type101
 
-        ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3  type101 type102 type103
+ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2  type101 type102
 
-        ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5  type104 type105
-    else
-        ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3  type101 type102 type103
 
-        ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
+ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5  type104 type105
 
-        ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
-
-        ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
-    fi
-
-fi
-
-if [ $use_info_jobs ]; then
-    ics_equal json:data-producer/v1/info-producers 4
-else
-    ics_equal json:ei-producer/v1/eiproducers 4
-fi
+ics_equal json:data-producer/v1/info-producers 4
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
@@ -540,164 +399,68 @@ ics_api_edp_get_producer_status 200 prod-d ENABLED
 for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type1 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
     fi
     if [ $(($i%5)) -eq 1 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type2 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
     fi
     if [ $(($i%5)) -eq 2 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type3 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
     fi
     if [ $(($i%5)) -eq 3 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type4 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
     fi
     if [ $(($i%5)) -eq 4 ]; then
-        if [  -z "$FLAT_A1_EI" ]; then
-            ics_api_a1_get_job_status 200 type5 job$i ENABLED
-        else
-            ics_api_a1_get_job_status 200 job$i ENABLED 120
-        fi
-        if [ $use_info_jobs ]; then
-            ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
-        fi
+        ics_api_a1_get_job_status 200 job$i ENABLED 120
+        ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
     fi
 done
 
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
-else
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
-fi
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
 
-if [ $use_info_jobs ]; then
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
-fi
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
 
 for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
-        if [ $ICS_VERSION == "V1-1" ]; then
-            prodstub_check_jobdata 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
-            prodstub_check_jobdata 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
-            prodstub_check_jobdata 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
-        else
-            if [ $use_info_jobs ]; then
-                prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
-            else
-                prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
-            fi
-        fi
-        if [ $use_info_jobs ]; then
-            prodstub_check_jobdata_3 200 prod-a job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
-            prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
-            prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
-        fi
+        prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-a job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
 
     fi
     if [ $(($i%5)) -eq 1 ]; then
-        if [ $ICS_VERSION == "V1-1" ]; then
-            prodstub_check_jobdata 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
-            prodstub_check_jobdata 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
-        else
-            if [ $use_info_jobs ]; then
-                prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
-            else
-                prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
-                prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
-            fi
-        fi
-        if [ $use_info_jobs ]; then
-            prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
-            prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
-        fi
+        prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
     fi
     if [ $(($i%5)) -eq 2 ]; then
-        if [ $ICS_VERSION == "V1-1" ]; then
-            prodstub_check_jobdata 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
-        else
-            if [ $use_info_jobs ]; then
-                prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
-            else
-                prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
-            fi
-        fi
-        if [ $use_info_jobs ]; then
-            prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type103 $TARGET info-owner testdata/ics/job-template.json
-        fi
+        prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type103 $TARGET info-owner testdata/ics/job-template.json
     fi
     if [ $(($i%5)) -eq 3 ]; then
-        if [ $ICS_VERSION == "V1-1" ]; then
-            prodstub_check_jobdata 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
-        else
-            if [ $use_info_jobs ]; then
-                prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
-            else
-                prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
-            fi
-        fi
-        if [ $use_info_jobs ]; then
-            prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type104 $TARGET info-owner testdata/ics/job-template.json
-        fi
+        prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type104 $TARGET info-owner testdata/ics/job-template.json
     fi
     if [ $(($i%5)) -eq 4 ]; then
-        if [ $ICS_VERSION == "V1-1" ]; then
-            prodstub_check_jobdata 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
-        else
-            if [ $use_info_jobs ]; then
-                prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
-            else
-                prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
-            fi
-        fi
-        if [ $use_info_jobs ]; then
-            prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type105 $TARGET info-owner testdata/ics/job-template.json
-        fi
+        prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
+        prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type105 $TARGET info-owner testdata/ics/job-template.json
     fi
 done
 
@@ -706,77 +469,51 @@ for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
         ics_api_a1_delete_job 204 job$i
-        if [ $use_info_jobs ]; then
-            ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
-        fi
+        ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 1 ]; then
         ics_api_a1_delete_job 204 job$i
-        if [ $use_info_jobs ]; then
-            ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
-        fi
+        ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 2 ]; then
         ics_api_a1_delete_job 204 job$i
-        if [ $use_info_jobs ]; then
-            ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
-        fi
+        ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 3 ]; then
         ics_api_a1_delete_job 204 job$i
-        if [ $use_info_jobs ]; then
-            ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
-        fi
+        ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
     fi
     if [ $(($i%5)) -eq 4 ]; then
         ics_api_a1_delete_job 204 job$i
-        if [ $use_info_jobs ]; then
-            ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
-        fi
+        ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
     fi
 done
 
-if [ $use_info_jobs ]; then
-    ics_equal json:data-producer/v1/info-producers 4
-else
-    ics_equal json:ei-producer/v1/eiproducers 4
-fi
+ics_equal json:data-producer/v1/info-producers 4
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 ics_api_edp_get_producer_status 200 prod-b ENABLED
 ics_api_edp_get_producer_status 200 prod-c ENABLED
 ics_api_edp_get_producer_status 200 prod-d ENABLED
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_equal json:A1-EI/v1/eitypes/type1/eijobs 0
-    ics_equal json:A1-EI/v1/eitypes/type2/eijobs 0
-    ics_equal json:A1-EI/v1/eitypes/type3/eijobs 0
-    ics_equal json:A1-EI/v1/eitypes/type4/eijobs 0
-    ics_equal json:A1-EI/v1/eitypes/type5/eijobs 0
-else
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0
-    ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0
-fi
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0
+ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0
 
-if [ $use_info_jobs ]; then
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0
-    ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
-fi
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0
+ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
 
-if [ $use_info_jobs ]; then
-    if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
-        ics_api_edp_put_type_2 200 type101 testdata/ics/info-type-1.json
-        ics_api_edp_put_type_2 200 type102 testdata/ics/info-type-2.json
-        ics_api_edp_put_type_2 200 type103 testdata/ics/info-type-3.json
-        ics_api_edp_put_type_2 200 type104 testdata/ics/info-type-4.json
-        ics_api_edp_put_type_2 200 type105 testdata/ics/info-type-5.json
-    fi
+if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+    ics_api_edp_put_type_2 200 type101 testdata/ics/info-type-1.json
+    ics_api_edp_put_type_2 200 type102 testdata/ics/info-type-2.json
+    ics_api_edp_put_type_2 200 type103 testdata/ics/info-type-3.json
+    ics_api_edp_put_type_2 200 type104 testdata/ics/info-type-4.json
+    ics_api_edp_put_type_2 200 type105 testdata/ics/info-type-5.json
 fi
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
diff --git a/test/auto-test/FTC1_A1PMS_ADAPTER.sh b/test/auto-test/FTC1_A1PMS_ADAPTER.sh
new file mode 100755 (executable)
index 0000000..9228ee7
--- /dev/null
@@ -0,0 +1,233 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. 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.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+
+TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy with A1PMS adapter using http/https and A1PMS REST with/without SDNC controller"
+
+#App names to include in the test when running docker, space separated list
+DOCKER_INCLUDED_IMAGES="CP CR A1PMS RICSIM SDNC NGW KUBEPROXY"
+
+#App names to include in the test when running kubernetes, space separated list
+KUBE_INCLUDED_IMAGES="CP CR A1PMS RICSIM SDNC NGW KUBEPROXY "
+#Prestarted 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
+#the image is not configured in the supplied env_file
+#Used for images not applicable to all supported profile
+CONDITIONALLY_IGNORED_IMAGES="NGW "
+
+#Supported test environment profiles
+SUPPORTED_PROFILES="ORAN-H-RELEASE ONAP-LONDON"
+#Supported run modes
+SUPPORTED_RUNMODES="DOCKER KUBE"
+
+. ../common/testcase_common.sh $@
+
+setup_testenvironment
+
+#### TEST BEGIN ####
+
+sim_generate_policy_uuid
+
+# Tested variants of REST/DMAAP/SDNC config
+TESTED_VARIANTS="REST   REST+SDNC"
+
+#Test a1pms and simulator protocol versions (others are http only)
+TESTED_PROTOCOLS="HTTP HTTPS"
+for __httpx in $TESTED_PROTOCOLS ; do
+    for interface in $TESTED_VARIANTS ; do
+
+        echo "#####################################################################"
+        echo "#####################################################################"
+        echo "### Testing a1pms: $interface using $__httpx"
+        echo "#####################################################################"
+        echo "#####################################################################"
+
+        clean_environment
+
+        start_kube_proxy
+
+        if [ $__httpx == "HTTPS" ]; then
+            use_a1pms_rest_https
+        else
+            use_a1pms_rest_http
+        fi
+
+        start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
+
+        set_a1pms_trace
+
+        # Create service to be able to receive events when rics becomes available
+        # Must use rest towards the a1pms since dmaap is not configured yet
+        a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
+
+        if [ $__httpx == "HTTPS" ]; then
+            use_cr_https
+            use_simulator_https
+            if [[ $interface = *"SDNC"* ]]; then
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
+            fi
+            use_a1pms_rest_https
+        else
+            use_cr_http
+            use_simulator_http
+            if [[ $interface = *"SDNC"* ]]; then
+                use_sdnc_http
+            fi
+            use_a1pms_rest_http
+        fi
+
+        start_ric_simulators ricsim_g1 1  STD_2.0.0
+        start_ric_simulators ricsim_g2 1  STD_2.0.0  #APMS will use adapter class towards this sim
+
+        start_cr 1
+
+        start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
+
+        if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
+            start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
+        fi
+
+        if [ -z "$A1PMS_ADAPTER_CLASS" ]; then
+            echo -e $RED"Env var A1PMS_ADAPTER_CLASS must be set with override file"$ERED
+            exit 1
+        fi
+        if [[ $interface = *"SDNC"* ]]; then
+            start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
+            prepare_a1pms_config      SDNC    ".a1pms_config.json" ricsim-g2 $A1PMS_ADAPTER_CLASS
+        else
+            prepare_a1pms_config      NOSDNC  ".a1pms_config.json" ricsim-g2 $A1PMS_ADAPTER_CLASS
+        fi
+
+        if [ $RUNMODE == "KUBE" ]; then
+            a1pms_load_config                       ".a1pms_config.json"
+        else
+            #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config
+            if [ $__httpx == "HTTPS" ]; then
+                use_a1pms_rest_https
+            else
+                use_a1pms_rest_http
+            fi
+            a1pms_api_put_configuration 200 ".a1pms_config.json"
+            if [ $__httpx == "HTTPS" ]; then
+                use_a1pms_rest_https
+            else
+                use_a1pms_rest_http
+            fi
+        fi
+
+        sim_put_policy_type 201 ricsim_g1_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
+        sim_put_policy_type 201 ricsim_g2_1 $A1PMS_ADAPTER_POLICY_NAME testdata/STD2/sim_qos.json
+
+        a1pms_equal json:rics 2 300
+
+        a1pms_equal json:policy-types 2 120
+
+        a1pms_equal json:policies 0
+
+        a1pms_equal json:policy-instances 0
+
+        cr_equal 0 received_callbacks 2 120
+
+        cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1
+
+        echo "############################################"
+        echo "############## Health check ################"
+        echo "############################################"
+
+        sleep_wait 120 "Let A1PMS cofiguration take effect"
+
+        a1pms_api_get_status 200
+
+        echo "############################################"
+        echo "##### Service registry and supervision #####"
+        echo "############################################"
+
+        a1pms_api_put_service 201 "serv1" 1000 "$CR_SERVICE_APP_PATH_0/1"
+
+        a1pms_api_get_service_ids 200 "serv1" "ric-registration"
+
+        a1pms_api_put_services_keepalive 200 "serv1"
+
+        echo "############################################"
+        echo "############## RIC Repository ##############"
+        echo "############################################"
+
+        a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:STD_QOS_0_2_0:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:$A1PMS_ADAPTER_POLICY_NAME:AVAILABLE"
+
+        echo "############################################"
+        echo "########### A1 Policy Management ###########"
+        echo "############################################"
+
+        notificationurl=$CR_SERVICE_APP_PATH_0"/test"
+
+        a1pms_api_put_policy 201 "serv1" ricsim_g1_1 STD_QOS_0_2_0 5000 true $notificationurl testdata/STD2/pi_qos_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g1_1 STD_QOS_0_2_0 5000 true $notificationurl testdata/STD2/pi_qos_template.json
+
+        a1pms_api_put_policy 201 "serv1" ricsim_g2_1 $A1PMS_ADAPTER_POLICY_NAME 5100 true $notificationurl testdata/STD2/pi_qos_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g2_1 $A1PMS_ADAPTER_POLICY_NAME 5100 true $notificationurl testdata/STD2/pi_qos_template.json
+
+        a1pms_equal json:policies 2
+
+        a1pms_api_delete_policy 204 5000
+
+        a1pms_api_delete_policy 204 5100
+
+        a1pms_equal json:policies 0
+
+        a1pms_equal json:policy-instances 0
+
+        cr_equal 0 received_callbacks 2
+
+
+        if [[ $interface = *"SDNC"* ]]; then
+            sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
+            # Adatper does not go through SDNC
+            sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
+        else
+            sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME
+            sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
+        fi
+
+        check_a1pms_logs
+
+
+        if [[ $interface = *"SDNC"* ]]; then
+            check_sdnc_logs
+        fi
+
+        store_logs          "${__httpx}__${interface}"
+
+    done
+
+done
+
+#### TEST COMPLETE ####
+
+
+print_result
+
+auto_clean_environment
diff --git a/test/auto-test/FTC1_RICMEDIATOR.sh b/test/auto-test/FTC1_RICMEDIATOR.sh
new file mode 100755 (executable)
index 0000000..e34d8aa
--- /dev/null
@@ -0,0 +1,248 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020 Nordix Foundation. 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.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+
+TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and A1PMS REST with/without SDNC controller"
+
+#App names to include in the test when running docker, space separated list
+DOCKER_INCLUDED_IMAGES="CP CR A1PMS RICSIM RICMEDIATORSIM SDNC NGW KUBEPROXY"
+
+#App names to include in the test when running kubernetes, space separated list
+KUBE_INCLUDED_IMAGES="CP CR A1PMS RICSIM RICMEDIATORSIM SDNC NGW KUBEPROXY "
+#Prestarted 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
+#the image is not configured in the supplied env_file
+#Used for images not applicable to all supported profile
+CONDITIONALLY_IGNORED_IMAGES="NGW "
+
+#Supported test environment profiles
+SUPPORTED_PROFILES="ORAN-H-RELEASE"
+#Supported run modes
+SUPPORTED_RUNMODES="DOCKER KUBE"
+
+. ../common/testcase_common.sh $@
+
+setup_testenvironment
+
+#### TEST BEGIN ####
+
+sim_generate_policy_uuid
+
+# Tested variants of REST/DMAAP/SDNC config
+TESTED_VARIANTS="REST REST+SDNC"
+
+#Test a1pms and simulator protocol versions (others are http only)
+TESTED_PROTOCOLS="HTTP HTTPS"
+for __httpx in $TESTED_PROTOCOLS ; do
+    for interface in $TESTED_VARIANTS ; do
+
+        echo "#####################################################################"
+        echo "#####################################################################"
+        echo "### Testing a1pms: $interface using $__httpx"
+        echo "#####################################################################"
+        echo "#####################################################################"
+
+        clean_environment
+
+        start_kube_proxy
+
+        if [ $__httpx == "HTTPS" ]; then
+            use_a1pms_rest_https
+            use_ricmediator_simulator_http
+        else
+            use_a1pms_rest_http
+            use_ricmediator_simulator_http
+        fi
+
+        start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
+
+        set_a1pms_trace
+
+        # Create service to be able to receive events when rics becomes available
+        # Must use rest towards the a1pms since dmaap is not configured yet
+        a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
+
+        if [ $__httpx == "HTTPS" ]; then
+            use_cr_https
+            use_simulator_https
+            use_ricmediator_simulator_http
+            if [[ $interface = *"SDNC"* ]]; then
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
+            fi
+            use_a1pms_rest_https
+        else
+            use_cr_http
+            use_simulator_http
+            use_ricmediator_simulator_http
+            if [[ $interface = *"SDNC"* ]]; then
+                use_sdnc_http
+            fi
+            if [[ $interface = *"DMAAP"* ]]; then
+                use_a1pms_dmaap_http
+            else
+                use_a1pms_rest_http
+            fi
+        fi
+
+        start_ric_simulators ricsim_g1 1  OSC_2.1.0
+        start_ric_simulators ricsim_g2 1  STD_1.1.3
+        start_ric_simulators ricsim_g3 1  STD_2.0.0
+        start_ricmediator_simulators ricsim_g4 1  NONE
+
+        start_cr 1
+
+        start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
+
+        if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
+            start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
+        fi
+
+
+        if [[ $interface = *"SDNC"* ]]; then
+            start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
+            prepare_a1pms_config      SDNC    ".a1pms_config.json"
+        else
+            prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
+        fi
+
+        if [ $RUNMODE == "KUBE" ]; then
+            a1pms_load_config                       ".a1pms_config.json"
+        else
+            #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config
+            if [ $__httpx == "HTTPS" ]; then
+                use_a1pms_rest_https
+            else
+                use_a1pms_rest_http
+            fi
+            a1pms_api_put_configuration 200 ".a1pms_config.json"
+            if [ $__httpx == "HTTPS" ]; then
+                use_a1pms_rest_https
+            else
+                use_a1pms_rest_http
+            fi
+        fi
+
+        sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+        sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
+
+        ricmediatorsim_put_policy_type 201 ricsim_g4_1 1 testdata/OSC/sim_1.json
+
+        a1pms_equal json:rics 4 300
+
+        a1pms_equal json:policy-types 3 120
+
+        a1pms_equal json:policies 0
+
+        a1pms_equal json:policy-instances 0
+
+        cr_equal 0 received_callbacks 4 120
+
+        cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1 ricsim_g4_1
+
+        echo "############################################"
+        echo "############## Health check ################"
+        echo "############################################"
+
+        sleep_wait 120 "Let A1PMS cofiguration take effect"
+
+        a1pms_api_get_status 200
+
+        echo "############################################"
+        echo "##### Service registry and supervision #####"
+        echo "############################################"
+
+        a1pms_api_put_service 201 "serv1" 1000 "$CR_SERVICE_APP_PATH_0/1"
+
+        a1pms_api_get_service_ids 200 "serv1" "ric-registration"
+
+        a1pms_api_put_services_keepalive 200 "serv1"
+
+        echo "############################################"
+        echo "############## RIC Repository ##############"
+        echo "############################################"
+
+        a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE  ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0:AVAILABLE ricsim_g4_1:me1_ricsim_g4_1,me2_ricsim_g4_1:1:AVAILABLE "
+
+        echo "############################################"
+        echo "########### A1 Policy Management ###########"
+        echo "############################################"
+
+        notificationurl=$CR_SERVICE_APP_PATH_0"/test"
+        a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
+        a1pms_api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json
+        a1pms_api_put_policy 201 "serv1" ricsim_g4_1 1 5300 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g4_1 1 5300 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
+
+        a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
+        a1pms_api_put_policy 200 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
+
+        a1pms_equal json:policies 4
+
+        a1pms_api_delete_policy 204 5000
+
+        a1pms_api_delete_policy 204 5100
+
+        a1pms_api_delete_policy 204 5200
+
+        a1pms_api_delete_policy 204 5300
+
+        a1pms_equal json:policies 0
+
+        a1pms_equal json:policy-instances 0
+
+        cr_equal 0 received_callbacks 4
+
+        if [[ $interface = *"SDNC"* ]]; then
+            sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
+            sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
+        else
+            sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
+            sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME
+        fi
+
+        check_a1pms_logs
+
+
+        if [[ $interface = *"SDNC"* ]]; then
+            check_sdnc_logs
+        fi
+
+        store_logs          "${__httpx}__${interface}"
+
+    done
+
+done
+
+#### TEST COMPLETE ####
+
+
+print_result
+
+auto_clean_environment
index 3b53e8e..d94b3d7 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -64,7 +64,11 @@ start_http_proxy
 
 start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0
 
-start_mr #Just to prevent errors in the a1pms log...
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    start_mr #Just to prevent errors in the a1pms log...
+fi
 
 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -133,9 +137,9 @@ a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1"
 # Create policies in STD
 for ((i=1; i<=$STD_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     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
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 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
 done
 
@@ -153,7 +157,6 @@ do
     sim_contains_str $RIC_SIM_PREFIX"_g3_"$i remote_hosts proxy
 done
 
-FLAT_A1_EI="1"
 
 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
@@ -187,59 +190,28 @@ if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
 fi
 
 ## Setup prod-a
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-else
-    ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
+ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
 
-    ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
-    ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-fi
+ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 
 
 ## Create a job for prod-a
 ## job1 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    fi
-fi
-
+prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
 
 ## Create a second job for prod-a
 ## job2 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
 
 # Arm producer prod-a for supervision failure
 prodstub_arm_producer 200 prod-a 400
@@ -247,11 +219,7 @@ prodstub_arm_producer 200 prod-a 400
 # Wait for producer prod-a to go disabled
 ics_api_edp_get_producer_status 200 prod-a DISABLED 360
 
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 0 1000
-else
-    ics_equal json:ei-producer/v1/eiproducers 0 1000
-fi
+ics_equal json:data-producer/v1/info-producers 0 1000
 
 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
     cr_equal 0 received_callbacks 3 30
index 3774b69..28afcf4 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -42,7 +42,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 #Test a1pms and simulator protocol versions (others are http only)
 NB_TESTED_PROTOCOLS="HTTP HTTPS"
@@ -75,10 +75,16 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
         start_ric_simulators ricsim_g3 1  STD_2.0.0
 
         start_sdnc
+        controller_api_wait_for_status_ok 200 ricsim_g1_1
 
         if [ $__nb_httpx == "HTTPS" ]; then
             # "Using secure ports towards SDNC"
-            use_sdnc_https
+            if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                deviation "SDNC does not support NB https"
+                use_sdnc_http
+            else
+                use_sdnc_https
+            fi
         else
             #"Using non-secure ports towards SDNC"
             use_sdnc_http
index c98eeac..e4a8f79 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -46,7 +46,6 @@ setup_testenvironment
 #Local vars in test script
 ##########################
 
-FLAT_A1_EI="1"
 NUM_JOBS=10
 
 clean_environment
@@ -72,11 +71,7 @@ start_dmaapadp PROXY $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_CONFIG_FILE_TE
 
 set_dmaapadp_trace
 
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    ics_equal json:data-producer/v1/info-producers 1 60
-else
-    ics_equal json:ei-producer/v1/eiproducers 1 60
-fi
+ics_equal json:data-producer/v1/info-producers 1 60
 
 ics_api_idc_get_job_ids 200 NOTYPE NOWNER EMPTY
 ics_api_idc_get_type_ids 200 ExampleInformationType ExampleInformationTypeKafka
@@ -93,10 +88,14 @@ else
     ics_api_edp_get_producer_ids_2 200 NOTYPE DmaapGenericInfoProducer
 fi
 
-
+if [[ "$DMAAP_ADP_FEATURE_LEVEL" == *"FILTERSCHEMA"* ]]; then
+    _template_json=job-template1.1.json
+else
+    _template_json=job-template1.json
+fi
 for ((i=1; i<=$NUM_JOBS; i++))
 do
-    ics_api_idc_put_job 201 joby$i ExampleInformationType $CR_SERVICE_MR_PATH_0/joby-data$i info-ownery$i $CR_SERVICE_MR_PATH_0/job_status_info-ownery$i testdata/dmaap-adapter/job-template1.json
+    ics_api_idc_put_job 201 joby$i ExampleInformationType $CR_SERVICE_MR_PATH_0/joby-data$i info-ownery$i $CR_SERVICE_MR_PATH_0/job_status_info-ownery$i testdata/dmaap-adapter/$_template_json
 done
 
 for ((i=1; i<=$NUM_JOBS; i++))
index b260c55..0e32eaf 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -43,10 +43,14 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 # Tested variants of REST/DMAAP/SDNC config
-TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC DMAAP_BATCH DMAAP_BATCH+SDNC"
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    TESTED_VARIANTS="REST   REST+SDNC"
+else
+    TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC DMAAP_BATCH DMAAP_BATCH+SDNC"
+fi
 #Test a1pms and simulator protocol versions (others are http only)
 TESTED_PROTOCOLS="HTTP HTTPS"
 
@@ -62,9 +66,18 @@ for __httpx in $TESTED_PROTOCOLS ; do
         if [ $__httpx == "HTTPS" ]; then
             use_cr_https
             use_simulator_https
-            use_mr_https
+            if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+                :
+            else
+                use_mr_https
+            fi
             if [[ $interface = *"SDNC"* ]]; then
-                use_sdnc_https
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
             fi
             if [[ $interface = *"DMAAP"* ]]; then
                 use_a1pms_dmaap_https
@@ -74,7 +87,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
         else
             use_cr_http
             use_simulator_http
-            use_mr_http
+            if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+                :
+            else
+                use_mr_http
+            fi
             if [[ $interface = *"SDNC"* ]]; then
                 use_sdnc_http
             fi
@@ -96,7 +113,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         start_ric_simulators ricsim_g3 4  STD_2.0.0
 
-        start_mr
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            start_mr
+        fi
 
         start_cr 1
 
@@ -113,6 +134,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface = *"SDNC"* ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC    ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
index 2eb1d9f..db0f56d 100755 (executable)
@@ -46,7 +46,7 @@ setup_testenvironment
 
 #Local vars in test script
 ##########################
-FLAT_A1_EI="1"
+
 NUM_CR=10 # Number of callback receivers, divide all callbacks to this number of servers - for load sharing
 ## Note: The number jobs must be a multiple of the number of CRs in order to calculate the number of expected event in each CR
 NUM_JOBS=200  # Mediator and adapter gets same number of jobs for every type
@@ -448,7 +448,7 @@ mr_api_send_json "/events/unauthenticated.dmaapadp.json" '{"msg":"msg-3"}'
 #in one batch
 #########################################################
 
-DATA_DELIV_JOBS=7 #Each job will eventuall get 5+2 msgs
+DATA_DELIV_JOBS=7 #Each job will eventually get 5+2 msgs
 
 # Wait for data recetption, adapter
 EXPECTED_DATA_DELIV=$(($NUM_JOBS*2/$NUM_CR+$EXPECTED_DATA_DELIV))
index 7123665..1426d66 100755 (executable)
@@ -46,7 +46,7 @@ setup_testenvironment
 
 #Local vars in test script
 ##########################
-FLAT_A1_EI="1"
+
 NUM_CR=1 # Number of callback receivers, max 1
 ## Note: The number jobs must be a multiple of the number of CRs in order to calculate the number of expected event in each CR
 NUM_JOBS=100  # Mediator and adapter gets same number of jobs for every type
index 6d024d7..1d451ca 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -39,7 +39,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 # Clean container and start all needed containers #
 clean_environment
@@ -59,7 +59,11 @@ start_ric_simulators ricsim_g1 1  OSC_2.1.0
 start_ric_simulators ricsim_g2 1  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
 
@@ -80,6 +84,7 @@ cr_equal 0 received_callbacks 3 120
 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
 
 # Add an STD RIC and check
+
 start_ric_simulators ricsim_g2 2  STD_1.1.3
 
 prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
@@ -94,8 +99,7 @@ cr_api_check_all_sync_events 200 0 ric-registration ricsim_g2_2
 
 check_a1pms_logs
 
-
-# Remove one RIC RIC and check
+# Remove one RIC and check
 start_ric_simulators ricsim_g2 1  STD_1.1.3
 
 prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
index 2b677d0..f3fee12 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -43,7 +43,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 use_cr_http
 
@@ -73,13 +73,17 @@ for interface in $TESTED_VARIANTS ; do
 
     start_cr 1
 
-    start_mr
-
+    if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+        :
+    else
+        start_mr
+    fi
 
 
     # Create first config
     if [[ $interface = *"SDNC"* ]]; then
         start_sdnc
+        controller_api_wait_for_status_ok 200 ricsim_g1_1
         prepare_a1pms_config      SDNC  ".a1pms_config_initial.json"
     else
         prepare_a1pms_config      NOSDNC  ".a1pms_config_initial.json"
index 1ecd5ff..d1ee766 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============LICENSE_END=================================================
 #
 
-TC_ONELINE_DESCR="Create 10000 policies in sequence using http/https and a1pms REST/DMAAP with/without SDNC controller"
+TC_ONELINE_DESCR="Create 10000 policies in sequence using http/https and a1pms REST with/without SDNC controller"
 
 #App names to include in the test when running docker, space separated list
 DOCKER_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY"
@@ -43,14 +43,14 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 #Local vars in test script
 ##########################
 # Number of policies in each sequence
 NUM_POLICIES=10000
 
-# Tested variants of REST/DMAAP/SDNC config
+# Tested variants of SDNC config
 TESTED_VARIANTS="NOSDNC   SDNC"
 
 #Test a1pms and simulator protocol versions (others are http only)
@@ -88,7 +88,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
         start_ric_simulators ricsim_g2 1 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
 
@@ -102,7 +106,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         set_a1pms_debug
 
-        mr_equal requests_submitted 0
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            mr_equal requests_submitted 0
+        fi
 
         sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
         sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
@@ -110,6 +118,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface == "SDNC" ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC    ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
@@ -160,65 +169,77 @@ for __httpx in $TESTED_PROTOCOLS ; do
         sim_equal ricsim_g3_1 num_instances $NUM_POLICIES
 
 
-        if [ $__httpx == "HTTPS" ]; then
-            echo "Using secure ports towards dmaap"
-            use_a1pms_dmaap_https
+        INTERFACE_VARIANT=
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            INTERFACE_VARIANT=REST
+            if [ $__httpx == "HTTPS" ]; then
+                use_a1pms_rest_https
+            else
+                use_a1pms_rest_http
+            fi
         else
-            echo "Using non-secure ports towards dmaap"
-            use_a1pms_dmaap_http
+            INTERFACE_VARIANT=DMAAP
+            if [ $__httpx == "HTTPS" ]; then
+                echo "Using secure ports towards dmaap"
+                use_a1pms_dmaap_https
+            else
+                echo "Using non-secure ports towards dmaap"
+                use_a1pms_dmaap_http
+            fi
         fi
 
         START_ID=$(($START_ID+$NUM_POLICIES))
 
-        start_timer "Create polices in OSC via a1pms DMAAP, one by one, and $interface using "$__httpx
+        start_timer "Create polices in OSC via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
         a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES
-        print_timer "Create polices in OSC via a1pms DMAAP, one by one, and $interface using "$__httpx
+        print_timer "Create polices in OSC via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
 
         sim_equal ricsim_g1_1 num_instances $((2*$NUM_POLICIES))
 
         START_ID=$(($START_ID+$NUM_POLICIES))
 
-        start_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx
+        start_timer "Create polices in STD via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
         a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES
-        print_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx
+        print_timer "Create polices in STD via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
 
         sim_equal ricsim_g2_1 num_instances $((2*$NUM_POLICIES))
 
 
         START_ID=$(($START_ID+$NUM_POLICIES))
 
-        start_timer "Create polices in STD 2 via a1pms DMAAP, one by one, and $interface using "$__httpx
+        start_timer "Create polices in STD 2 via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
         a1pms_api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES
-        print_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx
+        print_timer "Create polices in STD via a1pms $INTERFACE_VARIANT, one by one, and $interface using "$__httpx
 
         sim_equal ricsim_g3_1 num_instances $((2*$NUM_POLICIES))
 
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            START_ID=$(($START_ID+$NUM_POLICIES))
+            start_timer "Create polices in OSC via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
+            a1pms_api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES
+            print_timer "Create polices in OSC via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
 
-        START_ID=$(($START_ID+$NUM_POLICIES))
-
-        start_timer "Create polices in OSC via a1pms DMAAP in batch and $interface using "$__httpx
-        a1pms_api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES
-        print_timer "Create polices in OSC via a1pms DMAAP in batch and $interface using "$__httpx
-
-        sim_equal ricsim_g1_1 num_instances $((3*$NUM_POLICIES))
-
-        START_ID=$(($START_ID+$NUM_POLICIES))
+            sim_equal ricsim_g1_1 num_instances $((3*$NUM_POLICIES))
 
-        start_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx
-        a1pms_api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES
-        print_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx
+            START_ID=$(($START_ID+$NUM_POLICIES))
 
-        sim_equal ricsim_g2_1 num_instances $((3*$NUM_POLICIES))
+            start_timer "Create polices in STD via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
+            a1pms_api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES
+            print_timer "Create polices in STD via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
 
+            sim_equal ricsim_g2_1 num_instances $((3*$NUM_POLICIES))
 
-        START_ID=$(($START_ID+$NUM_POLICIES))
 
-        start_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx
-        a1pms_api_put_policy_batch 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES
-        print_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx
+            START_ID=$(($START_ID+$NUM_POLICIES))
 
-        sim_equal ricsim_g3_1 num_instances $((3*$NUM_POLICIES))
+            start_timer "Create polices in STD via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
+            a1pms_api_put_policy_batch 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES
+            print_timer "Create polices in STD via a1pms $INTERFACE_VARIANT in batch and $interface using "$__httpx
 
+            sim_equal ricsim_g3_1 num_instances $((3*$NUM_POLICIES))
+        fi
 
         if [ $interface == "SDNC" ]; then
             sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
index e652757..24ef2b6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -56,7 +56,7 @@ NUM_RICS=5
 NUM_POLICIES_PER_RIC=2000
 
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
 
@@ -73,7 +73,12 @@ for __httpx in $TESTED_PROTOCOLS ; do
             use_cr_https
             use_simulator_https
             if [[ $interface = *"SDNC"* ]]; then
-                use_sdnc_https
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
             fi
             use_a1pms_rest_https
         else
@@ -106,6 +111,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface = *"SDNC"* ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC  ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
@@ -164,6 +170,8 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         stop_a1pms
 
+        sleep_wait 60
+
         start_stopped_a1pms
 
         set_a1pms_debug
@@ -172,6 +180,8 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         stop_a1pms
 
+        sleep_wait 60
+
         for ((i=1; i<=$NUM_RICS; i++))
         do
             sim_post_delete_instances 200 ricsim_g1_$i
@@ -214,6 +224,8 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         stop_a1pms
 
+        sleep_wait 60
+
         start_stopped_a1pms
 
         set_a1pms_debug
index 5ce79c0..f977d14 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============LICENSE_END=================================================
 #
 
-TC_ONELINE_DESCR="Repeatedly create and delete policies in each RICs for 24h (or configured number of days). Via a1pms REST/DMAAP/DMAAP_BATCH and SDNC using http or https"
+TC_ONELINE_DESCR="Repeatedly create and delete policies in each RICs for 24h (or configured number of days). Via a1pms REST and with SDNC using http or https"
 
 #App names to include in the test when running docker, space separated list
 DOCKER_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY"
@@ -43,7 +43,7 @@ setup_testenvironment
 
 #### TEST BEGIN ####
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 #Local vars in test script
 ##########################
@@ -71,7 +71,12 @@ if [ $HTTPX == "HTTP" ]; then
 else
    use_cr_https
    use_a1pms_rest_https
-   use_sdnc_https
+   if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+      deviation "SDNC does not support NB https"
+      use_sdnc_http
+   else
+      use_sdnc_https
+   fi
    use_simulator_https
 fi
 
@@ -81,7 +86,11 @@ start_ric_simulators ricsim_g2 $NUM_RICS STD_1.1.3
 
 start_ric_simulators ricsim_g3 $NUM_RICS  STD_2.0.0
 
-start_mr
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    start_mr
+fi
 
 start_cr 1
 
@@ -105,6 +114,7 @@ else
 fi
 
 start_sdnc
+controller_api_wait_for_status_ok 200 ricsim_g1_1
 
 sleep_wait 120 "Let A1PMS cofiguration take effect"
 
@@ -172,9 +182,14 @@ echo "Register a service"
 a1pms_api_put_service 201 "serv1" 0 "$CR_SERVICE_APP_PATH_0/1"
 
 TEST_DURATION=$((24*3600*$DAYS))
+
 TEST_START=$SECONDS
 
-A1PMS_INTERFACES="REST REST_PARALLEL DMAAP DMAAP-BATCH"
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    A1PMS_INTERFACES="REST REST_PARALLEL"
+else
+    A1PMS_INTERFACES="REST REST_PARALLEL DMAAP DMAAP-BATCH"
+fi
 
 MR_MESSAGES=0
 
@@ -342,12 +357,16 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do
 
       a1pms_equal json:policy-instances $INSTANCES
 
-      mr_equal requests_submitted $MR_MESSAGES
-      mr_equal requests_fetched $MR_MESSAGES
-      mr_equal responses_submitted $MR_MESSAGES
-      mr_equal responses_fetched $MR_MESSAGES
-      mr_equal current_requests 0
-      mr_equal current_responses 0
+      if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+         :
+      else
+         mr_equal requests_submitted $MR_MESSAGES
+         mr_equal requests_fetched $MR_MESSAGES
+         mr_equal responses_submitted $MR_MESSAGES
+         mr_equal responses_fetched $MR_MESSAGES
+         mr_equal current_requests 0
+         mr_equal current_responses 0
+      fi
 
 
       for ((i=1; i<=$NUM_RICS; i++))
index 4b795c0..54c4b3a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -55,7 +55,7 @@ TESTED_PROTOCOLS="HTTP HTTPS"
 NUM_RICS=20
 NUM_POLICIES_PER_RIC=500
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
 
@@ -71,15 +71,28 @@ for __httpx in $TESTED_PROTOCOLS ; do
         if [ $__httpx == "HTTPS" ]; then
             use_cr_https
             use_simulator_https
-            use_mr_https
+            if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+                :
+            else
+                use_mr_https
+            fi
             if [[ $interface = *"SDNC"* ]]; then
-                use_sdnc_https
+                if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+                    deviation "SDNC does not support NB https"
+                    use_sdnc_http
+                else
+                    use_sdnc_https
+                fi
             fi
             use_a1pms_rest_https
         else
             use_cr_http
             use_simulator_http
-            use_mr_http
+            if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+                :
+            else
+                use_mr_http
+            fi
             if [[ $interface = *"SDNC"* ]]; then
                 use_sdnc_http
             fi
@@ -107,6 +120,7 @@ for __httpx in $TESTED_PROTOCOLS ; do
 
         if [[ $interface = *"SDNC"* ]]; then
             start_sdnc
+            controller_api_wait_for_status_ok 200 ricsim_g1_1
             prepare_a1pms_config      SDNC  ".a1pms_config.json"
         else
             prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
@@ -118,7 +132,11 @@ for __httpx in $TESTED_PROTOCOLS ; do
             a1pms_api_put_configuration 200 ".a1pms_config.json"
         fi
 
-        start_mr # Not used, but removes error messages from the a1pms log
+        if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+            :
+        else
+            start_mr #Just to prevent errors in the a1pms log...
+        fi
 
         start_cr 1
 
index b9a6654..a85eed2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -56,7 +56,11 @@ start_ric_simulators  $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3
 
 start_ric_simulators  $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0
 
-start_mr #Just to prevent errors in the a1pms log...
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    start_mr #Just to prevent errors in the a1pms log...
+fi
 
 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -158,11 +162,11 @@ notificationurl=$CR_SERVICE_APP_PATH_0"/test"
 # Create policies in OSC
 for ((i=1; i<=$OSC_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 2 $((2000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pihw_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl testdata/OSC/piqos_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pitsa_template.json 1
 done
 
@@ -177,11 +181,11 @@ done
 # Create policies in STD
 for ((i=1; i<=$STD_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     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
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 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
 done
 
index f6433ad..8178551 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -54,12 +54,7 @@ use_ics_rest_https
 use_prod_stub_https
 use_dmaapmed_https
 
-if [ $ICS_VERSION == "V1-1" ]; then
-    use_rapp_catalogue_http # https not yet supported
-else
-    ########################################use_rapp_catalogue_https
-    use_rapp_catalogue_http
-fi
+use_rapp_catalogue_http
 
 echo -e "$RED CHECK WHY RC HTTPS DOES NOT WORK $ERED"
 
@@ -103,6 +98,7 @@ kafkapc_api_start_sending 200 "unauthenticated.dmaapadp_kafka.text"
 start_control_panel
 
 start_sdnc
+controller_api_wait_for_status_ok 200 a1-sim-std-1
 
 start_a1pms
 
@@ -234,9 +230,9 @@ a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/ER-
 for ((i=0; i<$STD_NUM_RICS; i++))
 do
     ricid=$((3+$i))
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1
 done
 
@@ -244,9 +240,9 @@ done
 for ((i=0; i<$STD_NUM_RICS; i++))
 do
    ricid=$((5+$i))
-   generate_policy_uuid
+   sim_generate_policy_uuid
    a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS_0_2_0 $((2100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos_template.json 1
-   generate_policy_uuid
+   sim_generate_policy_uuid
    a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS2_0.1.0 $((2200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos2_template.json 1
 done
 
@@ -254,9 +250,9 @@ done
 for ((i=0; i<$OSC_NUM_RICS; i++))
 do
     ricid=$((1+$i))
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 1 $((3100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi1_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 2 $((3200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi2_template.json 1
 done
 
@@ -306,8 +302,6 @@ cr_api_reset 0   # Reset CR to count new events
 echo "ADD EVENT/STATUS CHECK"
 echo "ADD MR CHECK"
 
-FLAT_A1_EI="1"
-
 ics_api_admin_reset
 
 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
@@ -328,60 +322,30 @@ prodstub_arm_job_create 200 prod-a job2
 ics_api_service_status 200
 
 ## Setup prod-a
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-else
-    ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
-    ics_api_edp_get_type_2 200 type1
+ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
+ics_api_edp_get_type_2 200 type1
 
-    ics_api_edp_get_type_ids 200 type1
+ics_api_edp_get_type_ids 200 type1
 
-    ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-    ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-fi
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 
 
 ## Create a job for prod-a
 ## job1 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE3LEVEL" == *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
 
 ## Create a second job for prod-a
 ## job2 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
 
 # Dmaap mediator and adapter
 start_dmaapadp NOPROXY $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_CONFIG_FILE_TEMPLATE $SIM_GROUP/$DMAAP_ADP_COMPOSE_DIR/$DMAAP_ADP_DATA_FILE
@@ -451,13 +415,8 @@ start_stopped_ics
 
 # Check ICS status after restart
 
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_get_job_status 200 type1 job1 DISABLED
-    ics_api_a1_get_job_status 200 type1 job2 DISABLED
-else
-    ics_api_a1_get_job_status 200 job1 DISABLED
-    ics_api_a1_get_job_status 200 job2 DISABLED
-fi
+ics_api_a1_get_job_status 200 job1 DISABLED
+ics_api_a1_get_job_status 200 job2 DISABLED
 
 check_a1pms_logs
 check_ics_logs
index 7d7c935..c41c725 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -48,16 +48,32 @@ setup_testenvironment
 
 use_cr_https
 use_a1pms_rest_https
-use_sdnc_https
+if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+    deviation "SDNC does not support NB https"
+    use_sdnc_http
+else
+    use_sdnc_https
+fi
 use_simulator_https
-use_mr_https
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    use_mr_https
+fi
 __httpx="HTTPS"
 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
 
-generate_policy_uuid
+sim_generate_policy_uuid
 
 # Tested variants of REST/DMAAP/SDNC config
-TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
+
+
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    TESTED_VARIANTS="REST   REST+SDNC"
+else
+    TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
+fi
+
 for interface in $TESTED_VARIANTS ; do
 
     echo "#####################################################################"
@@ -85,8 +101,12 @@ for interface in $TESTED_VARIANTS ; do
 
     start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0
 
-    start_mr    "$MR_READ_TOPIC"  "/events" "users/policy-agent" \
-                "$MR_WRITE_TOPIC" "/events" "users/mr-stub"
+    if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+        :
+    else
+        start_mr    "$MR_READ_TOPIC"  "/events" "users/policy-agent" \
+                    "$MR_WRITE_TOPIC" "/events" "users/mr-stub"
+    fi
 
     start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -98,6 +118,7 @@ for interface in $TESTED_VARIANTS ; do
 
     if [[ $interface = *"SDNC"* ]]; then
         start_sdnc
+        controller_api_wait_for_status_ok 200 ricsim_g1_1
         prepare_a1pms_config      SDNC    ".a1pms_config.json"
     else
         prepare_a1pms_config      NOSDNC  ".a1pms_config.json"
index f4adcd6..6da3ef5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -48,7 +48,12 @@ setup_testenvironment
 
 use_cr_https
 use_a1pms_rest_https
-use_sdnc_https
+if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+    deviation "SDNC does not support NB https"
+    use_sdnc_http
+else
+    use_sdnc_https
+fi
 use_simulator_https
 
 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
@@ -66,7 +71,11 @@ start_ric_simulators  $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3
 
 start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0
 
-start_mr #Just to prevent errors in the a1pms log...
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    start_mr #Just to prevent errors in the a1pms log...
+fi
 
 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -75,6 +84,7 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
 fi
 
 start_sdnc
+controller_api_wait_for_status_ok 200 ricsim_g1_1
 
 start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
 
@@ -172,9 +182,9 @@ a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1"
 # Create policies in OSC
 for ((i=1; i<=$OSC_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1
 done
 
@@ -189,11 +199,11 @@ done
 # Create policies in STD
 for ((i=1; i<=$STD_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1
-    generate_policy_uuid
+    sim_generate_policy_uuid
     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
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 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
 done
 
index 7b8a6ed..e252e1d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -48,15 +48,16 @@ setup_testenvironment
 
 use_cr_https
 use_a1pms_rest_https
-use_sdnc_https
+if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
+    deviation "SDNC does not support NB https"
+    use_sdnc_http
+else
+    use_sdnc_https
+fi
 use_simulator_https
 use_ics_rest_https
 use_prod_stub_https
-if [ $ICS_VERSION == "V1-1" ]; then
-    use_rapp_catalogue_http # https not yet supported
-else
-    use_rapp_catalogue_https
-fi
+use_rapp_catalogue_https
 
 
 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
@@ -71,7 +72,11 @@ STD_NUM_RICS=2
 
 start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0
 
-start_mr #Just to prevent errors in the a1pms log...
+if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+    :
+else
+    start_mr #Just to prevent errors in the a1pms log...
+fi
 
 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -80,6 +85,7 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
 fi
 
 start_sdnc    # Comment this line to run A1PMS with proxy
+controller_api_wait_for_status_ok 200 ricsim_g3_1 # Comment this line to run A1PMS with proxy
 
 start_a1pms PROXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
 
@@ -105,11 +111,6 @@ set_a1pms_trace
 
 set_ics_trace
 
-use_info_jobs=false  #Set flag if interface supporting info-types is used
-if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-    use_info_jobs=true
-fi
-
 rapp_cat_api_get_services 200 EMPTY
 
 rapp_cat_api_put_service 201 "Emergency-response-app" v1 "Emergency-response-app" "Emergency-response-app"
@@ -155,9 +156,9 @@ a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1"
 # Create policies in STD
 for ((i=1; i<=$STD_NUM_RICS; i++))
 do
-    generate_policy_uuid
+    sim_generate_policy_uuid
     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
-    generate_policy_uuid
+    sim_generate_policy_uuid
     a1pms_api_put_policy 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
 done
 
@@ -174,8 +175,6 @@ do
     sim_print $RIC_SIM_PREFIX"_g3_"$i remote_hosts
 done
 
-FLAT_A1_EI="1"
-
 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
 RIC_G1_1=$RIC_SIM_PREFIX"_g3_1"
@@ -199,59 +198,28 @@ prodstub_arm_job_create 200 prod-a job2
 ics_api_service_status 200
 
 ## Setup prod-a
-if [ $ICS_VERSION == "V1-1" ]; then
-    ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
+ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
 
-    ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
-else
-    ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
+ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
-    ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-
-    ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
-fi
+ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
 
 ics_api_edp_get_producer_status 200 prod-a ENABLED
 
 
 ## Create a job for prod-a
 ## job1 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-else
-    if [ $use_info_jobs ]; then
-        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
-    fi
-fi
-
+ prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
 
 ## Create a second job for prod-a
 ## job2 - prod-a
-if [  -z "$FLAT_A1_EI" ]; then
-    ics_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
-fi
+ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
 
 # Check the job data in the producer
-if [ $ICS_VERSION == "V1-1" ]; then
-    prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-else
-    if [ $use_info_jobs ]; then
-        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    else
-        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
-    fi
-fi
+prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
 
 check_a1pms_logs
 check_ics_logs
index cca3eb7..59d6e8f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============LICENSE_END=================================================
 #
 
-TS_ONELINE_DESCR="Test suite - alternative A1PMS endpoint image testing. a1pms REST, DMAAP and SNDC controller resconf"
+TS_ONELINE_DESCR="Test suite - alternative A1PMS endpoint image testing. a1pms REST and SNDC controller resconf"
 
 . ../common/testsuite_common.sh
 
index f9baedf..c1a5e27 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============LICENSE_END=================================================
 #
 
-TS_ONELINE_DESCR="Test suite - interface testing. A1PMS REST, DMAAP and SNDC controller resconf"
+TS_ONELINE_DESCR="Test suite - interface testing. A1PMS REST and SNDC controller resconf"
 
 . ../common/testsuite_common.sh
 
index 0b1b10d..0036d92 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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,7 +17,7 @@
 #  ============LICENSE_END=================================================
 #
 
-TS_ONELINE_DESCR="Test suite - short list of tests on alternative A1PMS endpoint image testing. a1pms REST, DMAAP and SNDC controller resconf"
+TS_ONELINE_DESCR="Test suite - short list of tests on alternative A1PMS endpoint image testing. a1pms RES and SNDC controller resconf"
 
 . ../common/testsuite_common.sh
 
diff --git a/test/auto-test/override-adapter.sh b/test/auto-test/override-adapter.sh
new file mode 100644 (file)
index 0000000..5edb9e6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+################################################################################
+#   Copyright (c) 2023 Nordix Foundation.                                      #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+A1PMS_ADAPTER_CLASS=""         # adapter java class
+A1PMS_ADAPTER_POLICY_NAME=""   # policy type for adaper
index ef65172..492f204 100644 (file)
@@ -2871,7 +2871,7 @@ Translate ric name to kube host name.
 | --------- | ----------- |
 | `<ric-name>` | The name of the ric to translate into a host name (ip) |
 
-## Function: generate_policy_uuid ##
+## Function: sim_generate_policy_uuid ##
 
 Geneate a UUID prefix to use along with the policy instance number when creating/deleting policies. Sets the env var UUID.
 UUID is then automatically added to the policy id in GET/PUT/DELETE.
@@ -3152,7 +3152,7 @@ Checks the status of a policy
 
 ## License
 
-Copyright (C) 2020 Nordix Foundation. All rights reserved.
+Copyright (C) 2020-2023 Nordix Foundation. 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.
 You may obtain a copy of the License at
index ccc424e..e391872 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
@@ -457,16 +457,16 @@ start_stopped_a1pms() {
 
 
 # Function to perpare the consul configuration according to the current simulator configuration
-# args: SDNC|NOSDNC <output-file>
+# args: SDNC|NOSDNC <output-file> [ <sim-group> <adapter-class> ]
 # (Function for test scripts)
 prepare_a1pms_config() {
-       echo -e $BOLD"Prepare Consul config"$EBOLD
+       echo -e $BOLD"Prepare A1PMS config"$EBOLD
 
        echo " Writing consul config for "$A1PMS_APP_NAME" to file: "$2
 
-       if [ $# != 2 ];  then
+       if [ $# != 2 ] && [ $# != 4 ];  then
                ((RES_CONF_FAIL++))
-       __print_err "need two args,  SDNC|NOSDNC <output-file>" $@
+       __print_err "need two or four args,  SDNC|NOSDNC <output-file> [ <sim-group> <adapter-class> ]" $@
                exit 1
        fi
 
@@ -491,23 +491,26 @@ prepare_a1pms_config() {
                config_json=$config_json"\n                     }"
                config_json=$config_json"\n   ],"
        fi
-
-       config_json=$config_json"\n   \"streams_publishes\": {"
-       config_json=$config_json"\n                            \"dmaap_publisher\": {"
-       config_json=$config_json"\n                              \"type\": \"message-router\","
-       config_json=$config_json"\n                              \"dmaap_info\": {"
-       config_json=$config_json"\n                                \"topic_url\": \"$MR_SERVICE_PATH$MR_WRITE_URL\""
-       config_json=$config_json"\n                              }"
-       config_json=$config_json"\n                            }"
-       config_json=$config_json"\n   },"
-       config_json=$config_json"\n   \"streams_subscribes\": {"
-       config_json=$config_json"\n                             \"dmaap_subscriber\": {"
-       config_json=$config_json"\n                               \"type\": \"message-router\","
-       config_json=$config_json"\n                               \"dmaap_info\": {"
-       config_json=$config_json"\n                                   \"topic_url\": \"$MR_SERVICE_PATH$MR_READ_URL\""
-       config_json=$config_json"\n                                 }"
-       config_json=$config_json"\n                               }"
-       config_json=$config_json"\n   },"
+       if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
+               :
+       else
+               config_json=$config_json"\n   \"streams_publishes\": {"
+               config_json=$config_json"\n                            \"dmaap_publisher\": {"
+               config_json=$config_json"\n                              \"type\": \"message-router\","
+               config_json=$config_json"\n                              \"dmaap_info\": {"
+               config_json=$config_json"\n                                \"topic_url\": \"$MR_SERVICE_PATH$MR_WRITE_URL\""
+               config_json=$config_json"\n                              }"
+               config_json=$config_json"\n                            }"
+               config_json=$config_json"\n   },"
+               config_json=$config_json"\n   \"streams_subscribes\": {"
+               config_json=$config_json"\n                             \"dmaap_subscriber\": {"
+               config_json=$config_json"\n                               \"type\": \"message-router\","
+               config_json=$config_json"\n                               \"dmaap_info\": {"
+               config_json=$config_json"\n                                   \"topic_url\": \"$MR_SERVICE_PATH$MR_READ_URL\""
+               config_json=$config_json"\n                                 }"
+               config_json=$config_json"\n                               }"
+               config_json=$config_json"\n   },"
+       fi
 
        config_json=$config_json"\n   \"ric\": ["
 
@@ -524,16 +527,35 @@ prepare_a1pms_config() {
                                fi
                        done
                fi
+               result=$(kubectl $KUBECONF get pods -n $KUBE_A1SIM_NAMESPACE -o jsonpath='{.items[?(@.metadata.labels.autotest=="RICMEDIATORSIM")].metadata.name}')
+               oranrics=""
+               if [ $? -eq 0 ] && [ ! -z "$result" ]; then
+                       for im in $result; do
+                               if [[ $im != *"-0" ]]; then
+                                       ric_subdomain=$(kubectl $KUBECONF get pod $im -n $KUBE_A1SIM_NAMESPACE -o jsonpath='{.spec.subdomain}')
+                                       rics=$rics" "$im"."$ric_subdomain"."$KUBE_A1SIM_NAMESPACE
+                                       oranrics=$oranrics" "$im"."$ric_subdomain"."$KUBE_A1SIM_NAMESPACE
+                                       let ric_cntr=ric_cntr+1
+                               fi
+                       done
+               fi
                if [ $ric_cntr -eq 0 ]; then
                        echo $YELLOW"Warning: No rics found for the configuration"$EYELLOW
                fi
        else
-               rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "status=running" --format {{.Names}})
+               rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "label=a1sim" --filter "status=running" --format {{.Names}})
                if [ $? -ne 0 ] || [ -z "$rics" ]; then
                        echo -e $RED" FAIL - the names of the running RIC Simulator cannot be retrieved." $ERED
                        ((RES_CONF_FAIL++))
                        return 1
                fi
+               oranrics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "label=orana1sim" --filter "status=running" --format {{.Names}})
+               if [ $? -ne 0 ] || [ -z "$rics" ]; then
+                       echo -e $RED" FAIL - the names of the running RIC Simulator cannot be retrieved." $ERED
+                       ((RES_CONF_FAIL++))
+                       return 1
+               fi
+               rics="$rics $oranrics"
        fi
        cntr=0
        for ric in $rics; do
@@ -553,7 +575,23 @@ prepare_a1pms_config() {
                fi
                echo " Found a1 sim: "$ric_id
                config_json=$config_json"\n            \"name\": \"$ric_id\","
-               config_json=$config_json"\n            \"baseUrl\": \"$RIC_SIM_HTTPX://$ric:$RIC_SIM_PORT\","
+
+               xricfound=0
+               for xric in $oranrics; do
+                       if [ $xric == $ric ]; then
+                               xricfound=1
+                       fi
+               done
+               if [ $xricfound -eq 0 ]; then
+                       config_json=$config_json"\n            \"baseUrl\": \"$RIC_SIM_HTTPX://$ric:$RIC_SIM_PORT\","
+               else
+                       config_json=$config_json"\n            \"baseUrl\": \"$RICMEDIATOR_SIM_HTTPX://$ric:$RICMEDIATOR_SIM_PORT\","
+               fi
+               if [ ! -z "$3" ]; then
+                       if [[ $ric == "$3"* ]]; then
+                       config_json=$config_json"\n            \"customAdapterClass\": \"$4\","
+                       fi
+               fi
                if [ $1 == "SDNC" ]; then
                        config_json=$config_json"\n            \"controller\": \"$SDNC_APP_NAME\","
                fi
index 7c7a365..3cd8b33 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
@@ -258,7 +258,7 @@ __execute_curl_to_chartmuseum() {
                fi
        fi
        echo " CMD: $3 -skw %{http_code} $proxyflag" >> $HTTPLOG
-       res="$($3 -skw %{http_code} $proxyflag)"
+       res=$($3 -skw %{http_code} $proxyflag)
        echo " RESP: $res" >> $HTTPLOG
        retcode=$?
     if [ $retcode -ne 0 ]; then
index 1ccbc82..9edd01a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
@@ -133,5 +133,6 @@ echo "===  Results: positive=2XX http status, negative=non 2XX http status - (ok
 echo "Method     Endpoint                                      Positive         Negative"
 cat $SUMMARYFILE | cut -c 4-
 
+echo "-- end of test report -- "
 exit 0
 
index 0c067ca..3676fdc 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -505,43 +505,29 @@ ics_equal() {
 #Function prefix: ics_api_a1
 
 # API Test function: GET /A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs
-# args: <response-code> <type-id>  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]
-# args (flat uri structure): <response-code> <type-id>|NOTYPE  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]
+# args: <response-code> <type-id>|NOTYPE  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]
 # (Function for test scripts)
 ics_api_a1_get_job_ids() {
        __log_test_start $@
 
-       if [ -z "$FLAT_A1_EI" ]; then
-               # Valid number of parameters 4,5,6 etc
-       if [ $# -lt 3 ]; then
-                       __print_err "<response-code> <type-id>  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]" $@
-                       return 1
-               fi
-       else
-               echo -e $YELLOW"INTERFACE - FLAT URI STRUCTURE"$EYELLOW
-               # Valid number of parameters 4,5,6 etc
-       if [ $# -lt 3 ]; then
-                       __print_err "<response-code> <type-id>|NOTYPE  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]" $@
-                       return 1
-               fi
+       # Valid number of parameters 4,5,6 etc
+       if [ $# -lt 3 ]; then
+               __print_err "<response-code> <type-id>|NOTYPE  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]" $@
+               return 1
        fi
        search=""
        if [ $3 != "NOWNER" ]; then
                search="?owner="$3
        fi
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               query="/A1-EI/v1/eitypes/$2/eijobs$search"
-       else
-               if [ $2 != "NOTYPE" ]; then
-                       if [ -z "$search" ]; then
-                               search="?eiTypeId="$2
-                       else
-                               search=$search"&eiTypeId="$2
-                       fi
+       if [ $2 != "NOTYPE" ]; then
+               if [ -z "$search" ]; then
+                       search="?eiTypeId="$2
+               else
+                       search=$search"&eiTypeId="$2
                fi
-               query="/A1-EI/v1/eijobs$search"
        fi
+       query="/A1-EI/v1/eijobs$search"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
 
@@ -605,11 +591,7 @@ ics_api_a1_get_type() {
                        __log_test_fail_general "Schema file "$3", does not exist"
                        return 1
                fi
-               if [ -z "$FLAT_A1_EI" ]; then
-                       targetJson="{\"eiJobParametersSchema\":$schema}"
-               else
-                       targetJson=$schema
-               fi
+               targetJson=$schema
                echo " TARGET JSON: $targetJson" >> $HTTPLOG
                res=$(python3 ../common/compare_json.py "$targetJson" "$body")
 
@@ -668,121 +650,81 @@ ics_api_a1_get_type_ids() {
 }
 
 # API Test function: GET â€‹/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}​/status
-# args: <response-code> <type-id> <job-id> [<status>]
-# args (flat uri structure): <response-code> <job-id> [<status> [<timeout>]]
+# args: <response-code> <job-id> [<status> [<timeout>]]
 # (Function for test scripts)
 ics_api_a1_get_job_status() {
        __log_test_start $@
 
-       if [ -z "$FLAT_A1_EI" ]; then
-               if [ $# -ne 3 ] && [ $# -ne 4 ]; then
-                       __print_err "<response-code> <type-id> <job-id> [<status>]" $@
-                       return 1
-               fi
+       if [ $# -lt 2 ] && [ $# -gt 4 ]; then
+               __print_err "<response-code> <job-id> [<status> [<timeout>]]" $@
+               return 1
+       fi
 
-               query="/A1-EI/v1/eitypes/$2/eijobs/$3/status"
+       query="/A1-EI/v1/eijobs/$2/status"
 
+       start=$SECONDS
+       for (( ; ; )); do
                res="$(__do_curl_to_api ICS GET $query)"
                status=${res:${#res}-3}
 
+               if [ $# -eq 4 ]; then
+                       duration=$((SECONDS-start))
+                       echo -ne " Response=${status} after ${duration} seconds, waiting for ${3} ${SAMELINE}"
+                       if [ $duration -gt $4 ]; then
+                               echo ""
+                               duration=-1  #Last iteration
+                       fi
+               else
+                       duration=-1 #single test, no wait
+               fi
+
                if [ $status -ne $1 ]; then
-                       __log_test_fail_status_code $1 $status
-                       return 1
+                       if [ $duration -eq -1 ]; then
+                               __log_test_fail_status_code $1 $status
+                               return 1
+                       fi
                fi
-               if [ $# -eq 4 ]; then
+               if [ $# -ge 3 ] && [ $status -eq $1 ]; then
                        body=${res:0:${#res}-3}
-                       targetJson="{\"operationalState\": \"$4\"}"
+                       targetJson="{\"eiJobStatus\": \"$3\"}"
                        echo " TARGET JSON: $targetJson" >> $HTTPLOG
                        res=$(python3 ../common/compare_json.py "$targetJson" "$body")
 
                        if [ $res -ne 0 ]; then
-                               __log_test_fail_body
-                               return 1
-                       fi
-               fi
-       else
-               echo -e $YELLOW"INTERFACE - FLAT URI STRUCTURE"$EYELLOW
-               if [ $# -lt 2 ] && [ $# -gt 4 ]; then
-                       __print_err "<response-code> <job-id> [<status> [<timeout>]]" $@
-                       return 1
-               fi
-
-               query="/A1-EI/v1/eijobs/$2/status"
-
-               start=$SECONDS
-               for (( ; ; )); do
-                       res="$(__do_curl_to_api ICS GET $query)"
-                       status=${res:${#res}-3}
-
-                       if [ $# -eq 4 ]; then
-                               duration=$((SECONDS-start))
-                               echo -ne " Response=${status} after ${duration} seconds, waiting for ${3} ${SAMELINE}"
-                               if [ $duration -gt $4 ]; then
-                                       echo ""
-                                       duration=-1  #Last iteration
-                               fi
-                       else
-                               duration=-1 #single test, no wait
-                       fi
-
-                       if [ $status -ne $1 ]; then
                                if [ $duration -eq -1 ]; then
-                                       __log_test_fail_status_code $1 $status
+                                       __log_test_fail_body
                                        return 1
                                fi
-                       fi
-                       if [ $# -ge 3 ] && [ $status -eq $1 ]; then
-                               body=${res:0:${#res}-3}
-                               targetJson="{\"eiJobStatus\": \"$3\"}"
-                               echo " TARGET JSON: $targetJson" >> $HTTPLOG
-                               res=$(python3 ../common/compare_json.py "$targetJson" "$body")
-
-                               if [ $res -ne 0 ]; then
-                                       if [ $duration -eq -1 ]; then
-                                               __log_test_fail_body
-                                               return 1
-                                       fi
-                               else
-                                       duration=-1  #Goto pass
-                               fi
-                       fi
-                       if [ $duration -eq -1 ]; then
-                               if [ $# -eq 4 ]; then
-                                       echo ""
-                               fi
-                               __log_test_pass
-                               return 0
                        else
-                               sleep 1
+                               duration=-1  #Goto pass
                        fi
-               done
-       fi
+               fi
+               if [ $duration -eq -1 ]; then
+                       if [ $# -eq 4 ]; then
+                               echo ""
+                       fi
+                       __log_test_pass
+                       return 0
+               else
+                       sleep 1
+               fi
+       done
 
        __log_test_pass
        return 0
 }
 
 # API Test function: GET â€‹/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}
-# args: <response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]
-# args (flat uri structure): <response-code> <job-id> [<type-id> <target-url> <owner-id> <template-job-file>]
+# args: <response-code> <job-id> [<type-id> <target-url> <owner-id> <template-job-file>]
 # (Function for test scripts)
 ics_api_a1_get_job() {
        __log_test_start $@
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               if [ $# -ne 3 ] && [ $# -ne 6 ]; then
-                       __print_err "<response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]" $@
-                       return 1
-               fi
-               query="/A1-EI/v1/eitypes/$2/eijobs/$3"
-       else
-               echo -e $YELLOW"INTERFACE - FLAT URI STRUCTURE"$EYELLOW
-               if [ $# -ne 2 ] && [ $# -ne 7 ]; then
-                       __print_err "<response-code> <job-id> [<type-id> <target-url> <owner-id> <notification-url> <template-job-file>]" $@
-                       return 1
-               fi
-               query="/A1-EI/v1/eijobs/$2"
+       if [ $# -ne 2 ] && [ $# -ne 7 ]; then
+               __print_err "<response-code> <job-id> [<type-id> <target-url> <owner-id> <notification-url> <template-job-file>]" $@
+               return 1
        fi
+       query="/A1-EI/v1/eijobs/$2"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
 
@@ -791,45 +733,23 @@ ics_api_a1_get_job() {
                return 1
        fi
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               if [ $# -eq 6 ]; then
-                       body=${res:0:${#res}-3}
-
-                       if [ -f $6 ]; then
-                               jobfile=$(cat $6)
-                               jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
-                       else
-                               __log_test_fail_general "Job template file "$6", does not exist"
-                               return 1
-                       fi
-                       targetJson="{\"targetUri\": \"$4\",\"jobOwner\": \"$5\",\"jobParameters\": $jobfile}"
-                       echo " TARGET JSON: $targetJson" >> $HTTPLOG
-                       res=$(python3 ../common/compare_json.py "$targetJson" "$body")
+       if [ $# -eq 7 ]; then
+               body=${res:0:${#res}-3}
 
-                       if [ $res -ne 0 ]; then
-                               __log_test_fail_body
-                               return 1
-                       fi
+               if [ -f $7 ]; then
+                       jobfile=$(cat $7)
+                       jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
+               else
+                       __log_test_fail_general "Job template file "$6", does not exist"
+                       return 1
                fi
-       else
-               if [ $# -eq 7 ]; then
-                       body=${res:0:${#res}-3}
-
-                       if [ -f $7 ]; then
-                               jobfile=$(cat $7)
-                               jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
-                       else
-                               __log_test_fail_general "Job template file "$6", does not exist"
-                               return 1
-                       fi
-                       targetJson="{\"eiTypeId\": \"$3\", \"jobResultUri\": \"$4\",\"jobOwner\": \"$5\",\"jobStatusNotificationUri\": \"$6\",\"jobDefinition\": $jobfile}"
-                       echo " TARGET JSON: $targetJson" >> $HTTPLOG
-                       res=$(python3 ../common/compare_json.py "$targetJson" "$body")
+               targetJson="{\"eiTypeId\": \"$3\", \"jobResultUri\": \"$4\",\"jobOwner\": \"$5\",\"jobStatusNotificationUri\": \"$6\",\"jobDefinition\": $jobfile}"
+               echo " TARGET JSON: $targetJson" >> $HTTPLOG
+               res=$(python3 ../common/compare_json.py "$targetJson" "$body")
 
-                       if [ $res -ne 0 ]; then
-                               __log_test_fail_body
-                               return 1
-                       fi
+               if [ $res -ne 0 ]; then
+                       __log_test_fail_body
+                       return 1
                fi
        fi
 
@@ -838,27 +758,16 @@ ics_api_a1_get_job() {
 }
 
 # API Test function: DELETE â€‹/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}
-# args: <response-code> <type-id> <job-id>
-# args (flat uri structure): <response-code> <job-id>
+# args: <response-code> <job-id>
 # (Function for test scripts)
 ics_api_a1_delete_job() {
        __log_test_start $@
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               if [ $# -ne 3 ]; then
-                       __print_err "<response-code> <type-id> <job-id>" $@
-                       return 1
-               fi
-
-               query="/A1-EI/v1/eitypes/$2/eijobs/$3"
-       else
-               echo -e $YELLOW"INTERFACE - FLAT URI STRUCTURE"$EYELLOW
-               if [ $# -ne 2 ]; then
-                       __print_err "<response-code> <job-id>" $@
-                       return 1
-               fi
-               query="/A1-EI/v1/eijobs/$2"
+       if [ $# -ne 2 ]; then
+               __print_err "<response-code> <job-id>" $@
+               return 1
        fi
+       query="/A1-EI/v1/eijobs/$2"
     res="$(__do_curl_to_api ICS DELETE $query)"
     status=${res:${#res}-3}
 
@@ -872,50 +781,28 @@ ics_api_a1_delete_job() {
 }
 
 # API Test function: PUT â€‹/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}
-# args: <response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file>
-# args (flat uri structure): <response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file>
+# args <response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file>
 # (Function for test scripts)
 ics_api_a1_put_job() {
        __log_test_start $@
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               if [ $# -lt 6 ]; then
-                       __print_err "<response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file>" $@
-                       return 1
-               fi
-               if [ -f $6 ]; then
-                       jobfile=$(cat $6)
-                       jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
-               else
-                       __log_test_fail_general "Job template file "$6", does not exist"
-                       return 1
-               fi
-
-               inputJson="{\"targetUri\": \"$4\",\"jobOwner\": \"$5\",\"jobParameters\": $jobfile}"
-               file="./tmp/.p.json"
-               echo "$inputJson" > $file
-
-               query="/A1-EI/v1/eitypes/$2/eijobs/$3"
+       if [ $# -lt 7 ]; then
+               __print_err "<response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file>" $@
+               return 1
+       fi
+       if [ -f $7 ]; then
+               jobfile=$(cat $7)
+               jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
        else
-               echo -e $YELLOW"INTERFACE - FLAT URI STRUCTURE"$EYELLOW
-               if [ $# -lt 7 ]; then
-                       __print_err "<response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file>" $@
-                       return 1
-               fi
-               if [ -f $7 ]; then
-                       jobfile=$(cat $7)
-                       jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
-               else
-                       __log_test_fail_general "Job template file "$7", does not exist"
-                       return 1
-               fi
+               __log_test_fail_general "Job template file "$7", does not exist"
+               return 1
+       fi
 
-               inputJson="{\"eiTypeId\": \"$3\", \"jobResultUri\": \"$4\",\"jobOwner\": \"$5\",\"jobStatusNotificationUri\": \"$6\",\"jobDefinition\": $jobfile}"
-               file="./tmp/.p.json"
-               echo "$inputJson" > $file
+       inputJson="{\"eiTypeId\": \"$3\", \"jobResultUri\": \"$4\",\"jobOwner\": \"$5\",\"jobStatusNotificationUri\": \"$6\",\"jobDefinition\": $jobfile}"
+       file="./tmp/.p.json"
+       echo "$inputJson" > $file
 
-               query="/A1-EI/v1/eijobs/$2"
-       fi
+       query="/A1-EI/v1/eijobs/$2"
 
     res="$(__do_curl_to_api ICS PUT $query $file)"
     status=${res:${#res}-3}
@@ -946,11 +833,7 @@ ics_api_edp_get_type_ids() {
                __print_err "<response-code> [ EMPTY | <type-id>+]" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-types"
-       else
-               query="/ei-producer/v1/eitypes"
-       fi
+       query="/data-producer/v1/info-types"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
 
@@ -995,11 +878,7 @@ ics_api_edp_get_producer_status() {
                __print_err "<response-code> <producer-id> [<status> [<timeout>]]" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-producers/$2/status"
-       else
-               query="/ei-producer/v1/eiproducers/$2/status"
-       fi
+       query="/data-producer/v1/info-producers/$2/status"
        start=$SECONDS
        for (( ; ; )); do
                res="$(__do_curl_to_api ICS GET $query)"
@@ -1108,17 +987,10 @@ ics_api_edp_get_producer_ids_2() {
                __print_err "<response-code> [ ( NOTYPE | <type-id> ) [ EMPTY | <producer-id>+] ]" $@
                return 1
        fi
-    if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-producers"
-               if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
-                       query=$query"?info_type_id=$2&infoTypeId=$2"  #info_type_id changed to infoTypeId in F-release.
-                                                                     #Remove info_type_id when F-release is no longer supported
-               fi
-       else
-               query="/ei-producer/v1/eiproducers"
-               if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
-                       query=$query"?ei_type_id=$2"
-               fi
+       query="/data-producer/v1/info-producers"
+       if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
+               query=$query"?info_type_id=$2&infoTypeId=$2"  #info_type_id changed to infoTypeId in F-release.
+                                                                                                               #Remove info_type_id when F-release is no longer supported
        fi
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
@@ -1228,20 +1100,14 @@ ics_api_edp_get_type_2() {
        if [ $# -eq 3 ]; then
                paramError=0
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-               if [ $# -eq 4 ]; then
-                       paramError=0
-               fi
+       if [ $# -eq 4 ]; then
+               paramError=0
        fi
     if [ $paramError -ne 0 ]; then
                __print_err "<response-code> <type-id> [<job-schema-file> [ <info-type-info> ]]" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-types/$2"
-       else
-               query="/ei-producer/v1/eitypes/$2"
-       fi
+       query="/data-producer/v1/info-types/$2"
 
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
@@ -1269,11 +1135,7 @@ ics_api_edp_get_type_2() {
                        fi
                        info_data=",\"info_type_information\":$info_data"
                fi
-               if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-                       targetJson="{\"info_job_data_schema\":$schema $info_data}"
-               else
-                       targetJson="{\"ei_job_data_schema\":$schema}"
-               fi
+               targetJson="{\"info_job_data_schema\":$schema $info_data}"
 
                echo " TARGET JSON: $targetJson" >> $HTTPLOG
                res=$(python3 ../common/compare_json.py "$targetJson" "$body")
@@ -1294,16 +1156,9 @@ ics_api_edp_get_type_2() {
 ics_api_edp_put_type_2() {
        __log_test_start $@
 
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
-               if [ $# -lt 3 ] || [ $# -gt 4 ]; then
-                       __print_err "<response-code> <type-id> <job-schema-file> [ <info-type-info> ]" $@
-                       return 1
-               fi
-       else
-               if [ $# -ne 3 ]; then
-                       __print_err "<response-code> <type-id> <job-schema-file>" $@
-                       return 1
-               fi
+       if [ $# -lt 3 ] || [ $# -gt 4 ]; then
+               __print_err "<response-code> <type-id> <job-schema-file> [ <info-type-info> ]" $@
+               return 1
        fi
 
        if [ ! -f $3 ]; then
@@ -1322,21 +1177,12 @@ ics_api_edp_put_type_2() {
                info_data=",\"info_type_information\":$info_data"
        fi
 
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               schema=$(cat $3)
-               input_json="{\"info_job_data_schema\":$schema $info_data}"
-               file="./tmp/put_type.json"
-               echo $input_json > $file
+       schema=$(cat $3)
+       input_json="{\"info_job_data_schema\":$schema $info_data}"
+       file="./tmp/put_type.json"
+       echo $input_json > $file
 
-               query="/data-producer/v1/info-types/$2"
-       else
-               schema=$(cat $3)
-               input_json="{\"ei_job_data_schema\":$schema}"
-               file="./tmp/put_type.json"
-               echo $input_json > $file
-
-               query="/ei-producer/v1/eitypes/$2"
-       fi
+       query="/data-producer/v1/info-types/$2"
     res="$(__do_curl_to_api ICS PUT $query $file)"
     status=${res:${#res}-3}
 
@@ -1361,11 +1207,7 @@ ics_api_edp_delete_type_2() {
                return 1
        fi
 
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-types/$2"
-       else
-               query="/ei-producer/v1/eitypes/$2"
-       fi
+       query="/data-producer/v1/info-types/$2"
     res="$(__do_curl_to_api ICS DELETE $query)"
     status=${res:${#res}-3}
 
@@ -1470,11 +1312,7 @@ ics_api_edp_get_producer_2() {
                __print_err "<response-code> <producer-id> [<job-callback> <supervision-callback> (EMPTY | <type-id>+) ]" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-producers/$2"
-       else
-               query="/ei-producer/v1/eiproducers/$2"
-       fi
+       query="/data-producer/v1/info-producers/$2"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
 
@@ -1497,11 +1335,7 @@ ics_api_edp_get_producer_2() {
                fi
                targetJson=$targetJson"]"
                if [ $# -gt 4 ]; then
-                       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-                               targetJson="{\"supported_info_types\":$targetJson,\"info_job_callback_url\": \"$3\",\"info_producer_supervision_callback_url\": \"$4\"}"
-                       else
-                               targetJson="{\"supported_ei_types\":$targetJson,\"ei_job_callback_url\": \"$3\",\"ei_producer_supervision_callback_url\": \"$4\"}"
-                       fi
+                       targetJson="{\"supported_info_types\":$targetJson,\"info_job_callback_url\": \"$3\",\"info_producer_supervision_callback_url\": \"$4\"}"
                fi
                echo " TARGET JSON: $targetJson" >> $HTTPLOG
                res=$(python3 ../common/compare_json.py "$targetJson" "$body")
@@ -1527,11 +1361,7 @@ ics_api_edp_delete_producer() {
                __print_err "<response-code> <producer-id>" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-producers/$2"
-       else
-               query="/ei-producer/v1/eiproducers/$2"
-       fi
+       query="/data-producer/v1/info-producers/$2"
     res="$(__do_curl_to_api ICS DELETE $query)"
     status=${res:${#res}-3}
 
@@ -1628,27 +1458,15 @@ ics_api_edp_put_producer_2() {
                        inputJson=$inputJson"\""${arr[$i]}"\""
                done
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               inputJson="\"supported_info_types\":"$inputJson"]"
+       inputJson="\"supported_info_types\":"$inputJson"]"
 
-               inputJson=$inputJson",\"info_job_callback_url\": \"$3\",\"info_producer_supervision_callback_url\": \"$4\""
-
-               inputJson="{"$inputJson"}"
-
-               file="./tmp/.p.json"
-               echo "$inputJson" > $file
-               query="/data-producer/v1/info-producers/$2"
-       else
-               inputJson="\"supported_ei_types\":"$inputJson"]"
+       inputJson=$inputJson",\"info_job_callback_url\": \"$3\",\"info_producer_supervision_callback_url\": \"$4\""
 
-               inputJson=$inputJson",\"ei_job_callback_url\": \"$3\",\"ei_producer_supervision_callback_url\": \"$4\""
-
-               inputJson="{"$inputJson"}"
+       inputJson="{"$inputJson"}"
 
-               file="./tmp/.p.json"
-               echo "$inputJson" > $file
-               query="/ei-producer/v1/eiproducers/$2"
-       fi
+       file="./tmp/.p.json"
+       echo "$inputJson" > $file
+       query="/data-producer/v1/info-producers/$2"
     res="$(__do_curl_to_api ICS PUT $query $file)"
     status=${res:${#res}-3}
 
@@ -1748,11 +1566,7 @@ ics_api_edp_get_producer_jobs_2() {
                __print_err "<response-code> <producer-id> (EMPTY | [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)" $@
                return 1
        fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               query="/data-producer/v1/info-producers/$2/info-jobs"
-       else
-               query="/ei-producer/v1/eiproducers/$2/eijobs"
-       fi
+       query="/data-producer/v1/info-producers/$2/info-jobs"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
        if [ $status -ne $1 ]; then
@@ -1775,11 +1589,8 @@ ics_api_edp_get_producer_jobs_2() {
                                        __log_test_fail_general "Job template file "${arr[$i+4]}", does not exist"
                                        return 1
                                fi
-                               if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-                                       targetJson=$targetJson"{\"info_job_identity\":\"${arr[$i]}\",\"info_type_identity\":\"${arr[$i+1]}\",\"target_uri\":\"${arr[$i+2]}\",\"owner\":\"${arr[$i+3]}\",\"info_job_data\":$jobfile, \"last_updated\":\"????\"}"
-                               else
-                                       targetJson=$targetJson"{\"ei_job_identity\":\"${arr[$i]}\",\"ei_type_identity\":\"${arr[$i+1]}\",\"target_uri\":\"${arr[$i+2]}\",\"owner\":\"${arr[$i+3]}\",\"ei_job_data\":$jobfile, \"last_updated\":\"????\"}"
-                               fi
+                               targetJson=$targetJson"{\"info_job_identity\":\"${arr[$i]}\",\"info_type_identity\":\"${arr[$i+1]}\",\"target_uri\":\"${arr[$i+2]}\",\"owner\":\"${arr[$i+3]}\",\"info_job_data\":$jobfile, \"last_updated\":\"????\"}"
+
                        done
                fi
                targetJson=$targetJson"]"
@@ -2405,11 +2216,7 @@ ics_api_idc_delete_subscription() {
 ics_api_admin_reset() {
        __log_test_start $@
 
-       if [  -z "$FLAT_A1_EI" ]; then
-               query="/A1-EI/v1/eitypes/$2/eijobs"
-       else
-               query="/A1-EI/v1/eijobs"
-       fi
+       query="/A1-EI/v1/eijobs"
     res="$(__do_curl_to_api ICS GET $query)"
     status=${res:${#res}-3}
 
@@ -2426,18 +2233,14 @@ ics_api_admin_reset() {
        list=$(echo ${list//\"/})
        list=$list" "
        for job in $list; do
-               if [  -z "$FLAT_A1_EI" ]; then
-                       echo "Not supported for non-flat EI api"
-               else
-                       query="/A1-EI/v1/eijobs/$job"
-                       res="$(__do_curl_to_api ICS DELETE $query)"
-                       status=${res:${#res}-3}
-                       if [ $status -ne 204 ]; then
-                               __log_test_fail_status_code $1 $status
-                               return 1
-                       fi
-                       echo " Deleted job: "$job
+               query="/A1-EI/v1/eijobs/$job"
+               res="$(__do_curl_to_api ICS DELETE $query)"
+               status=${res:${#res}-3}
+               if [ $status -ne 204 ]; then
+                       __log_test_fail_status_code $1 $status
+                       return 1
                fi
+               echo " Deleted job: "$job
        done
 
        __log_test_pass
index 7dbef77..c70cd13 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -450,11 +450,8 @@ prodstub_check_jobdata_2() {
        __log_test_fail_general "Template file "$7" for jobdata, does not exist"
         return 1
     fi
-       if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-               targetJson="{\"info_job_identity\":\"$3\",\"info_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"info_job_data\":$jobfile,\"last_updated\":\"????\"}"
-       else
-               targetJson="{\"ei_job_identity\":\"$3\",\"ei_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"ei_job_data\":$jobfile,\"last_updated\":\"????\"}"
-    fi
+       targetJson="{\"ei_job_identity\":\"$3\",\"ei_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"ei_job_data\":$jobfile,\"last_updated\":\"????\"}"
+
        file="./tmp/.p.json"
        echo "$targetJson" > $file
 
diff --git a/test/common/ricmediatorsim_api_functions.sh b/test/common/ricmediatorsim_api_functions.sh
new file mode 100644 (file)
index 0000000..93c2db2
--- /dev/null
@@ -0,0 +1,566 @@
+#!/bin/bash
+
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 Nordix Foundation. 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.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+# This is a script that contains container/service management functions and test functions for RICMEDIATORSIM A1 simulators
+
+################ Test engine functions ################
+
+# Create the image var used during the test
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__RICMEDIATORSIM_imagesetup() {
+       __check_and_create_image_var RICMEDIATORSIM "RICMEDIATOR_SIM_IMAGE" "RICMEDIATOR_SIM_IMAGE_BASE" "RICMEDIATOR_SIM_IMAGE_TAG" REMOTE_RELEASE_ORAN "$RICMEDIATOR_SIM_DISPLAY_NAME"
+       __check_and_create_image_var RICMEDIATORSIM "RICMEDIATOR_SIM_DB_IMAGE" "RICMEDIATOR_SIM_DB_IMAGE_BASE" "RICMEDIATOR_SIM_DB_IMAGE_TAG" REMOTE_RELEASE_ORAN "$RICMEDIATOR_SIM_DB_DISPLAY_NAME"
+}
+
+# Pull image from remote repo or use locally built image
+# arg: <pull-policy-override> <pull-policy-original>
+# <pull-policy-override> Shall be used for images allowing overriding. For example use a local image when test is started to use released images
+# <pull-policy-original> Shall be used for images that does not allow overriding
+# Both var may contain: 'remote', 'remote-remove' or 'local'
+__RICMEDIATORSIM_imagepull() {
+       __check_and_pull_image $1 "$RICMEDIATOR_SIM_DISPLAY_NAME" $RICMEDIATOR_SIM_PREFIX"_"$RICMEDIATOR_SIM_BASE RICMEDIATOR_SIM_IMAGE
+       __check_and_pull_image $1 "$RICMEDIATOR_SIM_DB_DISPLAY_NAME" $RICMEDIATOR_SIM_PREFIX"_"$RICMEDIATOR_SIM_BASE RICMEDIATOR_SIM_DB_IMAGE
+}
+
+# Build image (only for simulator or interfaces stubs owned by the test environment)
+# arg: <image-tag-suffix> (selects staging, snapshot, release etc)
+# <image-tag-suffix> is present only for images with staging, snapshot,release tags
+__RICMEDIATORSIM_imagebuild() {
+       echo -e $RED" Image for app RICMEDIATORSIM shall never be built"$ERED
+}
+
+# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
+# arg: <docker-images-format-string> <file-to-append>
+__RICMEDIATORSIM_image_data() {
+       echo -e "$RICMEDIATOR_SIM_DISPLAY_NAME\t$(docker images --format $1 $RICMEDIATOR_SIM_IMAGE)" >>   $2
+       if [ ! -z "$RICMEDIATOR_SIM_IMAGE_SOURCE" ]; then
+               echo -e "-- source image --\t$(docker images --format $1 $RICMEDIATOR_SIM_IMAGE_SOURCE)" >>   $2
+       fi
+       echo -e "$RICMEDIATOR_SIM_DB_DISPLAY_NAME\t$(docker images --format $1 $RICMEDIATOR_SIM_DB_IMAGE)" >>   $2
+       if [ ! -z "$RICMEDIATOR_SIM_DB_IMAGE_SOURCE" ]; then
+               echo -e "-- source image --\t$(docker images --format $1 $RICMEDIATOR_SIM_DB_IMAGE_SOURCE)" >>   $2
+       fi
+}
+
+# Scale kubernetes resources to zero
+# All resources shall be ordered to be scaled to 0, if relevant. If not relevant to scale, then do no action.
+# This function is called for apps fully managed by the test script
+__RICMEDIATORSIM_kube_scale_zero() {
+       __kube_scale_all_resources $KUBE_A1SIM_NAMESPACE autotest RICMEDIATORSIM
+}
+
+# Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action.
+# This function is called for prestarted apps not managed by the test script.
+__RICMEDIATORSIM_kube_scale_zero_and_wait() {
+       __kube_scale_and_wait_all_resources $KUBE_A1SIM_NAMESPACE app $KUBE_A1SIM_NAMESPACE"-neara1simulator"
+}
+
+# Delete all kube resouces for the app
+# This function is called for apps managed by the test script.
+__RICMEDIATORSIM_kube_delete_all() {
+       __kube_delete_all_resources $KUBE_A1SIM_NAMESPACE autotest RICMEDIATORSIM
+}
+
+# Store docker logs
+# This function is called for apps managed by the test script.
+# args: <log-dir> <file-prexix>
+__RICMEDIATORSIM_store_docker_logs() {
+       if [ $RUNMODE == "KUBE" ]; then
+               for podname in $(kubectl $KUBECONF get pods -n $KUBE_A1SIM_NAMESPACE -l "autotest=RICMEDIATORSIM" -o custom-columns=":metadata.name"); do
+                       kubectl $KUBECONF logs -n $KUBE_A1SIM_NAMESPACE $podname --tail=-1 > $1$2_$podname.log 2>&1
+               done
+       else
+
+               RICMEDIATORs=$(docker ps --filter "name=$RICMEDIATOR_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "status=running" --filter "label=orana1sim" --format {{.Names}})
+               for ric in $rics; do
+                       docker logs $ric > $1$2_$ric.log 2>&1
+               done
+       fi
+}
+
+# Initial setup of protocol, host and ports
+# This function is called for apps managed by the test script.
+# args: -
+__RICMEDIATORSIM_initial_setup() {
+       use_ricmediator_simulator_http
+}
+
+# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers
+# For docker, the namespace shall be excluded
+# This function is called for apps managed by the test script as well as for prestarted apps.
+# args: -
+__RICMEDIATORSIM_statisics_setup() {
+       for ((RICMEDIATOR_SIMINSTANCE=10; RICMEDIATOR_SIMINSTANCE>0; RICMEDIATOR_SIMINSTANCE-- )); do
+               if [ $RUNMODE == "KUBE" ]; then
+                       RICMEDIATOR_SIMINSTANCE_KUBE=$(($RICMEDIATOR_SIMINSTANCE-1))
+                       echo -n " RICMEDIATOR_SIMG1_$RICMEDIATOR_SIMINSTANCE_KUBE ${RICMEDIATOR_SIM_PREFIX}-g1-$RICMEDIATOR_SIMINSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
+                       echo -n " RICMEDIATOR_SIMG2_$RICMEDIATOR_SIMINSTANCE_KUBE ${RICMEDIATOR_SIM_PREFIX}-g2-$RICMEDIATOR_SIMINSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
+                       echo -n " RICMEDIATOR_SIMG3_$RICMEDIATOR_SIMINSTANCE_KUBE ${RICMEDIATOR_SIM_PREFIX}-g3-$RICMEDIATOR_SIMINSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
+                       echo -n " RICMEDIATOR_SIMG4_$RICMEDIATOR_SIMINSTANCE_KUBE ${RICMEDIATOR_SIM_PREFIX}-g4-$RICMEDIATOR_SIMINSTANCE_KUBE $KUBE_A1SIM_NAMESPACE "
+               else
+                       if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then
+                               echo -n " RICMEDIATOR_SIMG1_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}_g1_$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG2_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}_g2_$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG3_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}_g3_$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG4_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}_g4_$RICMEDIATOR_SIMINSTANCE "
+                       else
+                               echo -n " RICMEDIATOR_SIMG1_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}-g1-$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG2_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}-g2-$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG3_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}-g3-$RICMEDIATOR_SIMINSTANCE "
+                               echo -n " RICMEDIATOR_SIMG4_$RICMEDIATOR_SIMINSTANCE ${RICMEDIATOR_SIM_PREFIX}-g4-$RICMEDIATOR_SIMINSTANCE "
+                       fi
+               fi
+       done
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__RICMEDIATORSIM_test_requirements() {
+       :
+}
+
+#######################################################
+
+
+RICMEDIATOR_SIM_HTTPX="http"
+RICMEDIATOR_SIM_PORT=$RICMEDIATOR_SIM_INTERNAL_PORT
+
+
+#Vars for container count
+G1_COUNT=0
+G2_COUNT=0
+G3_COUNT=0
+G4_COUNT=0
+G5_COUNT=0
+
+
+###########################
+### RICMEDIATOR Simulator functions
+###########################
+
+use_ricmediator_simulator_http() {
+       echo -e $BOLD"RICMEDIATORSIM protocol setting"$EBOLD
+       echo -e " Using $BOLD http $EBOLD towards the simulators"
+       RICMEDIATOR_SIM_HTTPX="http"
+       RICMEDIATOR_SIM_PORT=$RICMEDIATOR_SIM_INTERNAL_PORT
+       echo ""
+}
+
+use_ricmediator_simulator_https() {
+       __log_test_fail_not_supported
+}
+
+# Start one group (ricsim_g1, ricsim_g2 .. ricsim_g5) with a number of RIC Simulators using a given A interface
+# 'ricsim' may be set on command line to other prefix
+# args:  ricsim_g1|ricsim_g2|ricsim_g3|ricsim_g4|ricsim_g5 <count> <interface-id>
+# (Function for test scripts)
+start_ricmediator_simulators() {
+
+       echo -e $BOLD"Starting $RICMEDIATOR_SIM_DISPLAY_NAME"$EBOLD
+
+       if [ $RUNMODE == "KUBE" ]; then
+
+               # Check if app shall be fully managed by the test script
+               __check_included_image "RICMEDIATORSIM"
+               retcode_i=$?
+
+               # Check if app shall only be used by the testscipt
+               __check_prestarted_image "RICMEDIATORSIM"
+               retcode_p=$?
+
+               if [ $retcode_i -ne 0 ] && [ $retcode_p -ne 0 ]; then
+                       echo -e $RED"The $1 app is not included as managed nor prestarted in this test script"$ERED
+                       echo -e $RED"The $1 will not be started"$ERED
+                       exit
+               fi
+               if [ $retcode_i -eq 0 ] && [ $retcode_p -eq 0 ]; then
+                       echo -e $RED"The $1 stub app is included both as managed and prestarted in this test script"$ERED
+                       echo -e $RED"The $1 will not be started"$ERED
+                       exit
+               fi
+
+               if [ $retcode_p -eq 0 ]; then
+                       echo -e " Using existing $1 statefulset and service"
+                       echo " Using existing simulator deployment and service for statefulset $1"
+                       echo " Setting $1 replicas=$2"
+                       __kube_scale statefulset $1 $KUBE_A1SIM_NAMESPACE $2
+                       echo ""
+                       return
+               fi
+       fi
+
+       RICMEDIATOR1=$RICMEDIATOR_SIM_PREFIX"_g1"
+       RICMEDIATOR2=$RICMEDIATOR_SIM_PREFIX"_g2"
+       RICMEDIATOR3=$RICMEDIATOR_SIM_PREFIX"_g3"
+       RICMEDIATOR4=$RICMEDIATOR_SIM_PREFIX"_g4"
+       RICMEDIATOR5=$RICMEDIATOR_SIM_PREFIX"_g5"
+
+       if [ $# != 3 ]; then
+               ((RES_CONF_FAIL++))
+               __print_err "need three args,  $RICMEDIATOR1|$RICMEDIATOR2|$RICMEDIATOR3|$RICMEDIATOR4|$RICMEDIATOR5 <count> <interface-id>" $@
+               exit 1
+       fi
+
+       echo " $2 simulators using basename: $1 on interface: $3"
+       #Set env var for simulator count and A1 interface vesion for the given group
+       if [ $1 == "$RICMEDIATOR1" ]; then
+               G1_COUNT=$2
+       elif [ $1 == "$RICMEDIATOR2" ]; then
+               G2_COUNT=$2
+       elif [ $1 == "$RICMEDIATOR3" ]; then
+               G3_COUNT=$2
+       elif [ $1 == "$RICMEDIATOR4" ]; then
+               G4_COUNT=$2
+       elif [ $1 == "$RICMEDIATOR5" ]; then
+               G5_COUNT=$2
+       else
+               ((RES_CONF_FAIL++))
+               __print_err "need three args, $RICMEDIATOR1|$RICMEDIATOR2|$RICMEDIATOR3|$RICMEDIATOR4|$RICMEDIATOR5 <count> <interface-id>" $@
+               exit 1
+       fi
+
+       if [ $RUNMODE == "KUBE" ]; then
+
+               if [ $retcode_i -eq 0 ]; then
+
+                       #export needed env var for statefulset
+                       export RICMEDIATOR_SIM_SET_NAME=$(echo "$1" | tr '_' '-')  #kube does not accept underscore in names
+                       export KUBE_A1SIM_NAMESPACE
+                       export RICMEDIATOR_SIM_IMAGE
+                       export RICMEDIATOR_SIM_DB_IMAGE
+                       #Adding 1 more instance, instance 0 is never used. This is done to keep test scripts compatible
+                       # with docker that starts instance index on 1.....
+                       export RICMEDIATOR_SIM_COUNT=$(($2+1))
+                       export A1_VERSION=$3
+                       export RICMEDIATOR_SIM_INTERNAL_PORT
+                       export RICMEDIATOR_SIM_INTERNAL_SECURE_PORT
+
+                       echo -e " Creating $RICMEDIATOR_SIM_PREFIX app and expose service"
+
+                       #Check if nonrtric namespace exists, if not create it
+                       __kube_create_namespace $KUBE_A1SIM_NAMESPACE
+
+                       # Create service
+                       input_yaml=$SIM_GROUP"/"$RICMEDIATOR_SIM_COMPOSE_DIR"/"svc.yaml
+                       output_yaml=$PWD/tmp/ric_${1}_svc.yaml
+                       __kube_create_instance service $RICMEDIATOR_SIM_SET_NAME $input_yaml $output_yaml
+
+                       # Create app
+                       input_yaml=$SIM_GROUP"/"$RICMEDIATOR_SIM_COMPOSE_DIR"/"app.yaml
+                       output_yaml=$PWD/tmp/ric_${1}_app.yaml
+                       __kube_create_instance app $RICMEDIATOR_SIM_SET_NAME $input_yaml $output_yaml
+
+                       #Using only instance from index 1 to keep compatability with docker
+                       for (( count=1; count<${RICMEDIATOR_SIM_COUNT}; count++ )); do
+                               host=$(__find_ricmediatorsim_host $RICMEDIATOR_SIM_SET_NAME"-"$count)
+                               __check_service_start $RICMEDIATOR_SIM_SET_NAME"-"$count $host$RICMEDIATOR_SIM_ALIVE_URL
+                       done
+               fi
+       else
+               __check_included_image 'RICMEDIATORSIM'
+               if [ $? -eq 1 ]; then
+                       echo -e $RED"The Near-RT RICMEDIATOR Simulator app is not included as managed in this test script"$ERED
+                       echo -e $RED"Near-RT RICMEDIATOR Simulator will not be started"$ERED
+                       exit 1
+               fi
+
+               # Create .env file to compose project, all ric container will get this prefix
+               echo "COMPOSE_PROJECT_NAME="$RICMEDIATOR_SIM_PREFIX > $SIM_GROUP/$RICMEDIATOR_SIM_COMPOSE_DIR/.env
+
+               #extract service name (group), g1, g2, g3, g4 or g5 from var $1
+               #E.g. ricsim_g1 -> g1 is the service name
+               TMP_GRP=$1
+               RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME=$(echo "${TMP_GRP##*_}")
+
+               export RICMEDIATOR_SIMCOMPOSE_A1_VERSION=$3
+               export RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME
+               export RICMEDIATOR_SIM_INTERNAL_PORT
+               export RICMEDIATOR_SIM_INTERNAL_SECURE_PORT
+               export RICMEDIATOR_SIM_CERT_MOUNT_DIR
+               export DOCKER_SIM_NWNAME
+               export RICMEDIATOR_SIM_DISPLAY_NAME
+
+               docker_args=" --scale $RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME=$2"
+
+               #Create a list of contsiner names
+               #Will be <ricsim-prefix>_<service-name>_<index>
+               # or
+               # <ricsim-prefix>-<service-name>-<index>
+               app_data=""
+               cntr=1
+               if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then
+                       app_name_prefix=$RICMEDIATOR_SIM_PREFIX"_"$RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME"_"
+               else
+                       app_name_prefix=$RICMEDIATOR_SIM_PREFIX"-"$RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME"-"
+               fi
+               while [ $cntr -le $2 ]; do
+                       app=$app_name_prefix$cntr
+                       app_data="$app_data $app"
+                       let cntr=cntr+1
+               done
+
+               __start_container $RICMEDIATOR_SIM_COMPOSE_DIR "" "$docker_args" $2 $app_data
+
+               cntr=1
+               while [ $cntr -le $2 ]; do
+                       if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then
+                               app=$RICMEDIATOR_SIM_PREFIX"_"$RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME"_"$cntr
+                       else
+                               app=$RICMEDIATOR_SIM_PREFIX"-"$RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME"-"$cntr
+                       fi
+                       __check_service_start $app $RICMEDIATOR_SIM_HTTPX"://"$app:$RICMEDIATOR_SIM_PORT$RICMEDIATOR_SIM_ALIVE_URL
+                       let cntr=cntr+1
+               done
+
+       fi
+       echo ""
+       return 0
+}
+
+# Translate ric name to kube host name
+# args: <ric-name>
+# For test scripts
+get_kube_ricmediatorsim_host() {
+       name=$(echo "$1" | tr '_' '-')  #kube does not accept underscore in names
+       #example gnb_1_2 -> gnb-1-2
+       set_name=$(echo $name | rev | cut -d- -f2- | rev) # Cut index part of ric name to get the name of statefulset
+       # example gnb-g1-2 -> gnb-g1 where gnb-g1-2 is the ric name and gnb-g1 is the set name
+       echo $name"."$set_name"."$KUBE_A1SIM_NAMESPACE
+}
+
+# Helper function to get a the port and host name of a specific ric simulator
+# args: <ric-id>
+# (Not for test scripts)
+__find_ricmediatorsim_host() {
+       if [ $RUNMODE == "KUBE" ]; then
+               ricname=$(echo "$1" | tr '_' '-') # Kube does not accept underscore in names as docker do
+               if [ -z "$RICMEDIATOR_SIM_COMMON_SVC_NAME" ]; then
+                       ric_setname="${ricname%-*}"  #Extract the stateful set name
+               else
+                       ric_setname=$RICMEDIATOR_SIM_COMMON_SVC_NAME # Use the common svc name in the host name of the sims
+               fi
+               echo $RICMEDIATOR_SIM_HTTPX"://"$ricname.$ric_setname.$KUBE_A1SIM_NAMESPACE":"$RICMEDIATOR_SIM_PORT
+       else
+               if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then
+                       echo $RICMEDIATOR_SIM_HTTPX"://"$1":"$RICMEDIATOR_SIM_PORT
+               else
+                       ricname=$(echo "$1" | tr '_' '-')
+                       echo $RICMEDIATOR_SIM_HTTPX"://"$ricname":"$RICMEDIATOR_SIM_PORT
+               fi
+
+       fi
+}
+
+# Generate a UUID to use as prefix for policy ids
+nearsim_generate_policy_uuid() {
+       UUID=$(python3 -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)')
+       #Reduce length to make space for serial id, uses 'a' as marker where the serial id is added
+       UUID=${UUID:0:${#UUID}-4}"a"
+}
+
+# Excute a curl cmd towards a ricsimulator and check the response code.
+# args: <expected-response-code> <curl-cmd-string>
+__execute_curl_to_ricmediatorsim() {
+       echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
+       proxyflag=""
+       if [ ! -z "$KUBE_PROXY_PATH" ]; then
+               if [ $KUBE_PROXY_HTTPX == "http" ]; then
+                       proxyflag=" --proxy $KUBE_PROXY_PATH"
+               else
+                       proxyflag=" --proxy-insecure --proxy $KUBE_PROXY_PATH"
+               fi
+       fi
+       if [ -z "$KUBE_PROXY_CURL_JWT" ]; then
+               echo " CMD: $2 $proxyflag" >> $HTTPLOG
+               res="$($2 $proxyflag)"
+       else
+               echo " CMD: $2 $proxyflag -H Authorization: Bearer $KUBE_PROXY_CURL_JWT" >> $HTTPLOG
+               res=$($2 $proxyflag -H 'Authorization: Bearer '$KUBE_PROXY_CURL_JWT)
+       fi
+
+       echo " RESP: $res" >> $HTTPLOG
+       retcode=$?
+    if [ $retcode -ne 0 ]; then
+               ((RES_CONF_FAIL++))
+               echo " RETCODE: "$retcode
+        echo -e $RED" FAIL - fatal error when executing curl."$ERED
+        return 1
+    fi
+    status=${res:${#res}-3}
+    if [ $status -eq $1 ]; then
+        echo -e $GREEN" OK"$EGREEN
+        return 0
+    fi
+    echo -e $RED" FAIL - expected http response: "$1" but got http response: "$status $ERED
+       ((RES_CONF_FAIL++))
+    return 1
+}
+
+# Tests if a variable value in the ricsimulator is equal to a target value and and optional timeout.
+# Arg: <ric-id> <variable-name> <target-value> - This test set pass or fail depending on if the variable is
+# equal to the target or not.
+# Arg: <ric-id> <variable-name> <target-value> <timeout-in-sec>  - This test waits up to the timeout seconds
+# before setting pass or fail depending on if the variable value becomes equal to the target
+# value or not.
+# (Function for test scripts)
+ricmediatorsim_equal() {
+       __log_test_fail_not_supported
+       # if [ $# -eq 3 ] || [ $# -eq 4 ]; then
+       #       host=$(__find_ricmediatorsim_host $1)
+       #       __var_test $1 "$host/counter/" $2 "=" $3 $4
+       #       return 0
+       # else
+       #       __print_err "needs three or four args: <ric-id> <sim-param> <target-value> [ timeout ]"
+       #       return 1
+       # fi
+}
+
+# Print a variable value from the RICMEDIATOR sim.
+# args: <ric-id> <variable-name>
+# (Function for test scripts)
+ricmediatorsim_print() {
+       __log_test_info_not_supported
+       # if [ $# != 2 ]; then
+    #  __print_err "need two args, <ric-id> <sim-param>" $@
+       #       exit 1
+       # fi
+       # host=$(__find_ricmediatorsim_host $1)
+       # echo -e $BOLD"INFO(${BASH_LINENO[0]}): $1, $2 = $(__do_curl $host/counter/$2)"$EBOLD
+}
+
+# Tests if a variable value in the RICMEDIATOR simulator contains the target string and and optional timeout
+# Arg: <ric-id> <variable-name> <target-value> - This test set pass or fail depending on if the variable contains
+# the target or not.
+# Arg: <ric-id> <variable-name> <target-value> <timeout-in-sec>  - This test waits up to the timeout seconds
+# before setting pass or fail depending on if the variable value contains the target
+# value or not.
+# (Function for test scripts)
+ricmediatorsim_contains_str() {
+       __log_test_fail_not_supported
+       # if [ $# -eq 3 ] || [ $# -eq 4 ]; then
+       #       host=$(__find_ricmediatorsim_host $1)
+       #       __var_test $1 "$host/counter/" $2 "contain_str" $3 $4
+       #       return 0
+       # else
+       #       __print_err "needs three or four args: <ric-id> <sim-param> <target-value> [ timeout ]"
+       #       return 1
+       # fi
+}
+
+# Simulator API: Put a policy type in a ric
+# args: <response-code> <ric-id> <policy-type-id> <policy-type-file>
+# (Function for test scripts)
+ricmediatorsim_put_policy_type() {
+       __log_conf_start $@
+       if [ $# -ne 4 ]; then
+               __print_err "<response-code> <ric-id> <policy-type-id> <policy-type-file>" $@
+               return 1
+       fi
+       host=$(__find_ricmediatorsim_host $2)
+    curlString="curl -X PUT -skw %{http_code} "$host"/a1-p/policytypes/"$3" -H Content-Type:application/json --data-binary @"$4
+       __execute_curl_to_ricmediatorsim $1 "$curlString"
+       return $?
+}
+
+# Simulator API: Delete a policy type in a ric
+# <response-code> <ric-id> <policy-type-id>
+# (Function for test scripts)
+ricmediatorsim_delete_policy_type() {
+       __log_conf_start $@
+       if [ $# -ne 3 ]; then
+               __print_err "<response-code> <ric-id> <policy_type_id>" $@
+               return 1
+       fi
+       host=$(__find_ricmediatorsim_host $2)
+    curlString="curl -X DELETE -skw %{http_code} "$host"/a1-p/policytypes/"$3
+    __execute_curl_to_ricmediatorsim $1 "$curlString"
+       return $?
+}
+
+# Simulator API: Delete instances (and status), for one ric
+# <response-code> <ric-id>
+# (Function for test scripts)
+ricmediatorsim_post_delete_instances() {
+       __log_test_fail_not_supported
+       # __log_conf_start $@
+       # if [ $# -ne 2 ]; then
+       #       __print_err "<response-code> <ric-id>" $@
+       #       return 1
+       # fi
+       # host=$(__find_ricmediatorsim_host $2)
+    # curlString="curl -X POST -skw %{http_code} "$host"/deleteinstances"
+    # __execute_curl_to_ricmediatorsim $1 "$curlString"
+       # return $?
+}
+
+# Simulator API: Delete all (instances/types/statuses/settings), for one ric
+# <response-code> <ric-id>
+# (Function for test scripts)
+ricmediatorsim_post_delete_all() {
+       __log_test_fail_not_supported
+       # __log_conf_start $@
+       # if [ $# -ne 2 ]; then
+       #       __print_err "<response-code> <numericic-id>" $@
+       #       return 1
+       # fi
+       # host=$(__find_ricmediatorsim_host $2)
+    # curlString="curl -X POST -skw %{http_code} "$host"/deleteall"
+    # __execute_curl_to_ricmediatorsim $1 "$curlString"
+       # return $?
+}
+
+# Simulator API: Set (or reset) response code for next A1 message, for one ric
+# <response-code> <ric-id> [<forced_response_code>]
+# (Function for test scripts)
+ricmediatorsim_post_forcedresponse() {
+       __log_test_fail_not_supported
+       # __log_conf_start $@
+       # if [ $# -ne 3 ]; then
+       #       __print_err "<response-code> <ric-id> <forced_response_code>" $@
+       #       return 1
+       # fi
+       # host=$(__find_ricmediatorsim_host $2)
+    # curlString="curl -X POST -skw %{http_code} "$host"/forceresponse"
+       # if [ $# -eq 3 ]; then
+       #       curlString=$curlString"?code="$3
+       # fi
+    # __execute_curl_to_ricmediatorsim $1 "$curlString"
+       # return $?
+}
+
+# Simulator API: Set (or reset) A1 response delay, for one ric
+# <response-code> <ric-id> [<delay-in-seconds>]
+# (Function for test scripts)
+ricmediatorsim_post_forcedelay() {
+       __log_test_fail_not_supported
+       # __log_conf_start $@
+       # if [ $# -ne 3 ]; then
+       #       __print_err "<response-code> <ric-id> [<delay-in-seconds>]" $@
+       #       return 1
+       # fi
+       # host=$(__find_ricmediatorsim_host $2)
+    # curlString="curl -X POST -skw %{http_code} $host/forcedelay"
+       # if [ $# -eq 3 ]; then
+       #       curlString=$curlString"?delay="$3
+       # fi
+    # __execute_curl_to_ricmediatorsim $1 "$curlString"
+       # return $?
+}
\ No newline at end of file
index d71d11a..5e039b7 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -77,7 +77,7 @@ __RICSIM_store_docker_logs() {
                done
        else
 
-               rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "status=running" --format {{.Names}})
+               rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "status=running" --filter "label=a1sim" --format {{.Names}})
                for ric in $rics; do
                        docker logs $ric > $1$2_$ric.log 2>&1
                done
@@ -286,7 +286,8 @@ start_ric_simulators() {
                export DOCKER_SIM_NWNAME
                export RIC_SIM_DISPLAY_NAME
 
-               docker_args=" --scale $RICSIM_COMPOSE_SERVICE_NAME=$2"
+               echo -e $BOLD$YELLOW" Warning: Using docker compose --force-recreate "$EYELLOW$EBOLD
+               docker_args="--force-recreate --scale $RICSIM_COMPOSE_SERVICE_NAME=$2"
 
                #Create a list of contsiner names
                #Will be <ricsim-prefix>_<service-name>_<index>
@@ -358,7 +359,7 @@ __find_sim_host() {
 }
 
 # Generate a UUID to use as prefix for policy ids
-generate_policy_uuid() {
+sim_generate_policy_uuid() {
        UUID=$(python3 -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)')
        #Reduce length to make space for serial id, uses 'a' as marker where the serial id is added
        UUID=${UUID:0:${#UUID}-4}"a"
index bab9474..2701957 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -638,4 +638,37 @@ controller_api_get_A1_policy_status() {
 
        __log_test_pass
        return 0
-}
\ No newline at end of file
+}
+
+# Wait for http status on url
+# args: <response-code> <ric-id>
+# (Function for test scripts)
+controller_api_wait_for_status_ok() {
+       __log_conf_start $@
+
+    if [ $# -ne 2 ]; then
+               __print_err "<response-code> <ric-id> " $@
+               return 1
+       fi
+       ric_id=$(__find_sim_host $2)
+    url="$ric_id/"
+
+       TS_START=$SECONDS
+       while [ $(($TS_START+500)) -gt $SECONDS ]; do
+               echo -ne " Waiting for http status $1 on $url via sdnc, waited: $(($SECONDS-$TS_START))"$SAMELINE
+               res=$(__do_curl_to_controller getA1Policy "$url")
+               retcode=$?
+               status=${res:${#res}-3}
+               if [ $retcode -eq 0 ]; then
+                       if [ $status -eq $1 ]; then
+                               echo ""
+                               __log_conf_ok
+                               return 0
+                       fi
+               fi
+               sleep 5
+       done
+       echo ""
+       __log_conf_fail_general
+       return 1
+}
index 7383ddf..98a016b 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
@@ -221,8 +221,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are added in the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES"                           # Space separated list of features
+ICS_FEATURE_LEVEL=""                                     # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
@@ -305,7 +304,7 @@ SDNC_PWD="admin"                                         # SNDC PWD
 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"   # SNDC PWD
 SDNC_API_URL="/rests/operations/A1-ADAPTER-API:"         # Base url path for SNDC API (for upgraded sdnc)
 #SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"      # Base url path for SNDC API
-SDNC_ALIVE_URL="/apidoc/explorer/"                       # Base url path for SNDC API docs (for alive check)
+SDNC_ALIVE_URL="/apidoc/explorer/index.html"             # Base url path for SNDC API docs (for alive check)
 SDNC_COMPOSE_DIR="sdnc"
 SDNC_COMPOSE_FILE="docker-compose-2.yml"
 SDNC_KUBE_APP_FILE="app2.yaml"
index cb6c1f7..35aba16 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
@@ -221,8 +221,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are added in the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES"                           # Space separated list of features
+ICS_FEATURE_LEVEL=""                                     # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index dd4c5b3..1ddf958 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023 Nordix Foundation. 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.
@@ -76,44 +76,37 @@ A1PMS_IMAGE_TAG_REMOTE_RELEASE="1.5.0"
 
 # SDNC A1 Controller remote image and tag
 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.5.0-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.5.0-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.5.0-STAGING-latest"  #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.5.0"
-
-# SDNC A1 Controller remote image and tag
-SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.4.2-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.4.2-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.4.2-STAGING-latest"  #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.4.1"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.5.1-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.5.1-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.5.1-STAGING-latest"  #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.5.1"
 
 #SDNC DB remote image and tag
 #The DB is part of SDNC so handled in the same way as SDNC
 SDNC_DB_IMAGE_BASE="mariadb"
 SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
 
-# ICS image and tag - using f release
+# ICS image and tag - using g release
 ICS_IMAGE_BASE="o-ran-sc/nonrtric-plt-informationcoordinatorservice"
-ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.3.1"
+ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.4.1"
 #Note: Update var ICS_FEATURE_LEVEL if image version is changed
 
-# Control Panel image and tag - using f release
+# Control Panel image and tag - using g release
 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.3.0"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.4.0"
 
-# Gateway image and tags - used f release
+# Gateway image and tags - used g release
 NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
 NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
 
-# RAPP Catalogue image and tags - used f release
+# RAPP Catalogue image and tags - used g release
 RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-plt-rappcatalogue"
 RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.1.0"
 
 
-# Near RT RIC Simulator image and tags - used f release
+# Near RT RIC Simulator image and tags - used g release
 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
-RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.3.1"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.4.0"
 
 #MR stub image and tag
 MRSTUB_IMAGE_BASE="mrstub"
@@ -209,9 +202,9 @@ A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data"         # Path in container f
 A1PMS_CONFIG_FILE="application.yaml"                       # Container config file name
 A1PMS_DATA_FILE="application_configuration.json"           # Container data file name
 A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service"   # Mounted dir in the container
-A1PMS_FEATURE_LEVEL=""                                     # Space separated list of features
-#Preparation for DMAAP removal
-#A1PMS_FEATURE_LEVEL="NO-DMAAP"                             # Space separated list of features
+A1PMS_FEATURE_LEVEL="NO-DMAAP ADAPTER-CLASS"               # Space separated list of features
+A1PMS_ADAPTER_CLASS=""                                     # Class name set by override file
+A1PMS_ADAPTER_POLICY_NAME=""                               # Policy name set by override file
 
 ICS_APP_NAME="informationservice"                        # Name for ICS container
 ICS_DISPLAY_NAME="Enrichment Coordinator Service"        # Display name for ICS container
@@ -230,8 +223,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are added in the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES"                           # Space separated list of features
+ICS_FEATURE_LEVEL=""                                     # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
@@ -314,14 +306,14 @@ SDNC_PWD="admin"                                         # SNDC PWD
 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"   # SNDC PWD
 SDNC_API_URL="/rests/operations/A1-ADAPTER-API:"         # Base url path for SNDC API (for upgraded sdnc)
 #SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"      # Base url path for SNDC API
-SDNC_ALIVE_URL="/apidoc/explorer/"                       # Base url path for SNDC API docs (for alive check)
+SDNC_ALIVE_URL="/apidoc/explorer/index.html"             # Base url path for SNDC API docs (for alive check)
 SDNC_COMPOSE_DIR="sdnc"
 SDNC_COMPOSE_FILE="docker-compose-2.yml"
 SDNC_KUBE_APP_FILE="app2.yaml"
 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"    # Path to karaf log
 SDNC_RESPONSE_JSON_KEY="A1-ADAPTER-API:output"           # Key name for output json in replies from sdnc (for upgraded sdnc)
 #SDNC_RESPONSE_JSON_KEY="output"                          # Key name for output json in replies from sdnc
-SDNC_FEATURE_LEVEL="TRANS_RESP_CODE"                     # Space separated list of features
+SDNC_FEATURE_LEVEL="TRANS_RESP_CODE NO_NB_HTTPS"         # Space separated list of features
                                                          # TRANS_RESP_CODE: SDNC return southbound response code
 
 RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
index 42e3e54..9af7d91 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -297,8 +297,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are decoupled from the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
+ICS_FEATURE_LEVEL="TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index cebdeb8..b07cb06 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -297,8 +297,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are decoupled from the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
+ICS_FEATURE_LEVEL="TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index 96c88ca..365c06b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -16,7 +16,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 #
-#Profile for ORAN Cherry
+#Profile for ORAN H release
 TEST_ENV_PROFILE="ORAN-H-RELEASE"
 FLAVOUR="ORAN"
 
@@ -83,10 +83,10 @@ CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.5.0"
 
 # Gateway image and tags
 NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
-NRT_GATEWAY_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE="1.1.0"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+NRT_GATEWAY_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE="1.2.0"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
 
 
 # SDNC A1 Controller image and tags - Note using released honolulu ONAP image
@@ -122,13 +122,21 @@ RAPP_CAT_IMAGE_TAG_REMOTE="1.2.0"
 RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
 
 
-# Near RT RIC Simulator image and tags - same version as cherry
+# Near RT RIC Simulator image and tags
 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
 RIC_SIM_IMAGE_TAG_LOCAL="latest"
 RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.5.0-SNAPSHOT"
 RIC_SIM_IMAGE_TAG_REMOTE="2.5.0"
 RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.5.0"
 
+# ORAN Near RT RIC Simulator image and tags
+RICMEDIATOR_SIM_IMAGE_BASE="o-ran-sc/ric-plt-a1"
+RICMEDIATOR_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="3.0.1"
+
+# ORAN Near RT RIC Simulator DB image and tags
+RICMEDIATOR_SIM_DB_IMAGE_BASE="o-ran-sc/ric-plt-dbaas"
+RICMEDIATOR_SIM_DB_IMAGE_TAG_REMOTE_RELEASE_ORAN="0.6.2"
+
 # DMAAP Mediator Service
 DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-plt-dmaapmediatorproducer"
 DMAAP_MED_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
@@ -278,7 +286,9 @@ A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data"         # Path in container f
 A1PMS_CONFIG_FILE="application.yaml"                       # Container config file name
 A1PMS_DATA_FILE="application_configuration.json"           # Container data file name
 A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service"   # Mounted dir in the container
-A1PMS_FEATURE_LEVEL=""                                     # Space separated list of features
+A1PMS_FEATURE_LEVEL="NO-DMAAP ADAPTER-CLASS"               # Space separated list of features
+A1PMS_ADAPTER_CLASS=""                                     # Class name set by override file
+A1PMS_ADAPTER_POLICY_NAME=""                               # Policy name set by override file
 
 ICS_APP_NAME="informationservice"                        # Name for ICS container
 ICS_DISPLAY_NAME="Information Coordinator Service"       # Display name for ICS container
@@ -297,8 +307,7 @@ ICS_ALIVE_URL="/status"                                  # Base path for alive c
 ICS_COMPOSE_DIR="ics"                                    # Dir in simulator_group for docker-compose
 ICS_CONFIG_MOUNT_PATH=/opt/app/information-coordinator-service/config # Internal container path for configuration
 ICS_CONFIG_FILE=application.yaml                         # Config file name
-ICS_VERSION="V1-2"                                       # Version where the types are decoupled from the producer registration
-ICS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
+ICS_FEATURE_LEVEL="TYPE-SUBSCRIPTIONS INFO-TYPE-INFO RESP_CODE_CHANGE_1 DEFAULT_TYPE_VALIDATION"  # Space separated list of features
 
 MR_DMAAP_APP_NAME="message-router"                       # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
@@ -360,7 +369,7 @@ RIC_SIM_PREFIX="ricsim"                                  # Prefix added to ric c
                                                          # This prefix can be changed from the command line
 RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
                                                          # (external ports allocated by docker)
-RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
+RIC_SIM_INTERNAL_SECURE_PORT=8185                       # RIC Simulator container internal secure port (container -> container).
                                                          # (external ports allocated by docker)
 RIC_SIM_CERT_MOUNT_DIR="./cert"
 
@@ -368,6 +377,24 @@ RIC_SIM_COMPOSE_DIR="ric"                                # Dir in simulator grou
 RIC_SIM_ALIVE_URL="/"                                    # Base path for alive check
 RIC_SIM_COMMON_SVC_NAME=""                               # Name of svc if one common svc is used for all ric sim groups (stateful sets)
 
+RICMEDIATOR_SIM_DISPLAY_NAME="ORAN Near-RT RIC A1 Simulator"
+RICMEDIATOR_SIM_DB_DISPLAY_NAME="ORAN Near-RT RIC A1 Simulator DB"
+RICMEDIATOR_SIM_BASE="g"                                     # Base name of the RIC Simulator container, shall be the group code
+                                                         # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RICMEDIATOR_SIM_PREFIX="ricsim"                              # Prefix added to ric container name, added in the .env file in the 'ric' dir
+                                                         # This prefix can be changed from the command line
+RICMEDIATOR_SIM_INTERNAL_PORT=10000                      # RIC Simulator container internal port (container -> container).
+                                                         # (external ports allocated by docker)
+RICMEDIATOR_SIM_INTERNAL_SECURE_PORT=10001               # RIC Simulator container internal secure port (container -> container).
+                                                         # (external ports allocated by docker)
+                                                         # This port number is not supported by app, kept only for consistency with other ric sims
+RICMEDIATOR_SIM_CERT_MOUNT_DIR="./cert"
+
+RICMEDIATOR_SIM_COMPOSE_DIR="ricmediator"                # Dir in simulator group for docker compose
+RICMEDIATOR_SIM_ALIVE_URL="/a1-p/healthcheck"            # Base path for alive check
+RICMEDIATOR_SIM_COMMON_SVC_NAME=""                       # Name of svc if one common svc is used for all ric sim groups (stateful sets)
+
+
 # For ONAP sdnc
 SDNC_APP_NAME="a1controller"                             # Name of the SNDC A1 Controller container
 SDNC_DISPLAY_NAME="SDNC A1 Controller"
index 71d3da7..33e2a38 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-22023 Nordix Foundation. 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.
@@ -322,8 +322,8 @@ TEST_SEQUENCE_NR=1
 # Function to log the start of a test case
 __log_test_start() {
        TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
-       echo -e $BOLD"TEST $TEST_SEQUENCE_NR (${BASH_LINENO[1]}): ${FUNCNAME[1]}" $@ $EBOLD
-    echo "TEST $TEST_SEQUENCE_NR - ${TIMESTAMP}: (${BASH_LINENO[1]}): ${FUNCNAME[1]}" $@ >> $HTTPLOG
+       echo -e $BOLD"TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: ${FUNCNAME[1]}" $@ $EBOLD
+    echo "TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: ${FUNCNAME[1]}" $@ >> $HTTPLOG
        ((RES_TEST++))
        ((TEST_SEQUENCE_NR++))
 }
@@ -367,6 +367,12 @@ __log_test_fail_not_supported() {
        __check_stop_at_error
 }
 
+# Function to log a test case that is not supported but will not fail
+__log_test_info_not_supported() {
+       echo -e $YELLOW" INFO, function not supported"$YELLOW
+       __print_current_stats
+}
+
 # General function to log a passed test case
 __log_test_pass() {
        if [ $# -gt 0 ]; then
@@ -383,8 +389,8 @@ CONF_SEQUENCE_NR=1
 # Function to log the start of a configuration setup
 __log_conf_start() {
        TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
-       echo -e $BOLD"CONF $CONF_SEQUENCE_NR (${BASH_LINENO[1]}): "${FUNCNAME[1]} $@ $EBOLD
-       echo "CONF $CONF_SEQUENCE_NR - ${TIMESTAMP}: (${BASH_LINENO[1]}): "${FUNCNAME[1]} $@  >> $HTTPLOG
+       echo -e $BOLD"CONF $CONF_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: "${FUNCNAME[1]} $@ $EBOLD
+       echo "CONF $CONF_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: "${FUNCNAME[1]} $@  >> $HTTPLOG
        ((CONF_SEQUENCE_NR++))
 }
 
@@ -1535,10 +1541,11 @@ __check_and_pull_image() {
        elif [ $1 == "remote" ] || [ $1 == "remote-remove" ]; then
                if [ $1 == "remote-remove" ]; then
                        if [ $RUNMODE == "DOCKER" ]; then
+
                                echo -ne "  Attempt to stop and remove container(s), if running - ${SAMELINE}"
                                tmp=$(docker ps -aq --filter name=${3} --filter network=${DOCKER_SIM_NWNAME})
                                if [ $? -eq 0 ] && [ ! -z "$tmp" ]; then
-                                       docker stop $tmp &> ./tmp/.dockererr
+                                       docker stop -t 0 $tmp &> ./tmp/.dockererr
                                        if [ $? -ne 0 ]; then
                                                ((IMAGE_ERR++))
                                                echo ""
@@ -1550,7 +1557,7 @@ __check_and_pull_image() {
                                echo -ne "  Attempt to stop and remove container(s), if running - "$GREEN"stopped"$EGREEN"${SAMELINE}"
                                tmp=$(docker ps -aq --filter name=${3} --filter network=${DOCKER_SIM_NWNAME}) &> /dev/null
                                if [ $? -eq 0 ] && [ ! -z "$tmp" ]; then
-                                       docker rm $tmp &> ./tmp/.dockererr
+                                       docker rm -f $tmp &> ./tmp/.dockererr
                                        if [ $? -ne 0 ]; then
                                                ((IMAGE_ERR++))
                                                echo ""
@@ -1697,24 +1704,32 @@ setup_testenvironment() {
 
        # The following sequence pull the configured images
        echo -e $BOLD"Pulling configured images, if needed"$EBOLD
+       __exclude_check=0
        if [ ! -z "$IMAGE_REPO_ADR" ] && [ $IMAGE_REPO_POLICY == "local" ]; then
-               echo -e $YELLOW" Excluding all remote image check/pull when running with image repo: $IMAGE_REPO_ADR and image policy $IMAGE_REPO_POLICY"$EYELLOW
-       else
-               for imagename in $APP_SHORT_NAMES; do
-                       __check_included_image $imagename
-                       incl=$?
-                       __check_project_image $imagename
-                       proj=$?
-                       if [ $incl -eq 0 ]; then
-                               if [ $proj -eq 0 ]; then
-                                       START_ARG_MOD=$START_ARG
-                                       __check_image_local_override $imagename
-                                       if [ $? -eq 1 ]; then
-                                               START_ARG_MOD="local"
-                                       fi
-                               else
-                                       START_ARG_MOD=$START_ARG
+               echo -e $YELLOW" Excluding all remote image check/pull (unless local override) when running with image repo: $IMAGE_REPO_ADR and image policy: $IMAGE_REPO_POLICY"$EYELLOW
+               __exclude_check=1
+       fi
+       for imagename in $APP_SHORT_NAMES; do
+               __check_included_image $imagename
+               incl=$?
+               __check_project_image $imagename
+               proj=$?
+               if [ $incl -eq 0 ]; then
+                       if [ $proj -eq 0 ]; then
+                               START_ARG_MOD=$START_ARG
+                               __check_image_local_override $imagename
+                               if [ $? -eq 1 ]; then
+                                       START_ARG_MOD="local"
                                fi
+                       else
+                               START_ARG_MOD=$START_ARG
+                       fi
+                       __exclude_image_check=0
+                       if [ $__exclude_check == 1 ] && [ "$START_ARG_MOD" != "local" ]; then
+                               # For to handle locally built images,  overriding remote images
+                               __exclude_image_check=1
+                       fi
+                       if [ $__exclude_image_check == 0 ]; then
                                __check_image_local_build $imagename
                                #No pull of images built locally
                                if [ $? -ne 0 ]; then
@@ -1728,11 +1743,12 @@ setup_testenvironment() {
                                        function_pointer="__"$imagename"_imagepull"
                                        $function_pointer $START_ARG_MOD $START_ARG
                                fi
-                       else
-                               echo -e $YELLOW" Excluding $imagename image from image check/pull"$EYELLOW
                        fi
-               done
-       fi
+               else
+                       echo -e $YELLOW" Excluding $imagename image from image check/pull"$EYELLOW
+               fi
+       done
+
 
        #Errors in image setting - exit
        if [ $IMAGE_ERR -ne 0 ]; then
@@ -1822,8 +1838,8 @@ setup_testenvironment() {
 
                # Create a table of the images used in the script - from remote repo
                echo -e $BOLD"Remote repo images used in this test script"$EBOLD
-               echo -e $YELLOW"-- Note: These image will be pulled when the container starts. Images not managed by the test engine --"$EYELLOW
-
+               echo -e $YELLOW"-- Note: These image will be pulled when the container starts. Images not managed by the test engine "$EYELLOW
+               echo -e $YELLOW"-- Note: Images with local override will however be re-tagged and managed by the test engine "$EYELLOW
                docker_tmp_file=./tmp/.docker-images-table
                format_string="{{.Repository}}\\t{{.Tag}}"
                echo -e "Application\tRepository\tTag" > $docker_tmp_file
@@ -2327,7 +2343,7 @@ __kube_scale_all_resources() {
                result=$(kubectl $KUBECONF get $restype -n $namespace -o jsonpath='{.items[?(@.metadata.labels.'$labelname'=="'$labelid'")].metadata.name}')
                if [ $? -eq 0 ] && [ ! -z "$result" ]; then
                        for resid in $result; do
-                               echo -ne "  Ordered caling $restype $resid in namespace $namespace with label $labelname=$labelid to 0"$SAMELINE
+                               echo -ne "  Ordered scaling $restype $resid in namespace $namespace with label $labelname=$labelid to 0"$SAMELINE
                                kubectl $KUBECONF scale  $restype $resid  -n $namespace --replicas=0 1> /dev/null 2> ./tmp/kubeerr
                                echo -e "  Ordered scaling $restype $resid in namespace $namespace with label $labelname=$labelid to 0 $GREEN OK $EGREEN"
                        done
@@ -3240,8 +3256,8 @@ __var_test() {
                        checkjsonarraycount=1
                fi
 
-               echo -e $BOLD"TEST $TEST_SEQUENCE_NR (${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5} within ${6} seconds"$EBOLD
-        echo "TEST $TEST_SEQUENCE_NR - ${TIMESTAMP}: (${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5} within ${6} seconds" >> $HTTPLOG
+               echo -e $BOLD"TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: ${1}, ${3} ${4} ${5} within ${6} seconds"$EBOLD
+        echo "TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: ${1}, ${3} ${4} ${5} within ${6} seconds" >> $HTTPLOG
 
                ((RES_TEST++))
                ((TEST_SEQUENCE_NR++))
@@ -3316,8 +3332,8 @@ __var_test() {
                        checkjsonarraycount=1
                fi
 
-               echo -e $BOLD"TEST $TEST_SEQUENCE_NR (${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5}"$EBOLD
-               echo "TEST $TEST_SEQUENCE_NR - ${TIMESTAMP}: (${BASH_LINENO[1]}): ${1}, ${3} ${4} ${5}" >> $HTTPLOG
+               echo -e $BOLD"TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}: ${1}, ${3} ${4} ${5}"$EBOLD
+               echo "TEST $TEST_SEQUENCE_NR - (${BASH_LINENO[1]}) - ${TIMESTAMP}:  ${1}, ${3} ${4} ${5}" >> $HTTPLOG
                ((RES_TEST++))
                ((TEST_SEQUENCE_NR++))
                if [ $checkjsonarraycount -eq 0 ]; then
index 00cfcca..829084f 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
 #
 
 # List of short names for all supported apps, including simulators etc
-APP_SHORT_NAMES="A1PMS ICS SDNC CP NGW RC RICSIM HTTPPROXY DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC CHARTMUS HELMMANAGER LOCALHELM KEYCLOAK ISTIO AUTHSIDECAR"
+APP_SHORT_NAMES="A1PMS ICS SDNC CP NGW RC RICSIM RICMEDIATORSIM HTTPPROXY DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC CHARTMUS HELMMANAGER LOCALHELM KEYCLOAK ISTIO AUTHSIDECAR"
 
 # List of available apps that built and released of the project
 PROJECT_IMAGES="A1PMS ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER AUTHSIDECAR"
 
 # List of available apps to override with local or remote staging/snapshot/release image
-AVAILABLE_IMAGES_OVERRIDE="A1PMS ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER AUTHSIDECAR"
+AVAILABLE_IMAGES_OVERRIDE="A1PMS ICS SDNC CP NGW RICSIM RICMEDIATORSIM RC DMAAPMED DMAAPADP HELMMANAGER AUTHSIDECAR"
 
 # List of available apps where the image is built by the test environment
 LOCAL_IMAGE_BUILD="MR CR PRODSTUB KUBEPROXY HTTPPROXY KAFKAPC"
index e66d30f..8353086 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
 
 ARG NEXUS_PROXY_REPO
 
-FROM ${NEXUS_PROXY_REPO}python:3.8-slim-buster
+FROM ${NEXUS_PROXY_REPO}alpine:3.17.3
 
-#install nginx
-RUN apt-get update; apt-get install -y nginx=1.14.*
-
-COPY app/ /usr/src/app/
-COPY cert/ /usr/src/app/cert/
+RUN apk add --update --no-cache python3 py3-pip nginx
 
 WORKDIR /usr/src/app
 
-RUN pip install -r requirements.txt
+COPY app/ .
+COPY cert/ ./cert/
+
+RUN pip3 install -r requirements.txt
 
 RUN chmod +x start.sh
 
index 4f98996..6771f1c 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020-2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -15,7 +15,6 @@
 #  ============LICENSE_END=================================================
 #
 
-user www-data;
 worker_processes auto;
 pid /run/nginx.pid;
 include /etc/nginx/modules-enabled/*.conf;
index 16ee34d..ef5e695 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
index 7f0ef12..479eeb1 100644 (file)
@@ -1,16 +1,31 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
 ARG NEXUS_PROXY_REPO
 
-FROM ${NEXUS_PROXY_REPO}node:16-alpine3.12
+FROM ${NEXUS_PROXY_REPO}alpine:3.17.3
 
-ENV NODE_ENV=production
+RUN apk add --update --no-cache nodejs
 
-WORKDIR /usr/src/app/cert
+WORKDIR /app
 
-# Need trailing slash on dest for multiple file copy
-COPY cert/*.crt ./
-COPY cert/pass .
+COPY cert/*.crt cert/
+COPY cert/pass cert/
 
-WORKDIR /usr/src/app
 COPY http_proxy.js .
 
 CMD [ "node", "http_proxy.js" ]
index ac075bf..2f8feb3 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2021-2023 Nordix Foundation. 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.
 
 ARG NEXUS_PROXY_REPO
 
-FROM ${NEXUS_PROXY_REPO}python:3.8-slim-buster
+FROM ${NEXUS_PROXY_REPO}alpine:3.17.3
 
-# Change order to fix problem with WSL
-
-#install nginx
-RUN apt-get update
-RUN apt-get install -y nginx=1.14.*
-
-COPY app/ /usr/src/app/
-COPY cert/ /usr/src/app/cert/
+RUN apk add --update --no-cache python3 py3-pip nginx
 
 WORKDIR /usr/src/app
 
-RUN pip install -r requirements.txt
+COPY app/ .
+COPY cert/ ./cert/
+
+RUN pip3 install -r requirements.txt
 
 RUN chmod +x start.sh
 
index 88b18de..4302711 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020-2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -15,7 +15,6 @@
 #  ============LICENSE_END=================================================
 #
 
-user www-data;
 worker_processes auto;
 pid /run/nginx.pid;
 include /etc/nginx/modules-enabled/*.conf;
index 2f33b1a..a0461fa 100644 (file)
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
index 4768bf9..8353086 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
 
 ARG NEXUS_PROXY_REPO
 
-FROM ${NEXUS_PROXY_REPO}python:3.8-slim-buster
+FROM ${NEXUS_PROXY_REPO}alpine:3.17.3
 
-COPY app/ /usr/src/app/
-COPY cert/ /usr/src/app/cert/
+RUN apk add --update --no-cache python3 py3-pip nginx
 
 WORKDIR /usr/src/app
 
-RUN pip install -r requirements.txt
+COPY app/ .
+COPY cert/ ./cert/
 
-RUN chmod +x start.sh
+RUN pip3 install -r requirements.txt
 
-#install nginx
-RUN apt-get update
-RUN apt-get install -y nginx=1.14.*
+RUN chmod +x start.sh
 
 CMD [ "./start.sh" ]
index 9fa01e6..bc99493 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020-2022 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -15,7 +15,6 @@
 #  ============LICENSE_END=================================================
 #
 
-user www-data;
 worker_processes auto;
 pid /run/nginx.pid;
 include /etc/nginx/modules-enabled/*.conf;
index 21858c8..cca4048 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
index 005f769..3dc83e8 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2020-2022 Nordix Foundation
+#  Copyright (C) 2020-2023 Nordix Foundation
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -133,7 +133,7 @@ spec:
       initContainers:
       - name: init-kafka
         image: busybox
-        command: ['sh', '-c', 'until nslookup $MR_ZOOKEEPER_APP_NAME; do echo waiting for $MR_ZOOKEEPER_APP_NAME; sleep 2; done;']
+        command: ['sh', '-c', 'until nslookup $MR_ZOOKEEPER_APP_NAME.$KUBE_ONAP_NAMESPACE.svc.cluster.local; do echo waiting for $MR_ZOOKEEPER_APP_NAME; sleep 2; done;']
       volumes:
       - configMap:
           defaultMode: 420
@@ -184,7 +184,7 @@ spec:
       initContainers:
       - name: init-dmaap-mr
         image: busybox
-        command: ['sh', '-c', 'until nslookup $MR_KAFKA_APP_NAME; do echo waiting for $MR_KAFKA_APP_NAME; sleep 2; done;']
+        command: ['sh', '-c', 'until nslookup $MR_KAFKA_APP_NAME.$KUBE_ONAP_NAMESPACE.svc.cluster.local; do echo waiting for $MR_KAFKA_APP_NAME; sleep 2; done;']
       volumes:
       - configMap:
           defaultMode: 420
index 3515973..9e35882 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2020-2023 Nordix Foundation. 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.
@@ -40,5 +40,6 @@ services:
     volumes:
       - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro
     labels:
+      - "a1sim=app"
       - "nrttest_app=RICSIM"
       - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}"
diff --git a/test/simulator-group/ricmediator/.gitignore b/test/simulator-group/ricmediator/.gitignore
new file mode 100644 (file)
index 0000000..1f9d6f9
--- /dev/null
@@ -0,0 +1,5 @@
+.tmp.json
+.dockererr
+.env
+fakedir
+gen_docker-compose*
\ No newline at end of file
diff --git a/test/simulator-group/ricmediator/app.yaml b/test/simulator-group/ricmediator/app.yaml
new file mode 100644 (file)
index 0000000..4696598
--- /dev/null
@@ -0,0 +1,61 @@
+#  ============LICENSE_START=======================================================
+#  Copyright (C) 2023 Nordix Foundation
+#  ================================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#  SPDX-License-Identifier: Apache-2.0
+#  ============LICENSE_END=========================================================
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: $RICMEDIATOR_SIM_SET_NAME
+  namespace: $KUBE_A1SIM_NAMESPACE
+  labels:
+    run: $RICMEDIATOR_SIM_SET_NAME
+    autotest: RICMEDIATORSIM
+spec:
+  replicas: $RICMEDIATOR_SIM_COUNT
+  serviceName: $RICMEDIATOR_SIM_SET_NAME
+  selector:
+    matchLabels:
+      run: $RICMEDIATOR_SIM_SET_NAME
+  template:
+    metadata:
+      labels:
+        run: $RICMEDIATOR_SIM_SET_NAME
+        autotest: RICMEDIATORSIM
+    spec:
+      containers:
+      - name: $RICMEDIATOR_SIM_SET_NAME
+        image: $RICMEDIATOR_SIM_IMAGE
+        env:
+        - name: MY_POD_NAME
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+        - name: DBAAS_SERVICE_HOST
+          value: $(MY_POD_NAME).$RICMEDIATOR_SIM_SET_NAME.$KUBE_A1SIM_NAMESPACE
+        - name: DBAAS_SERVICE_PORT
+          value: "6379"
+        imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
+        ports:
+        - name: http
+          containerPort: $RICMEDIATOR_SIM_INTERNAL_PORT
+        - name: https
+          containerPort: $RICMEDIATOR_SIM_INTERNAL_SECURE_PORT
+      - name: dbaas
+        image: $RICMEDIATOR_SIM_DB_IMAGE
+        imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
+        ports:
+        - name: http
+          containerPort: 6379
diff --git a/test/simulator-group/ricmediator/docker-compose.yml b/test/simulator-group/ricmediator/docker-compose.yml
new file mode 100644 (file)
index 0000000..e5130b9
--- /dev/null
@@ -0,0 +1,51 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 Nordix Foundation. 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.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+version: '3.0'
+
+# Compose file to bring up 3 groups of ric simulator containers with variable interface and count
+
+networks:
+  default:
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
+
+services:
+  ${RICMEDIATOR_SIMCOMPOSE_SERVICE_NAME}:
+    image: ${RICMEDIATOR_SIM_IMAGE}
+    networks:
+      - default
+    ports:
+      - ${RICMEDIATOR_SIM_INTERNAL_PORT}/tcp
+      - ${RICMEDIATOR_SIM_INTERNAL_SECURE_PORT}/tcp
+    environment:
+      - DBAAS_SERVICE_HOST=dbaas
+      - DBAAS_SERVICE_PORT=6379
+    labels:
+      - "orana1sim=app"
+      - "nrttest_app=RICMEDIATORSIM"
+      - "nrttest_dp=${RICMEDIATOR_SIM_DISPLAY_NAME}"
+
+  dbaas:
+    image: ${RICMEDIATOR_SIM_DB_IMAGE}
+    networks:
+      - default
+    ports:
+      - 6379/tcp
+    labels:
+      - "nrttest_app=RICMEDIATORSIM"
+      - "nrttest_dp=${RICMEDIATOR_SIM_DISPLAY_NAME}"
\ No newline at end of file
diff --git a/test/simulator-group/ricmediator/svc.yaml b/test/simulator-group/ricmediator/svc.yaml
new file mode 100644 (file)
index 0000000..49baaaa
--- /dev/null
@@ -0,0 +1,32 @@
+#  ============LICENSE_START=======================================================
+#  Copyright (C) 2023 Nordix Foundation
+#  ================================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#  SPDX-License-Identifier: Apache-2.0
+#  ============LICENSE_END=========================================================
+apiVersion: v1
+kind: Service
+metadata:
+  name: $RICMEDIATOR_SIM_SET_NAME
+  namespace: $KUBE_A1SIM_NAMESPACE
+  labels:
+    run: $RICMEDIATOR_SIM_SET_NAME
+    autotest: RICMEDIATORSIM
+spec:
+  ports:
+  - port: 80
+    name: http
+  clusterIP: None
+  selector:
+    run: $RICMEDIATOR_SIM_SET_NAME
index 7dc00c5..7c090b2 100644 (file)
@@ -1,3 +1,4 @@
 .tmp.json
 .dockererr
-gen_docker-compose*
\ No newline at end of file
+gen_docker-compose*
+REM_*
index 76f43ad..aaa29e8 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2020-2022 Nordix Foundation
+#  Copyright (C) 2020-2023 Nordix Foundation
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -74,7 +74,9 @@ spec:
           value: 'changeit'
         command:
         - /opt/onap/sdnc/bin/startODL.sh
+
 ---
+
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -112,4 +114,3 @@ spec:
             value: 'gamma'
           - name: MYSQL_DATABASE
             value: 'sdnctl'
-