Test updates for ECS, PMS and SDNC 28/6728/1
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 21 Sep 2021 18:39:58 +0000 (20:39 +0200)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 21 Sep 2021 18:43:45 +0000 (20:43 +0200)
Proxy in SDNC
Autodelete jobs in ECS
Persistent subscriptions in ECS
Extended info in types
Image uplifts

Issue-ID: NONRTRIC-596

Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: Ibc6d80db0edd0188825ec0920d5de5061d571682

13 files changed:
test/auto-test/FTC1100.sh
test/auto-test/FTC150.sh
test/auto-test/FTC1800.sh
test/auto-test/FTC2002.sh [new file with mode: 0755]
test/auto-test/testdata/ecs/info-type-info.json [new file with mode: 0644]
test/common/controller_api_functions.sh
test/common/ecs_api_functions.sh
test/common/test_env-onap-honolulu.sh
test/common/test_env-onap-istanbul.sh
test/common/test_env-oran-d-release.sh
test/common/test_env-oran-e-release.sh
test/common/testcase_common.sh
test/simulator-group/policy_agent/application.yaml

index b6a2abb..eb687e8 100755 (executable)
@@ -331,9 +331,17 @@ else
     ecs_api_edp_delete_type_2 204 type1
     ecs_api_edp_get_type_2 404 type1
     ecs_api_edp_get_type_ids 200 EMPTY
-    ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+        ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json
+    else
+        ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json
+    fi
     ecs_api_edp_get_type_ids 200 type1
-    ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json
+    else
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    fi
 
     ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
     ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
@@ -359,7 +367,11 @@ ecs_api_edp_get_type_ids 200 type1
 if [ $ECS_VERSION == "V1-1" ]; then
     ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a
 else
-    ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json
+    else
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    fi
 fi
 
 if [ $ECS_VERSION == "V1-1" ]; then
@@ -513,7 +525,11 @@ if [ $ECS_VERSION == "V1-1" ]; then
     ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a
     ecs_api_edp_get_type 200 type2 testdata/ecs/ei-type-2.json prod-b
 else
-    ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json
+    else
+        ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json
+    fi
     ecs_api_edp_get_type_2 200 type2 testdata/ecs/ei-type-2.json
 fi
 
@@ -1950,6 +1966,30 @@ else
     cr_equal received_callbacks 12
 fi
 
+# Test job deletion at type delete
+
+if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+
+    ecs_api_edp_delete_type_2 406 type104
+
+    ecs_api_edp_delete_producer 204 prod-id
+
+    ecs_api_edp_delete_type_2 204 type104
+
+    cr_equal received_callbacks 32 30
+    cr_equal received_callbacks?id=info-job108-status 3
+    cr_equal received_callbacks?id=type-status1 19
+    cr_api_check_all_ecs_subscription_events 200 type-status1 type104 testdata/ecs/info-type-4.json DEREGISTERED
+    cr_api_check_all_ecs_events 200 info-job108-status DISABLED
+
+    ecs_api_edp_get_producer 404 prod-id
+
+    ecs_api_idc_get_job 404 job-108
+
+else
+    cr_equal received_callbacks 12
+fi
+
 check_ecs_logs
 
 store_logs END
index 1d80a8c..bcd41cb 100755 (executable)
@@ -103,14 +103,16 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
         controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 99
 
         RESP=202
-        if [ $FLAVOUR == "ONAP" ]; then
+        if [ $FLAVOUR == "ONAP" ] && [[ "$SDNC_FEATURE_LEVEL" != *"TRANS_RESP_CODE"* ]]; then
+            deviation "SDNC does not return original response code from sim"
             RESP=200
         fi
         controller_api_put_A1_policy $RESP OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
         controller_api_put_A1_policy 404 OSC ricsim_g1_1 5 1001 testdata/OSC/pi1_template.json
 
         RESP=201
-        if [ $FLAVOUR == "ONAP" ]; then
+        if [ $FLAVOUR == "ONAP" ] && [[ "$SDNC_FEATURE_LEVEL" != *"TRANS_RESP_CODE"* ]]; then
+            deviation "SDNC does not return original response code from sim"
             RESP=200
         fi
         controller_api_put_A1_policy $RESP STD ricsim_g2_1   5000 testdata/STD/pi1_template.json
@@ -126,13 +128,15 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
         controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED"
 
         RESP=202
-        if [ $FLAVOUR == "ONAP" ]; then
+        if [ $FLAVOUR == "ONAP" ] && [[ "$SDNC_FEATURE_LEVEL" != *"TRANS_RESP_CODE"* ]]; then
+            deviation "SDNC does not return original response code from sim"
             RESP=200
         fi
         controller_api_delete_A1_policy $RESP OSC ricsim_g1_1 1 4000
 
         RESP=204
-        if [ $FLAVOUR == "ONAP" ]; then
+        if [ $FLAVOUR == "ONAP" ] && [[ "$SDNC_FEATURE_LEVEL" != *"TRANS_RESP_CODE"* ]]; then
+            deviation "SDNC does not return original response code from sim"
             RESP=200
         fi
         controller_api_delete_A1_policy $RESP STD ricsim_g2_1 5000
index 8ad142c..bb9ed60 100755 (executable)
@@ -218,6 +218,39 @@ else
         ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json
         ecs_api_edp_put_type_2 201 type105 testdata/ecs/info-type-5.json
 
+
+
+        if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+            cr_equal received_callbacks 20 30
+            cr_equal received_callbacks?id=type-status1 10
+            cr_equal received_callbacks?id=type-status2 10
+
+            cr_api_check_all_ecs_subscription_events 200 type-status1 \
+                type1 testdata/ecs/ei-type-1.json REGISTERED \
+                type2 testdata/ecs/ei-type-2.json REGISTERED \
+                type3 testdata/ecs/ei-type-3.json REGISTERED \
+                type4 testdata/ecs/ei-type-4.json REGISTERED \
+                type5 testdata/ecs/ei-type-5.json REGISTERED \
+                type101 testdata/ecs/info-type-1.json REGISTERED \
+                type102 testdata/ecs/info-type-2.json REGISTERED \
+                type103 testdata/ecs/info-type-3.json REGISTERED \
+                type104 testdata/ecs/info-type-4.json REGISTERED \
+                type105 testdata/ecs/info-type-5.json REGISTERED
+
+            cr_api_check_all_ecs_subscription_events 200 type-status2 \
+                type1 testdata/ecs/ei-type-1.json REGISTERED \
+                type2 testdata/ecs/ei-type-2.json REGISTERED \
+                type3 testdata/ecs/ei-type-3.json REGISTERED \
+                type4 testdata/ecs/ei-type-4.json REGISTERED \
+                type5 testdata/ecs/ei-type-5.json REGISTERED \
+                type101 testdata/ecs/info-type-1.json REGISTERED \
+                type102 testdata/ecs/info-type-2.json REGISTERED \
+                type103 testdata/ecs/info-type-3.json REGISTERED \
+                type104 testdata/ecs/info-type-4.json REGISTERED \
+                type105 testdata/ecs/info-type-5.json REGISTERED
+
+        fi
+
         ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
 
         ecs_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
@@ -332,6 +365,22 @@ else
 
 fi
 
+
+if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+
+    ecs_equal json:/data-consumer/v1/info-type-subscription 2 200
+
+    ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1
+    ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2
+
+    if [ $use_info_jobs ]; then
+        ecs_equal json:data-producer/v1/info-types 10 1000
+    else
+        ecs_equal json:ei-producer/v1/eitypes 5 1000
+    fi
+
+fi
+
 stop_ecs
 
 cr_api_reset
@@ -340,28 +389,22 @@ start_stopped_ecs
 
 set_ecs_trace
 
-
 if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
 
-    ecs_api_idc_get_subscription_ids 200 NOOWNER EMPTY
-    ecs_api_idc_get_subscription_ids 200 NOOWNER EMPTY
+    ecs_equal json:/data-consumer/v1/info-type-subscription 2 200
+
+    ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1
+    ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2
 
     if [ $use_info_jobs ]; then
         ecs_equal json:data-producer/v1/info-types 10 1000
     else
         ecs_equal json:ei-producer/v1/eitypes 5 1000
     fi
-
-    ecs_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1
-
-    ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1
-
-    ecs_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2
-
-    ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2
-
 fi
 
+cr_equal received_callbacks 0
+
 for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
@@ -735,8 +778,35 @@ if [ $use_info_jobs ]; then
     ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
 fi
 
+if [ $use_info_jobs ]; then
+    if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
+        ecs_api_edp_put_type_2 200 type101 testdata/ecs/info-type-1.json
+        ecs_api_edp_put_type_2 200 type102 testdata/ecs/info-type-2.json
+        ecs_api_edp_put_type_2 200 type103 testdata/ecs/info-type-3.json
+        ecs_api_edp_put_type_2 200 type104 testdata/ecs/info-type-4.json
+        ecs_api_edp_put_type_2 200 type105 testdata/ecs/info-type-5.json
+    fi
+fi
+
 if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
-    cr_equal received_callbacks 0 30
+    cr_equal received_callbacks 10 30
+    cr_equal received_callbacks?id=type-status1 5
+    cr_equal received_callbacks?id=type-status2 5
+
+    cr_api_check_all_ecs_subscription_events 200 type-status1 \
+        type101 testdata/ecs/info-type-1.json REGISTERED \
+        type102 testdata/ecs/info-type-2.json REGISTERED \
+        type103 testdata/ecs/info-type-3.json REGISTERED \
+        type104 testdata/ecs/info-type-4.json REGISTERED \
+        type105 testdata/ecs/info-type-5.json REGISTERED
+
+    cr_api_check_all_ecs_subscription_events 200 type-status2 \
+        type101 testdata/ecs/info-type-1.json REGISTERED \
+        type102 testdata/ecs/info-type-2.json REGISTERED \
+        type103 testdata/ecs/info-type-3.json REGISTERED \
+        type104 testdata/ecs/info-type-4.json REGISTERED \
+        type105 testdata/ecs/info-type-5.json REGISTERED
+
 else
     cr_equal received_callbacks 0 30
 fi
diff --git a/test/auto-test/FTC2002.sh b/test/auto-test/FTC2002.sh
new file mode 100755 (executable)
index 0000000..753cc79
--- /dev/null
@@ -0,0 +1,164 @@
+#!/usr/bin/env 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="Testing southbound proxy for SDNC - docker only"
+
+#App names to include in the test when running docker, space separated list
+DOCKER_INCLUDED_IMAGES="RICSIM SDNC HTTPPROXY"
+#App names to include in the test when running kubernetes, space separated list
+KUBE_INCLUDED_IMAGES=""
+#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
+KUBE_PRESTARTED_IMAGES=" "
+
+#Supported test environment profiles
+SUPPORTED_PROFILES="ONAP-ISTANBUL"
+#Supported run modes
+SUPPORTED_RUNMODES="DOCKER"
+
+. ../common/testcase_common.sh  $@
+. ../common/controller_api_functions.sh
+. ../common/ricsimulator_api_functions.sh
+. ../common/kube_proxy_api_functions.sh
+. ../common/http_proxy_api_functions.sh
+
+setup_testenvironment
+
+#### TEST BEGIN ####
+
+generate_policy_uuid
+
+#Test agent and simulator protocol versions (others are http only)
+NB_TESTED_PROTOCOLS="HTTP HTTPS"
+SB_TESTED_PROTOCOLS="HTTP HTTPS"
+
+for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
+    for __sb_httpx in $SB_TESTED_PROTOCOLS ; do
+
+        echo "#####################################################################"
+        echo "#####################################################################"
+        echo "### Testing SDNC using Northbound: $__nb_httpx and Southbound: $__sb_httpx"
+        echo "#####################################################################"
+        echo "#####################################################################"
+
+        if [ $__sb_httpx == "HTTPS" ]; then
+            deviation "Southbound https proxy is currently not supported"
+            break
+        fi
+
+
+        # Clean container and start all needed containers #
+        clean_environment
+
+        start_http_proxy
+
+        start_ric_simulators ricsim_g1 1  OSC_2.1.0
+        start_ric_simulators ricsim_g2 1  STD_1.1.3
+        if [ "$PMS_VERSION" == "V2" ]; then
+            start_ric_simulators ricsim_g3 1  STD_2.0.0
+        fi
+
+        start_sdnc
+
+        if [ $__nb_httpx == "HTTPS" ]; then
+            # "Using secure ports towards SDNC"
+            use_sdnc_https
+        else
+            #"Using non-secure ports towards SDNC"
+            use_sdnc_http
+        fi
+
+        if [ $__sb_httpx == "HTTPS" ]; then
+            # "Using secure ports towards SDNC"
+            use_simulator_https
+            use_http_proxy_https
+        else
+            #"Using non-secure ports towards SDNC"
+            use_simulator_http
+            use_http_proxy_http
+        fi
+
+        echo -e $BOLD"Configure proxy in SDNC"$EBOLD
+        echo ""
+
+        if [ $__sb_httpx == "HTTPS" ]; then
+            echo "
+            sed  -i 's/a1Mediator.proxy.url=/a1Mediator.proxy.url=https:\/\/httpproxy:8433/g' /opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties
+            " | docker exec -i a1controller bash
+        else
+            echo "
+            sed  -i 's/a1Mediator.proxy.url=/a1Mediator.proxy.url=http:\/\/httpproxy:8080/g' /opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties
+            " | docker exec -i a1controller bash
+        fi
+
+        # Restart SDNC to use the updated config
+        stop_sdnc
+        start_stopped_sdnc
+
+        # API tests
+
+        controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 1
+
+        sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+
+        controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1
+        controller_api_get_A1_policy_ids 200 STD ricsim_g2_1
+
+        controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1
+        controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1 testdata/OSC/sim_1.json
+        controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 99
+
+        controller_api_put_A1_policy 202 OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
+        controller_api_put_A1_policy 404 OSC ricsim_g1_1 5 1001 testdata/OSC/pi1_template.json
+
+        controller_api_put_A1_policy 201 STD ricsim_g2_1   5000 testdata/STD/pi1_template.json
+
+        controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1 4000
+        controller_api_get_A1_policy_ids 200 STD ricsim_g2_1 5000
+
+        controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000
+        controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000
+
+        VAL='NOT IN EFFECT'
+        controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "false"
+        controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED"
+
+
+        deviation "SDNC does not return original response code from sim"
+        controller_api_delete_A1_policy 202 OSC ricsim_g1_1 1 4000
+
+        deviation "SDNC does not return original response code from sim"
+        controller_api_delete_A1_policy 204 STD ricsim_g2_1 5000
+
+        sim_contains_str ricsim_g1_1 remote_hosts httpproxy.nonrtric-docker-net
+        sim_contains_str ricsim_g2_1 remote_hosts httpproxy.nonrtric-docker-net
+
+        check_sdnc_logs
+
+        store_logs          "NB_"$__nb_httpx"_SB_"$__sb_httpx
+
+    done
+
+done
+
+#### TEST COMPLETE ####
+
+print_result
+
+auto_clean_environment
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-info.json b/test/auto-test/testdata/ecs/info-type-info.json
new file mode 100644 (file)
index 0000000..88814e7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "hint": "periodic"
+}
\ No newline at end of file
index 3ed3933..d703d83 100644 (file)
@@ -272,6 +272,57 @@ start_sdnc() {
     return 0
 }
 
+
+# Stop the sndc
+# args: -
+# args: -
+# (Function for test scripts)
+stop_sdnc() {
+       echo -e $BOLD"Stopping $SDNC_DISPLAY_NAME"$EBOLD
+
+       if [ $RUNMODE == "KUBE" ]; then
+               __log_conf_fail_not_supported " Cannot stop sndc in KUBE mode"
+               return 1
+       else
+               docker stop $SDNC_APP_NAME &> ./tmp/.dockererr
+               if [ $? -ne 0 ]; then
+                       __print_err "Could not stop $SDNC_APP_NAME" $@
+                       cat ./tmp/.dockererr
+                       ((RES_CONF_FAIL++))
+                       return 1
+               fi
+       fi
+       echo -e $BOLD$GREEN"Stopped"$EGREEN$EBOLD
+       echo ""
+       return 0
+}
+
+# Start a previously stopped sdnc
+# args: -
+# (Function for test scripts)
+start_stopped_sdnc() {
+       echo -e $BOLD"Starting (the previously stopped) $SDNC_DISPLAY_NAME"$EBOLD
+
+       if [ $RUNMODE == "KUBE" ]; then
+               __log_conf_fail_not_supported " Cannot restart sndc in KUBE mode"
+               return 1
+       else
+               docker start $SDNC_APP_NAME &> ./tmp/.dockererr
+               if [ $? -ne 0 ]; then
+                       __print_err "Could not start (the stopped) $SDNC_APP_NAME" $@
+                       cat ./tmp/.dockererr
+                       ((RES_CONF_FAIL++))
+                       return 1
+               fi
+       fi
+       __check_service_start $SDNC_APP_NAME $SDNC_PATH$SDNC_ALIVE_URL
+       if [ $? -ne 0 ]; then
+               return 1
+       fi
+       echo ""
+       return 0
+}
+
 # Check the agent logs for WARNINGs and ERRORs
 # args: -
 # (Function for test scripts)
index 805fae4..9bde835 100644 (file)
@@ -1225,7 +1225,7 @@ ecs_api_edp_get_type() {
 
 # API Test function: GET /ei-producer/v1/eitypes/{eiTypeId}
 # API Test function: GET /data-producer/v1/info-types/{infoTypeId}
-# args: (v1_2) <response-code> <type-id> [<job-schema-file> ]
+# args: (v1_2) <response-code> <type-id> [<job-schema-file> [ <info-type-info> ]]
 # (Function for test scripts)
 ecs_api_edp_get_type_2() {
        __log_test_start $@
@@ -1237,8 +1237,13 @@ ecs_api_edp_get_type_2() {
        if [ $# -eq 3 ]; then
                paramError=0
        fi
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
+               if [ $# -eq 4 ]; then
+                       paramError=0
+               fi
+       fi
     if [ $paramError -ne 0 ]; then
-               __print_err "<response-code> <type-id> [<job-schema-file> ]" $@
+               __print_err "<response-code> <type-id> [<job-schema-file> [ <info-type-info> ]]" $@
                return 1
        fi
        if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
@@ -1254,7 +1259,7 @@ ecs_api_edp_get_type_2() {
                __log_test_fail_status_code $1 $status
                return 1
        fi
-       if [ $# -eq 3 ]; then
+       if [ $# -ge 3 ]; then
                body=${res:0:${#res}-3}
 
                if [ -f $3 ]; then
@@ -1263,8 +1268,18 @@ ecs_api_edp_get_type_2() {
                        __log_test_fail_general "Job template file "$3", does not exist"
                        return 1
                fi
+               info_data=""
+               if [ $# -gt 3 ]; then
+                       if [ -f $4 ]; then
+                               info_data=$(cat $4)
+                       else
+                               __log_test_fail_general "Info-data file "$4", does not exist"
+                               return 1
+                       fi
+                       info_data=",\"info_type_information\":$info_data"
+               fi
                if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
-                       targetJson="{\"info_job_data_schema\":$schema}"
+                       targetJson="{\"info_job_data_schema\":$schema $info_data}"
                else
                        targetJson="{\"ei_job_data_schema\":$schema}"
                fi
@@ -1283,23 +1298,42 @@ ecs_api_edp_get_type_2() {
 
 # API Test function: PUT /ei-producer/v1/eitypes/{eiTypeId}
 # API Test function: PUT /data-producer/v1/info-types/{infoTypeId}
-# args: (v1_2) <response-code> <type-id> <job-schema-file>
+# args: (v1_2) <response-code> <type-id> <job-schema-file> [ <info-type-info> ]
 # (Function for test scripts)
 ecs_api_edp_put_type_2() {
        __log_test_start $@
 
-    if [ $# -ne 3 ]; then
-               __print_err "<response-code> <type-id> <job-schema-file>" $@
-               return 1
+       if [[ "$ECS_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
        fi
 
        if [ ! -f $3 ]; then
                __log_test_fail_general "Job schema file "$3", does not exist"
                return 1
        fi
+
+       info_data=""
+       if [ $# -gt 3 ]; then
+               if [ -f $4 ]; then
+                       info_data=$(cat $4)
+               else
+                       __log_test_fail_general "Info-data file "$4", does not exist"
+                       return 1
+               fi
+               info_data=",\"info_type_information\":$info_data"
+       fi
+
        if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
                schema=$(cat $3)
-               input_json="{\"info_job_data_schema\":$schema}"
+               input_json="{\"info_job_data_schema\":$schema $info_data}"
                file="./tmp/put_type.json"
                echo $input_json > $file
 
index 0797912..54e6fbe 100755 (executable)
@@ -76,10 +76,10 @@ POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.1.1"
 
 # SDNC A1 Controller remote image and tag
 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.1.3-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.3-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.1.3-STAGING-latest"  #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.1.2"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.1.7-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.7-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.1.7-STAGING-latest"  #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.1.6"
 
 #SDNC DB remote image and tag
 #The DB is part of SDNC so handled in the same way as SDNC
@@ -320,6 +320,7 @@ 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=""                                    # Space separated list of features
 
 RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
 RAPP_CAT_DISPLAY_NAME="RAPP Catalogue Service"
index a99ad9d..4982e19 100644 (file)
@@ -69,9 +69,9 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO
 
 # Policy Agent image and tags
 POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
-POLICY_AGENT_IMAGE_TAG_LOCAL="1.2.1-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.1-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE="1.2.1-STAGING-latest" #Will use snapshot repo
+POLICY_AGENT_IMAGE_TAG_LOCAL="1.2.2-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.2-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="1.2.2-STAGING-latest" #Will use snapshot repo
 POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.2.1"
 
 # SDNC A1 Controller remote image and tag
@@ -86,22 +86,25 @@ SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
 SDNC_DB_IMAGE_BASE="mariadb"
 SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
 
-# ECS image and tag - uses cherry release
+# ECS image and tag - uses d release
 ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
-ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
+ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.1.0"
 #Note: Update var ECS_FEATURE_LEVEL if image version is changed
 
-# Control Panel image and tag - uses cherry release
+# Control Panel image and tag - uses d release
 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.1"
+CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.2.0"
 
+# Gateway image and tags - uses d 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 - uses cherry release
+# RAPP Catalogue image and tags - uses d release
 RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
 RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
 
 
-# Near RT RIC Simulator image and tags - uses cherry release
+# Near RT RIC Simulator image and tags - uses d release
 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
 RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.0"
 
@@ -165,7 +168,7 @@ KUBE_PROXY_IMAGE_TAG_LOCAL="latest"
 PROJECT_IMAGES_APP_NAMES="PA SDNC"
 
 # List of app short names which images pulled from ORAN
-ORAN_IMAGES_APP_NAMES="CP ECS RICSIM RC"
+ORAN_IMAGES_APP_NAMES="CP ECS RICSIM RC NGW"
 
 # List of app short names which images pulled from ONAP
 ONAP_IMAGES_APP_NAMES=""   # Not used
@@ -224,7 +227,7 @@ ECS_COMPOSE_DIR="ecs"                                    # Dir in simulator_grou
 ECS_CONFIG_MOUNT_PATH=/opt/app/enrichment-coordinator-service/config # Internal container path for configuration
 ECS_CONFIG_FILE=application.yaml                         # Config file name
 ECS_VERSION="V1-2"                                       # Version where the types are added in the producer registration
-ECS_FEATURE_LEVEL=""                                     # Space separated list of features
+ECS_FEATURE_LEVEL="INFO-TYPES"                           # Space separated list of features
 
 MR_DMAAP_APP_NAME="dmaap-mr"                             # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
@@ -320,6 +323,8 @@ 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
+                                                         # TRANS_RESP_CODE: SDNC return southbound response code
 
 RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
 RAPP_CAT_DISPLAY_NAME="RAPP Catalogue Service"
@@ -343,6 +348,21 @@ CONTROL_PANEL_CONFIG_MOUNT_PATH=/maven                   # Container internal pa
 CONTROL_PANEL_CONFIG_FILE=application.properties         # Config file name
 CONTROL_PANEL_HOST_MNT_DIR="./mnt"                       # Mounted dir, relative to compose file, on the host
 
+NRT_GATEWAY_APP_NAME="nonrtricgateway"                   # Name of the Gateway container
+NRT_GATEWAY_DISPLAY_NAME="NonRT-RIC Gateway"
+NRT_GATEWAY_EXTERNAL_PORT=9090                           # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_PORT=9090                           # Gateway container internal port (container -> container)
+NRT_GATEWAY_EXTERNAL_SECURE_PORT=9091                    # Gateway container external port (host -> container)
+NRT_GATEWAY_INTERNAL_SECURE_PORT=9091                    # Gateway container internal port (container -> container)
+NRT_GATEWAY_LOGPATH="/var/log/nonrtric-gateway/application.log" # Path the application log in the Gateway container
+NRT_GATEWAY_HOST_MNT_DIR="./mnt"                         # Mounted dir, relative to compose file, on the host
+NRT_GATEWAY_ALIVE_URL="/actuator/metrics"                # Base path for alive check
+NRT_GATEWAY_COMPOSE_DIR="ngw"                            # Dir in simulator_group for docker-compose
+NRT_GATEWAY_CONFIG_MOUNT_PATH=/opt/app/nonrtric-gateway/config  # Container internal path for config
+NRT_GATEWAY_CONFIG_FILE=application.yaml                 # Config file name
+NRT_GATEWAY_PKG_NAME="org.springframework.cloud.gateway" # Java base package name
+NRT_GATEWAY_ACTUATOR="/actuator/loggers/$NRT_GATEWAY_PKG_NAME" # Url for trace/debug
+
 HTTP_PROXY_APP_NAME="httpproxy"                          # Name of the Http Proxy container
 HTTP_PROXY_DISPLAY_NAME="Http Proxy"
 HTTP_PROXY_EXTERNAL_PORT=8740                            # Http Proxy container external port (host -> container)
index 399f362..385dafe 100755 (executable)
@@ -89,9 +89,9 @@ NRT_GATEWAY_IMAGE_TAG_REMOTE="1.0.0"
 NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
 
 
-# SDNC A1 Controller image and tags - Note using ONAP image
+# SDNC A1 Controller image and tags - Note using Honolulu ONAP image
 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.1.2"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.1.6"
 #No local image for ONAP SDNC, remote release image always used
 
 # ORAN SDNC adapter kept as reference
@@ -364,6 +364,7 @@ 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=""                                    # Space separated list of features
 
 RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
 RAPP_CAT_DISPLAY_NAME="RAPP Catalogue"
index e468d03..0f6e977 100755 (executable)
@@ -89,9 +89,9 @@ NRT_GATEWAY_IMAGE_TAG_REMOTE="1.1.0"
 NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
 
 
-# SDNC A1 Controller image and tags - Note using ONAP image
+# SDNC A1 Controller image and tags - Note using released honolulu ONAP image
 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.1.2"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.1.6"
 #No local image for ONAP SDNC, remote release image always used
 
 # ORAN SDNC adapter kept as reference
@@ -247,7 +247,7 @@ ECS_COMPOSE_DIR="ecs"                                    # Dir in simulator_grou
 ECS_CONFIG_MOUNT_PATH=/opt/app/enrichment-coordinator-service/config # Internal container path for configuration
 ECS_CONFIG_FILE=application.yaml                         # Config file name
 ECS_VERSION="V1-2"                                       # Version where the types are decoupled from the producer registration
-ECS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS"        # Space separated list of features
+ECS_FEATURE_LEVEL="INFO-TYPES TYPE-SUBSCRIPTIONS INFO-TYPE-INFO"  # Space separated list of features
 
 MR_DMAAP_APP_NAME="dmaap-mr"                             # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
@@ -364,6 +364,7 @@ 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=""                                    # Space separated list of features
 
 RAPP_CAT_APP_NAME="rappcatalogueservice"                 # Name for the RAPP Catalogue
 RAPP_CAT_DISPLAY_NAME="RAPP Catalogue"
index 5f1b097..b63d4d1 100755 (executable)
@@ -310,6 +310,14 @@ __log_conf_fail_body() {
        __check_stop_at_error
 }
 
+# Function to log a configuration that is not supported
+__log_conf_fail_not_supported() {
+       echo -e $RED" FAIL, function not supported"$ERED$@
+       ((RES_CONF_FAIL++))
+       __print_current_stats
+       __check_stop_at_error
+}
+
 # Function to log a passed configuration setup
 __log_conf_ok() {
        if [ $# -gt 0 ]; then
index 5c5b08d..75e4200 100644 (file)
@@ -66,3 +66,4 @@ app:
     # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
     http.proxy-host: $AGENT_HTTP_PROXY_CONFIG_HOST_NAME
     http.proxy-port: $AGENT_HTTP_PROXY_CONFIG_PORT
+    http.proxy-type: HTTP