Merge "NONRTRIC - ECS updates of the NBI"
authorHenrik Andersson <henrik.b.andersson@est.tech>
Wed, 12 May 2021 09:21:33 +0000 (09:21 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Wed, 12 May 2021 09:21:33 +0000 (09:21 +0000)
25 files changed:
test/auto-test/FTC1100.sh
test/auto-test/FTC1800.sh
test/auto-test/FTC2001.sh
test/auto-test/FTC_HELM_RECIPE_D_RELEASE.sh
test/auto-test/PM_EI_DEMO.sh
test/auto-test/testdata/ecs/info-type-1.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-2.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-3.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-4.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-5.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-50.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-6.json [new file with mode: 0644]
test/auto-test/testdata/ecs/info-type-60.json [new file with mode: 0644]
test/common/README.md
test/common/agent_api_functions.sh
test/common/ecs_api_functions.sh
test/common/prodstub_api_functions.sh
test/common/test_env-onap-honolulu.sh
test/common/test_env-onap-istanbul.sh
test/common/test_env-oran-cherry.sh
test/common/test_env-oran-d-release.sh
test/prodstub/app/prodstub.py
test/simulator-group/ngw/application.yaml
test/usecases/linkfailure/README.md
test/usecases/linkfailure/app/main.py

index 76f03d5..c210417 100755 (executable)
@@ -79,7 +79,7 @@ fi
 
 start_prod_stub
 
-set_ecs_trace
+set_ecs_debug
 
 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
 
@@ -95,18 +95,38 @@ start_cr
 
 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
+#Targets for ei jobs
 TARGET1="$RIC_SIM_HTTPX://ricsim_g3_1:$RIC_SIM_PORT/datadelivery"
 TARGET2="$RIC_SIM_HTTPX://ricsim_g3_2:$RIC_SIM_PORT/datadelivery"
 TARGET3="$RIC_SIM_HTTPX://ricsim_g3_3:$RIC_SIM_PORT/datadelivery"
 TARGET8="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery"
 TARGET10="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery"
 
+#Targets for info jobs
+TARGET101="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET102="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET103="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET108="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET110="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET150="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+TARGET160="http://localhost:80/target"  # Dummy target, no target for info data in this env...
+
+#Status callbacks for eijobs
 STATUS1="$CR_SERVICE_PATH/job1-status"
 STATUS2="$CR_SERVICE_PATH/job2-status"
 STATUS3="$CR_SERVICE_PATH/job3-status"
 STATUS8="$CR_SERVICE_PATH/job8-status"
 STATUS10="$CR_SERVICE_PATH/job10-status"
 
+#Status callbacks for infojobs
+INFOSTATUS101="$CR_SERVICE_PATH/info-job101-status"
+INFOSTATUS102="$CR_SERVICE_PATH/info-job102-status"
+INFOSTATUS103="$CR_SERVICE_PATH/info-job103-status"
+INFOSTATUS108="$CR_SERVICE_PATH/info-job108-status"
+INFOSTATUS110="$CR_SERVICE_PATH/info-job110-status"
+INFOSTATUS150="$CR_SERVICE_PATH/info-job150-status"
+INFOSTATUS160="$CR_SERVICE_PATH/info-job160-status"
+
 ### Setup prodstub sim to accept calls for producers, types and jobs
 ## prod-a type1
 ## prod-b type1 and type2
@@ -247,8 +267,6 @@ else
 
     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
-
-    ecs_api_edp_delete_type_2 406 type1
 fi
 
 
@@ -312,7 +330,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    fi
 fi
 
 ecs_api_a1_get_job_ids 200 type1 NOWNER job1
@@ -352,7 +374,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    fi
 fi
 ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2
 ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
@@ -436,7 +462,11 @@ prodstub_equal create/prod-b/job3 1
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json
+    fi
 fi
 
 ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2
@@ -560,7 +590,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
 else
-    prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    else
+        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    fi
 fi
 
 ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
@@ -621,7 +655,11 @@ cr_api_check_all_ecs_events 200 job3-status ENABLED
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
 else
-    prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    else
+        prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json
+    fi
 fi
 
 ## Setup prod-d
@@ -643,7 +681,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json
+    fi
 fi
 
 prodstub_equal create/prod-d/job8 1
@@ -737,7 +779,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    fi
 fi
 
 prodstub_equal create/prod-e/job10 1
@@ -764,7 +810,11 @@ ecs_api_a1_get_job_ids 200 type6 NOWNER job10
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json
+    fi
 fi
 
 prodstub_equal create/prod-f/job10 1
@@ -894,7 +944,11 @@ else
 fi
 
 # Wait for producer prod-a to be removed
-ecs_equal json:ei-producer/v1/eiproducers 5 1000
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    ecs_equal json:data-producer/v1/info-producers 5 1000
+else
+    ecs_equal json:ei-producer/v1/eiproducers 5 1000
+fi
 
 if [ $ECS_VERSION == "V1-1" ]; then
     ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
@@ -991,14 +1045,22 @@ sleep_wait 120
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json
 else
-    prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json
+    else
+        prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json
+    fi
 fi
 
 prodstub_arm_producer 200 prod-f 400
 
 ecs_api_edp_get_producer_status 200 prod-f DISABLED 360
 
-ecs_equal json:ei-producer/v1/eiproducers 4 1000
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    ecs_equal json:data-producer/v1/info-producers 4 1000
+else
+    ecs_equal json:ei-producer/v1/eiproducers 4 1000
+fi
 
 if [ $ECS_VERSION == "V1-1" ]; then
     ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e
@@ -1029,6 +1091,640 @@ fi
 
 cr_equal received_callbacks 6
 
+
+if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+
+    # End test if info types is not impl in tested version
+    check_ecs_logs
+
+    store_logs END
+
+    #### TEST COMPLETE ####
+
+    print_result
+
+    auto_clean_environment
+fi
+
+
+############################################
+# Test of info types
+############################################
+
+### Setup prodstub sim to accept calls for producers, info types and jobs
+## prod-ia type101
+## prod-ib type101 and type102
+## prod-ic no-type
+## prod-id type104
+## prod-ie type106
+## prod-if type106
+## prod-ig type150  (configured later)
+## prod-ig type160  (configured later)
+
+## job101 -> prod-ia
+## job102 -> prod-ia
+## job103 -> prod-ib
+## job104 -> prod-ia
+## job106 -> prod-ib
+## job108 -> prod-id
+## job110 -> prod-ie and prod-if
+## job150 -> prod-ig  (configured later)
+
+prodstub_arm_producer 200 prod-ia
+prodstub_arm_producer 200 prod-ib
+prodstub_arm_producer 200 prod-ic
+prodstub_arm_producer 200 prod-id
+prodstub_arm_producer 200 prod-ie
+prodstub_arm_producer 200 prod-if
+
+prodstub_arm_type 200 prod-ia type101
+prodstub_arm_type 200 prod-ib type102
+prodstub_arm_type 200 prod-ib type103
+prodstub_arm_type 200 prod-id type104
+prodstub_arm_type 200 prod-ie type106
+prodstub_arm_type 200 prod-if type106
+
+prodstub_disarm_type 200 prod-ib type103
+prodstub_arm_type 200 prod-ib type101
+prodstub_disarm_type 200 prod-ib type101
+
+
+prodstub_arm_job_create 200 prod-ia job101
+prodstub_arm_job_create 200 prod-ia job102
+prodstub_arm_job_create 200 prod-ib job103
+
+prodstub_arm_job_delete 200 prod-ia job101
+prodstub_arm_job_delete 200 prod-ia job102
+prodstub_arm_job_delete 200 prod-ib job103
+
+prodstub_arm_job_create 200 prod-ib job104
+prodstub_arm_job_create 200 prod-ia job104
+
+prodstub_arm_job_create 200 prod-ib job106
+
+prodstub_arm_job_create 200 prod-id job108
+
+prodstub_arm_job_create 200 prod-ie job110
+prodstub_arm_job_create 200 prod-if job110
+
+
+# NOTE: types, jobs and producers are still present related to eitypes
+
+
+### Initial tests - no config made
+### GET: type ids, types, producer ids, producers, job ids, jobs
+### DELETE: jobs
+ecs_api_idc_get_type_ids 200 type1 type2 type4 type6
+ecs_api_idc_get_type 404 test-type
+
+ecs_api_edp_get_type_ids 200 type1 type2 type4 type6
+ecs_api_edp_get_type_2 404 test-type
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e
+ecs_api_edp_get_producer_2 404 test-prod
+ecs_api_edp_get_producer_status 404 test-prod
+
+ecs_api_edp_delete_producer 404 test-prod
+
+ecs_api_idc_get_job_ids 200 test-type NOWNER EMPTY
+ecs_api_idc_get_job_ids 200 test-type test-owner EMPTY
+
+ecs_api_idc_get_job 404 test-job
+
+ecs_api_idc_get_job_status 404 test-job
+
+ecs_api_idc_delete_job 404 test-job
+
+ecs_api_edp_get_producer_jobs_2 404 test-prod
+
+ecs_api_edp_get_type_2 404 test-type
+ecs_api_edp_delete_type_2 404 test-type
+
+### Setup of producer/job and testing apis ###
+
+## Setup prod-ia
+ecs_api_edp_get_type_ids 200 type1 type2 type4 type6
+ecs_api_edp_get_type_2 404 type101
+ecs_api_edp_put_producer_2 404 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+
+# Create type, delete and create again
+ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json
+ecs_api_edp_get_type_2 200 type101
+ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
+ecs_api_edp_delete_type_2 204 type101
+ecs_api_edp_get_type_2 404 type101
+ecs_api_edp_get_type_ids 200 type1 type2 type4 type6
+ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json
+ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
+ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json
+
+ecs_api_edp_put_producer_2 201 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+ecs_api_edp_put_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+
+ecs_api_edp_delete_type_2 406 type101
+
+
+#ecs_api_idc_get_type_ids 200 type101
+#ecs_api_idc_get_type 200 type101 testdata/ecs/empty-type.json
+
+ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
+ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-b prod-c prod-d prod-e
+ecs_api_edp_get_producer_ids_2 200 type101 prod-ia
+ecs_api_edp_get_producer_ids_2 200 type102 EMPTY
+
+ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+
+ecs_api_edp_get_producer_status 200 prod-ia ENABLED
+
+ecs_api_idc_get_job_ids 200 type101 NOWNER EMPTY
+ecs_api_idc_get_job_ids 200 type101 test-owner EMPTY
+
+ecs_api_idc_get_job 404 test-job
+
+ecs_api_idc_get_job_status 404 test-job
+ecs_api_edp_get_producer_jobs_2 200 prod-ia EMPTY
+
+## Create a job for prod-ia
+## job101 - prod-ia
+ecs_api_idc_put_job 201 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ecs/job-template.json VALIDATE
+
+# Check the job data in the producer
+prodstub_check_jobdata_3 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_ids 200 type101 NOWNER job101
+ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101
+
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job1 job2 job3 job8 job10
+
+ecs_api_idc_get_job 200 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_status 200 job101 ENABLED
+
+prodstub_equal create/prod-ia/job101 1
+
+ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json
+
+## Create a second job for prod-ia
+## job102 - prod-ia
+ecs_api_idc_put_job 201 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ecs/job-template.json  VALIDATE
+
+# Check the job data in the producer
+prodstub_check_jobdata_3 200 prod-ia job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json
+ecs_api_idc_get_job_ids 200 type101 NOWNER job101 job102
+ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101
+ecs_api_idc_get_job_ids 200 type101 info-owner-2 job102
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
+
+ecs_api_idc_get_job 200 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_status 200 job102 ENABLED
+
+prodstub_equal create/prod-ia/job102 1
+
+ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json
+
+
+## Setup prod-ib
+ecs_api_edp_put_type_2 201 type102 testdata/ecs/info-type-2.json
+ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
+
+
+ecs_api_idc_get_type_ids 200 type101 type102 type1 type2 type4 type6
+
+ecs_api_idc_get_type 200 type101 testdata/ecs/info-type-1.json
+
+ecs_api_idc_get_type 200 type102 testdata/ecs/info-type-2.json
+
+ecs_api_edp_get_type_ids 200 type101 type102 type1 type2 type4 type6
+ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json
+ecs_api_edp_get_type_2 200 type102 testdata/ecs/info-type-2.json
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+ecs_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
+
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+
+## Create job for prod-ib
+##  job103 - prod-ib
+ecs_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json  VALIDATE
+
+prodstub_equal create/prod-ib/job103 1
+
+# Check the job data in the producer
+prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_ids 200 type101 NOWNER job101 job102
+ecs_api_idc_get_job_ids 200 type102 NOWNER job103
+ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101
+ecs_api_idc_get_job_ids 200 type101 info-owner-2 job102
+ecs_api_idc_get_job_ids 200 type102 info-owner-3 job103
+
+ecs_api_idc_get_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_status 200 job103 ENABLED
+
+ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json
+ecs_api_edp_get_producer_jobs_2 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template.json
+
+## Setup prod-ic (no types)
+ecs_api_edp_put_producer_2 201 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic NOTYPE
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
+ecs_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
+ecs_api_edp_get_producer_2 200 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic EMPTY
+
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+
+
+## Delete job103 and prod-ib and re-create if different order
+
+# Delete job then producer
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
+
+ecs_api_idc_delete_job 204 job103
+
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
+
+ecs_api_edp_delete_producer 204 prod-ib
+
+ecs_api_edp_get_producer_status 404 prod-ib
+
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e
+
+prodstub_equal delete/prod-ib/job103 1
+
+ecs_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json VALIDATE
+ecs_api_idc_get_job_status 200 job103 DISABLED
+
+# Put producer then job
+ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
+
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+
+ecs_api_idc_put_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template2.json  VALIDATE
+ecs_api_idc_get_job_status 200 job103 ENABLED
+
+prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template2.json
+
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
+
+prodstub_equal create/prod-ib/job103 3
+prodstub_equal delete/prod-ib/job103 1
+
+# Delete only the producer
+ecs_api_edp_delete_producer 204 prod-ib
+
+ecs_api_edp_get_producer_status 404 prod-ib
+
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103  job1 job2 job3 job8 job10
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e
+
+ecs_api_idc_get_job_status 200 job103 DISABLED
+
+cr_equal received_callbacks 7 30
+cr_equal received_callbacks?id=info-job103-status 1
+cr_api_check_all_ecs_events 200 info-job103-status DISABLED
+
+# Re-create the producer
+ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
+
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+
+ecs_api_idc_get_job_status 200 job103 ENABLED
+
+cr_equal received_callbacks 8 30
+cr_equal received_callbacks?id=info-job103-status 2
+cr_api_check_all_ecs_events 200 info-job103-status ENABLED
+
+prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template2.json
+
+## Setup prod-id
+ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json
+ecs_api_edp_put_producer_2 201 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104
+
+ecs_api_idc_get_job_ids 200 type104 NOWNER EMPTY
+
+ecs_api_idc_put_job 201 job108 type104 $TARGET108 info-owner-4 $INFOSTATUS108 testdata/ecs/job-template.json  VALIDATE
+
+prodstub_check_jobdata_3 200 prod-id job108 type104 $TARGET108 info-owner-4 testdata/ecs/job-template.json
+
+prodstub_equal create/prod-id/job108 1
+prodstub_equal delete/prod-id/job108 0
+
+ecs_api_idc_get_job_ids 200 type104 NOWNER job108
+
+ecs_api_idc_get_job_status 200 job108 ENABLED
+
+# Re-PUT the producer with zero types
+ecs_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id NOTYPE
+
+ecs_api_idc_get_job_ids 200 type104 NOWNER job108
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108  job1 job2 job3 job8 job10
+
+ecs_api_idc_get_job_status 200 job108 DISABLED
+
+cr_equal received_callbacks 9 30
+cr_equal received_callbacks?id=info-job108-status 1
+cr_api_check_all_ecs_events 200 info-job108-status DISABLED
+
+prodstub_equal create/prod-id/job108 1
+prodstub_equal delete/prod-id/job108 0
+
+## Re-setup prod-id
+ecs_api_edp_put_type_2 200 type104 testdata/ecs/info-type-4.json
+ecs_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104
+
+ecs_api_idc_get_job_ids 200 type104 NOWNER job108
+ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108 job1 job2 job3 job8 job10
+
+ecs_api_idc_get_job_status 200 job108 ENABLED
+
+ecs_api_edp_get_producer_status 200 prod-ia ENABLED
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+
+cr_equal received_callbacks 10 30
+cr_equal received_callbacks?id=info-job108-status 2
+cr_api_check_all_ecs_events 200 info-job108-status ENABLED
+
+prodstub_equal create/prod-id/job108 2
+prodstub_equal delete/prod-id/job108 0
+
+
+## Setup prod-ie
+ecs_api_edp_put_type_2 201 type106 testdata/ecs/info-type-6.json
+ecs_api_edp_put_producer_2 201 prod-ie $CB_JOB/prod-ie $CB_SV/prod-ie type106
+
+ecs_api_idc_get_job_ids 200 type106 NOWNER EMPTY
+
+ecs_api_idc_put_job 201 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ecs/job-template.json  VALIDATE
+
+prodstub_check_jobdata_3 200 prod-ie job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template.json
+
+prodstub_equal create/prod-ie/job110 1
+prodstub_equal delete/prod-ie/job110 0
+
+ecs_api_idc_get_job_ids 200 type106 NOWNER job110
+
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+## Setup prod-if
+ecs_api_edp_put_type_2 200 type106 testdata/ecs/info-type-6.json
+ecs_api_edp_put_producer_2 201 prod-if $CB_JOB/prod-if $CB_SV/prod-if type106
+
+ecs_api_idc_get_job_ids 200 type106 NOWNER job110
+
+prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template.json
+
+prodstub_equal create/prod-if/job110 1
+prodstub_equal delete/prod-if/job110 0
+
+ecs_api_idc_get_job_ids 200 type106 NOWNER job110
+
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+## Status updates prod-ia and jobs
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if  prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_status 200 prod-ia ENABLED
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+# Arm producer prod-ia for supervision failure
+prodstub_arm_producer 200 prod-ia 400
+
+# Wait for producer prod-ia to go disabled
+ecs_api_edp_get_producer_status 200 prod-ia DISABLED 360
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id  prod-ie prod-if prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_status 200 prod-ia DISABLED
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+
+ecs_api_idc_get_job_status 200 job101 ENABLED
+ecs_api_idc_get_job_status 200 job102 ENABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+# Arm producer prod-ia for supervision
+prodstub_arm_producer 200 prod-ia 200
+
+# Wait for producer prod-ia to go enabled
+ecs_api_edp_get_producer_status 200 prod-ia ENABLED 360
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_status 200 prod-ia ENABLED
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+ecs_api_idc_get_job_status 200 job101 ENABLED
+ecs_api_idc_get_job_status 200 job102 ENABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+# Arm producer prod-ia for supervision failure
+prodstub_arm_producer 200 prod-ia 400
+
+# Wait for producer prod-ia to go disabled
+ecs_api_edp_get_producer_status 200 prod-ia DISABLED 360
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_status 200 prod-ia DISABLED
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+ecs_api_idc_get_job_status 200 job101 ENABLED
+ecs_api_idc_get_job_status 200 job102 ENABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+# Wait for producer prod-ia to be removed
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    ecs_equal json:data-producer/v1/info-producers 9 1000
+else
+    ecs_equal json:ei-producer/v1/eiproducers 9 1000
+fi
+
+ecs_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
+
+
+ecs_api_edp_get_producer_status 404 prod-ia
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+ecs_api_idc_get_job_status 200 job101 DISABLED
+ecs_api_idc_get_job_status 200 job102 DISABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+cr_equal received_callbacks 12 30
+cr_equal received_callbacks?id=info-job101-status 1
+cr_equal received_callbacks?id=info-job102-status 1
+
+cr_api_check_all_ecs_events 200 info-job101-status DISABLED
+cr_api_check_all_ecs_events 200 info-job102-status DISABLED
+
+
+# Arm producer prod-ie for supervision failure
+prodstub_arm_producer 200 prod-ie 400
+
+ecs_api_edp_get_producer_status 200 prod-ie DISABLED 1000
+
+ecs_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
+
+ecs_api_edp_get_producer_status 404 prod-ia
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie DISABLED
+ecs_api_edp_get_producer_status 200 prod-if ENABLED
+
+ecs_api_idc_get_job_status 200 job101 DISABLED
+ecs_api_idc_get_job_status 200 job102 DISABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+#Disable create for job110 in prod-ie
+prodstub_arm_job_create 200 prod-ie job110 400
+
+#Update tjob 10 - only prod-if will be updated
+ecs_api_idc_put_job 200 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ecs/job-template2.json  VALIDATE
+#Reset producer and job responses
+prodstub_arm_producer 200 prod-ie 200
+prodstub_arm_job_create 200 prod-ie job110 200
+
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED 360
+
+ecs_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
+
+#Wait for job to be updated
+sleep_wait 120
+
+prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template2.json
+
+prodstub_arm_producer 200 prod-if 400
+
+ecs_api_edp_get_producer_status 200 prod-if DISABLED 360
+
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    ecs_equal json:data-producer/v1/info-producers 8 1000
+else
+    ecs_equal json:ei-producer/v1/eiproducers 8 1000
+fi
+
+ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-b prod-c prod-d prod-e
+
+ecs_api_edp_get_producer_status 404 prod-ia
+ecs_api_edp_get_producer_status 200 prod-ib ENABLED
+ecs_api_edp_get_producer_status 200 prod-ic ENABLED
+ecs_api_edp_get_producer_status 200 prod-id ENABLED
+ecs_api_edp_get_producer_status 200 prod-ie ENABLED
+ecs_api_edp_get_producer_status 404 prod-if
+
+ecs_api_idc_get_job_status 200 job101 DISABLED
+ecs_api_idc_get_job_status 200 job102 DISABLED
+ecs_api_idc_get_job_status 200 job103 ENABLED
+ecs_api_idc_get_job_status 200 job108 ENABLED
+ecs_api_idc_get_job_status 200 job110 ENABLED
+
+cr_equal received_callbacks 12
+
+### Test of pre and post validation
+
+ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106
+ecs_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE
+ecs_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ecs/job-template.json
+
+ecs_api_idc_get_job_status 404 job150
+ecs_api_idc_get_job_status 200 job160 DISABLED 60
+
+prodstub_arm_producer 200 prod-ig
+prodstub_arm_job_create 200 prod-ig job150
+prodstub_arm_job_create 200 prod-ig job160
+
+ecs_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE
+ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360
+
+ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY
+
+ecs_api_idc_get_job_status 404 job150
+ecs_api_idc_get_job_status 200 job160 DISABLED 60
+
+prodstub_arm_type 200 prod-ig type160
+
+ecs_api_edp_put_type_2 201 type160 testdata/ecs/info-type-60.json
+ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160
+
+ecs_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160
+ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360
+ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160
+
+ecs_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE
+
+ecs_api_idc_get_job_status 404 job150
+ecs_api_idc_get_job_status 200 job160 ENABLED 60
+
+prodstub_check_jobdata_3 200 prod-ig job160 type160 $TARGET160 info-owner-1 testdata/ecs/job-template.json
+
+prodstub_equal create/prod-ig/job160 1
+prodstub_equal delete/prod-ig/job160 0
+
+prodstub_arm_type 200 prod-ig type150
+
+ecs_api_edp_put_type_2 201 type150 testdata/ecs/info-type-50.json
+ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160 type150
+
+ecs_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150
+ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360
+
+ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150
+
+ecs_api_idc_get_job_status 404 job150
+ecs_api_idc_get_job_status 200 job160 ENABLED
+
+ecs_api_idc_put_job 201 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE
+
+ecs_api_idc_get_job_status 200 job150 ENABLED 60
+ecs_api_idc_get_job_status 200 job160 ENABLED
+
+cr_equal received_callbacks 12
+
 check_ecs_logs
 
 store_logs END
@@ -1037,4 +1733,4 @@ store_logs END
 
 print_result
 
-auto_clean_environment
+auto_clean_environment
\ No newline at end of file
index 01f0178..fd50bc9 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 
-TC_ONELINE_DESCR="ECS Create 10000 jobs and restart, test job persistency"
+TC_ONELINE_DESCR="ECS Create 10000 jobs (ei and info) restart, test job persistency"
 
 #App names to include in the test when running docker, space separated list
 DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR CP NGW"
@@ -83,6 +83,12 @@ TARGET="http://localhost:80/target"  # Dummy target
 
 NUM_JOBS=10000
 
+use_info_jobs=false  #Set flag if interface supporting info-types is used
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    use_info_jobs=true
+    NUM_JOBS=5000 # 5K ei jobs and 5K info jobs
+fi
+
 # Setup prodstub sim to accept calls for producers, types and jobs
 prodstub_arm_producer 200 prod-a
 prodstub_arm_producer 200 prod-b
@@ -123,6 +129,48 @@ 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
+
+
 if [ $ECS_VERSION == "V1-1" ]; then
 
     ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json
@@ -148,9 +196,29 @@ else
     ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
 
     ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
+
+    if [ $use_info_jobs ]; then
+        ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json
+        ecs_api_edp_put_type_2 201 type102 testdata/ecs/info-type-2.json
+        ecs_api_edp_put_type_2 201 type103 testdata/ecs/info-type-3.json
+        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
+
+        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
+
+        ecs_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
+
+        ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
+    fi
 fi
 
-ecs_equal json:ei-producer/v1/eiproducers 4
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-producer/v1/info-producers 4
+else
+    ecs_equal json:ei-producer/v1/eiproducers 4
+fi
 
 ecs_api_edp_get_producer_status 200 prod-a ENABLED
 ecs_api_edp_get_producer_status 200 prod-b ENABLED
@@ -166,6 +234,10 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 1 ]; then
         ecs_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
@@ -174,6 +246,10 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 2 ]; then
         ecs_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
@@ -182,6 +258,10 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 3 ]; then
         ecs_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
@@ -190,6 +270,10 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 4 ]; then
         ecs_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
@@ -198,6 +282,10 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
 done
 
@@ -209,10 +297,17 @@ if [  -z "$FLAT_A1_EI" ]; then
     ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
 else
     ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
+fi
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
 fi
 
 stop_ecs
@@ -227,19 +322,37 @@ 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
     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
     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
     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
     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
     fi
 done
 
@@ -256,6 +369,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i DISABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 1 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -263,6 +379,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i DISABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 2 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -270,6 +389,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i DISABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 3 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -277,6 +399,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i DISABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 4 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -284,6 +409,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i DISABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
+        fi
     fi
 done
 
@@ -298,17 +426,31 @@ if [ $ECS_VERSION == "V1-1" ]; then
     ecs_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json type5 testdata/ecs/ei-type-5.json
 
 else
-    ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+    if [ $use_info_jobs ]; then
+        ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1  type101
 
-    ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
+        ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2  type101 type102
 
-    ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
+        ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3  type101 type102 type103
 
-    ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
+        ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5  type104 type105
+    else
+        ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
+
+        ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
+
+        ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
+
+        ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
+    fi
 
 fi
 
-ecs_equal json:ei-producer/v1/eiproducers 4
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-producer/v1/info-producers 4
+else
+    ecs_equal json:ei-producer/v1/eiproducers 4
+fi
 
 ecs_api_edp_get_producer_status 200 prod-a ENABLED
 ecs_api_edp_get_producer_status 200 prod-b ENABLED
@@ -323,6 +465,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 1 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -330,6 +475,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 2 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -337,6 +485,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 3 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -344,6 +495,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
     if [ $(($i%5)) -eq 4 ]; then
         if [  -z "$FLAT_A1_EI" ]; then
@@ -351,6 +505,9 @@ do
         else
             ecs_api_a1_get_job_status 200 job$i ENABLED 120
         fi
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
+        fi
     fi
 done
 
@@ -363,10 +520,18 @@ if [  -z "$FLAT_A1_EI" ]; then
     ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
 else
     ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
+fi
+
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
 fi
 
 for ((i=1; i<=$NUM_JOBS; i++))
@@ -377,9 +542,20 @@ do
             prodstub_check_jobdata 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
             prodstub_check_jobdata 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
         else
-            prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
-            prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
-            prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+            if [ $use_info_jobs ]; then
+                prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+            else
+                prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/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/ecs/job-template.json
+            prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json
+            prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json
         fi
 
     fi
@@ -388,29 +564,59 @@ do
             prodstub_check_jobdata 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
             prodstub_check_jobdata 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
         else
-            prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
-            prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
+            if [ $use_info_jobs ]; then
+                prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
+            else
+                prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
+                prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/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/ecs/job-template.json
+            prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ecs/job-template.json
         fi
     fi
     if [ $(($i%5)) -eq 2 ]; then
         if [ $ECS_VERSION == "V1-1" ]; then
             prodstub_check_jobdata 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
         else
-            prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
+            if [ $use_info_jobs ]; then
+                prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
+            else
+                prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/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/ecs/job-template.json
         fi
     fi
     if [ $(($i%5)) -eq 3 ]; then
         if [ $ECS_VERSION == "V1-1" ]; then
             prodstub_check_jobdata 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
         else
-            prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
+            if [ $use_info_jobs ]; then
+                prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
+            else
+                prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/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/ecs/job-template.json
         fi
     fi
     if [ $(($i%5)) -eq 4 ]; then
         if [ $ECS_VERSION == "V1-1" ]; then
             prodstub_check_jobdata 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
         else
-            prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
+            if [ $use_info_jobs ]; then
+                prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
+            else
+                prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/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/ecs/job-template.json
         fi
     fi
 done
@@ -420,22 +626,41 @@ for ((i=1; i<=$NUM_JOBS; i++))
 do
     if [ $(($i%5)) -eq 0 ]; then
         ecs_api_a1_delete_job 204 job$i
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
+        fi
     fi
     if [ $(($i%5)) -eq 1 ]; then
         ecs_api_a1_delete_job 204 job$i
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
+        fi
     fi
     if [ $(($i%5)) -eq 2 ]; then
         ecs_api_a1_delete_job 204 job$i
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
+        fi
     fi
     if [ $(($i%5)) -eq 3 ]; then
         ecs_api_a1_delete_job 204 job$i
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
+        fi
     fi
     if [ $(($i%5)) -eq 4 ]; then
         ecs_api_a1_delete_job 204 job$i
+        if [ $use_info_jobs ]; then
+            ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
+        fi
     fi
 done
 
-ecs_equal json:ei-producer/v1/eiproducers 4
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-producer/v1/info-producers 4
+else
+    ecs_equal json:ei-producer/v1/eiproducers 4
+fi
 
 ecs_api_edp_get_producer_status 200 prod-a ENABLED
 ecs_api_edp_get_producer_status 200 prod-b ENABLED
@@ -450,10 +675,18 @@ if [  -z "$FLAT_A1_EI" ]; then
     ecs_equal json:A1-EI/v1/eitypes/type5/eijobs 0
 else
     ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
-    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0
+    ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0
+fi
+
+if [ $use_info_jobs ]; then
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0
+    ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
 fi
 
 check_ecs_logs
@@ -465,4 +698,4 @@ store_logs END
 
 print_result
 
-auto_clean_environment
+auto_clean_environment
\ No newline at end of file
index ab48c6e..28926cb 100755 (executable)
@@ -223,7 +223,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    fi
 fi
 
 
@@ -239,7 +243,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    fi
 fi
 
 # Arm producer prod-a for supervision failure
@@ -248,7 +256,12 @@ prodstub_arm_producer 200 prod-a 400
 # Wait for producer prod-a to go disabled
 ecs_api_edp_get_producer_status 200 prod-a DISABLED 360
 
-ecs_equal json:ei-producer/v1/eiproducers 0 1000
+if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+    ecs_equal json:data-producer/v1/info-producers 0 1000
+else
+    ecs_equal json:ei-producer/v1/eiproducers 0 1000
+fi
+
 
 echo -e $YELLOW"Verify that ECS has send status notification to the callback recevier"$EYELLOW
 echo -e $YELLOW"and check the source of the call in the log to be from the httpproxy"$EYELLOW
index 4343bea..d1910d2 100755 (executable)
@@ -373,7 +373,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    fi
 fi
 
 stop_ecs
index 6f866fb..d770bfb 100755 (executable)
@@ -127,6 +127,11 @@ set_agent_trace
 
 set_ecs_trace
 
+use_info_jobs=false  #Set flag if interface supporting info-types is used
+if [[ "$ECS_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"
@@ -241,7 +246,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    if [ $use_info_jobs ]; then
+        prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json
+    fi
 fi
 
 
@@ -257,7 +266,11 @@ fi
 if [ $ECS_VERSION == "V1-1" ]; then
     prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
 else
-    prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    if [ $use_info_jobs ]; then
+        prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    else
+        prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json
+    fi
 fi
 
 check_policy_agent_logs
diff --git a/test/auto-test/testdata/ecs/info-type-1.json b/test/auto-test/testdata/ecs/info-type-1.json
new file mode 100644 (file)
index 0000000..14103dd
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType1_1.0.0",
+    "description": "Info-Type 1",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-2.json b/test/auto-test/testdata/ecs/info-type-2.json
new file mode 100644 (file)
index 0000000..88a57f9
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType2_1.0.0",
+    "description": "Info-Type 2",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-3.json b/test/auto-test/testdata/ecs/info-type-3.json
new file mode 100644 (file)
index 0000000..a794266
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType3_1.0.0",
+    "description": "Info-Type 3",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-4.json b/test/auto-test/testdata/ecs/info-type-4.json
new file mode 100644 (file)
index 0000000..2ea9e0e
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType4_1.0.0",
+    "description": "Info-Type 4",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-5.json b/test/auto-test/testdata/ecs/info-type-5.json
new file mode 100644 (file)
index 0000000..6b92560
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType5_1.0.0",
+    "description": "Info-Type 5",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-50.json b/test/auto-test/testdata/ecs/info-type-50.json
new file mode 100644 (file)
index 0000000..8f635b8
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType50_1.0.0",
+    "description": "Info-Type 50",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-6.json b/test/auto-test/testdata/ecs/info-type-6.json
new file mode 100644 (file)
index 0000000..7e13a32
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType6_1.0.0",
+    "description": "Info-Type 6",
+    "type": "object"
+}
\ No newline at end of file
diff --git a/test/auto-test/testdata/ecs/info-type-60.json b/test/auto-test/testdata/ecs/info-type-60.json
new file mode 100644 (file)
index 0000000..50f3aff
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "title": "STD_InfoType60_1.0.0",
+    "description": "Info-Type 60",
+    "type": "object"
+}
\ No newline at end of file
index dd64c42..65f20cc 100644 (file)
@@ -1165,7 +1165,7 @@ To test, provide all the specified parameters.
 | `<template-job-file>` | Path to a job template for job parameters of the job  |
 
 ## Function: ecs_api_edp_get_type_ids() ##
-Test of GET '/ei-producer/v1/eitypes' and an optional check of the returned list of type ids.
+Test of GET '/ei-producer/v1/eitypes' or '/data-producer/v1/info-types' depending on ecs version and an optional check of the returned list of type ids.
 To test the response code only, provide the response code.
 To also test the response payload add list of expected type ids (or EMPTY if the list is expected to be empty).
 
@@ -1176,11 +1176,11 @@ To also test the response payload add list of expected type ids (or EMPTY if the
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<type-id>` | Id of the EI type  |
+| `<type-id>` | Id of the type  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
 ## Function: ecs_api_edp_get_producer_status() ##
-Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/status' and optional check of the returned status.
+Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/status' or '/data-producer/v1/info-producers/{infoProducerId}/status' depending on ecs version and optional check of the returned status.
 To test the response code only, provide the response code and producer id.
 To also test the response payload add the expected status.
 
@@ -1209,6 +1209,23 @@ To also test the response payload add the list of expected producer-ids (or EMPT
 | `<producer-id>` | Id of the producer  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
+## Function: ecs_api_edp_get_producer_ids_2() ##
+Test of GET '/ei-producer/v1/eiproducers' or '/data-producer/v1/info-producers' depending on ecs version and optional check of the returned producer ids.
+To test the response code only, provide the response.
+To also test the response payload add the type (if any) and a list of expected producer-ids (or EMPTY if the list of ids is expected to be empty).
+
+| arg list |
+|--|
+| `<response-code> [ ( NOTYPE | <type-id> ) [ EMPTY | <producer-id>+]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the type  |
+| `EMPTY` | No type given  |
+| `<producer-id>` | Id of the producer  |
+| `EMPTY` | The expected list of type ids shall be empty  |
+
 ## Function: ecs_api_edp_get_type() ##
 Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' and optional check of the returned type.
 To test the response code only, provide the response and the type-id.
@@ -1221,11 +1238,53 @@ To also test the response payload add a path to a job schema file and a list exp
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<type-id>` | Id of the EI type  |
+| `<type-id>` | Id of the type  |
 | `<job-schema-file>` | Path to a job schema file  |
 | `<producer-id>` | Id of the producer  |
 | `EMPTY` | The expected list of type ids shall be empty  |
 
+## Function: ecs_api_edp_get_type_2() ##
+Test of GET '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ecs version and optional check of the returned type.
+To test the response code only, provide the response and the type-id.
+To also test the response payload add a path to a job schema file.
+
+| arg list |
+|--|
+| `<response-code> <type-id> [<job-schema-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the type  |
+| `<job-schema-file>` | Path to a job schema file  |
+| `EMPTY` | The expected list of type ids shall be empty  |
+
+## Function: ecs_api_edp_put_type_2() ##
+Test of PUT '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ecs version and optional check of the returned type.
+
+| arg list |
+|--|
+| `<response-code> <type-id> [<job-schema-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the type  |
+| `<job-schema-file>` | Path to a job schema file  |
+| `EMPTY` | The expected list of type ids shall be empty  |
+
+## Function: ecs_api_edp_delete_type_2() ##
+Test of DELETE '/ei-producer/v1/eitypes/{eiTypeId}' or '/data-producer/v1/info-types/{infoTypeId}' depending on ecs version and optional check of the returned type.
+
+| arg list |
+|--|
+| `<response-code> <type-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the type  |
+
 ## Function: ecs_api_edp_get_producer() ##
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' and optional check of the returned producer.
 To test the response code only, provide the response and the producer-id.
@@ -1242,12 +1301,31 @@ To also test the response payload add the remaining parameters defining thee pro
 | `<create-callback>` | Callback for create job  |
 | `<delete-callback>` | Callback for delete job  |
 | `<supervision-callback>` | Callback for producer supervision  |
-| `<type-id>` | Id of the EI type  |
+| `<type-id>` | Id of the type  |
 | `<schema-file>` | Path to a schema file  |
 | `EMPTY` | The expected list of type schema pairs shall be empty  |
 
+
+## Function: ecs_api_edp_get_producer_2() ##
+Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ecs version and optional check of the returned producer.
+To test the response code only, provide the response and the producer-id.
+To also test the response payload add the remaining parameters defining thee producer.
+
+| arg list |
+|--|
+| `<response-code> <producer-id> [<job-callback> <supervision-callback> (EMPTY | <type-id>+) ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<producer-id>` | Id of the producer  |
+| `<job-callback>` | Callback for the url  |
+| `<supervision-callback>` | Callback for producer supervision  |
+| `<type-id>` | Id of the type  |
+| `EMPTY` | The expected list of types shall be empty  |
+
 ## Function: ecs_api_edp_delete_producer() ##
-Test of DELETE '/ei-producer/v1/eiproducers/{eiProducerId}'.
+Test of DELETE '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ecs version.
 To test, provide all parameters.
 
 | arg list |
@@ -1273,10 +1351,27 @@ To test, provide all parameters. The list of type/schema pair may be empty.
 | `<producer-id>` | Id of the producer  |
 | `<job-callback>` | Callback for create/delete job  |
 | `<supervision-callback>` | Callback for producer supervision  |
-| `<type-id>` | Id of the EI type  |
+| `<type-id>` | Id of the type  |
 | `<schema-file>` | Path to a schema file  |
 | `EMPTY` | The list of type/schema pairs is empty  |
 
+## Function: ecs_api_edp_put_producer_2() ##
+Test of PUT '/ei-producer/v1/eiproducers/{eiProducerId}' or '/data-producer/v1/info-producers/{infoProducerId}' depending on ecs version.
+To test, provide all parameters. The list of type/schema pair may be empty.
+
+| arg list |
+|--|
+| `<response-code> <producer-id> <job-callback> <supervision-callback> NOTYPE|[<type-id>+]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<producer-id>` | Id of the producer  |
+| `<job-callback>` | Callback for create/delete job  |
+| `<supervision-callback>` | Callback for producer supervision  |
+| `<type-id>` | Id of the type  |
+| `NOTYPE` | The list of types is empty  |
+
 ## Function: ecs_api_edp_get_producer_jobs() ##
 Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' and optional check of the returned producer job.
 To test the response code only, provide the response and the producer-id.
@@ -1297,6 +1392,26 @@ To also test the response payload add the remaining parameters.
 | `<template-job-file>` | Path to a job template file  |
 | `EMPTY` | The list of job/type/target/job-file tuples is empty  |
 
+## Function: ecs_api_edp_get_producer_jobs_2() ##
+Test of GET '/ei-producer/v1/eiproducers/{eiProducerId}/eijobs' or '/data-producer/v1/info-producers/{infoProducerId}/info-jobs' depending on ecs version and optional check of the returned producer job.
+To test the response code only, provide the response and the producer-id.
+To also test the response payload add the remaining parameters.
+
+| arg list |
+|--|
+| `<response-code> <producer-id> (EMPTY | [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<producer-id>` | Id of the producer  |
+| `<job-id>` | Id of the job  |
+| `<type-id>` | Id of the type  |
+| `<target-url>` | Target url for data delivery  |
+| `<job-owner>` | Id of the job owner  |
+| `<template-job-file>` | Path to a job template file  |
+| `EMPTY` | The list of job/type/target/job-file tuples is empty  |
+
 ## Function: ecs_api_service_status() ##
 Test of GET '/status'.
 
@@ -1308,6 +1423,121 @@ Test of GET '/status'.
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
 
+## Function: ecs_api_idc_get_type_ids() ##
+Test of GET '/data-consumer/v1/info-types' and an optional check of the returned list of type ids.
+To test the response code only, provide the response code.
+To also test the response payload add list of expected type ids (or EMPTY if the list is expected to be empty).
+
+| arg list |
+|--|
+| `<response-code> [ EMPTY | <type-id>+]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `EMPTY` | The expected list of type ids shall be empty  |
+
+## Function: ecs_api_idc_get_job_ids() ##
+Test of GET '/data-consumer/v1/info-jobs' and optional check of the array of returned job ids.
+To test the response code only, provide the response code parameter as well as a type id and an owner id.
+To also test the response payload add the 'EMPTY' for an expected empty array or repeat the last parameter for each expected job id.
+
+| arg list |
+|--|
+| `<response-code> <type-id>  <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `<owner-id>` | Id of the job owner  |
+| `NOOWNER` | No owner is given  |
+| `<job-id>` | Id of the expected job  |
+| `EMPTY` | The expected list of job id shall be empty  |
+
+## Function: ecs_api_idc_get_job() ##
+Test of GET '/data-consumer/v1/info-jobs/{infoJobId}' and optional check of the returned job.
+To test the response code only, provide the response code, type id and job id.
+To also test the response payload add the remaining parameters.
+
+| arg list |
+|--|
+| `<response-code> <type-id> <job-id> [<target-url> <owner-id> <template-job-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `<job-id>` | Id of the job  |
+| `<target-url>` | Expected target url for the job  |
+| `<owner-id>` | Expected owner for the job  |
+| `<template-job-file>` | Path to a job template for job parameters of the job  |
+
+## Function: ecs_api_idc_put_job() ##
+Test of PUT '​/data-consumer/v1/info-jobs/{infoJobId}'.
+To test, provide all the specified parameters.
+
+| arg list |
+|--|
+| `<response-code> <type-id> <job-id> <target-url> <owner-id> <template-job-file> [VALIDATE]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `<job-id>` | Id of the job  |
+| `<target-url>` | Target url for the job  |
+| `<owner-id>` | Owner of the job  |
+| `<template-job-file>` | Path to a job template for job parameters of the job  |
+| `VALIIDATE` | Indicator to preform type validation at creation  |
+
+## Function: ecs_api_idc_delete_job() ##
+Test of DELETE '/A1-EI​/v1​/eitypes​/{eiTypeId}​/eijobs​/{eiJobId}'.
+To test, provide all the specified parameters.
+
+| arg list |
+|--|
+| `<response-code> <type-id> <job-id> |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the type  |
+| `<job-id>` | Id of the job  |
+
+## Function: ecs_api_idc_get_type() ##
+Test of GET '/data-consumer/v1/info-types/{infoTypeId} and optional check of the returned schema.
+To test the response code only, provide the response code parameter as well as the type-id.
+To also test the response payload add a path to the expected schema file.
+
+| arg list |
+|--|
+| `<response-code> <type-id> [<schema-file>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `<schema-file>` | Path to a schema file to compare with the returned schema  |
+
+## Function: ecs_api_idc_get_job_status() ##
+Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' and optional check of the returned status.
+To test the response code only, provide the response code, type id and job id.
+To also test the response payload add the expected status.
+
+| arg list |
+|--|
+| `<response-code> <type-id> <job-id> [<status>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<type-id>` | Id of the Info type  |
+| `<job-id>` | Id of the job  |
+| `<status>` | Expected status  |
+
+
 ## Function: ecs_api_admin_reset() ##
 Test of GET '/status'.
 
@@ -1364,7 +1594,7 @@ Sample test of pms api (status)
 | `<response-code>` | Expected http response code |
 
 ## Function: gateway_ecs_get_types ##
-Sample test of ecs api (get ei type)
+Sample test of ecs api (get types)
 Only response code tested - not payload
 | arg list |
 |--|
@@ -1591,6 +1821,40 @@ Check a job in the prodstub towards the list of provided parameters.
 | `<job-owner>` | Id of the job owner  |
 | `<template-job-file>` | Path to a job template file  |
 
+## Function: prodstub_check_jobdata_2() ##
+Check a job in the prodstub towards the list of provided parameters.
+
+| arg list |
+|--|
+| `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<producer-id>` | Id of the producer  |
+| `<job-id>` | Id of the job  |
+| `<type-id>` | Id of the type  |
+| `<target-url>` | Target url for data delivery  |
+| `<job-owner>` | Id of the job owner  |
+| `<template-job-file>` | Path to a job template file  |
+
+## Function: prodstub_check_jobdata_3() ##
+Check a job in the prodstub towards the list of provided parameters.
+
+| arg list |
+|--|
+| `<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<producer-id>` | Id of the producer  |
+| `<job-id>` | Id of the job  |
+| `<type-id>` | Id of the type  |
+| `<target-url>` | Target url for data delivery  |
+| `<job-owner>` | Id of the job owner  |
+| `<template-job-file>` | Path to a job template file  |
+
 ## Function: prodstub_delete_jobdata() ##
 Delete the job parameters, job data, for a job.
 
index 82dde44..2a2f8a7 100644 (file)
@@ -2124,7 +2124,7 @@ api_put_configuration() {
         return 1
     fi
        if [ ! -f $2 ]; then
-               _log_test_fail_general "Config file "$2", does not exist"
+               __log_test_fail_general "Config file "$2", does not exist"
                return 1
        fi
        inputJson=$(< $2)
@@ -2160,7 +2160,7 @@ api_get_configuration() {
         return 1
     fi
        if [ ! -f $2 ]; then
-               _log_test_fail_general "Config file "$2" for comparison, does not exist"
+               __log_test_fail_general "Config file "$2" for comparison, does not exist"
                return 1
        fi
 
index cf5f580..3edb88d 100644 (file)
@@ -806,7 +806,7 @@ ecs_api_a1_get_job() {
                                jobfile=$(cat $6)
                                jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
                        else
-                               _log_test_fail_general "Job template file "$6", does not exist"
+                               __log_test_fail_general "Job template file "$6", does not exist"
                                return 1
                        fi
                        targetJson="{\"targetUri\": \"$4\",\"jobOwner\": \"$5\",\"jobParameters\": $jobfile}"
@@ -826,7 +826,7 @@ ecs_api_a1_get_job() {
                                jobfile=$(cat $7)
                                jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
                        else
-                               _log_test_fail_general "Job template file "$6", does not exist"
+                               __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}"
@@ -894,7 +894,7 @@ ecs_api_a1_put_job() {
                        jobfile=$(cat $6)
                        jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
                else
-                       _log_test_fail_general "Job template file "$6", does not exist"
+                       __log_test_fail_general "Job template file "$6", does not exist"
                        return 1
                fi
 
@@ -913,7 +913,7 @@ ecs_api_a1_put_job() {
                        jobfile=$(cat $7)
                        jobfile=$(echo "$jobfile" | sed "s/XXXX/$2/g")
                else
-                       _log_test_fail_general "Job template file "$7", does not exist"
+                       __log_test_fail_general "Job template file "$7", does not exist"
                        return 1
                fi
 
@@ -943,6 +943,7 @@ ecs_api_a1_put_job() {
 # Function prefix: ecs_api_edp
 
 # API Test function: GET /ei-producer/v1/eitypes
+# API Test function: GET /data-producer/v1/info-types
 # args: <response-code> [ EMPTY | <type-id>+]
 # (Function for test scripts)
 ecs_api_edp_get_type_ids() {
@@ -952,8 +953,11 @@ ecs_api_edp_get_type_ids() {
                __print_err "<response-code> [ EMPTY | <type-id>+]" $@
                return 1
        fi
-
-       query="/ei-producer/v1/eitypes"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-types"
+       else
+               query="/ei-producer/v1/eitypes"
+       fi
     res="$(__do_curl_to_api ECS GET $query)"
     status=${res:${#res}-3}
 
@@ -988,6 +992,7 @@ ecs_api_edp_get_type_ids() {
 }
 
 # API Test function: GET /ei-producer/v1/eiproducers/{eiProducerId}/status
+# API Test function: GET /data-producer/v1/info-producers/{infoProducerId}/status
 # args: <response-code> <producer-id> [<status> [<timeout>]]
 # (Function for test scripts)
 ecs_api_edp_get_producer_status() {
@@ -997,8 +1002,11 @@ ecs_api_edp_get_producer_status() {
                __print_err "<response-code> <producer-id> [<status> [<timeout>]]" $@
                return 1
        fi
-
-       query="/ei-producer/v1/eiproducers/$2/status"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-producers/$2/status"
+       else
+               query="/ei-producer/v1/eiproducers/$2/status"
+       fi
        start=$SECONDS
        for (( ; ; )); do
                res="$(__do_curl_to_api ECS GET $query)"
@@ -1097,6 +1105,7 @@ ecs_api_edp_get_producer_ids() {
 }
 
 # API Test function: GET /ei-producer/v1/eiproducers
+# API Test function: GET /data-producer/v1/info-producers
 # args (v1_2): <response-code> [ ( NOTYPE | <type-id> ) [ EMPTY | <producer-id>+] ]
 # (Function for test scripts)
 ecs_api_edp_get_producer_ids_2() {
@@ -1106,10 +1115,16 @@ ecs_api_edp_get_producer_ids_2() {
                __print_err "<response-code> [ ( NOTYPE | <type-id> ) [ EMPTY | <producer-id>+] ]" $@
                return 1
        fi
-
-       query="/ei-producer/v1/eiproducers"
-       if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
-               query=$query"?ei_type_id=$2"
+    if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-producers"
+               if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
+                       query=$query"?info_type_id=$2"
+               fi
+       else
+               query="/ei-producer/v1/eiproducers"
+               if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
+                       query=$query"?ei_type_id=$2"
+               fi
        fi
     res="$(__do_curl_to_api ECS GET $query)"
     status=${res:${#res}-3}
@@ -1206,6 +1221,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> ]
 # (Function for test scripts)
 ecs_api_edp_get_type_2() {
@@ -1222,8 +1238,12 @@ ecs_api_edp_get_type_2() {
                __print_err "<response-code> <type-id> [<job-schema-file> ]" $@
                return 1
        fi
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-types/$2"
+       else
+               query="/ei-producer/v1/eitypes/$2"
+       fi
 
-       query="/ei-producer/v1/eitypes/$2"
     res="$(__do_curl_to_api ECS GET $query)"
     status=${res:${#res}-3}
 
@@ -1240,8 +1260,11 @@ ecs_api_edp_get_type_2() {
                        __log_test_fail_general "Job template file "$3", does not exist"
                        return 1
                fi
-
-               targetJson="{\"ei_job_data_schema\":$schema}"
+               if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+                       targetJson="{\"info_job_data_schema\":$schema}"
+               else
+                       targetJson="{\"ei_job_data_schema\":$schema}"
+               fi
 
                echo " TARGET JSON: $targetJson" >> $HTTPLOG
                res=$(python3 ../common/compare_json.py "$targetJson" "$body")
@@ -1256,6 +1279,7 @@ 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>
 # (Function for test scripts)
 ecs_api_edp_put_type_2() {
@@ -1270,12 +1294,21 @@ ecs_api_edp_put_type_2() {
                __log_test_fail_general "Job schema file "$3", does not exist"
                return 1
        fi
-       schema=$(cat $3)
-       input_json="{\"ei_job_data_schema\":$schema}"
-       file="./tmp/put_type.json"
-       echo $input_json > $file
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               schema=$(cat $3)
+               input_json="{\"info_job_data_schema\":$schema}"
+               file="./tmp/put_type.json"
+               echo $input_json > $file
 
-       query="/ei-producer/v1/eitypes/$2"
+               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
     res="$(__do_curl_to_api ECS PUT $query $file)"
     status=${res:${#res}-3}
 
@@ -1289,6 +1322,7 @@ ecs_api_edp_put_type_2() {
 }
 
 # API Test function: DELETE /ei-producer/v1/eitypes/{eiTypeId}
+# API Test function: DELETE /data-producer/v1/info-types/{infoTypeId}
 # args: (v1_2) <response-code> <type-id>
 # (Function for test scripts)
 ecs_api_edp_delete_type_2() {
@@ -1299,7 +1333,11 @@ ecs_api_edp_delete_type_2() {
                return 1
        fi
 
-       query="/ei-producer/v1/eitypes/$2"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-types/$2"
+       else
+               query="/ei-producer/v1/eitypes/$2"
+       fi
     res="$(__do_curl_to_api ECS DELETE $query)"
     status=${res:${#res}-3}
 
@@ -1357,7 +1395,7 @@ ecs_api_edp_get_producer() {
                                if [ -f ${arr[$i+1]} ]; then
                                        schema=$(cat ${arr[$i+1]})
                                else
-                                       _log_test_fail_general "Schema file "${arr[$i+1]}", does not exist"
+                                       __log_test_fail_general "Schema file "${arr[$i+1]}", does not exist"
                                        return 1
                                fi
 
@@ -1382,6 +1420,7 @@ ecs_api_edp_get_producer() {
 }
 
 # API Test function: GET /ei-producer/v1/eiproducers/{eiProducerId}
+# API Test function: GET /data-producer/v1/info-producers/{infoProducerId}
 # args (v1_2): <response-code> <producer-id> [<job-callback> <supervision-callback> (EMPTY | <type-id>+) ]
 # (Function for test scripts)
 ecs_api_edp_get_producer_2() {
@@ -1403,8 +1442,11 @@ ecs_api_edp_get_producer_2() {
                __print_err "<response-code> <producer-id> [<job-callback> <supervision-callback> (EMPTY | <type-id>+) ]" $@
                return 1
        fi
-
-       query="/ei-producer/v1/eiproducers/$2"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-producers/$2"
+       else
+               query="/ei-producer/v1/eiproducers/$2"
+       fi
     res="$(__do_curl_to_api ECS GET $query)"
     status=${res:${#res}-3}
 
@@ -1427,7 +1469,11 @@ ecs_api_edp_get_producer_2() {
                fi
                targetJson=$targetJson"]"
                if [ $# -gt 4 ]; then
-                       targetJson="{\"supported_ei_types\":$targetJson,\"ei_job_callback_url\": \"$3\",\"ei_producer_supervision_callback_url\": \"$4\"}"
+                       if [[ "$ECS_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
                fi
                echo " TARGET JSON: $targetJson" >> $HTTPLOG
                res=$(python3 ../common/compare_json.py "$targetJson" "$body")
@@ -1443,6 +1489,7 @@ ecs_api_edp_get_producer_2() {
 }
 
 # API Test function: DELETE /ei-producer/v1/eiproducers/{eiProducerId}
+# API Test function: DELETE /data-producer/v1/info-producers/{infoProducerId}
 # args: <response-code> <producer-id>
 # (Function for test scripts)
 ecs_api_edp_delete_producer() {
@@ -1452,8 +1499,11 @@ ecs_api_edp_delete_producer() {
                __print_err "<response-code> <producer-id>" $@
                return 1
        fi
-
-       query="/ei-producer/v1/eiproducers/$2"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-producers/$2"
+       else
+               query="/ei-producer/v1/eiproducers/$2"
+       fi
     res="$(__do_curl_to_api ECS DELETE $query)"
     status=${res:${#res}-3}
 
@@ -1494,7 +1544,7 @@ ecs_api_edp_put_producer() {
                        if [ -f ${arr[$i+1]} ]; then
                                schema=$(cat ${arr[$i+1]})
                        else
-                               _log_test_fail_general "Schema file "${arr[$i+1]}", does not exist"
+                               __log_test_fail_general "Schema file "${arr[$i+1]}", does not exist"
                                return 1
                        fi
                        inputJson=$inputJson"{\"ei_type_identity\":\"${arr[$i]}\",\"ei_job_data_schema\":$schema}"
@@ -1522,6 +1572,7 @@ ecs_api_edp_put_producer() {
 }
 
 # API Test function: PUT /ei-producer/v1/eiproducers/{eiProducerId}
+# API Test function: PUT /data-producer/v1/info-producers/{infoProducerId}
 # args: (v1_2) <response-code> <producer-id> <job-callback> <supervision-callback> NOTYPE|[<type-id>+]
 # (Function for test scripts)
 ecs_api_edp_put_producer_2() {
@@ -1549,15 +1600,27 @@ ecs_api_edp_put_producer_2() {
                        inputJson=$inputJson"\""${arr[$i]}"\""
                done
        fi
-       inputJson="\"supported_ei_types\":"$inputJson"]"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               inputJson="\"supported_info_types\":"$inputJson"]"
 
-       inputJson=$inputJson",\"ei_job_callback_url\": \"$3\",\"ei_producer_supervision_callback_url\": \"$4\""
+               inputJson=$inputJson",\"info_job_callback_url\": \"$3\",\"info_producer_supervision_callback_url\": \"$4\""
 
-       inputJson="{"$inputJson"}"
+               inputJson="{"$inputJson"}"
 
-       file="./tmp/.p.json"
-       echo "$inputJson" > $file
-       query="/ei-producer/v1/eiproducers/$2"
+               file="./tmp/.p.json"
+               echo "$inputJson" > $file
+               query="/data-producer/v1/info-producers/$2"
+       else
+               inputJson="\"supported_ei_types\":"$inputJson"]"
+
+               inputJson=$inputJson",\"ei_job_callback_url\": \"$3\",\"ei_producer_supervision_callback_url\": \"$4\""
+
+               inputJson="{"$inputJson"}"
+
+               file="./tmp/.p.json"
+               echo "$inputJson" > $file
+               query="/ei-producer/v1/eiproducers/$2"
+       fi
     res="$(__do_curl_to_api ECS PUT $query $file)"
     status=${res:${#res}-3}
 
@@ -1613,7 +1676,7 @@ ecs_api_edp_get_producer_jobs() {
                                        jobfile=$(cat ${arr[$i+4]})
                                        jobfile=$(echo "$jobfile" | sed "s/XXXX/${arr[$i]}/g")
                                else
-                                       _log_test_fail_general "Job template file "${arr[$i+4]}", does not exist"
+                                       __log_test_fail_general "Job template file "${arr[$i+4]}", does not exist"
                                        return 1
                                fi
                                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}"
@@ -1635,6 +1698,7 @@ ecs_api_edp_get_producer_jobs() {
 }
 
 # API Test function: GET /ei-producer/v1/eiproducers/{eiProducerId}/eijobs
+# API Test function: GET /data-producer/v1/info-producers/{infoProducerId}/info-jobs
 # args: (V1-2) <response-code> <producer-id> (EMPTY | [<job-id> <type-id> <target-url> <job-owner> <template-job-file>]+)
 # (Function for test scripts)
 ecs_api_edp_get_producer_jobs_2() {
@@ -1656,8 +1720,11 @@ ecs_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
-
-       query="/ei-producer/v1/eiproducers/$2/eijobs"
+       if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
+               query="/data-producer/v1/info-producers/$2/info-jobs"
+       else
+               query="/ei-producer/v1/eiproducers/$2/eijobs"
+       fi
     res="$(__do_curl_to_api ECS GET $query)"
     status=${res:${#res}-3}
        if [ $status -ne $1 ]; then
@@ -1677,10 +1744,14 @@ ecs_api_edp_get_producer_jobs_2() {
                                        jobfile=$(cat ${arr[$i+4]})
                                        jobfile=$(echo "$jobfile" | sed "s/XXXX/${arr[$i]}/g")
                                else
-                                       _log_test_fail_general "Job template file "${arr[$i+4]}", does not exist"
+                                       __log_test_fail_general "Job template file "${arr[$i+4]}", does not exist"
                                        return 1
                                fi
-                               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\":\"????\"}"
+                               if [[ "$ECS_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
                        done
                fi
                targetJson=$targetJson"]"
@@ -1710,7 +1781,7 @@ ecs_api_service_status() {
        __log_test_start $@
 
     if [ $# -lt 1 ]; then
-               __print_err "<response-code> [<producer-id>]*|NOID" $@
+               __print_err "<response-code>" $@
                return 1
        fi
        res="$(__do_curl_to_api ECS GET /status)"
@@ -1723,6 +1794,332 @@ ecs_api_service_status() {
        return 0
 }
 
+###########################################
+######### Info data consumer API ##########
+###########################################
+#Function prefix: ecs_api_idc
+
+
+# API Test function: GET /data-consumer/v1/info-types
+# args: <response-code> [ (EMPTY | [<type-id>]+) ]
+# (Function for test scripts)
+ecs_api_idc_get_type_ids() {
+       __log_test_start $@
+
+    if [ $# -lt 1 ]; then
+               __print_err "<response-code> [ (EMPTY | [<type-id>]+) ]" $@
+               return 1
+       fi
+
+       query="/data-consumer/v1/info-types"
+    res="$(__do_curl_to_api ECS GET $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+       if [ $# -gt 1 ]; then
+               body=${res:0:${#res}-3}
+               targetJson="["
+               if [ $2 != "EMPTY" ]; then
+                       for pid in ${@:2} ; do
+                               if [ "$targetJson" != "[" ]; then
+                                       targetJson=$targetJson","
+                               fi
+                               targetJson=$targetJson"\"$pid\""
+                       done
+               fi
+               targetJson=$targetJson"]"
+               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
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: GET /data-consumer/v1/info-jobs
+# args: <response-code> <type-id>|NOTYPE <owner-id>|NOOWNER [ EMPTY | <job-id>+ ]
+# (Function for test scripts)
+ecs_api_idc_get_job_ids() {
+       __log_test_start $@
+
+       # 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 [ $2 != "NOTYPE" ]; then
+               if [ -z "$search" ]; then
+                       search="?infoTypeId="$2
+               else
+                       search=$search"&infoTypeId="$2
+               fi
+       fi
+       query="/data-consumer/v1/info-jobs$search"
+
+    res="$(__do_curl_to_api ECS GET $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       if [ $# -gt 3 ]; then
+               body=${res:0:${#res}-3}
+               targetJson="["
+
+               for pid in ${@:4} ; do
+                       if [ "$targetJson" != "[" ]; then
+                               targetJson=$targetJson","
+                       fi
+                       if [ $pid != "EMPTY" ]; then
+                               targetJson=$targetJson"\"$pid\""
+                       fi
+               done
+
+               targetJson=$targetJson"]"
+               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
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: GET /data-consumer/v1/info-jobs/{infoJobId}
+# args: <response-code> <job-id> [<type-id> <target-url> <owner-id> <template-job-file>]
+# (Function for test scripts)
+ecs_api_idc_get_job() {
+       __log_test_start $@
+
+       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="/data-consumer/v1/info-jobs/$2"
+    res="$(__do_curl_to_api ECS GET $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       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="{\"info_type_id\": \"$3\", \"job_result_uri\": \"$4\",\"job_owner\": \"$5\",\"status_notification_uri\": \"$6\",\"job_definition\": $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
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+
+# API Test function: PUT â€‹/data-consumer/v1/info-jobs/{infoJobId}
+# args: <response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file> [ VALIDATE ]
+# (Function for test scripts)
+ecs_api_idc_put_job() {
+       __log_test_start $@
+
+       if [ $# -lt 7 ] || [ $# -gt 8 ]; then
+               __print_err "<response-code> <job-id> <type-id> <target-url> <owner-id> <notification-url> <template-job-file> [ VALIDATE ]" $@
+               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
+
+       inputJson="{\"info_type_id\": \"$3\", \"job_result_uri\": \"$4\",\"job_owner\": \"$5\",\"status_notification_uri\": \"$6\",\"job_definition\": $jobfile}"
+       file="./tmp/.p.json"
+       echo "$inputJson" > $file
+
+       query="/data-consumer/v1/info-jobs/$2"
+
+       if [ $# -eq 8 ]; then
+               if [ $8 == "VALIDATE" ]; then
+                       query=$query"?typeCheck=true"
+               fi
+       fi
+
+    res="$(__do_curl_to_api ECS PUT $query $file)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: DELETE â€‹/data-consumer/v1/info-jobs/{infoJobId}
+# args: <response-code> <job-id>
+# (Function for test scripts)
+ecs_api_idc_delete_job() {
+       __log_test_start $@
+
+       if [ $# -ne 2 ]; then
+               __print_err "<response-code> <job-id>" $@
+               return 1
+       fi
+       query="/data-consumer/v1/info-jobs/$2"
+    res="$(__do_curl_to_api ECS DELETE $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: GET â€‹/data-consumer/v1/info-types/{infoTypeId}
+# args: <response-code> <type-id> [<schema-file>]
+# (Function for test scripts)
+ecs_api_idc_get_type() {
+       __log_test_start $@
+
+    if [ $# -lt 2 ] || [ $# -gt 3 ]; then
+               __print_err "<response-code> <type-id> [<schema-file>]" $@
+               return 1
+       fi
+
+       query="/data-consumer/v1/info-types/$2"
+    res="$(__do_curl_to_api ECS GET $query)"
+    status=${res:${#res}-3}
+
+       if [ $status -ne $1 ]; then
+               __log_test_fail_status_code $1 $status
+               return 1
+       fi
+
+       if [ $# -eq 3 ]; then
+               body=${res:0:${#res}-3}
+               if [ -f $3 ]; then
+                       schema=$(cat $3)
+               else
+                       __log_test_fail_general "Schema file "$3", does not exist"
+                       return 1
+               fi
+               targetJson="{\"job_data_schema\":$schema}"
+               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
+
+       __log_test_pass
+       return 0
+}
+
+# API Test function: GET /data-consumer/v1/info-jobs/{infoJobId}/status
+# args: <response-code> <job-id> [<status> [<timeout>]]
+# (Function for test scripts)
+ecs_api_idc_get_job_status() {
+       __log_test_start $@
+
+       if [ $# -lt 2 ] && [ $# -gt 4 ]; then
+               __print_err "<response-code> <job-id> [<status> [<timeout>]]" $@
+               return 1
+       fi
+
+       query="/data-consumer/v1/info-jobs/$2/status"
+
+       start=$SECONDS
+       for (( ; ; )); do
+               res="$(__do_curl_to_api ECS 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
+                               return 1
+                       fi
+               fi
+               if [ $# -ge 3 ] && [ $status -eq $1 ]; then
+                       body=${res:0:${#res}-3}
+                       targetJson="{\"info_job_status\": \"$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
+               fi
+       done
+
+       __log_test_pass
+       return 0
+}
+
 
 ##########################################
 ####          Reset jobs              ####
index 8aae95a..54e59e3 100644 (file)
@@ -418,7 +418,7 @@ prodstub_check_jobdata() {
         jobfile=$(cat $7)
         jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
     else
-        _log_test_fail_general "Template file "$7" for jobdata, does not exist"
+       __log_test_fail_general "Template file "$7" for jobdata, does not exist"
         return 1
     fi
     targetJson="{\"ei_job_identity\":\"$3\",\"ei_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"ei_job_data\":$jobfile}"
@@ -444,7 +444,7 @@ prodstub_check_jobdata_2() {
         jobfile=$(cat $7)
         jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
     else
-        _log_test_fail_general "Template file "$7" for jobdata, does not exist"
+       __log_test_fail_general "Template file "$7" for jobdata, does not exist"
         return 1
     fi
     targetJson="{\"ei_job_identity\":\"$3\",\"ei_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"ei_job_data\":$jobfile,\"last_updated\":\"????\"}"
@@ -457,6 +457,32 @@ prodstub_check_jobdata_2() {
     return $?
 }
 
+# Prodstub API: Get job data for a job and compare with a target job json (info-jobs)
+# <response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>
+# (Function for test scripts)
+prodstub_check_jobdata_3() {
+       __log_test_start $@
+       if [ $# -ne 7 ]; then
+               __print_err "<response-code> <producer-id> <job-id> <type-id> <target-url> <job-owner> <template-job-file>" $@
+               return 1
+       fi
+    if [ -f $7 ]; then
+        jobfile=$(cat $7)
+        jobfile=$(echo "$jobfile" | sed "s/XXXX/$3/g")
+    else
+       __log_test_fail_general "Template file "$7" for jobdata, does not exist"
+        return 1
+    fi
+    targetJson="{\"info_job_identity\":\"$3\",\"info_type_identity\":\"$4\",\"target_uri\":\"$5\",\"owner\":\"$6\", \"info_job_data\":$jobfile,\"last_updated\":\"????\"}"
+    file="./tmp/.p.json"
+       echo "$targetJson" > $file
+
+    curlString="curl -X GET -skw %{http_code} $PROD_STUB_PATH/jobdata/$2/$3"
+
+    __execute_curl_to_prodstub TEST $1 "$curlString" $file
+    return $?
+}
+
 # Prodstub API: Delete the job data
 # <response-code> <producer-id> <job-id>
 # (Function for test scripts)
index 8407662..0797912 100755 (executable)
@@ -89,7 +89,7 @@ SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
 # ECS image and tag - uses cherry release
 ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
 ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
-
+#Note: Update var ECS_FEATURE_LEVEL if image version is changed
 
 # Control Panel image and tag - uses cherry release
 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
@@ -224,6 +224,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
 
 MR_DMAAP_APP_NAME="dmaap-mr"                             # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index ea7c3e0..4711dfb 100644 (file)
@@ -89,7 +89,7 @@ SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
 # ECS image and tag - uses cherry release
 ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
 ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
-
+#Note: Update var ECS_FEATURE_LEVEL if image version is changed
 
 # Control Panel image and tag - uses cherry release
 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
@@ -224,6 +224,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
 
 MR_DMAAP_APP_NAME="dmaap-mr"                             # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index c82a5d3..91b153a 100755 (executable)
@@ -227,6 +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
 
 MR_DMAAP_APP_NAME="dmaap-mr"                             # Name for the Dmaap MR
 MR_STUB_APP_NAME="mr-stub"                               # Name of the MR stub
index 08925a4..bc29ac9 100755 (executable)
@@ -71,7 +71,7 @@ ECS_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
 ECS_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
 ECS_IMAGE_TAG_REMOTE="1.1.0"
 ECS_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
-
+#Note: Update var ECS_FEATURE_LEVEL if image version is changed
 
 #Control Panel image and tags
 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
@@ -247,6 +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"                           # 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
index ea8b914..f4f1488 100644 (file)
@@ -312,6 +312,10 @@ def disarm_type(producer_id, type_id):
 
     if (recursive_search(producer_dict, "ei_job_type",type_id) is True):
         return "TYPE_IN_USE",400
+    elif (recursive_search(producer_dict, "ei_type_identity",type_id) is True):
+        return "TYPE_IN_USE",400
+    elif (recursive_search(producer_dict, "info_type_identity",type_id) is True):
+        return "TYPE_IN_USE",400
 
     type_list=producer_dict['types']
     type_list.remove(type_id)
@@ -339,17 +343,26 @@ def callback_create(producer_id):
     if (producer_dict is None):
         return PRODUCER_OR_JOB_NOT_FOUND,400
     type_list=producer_dict['types']
-    type_id=req_json_dict['ei_type_identity']
-    if (type_id not in type_list):
+
+
+    if 'ei_type_identity' in req_json_dict.keys():
+        type_key_name='ei_type_identity'
+        job_key_name='ei_job_identity'
+    elif 'info_type_identity' in req_json_dict.keys():
+        type_key_name='info_type_identity'
+        job_key_name='info_job_identity'
+    else:
         return TYPE_NOT_FOUND, 400
 
-    job_id=req_json_dict['ei_job_identity']
+    type_id=req_json_dict[type_key_name]
+    job_id=req_json_dict[job_key_name]
+
     job_dict=get_callback_dict(producer_id, job_id)
     if (job_dict is None):
         return PRODUCER_OR_JOB_NOT_FOUND,400
     return_code=0
     return_msg=""
-    if (req_json_dict['ei_job_identity'] == job_id):
+    if (req_json_dict[job_key_name] == job_id):
         print("Create callback received for producer: "+str(producer_id)+" and job: "+str(job_id))
         return_code=job_dict['create_response']
         if ((job_dict['create_response'] == 200) or (job_dict['create_response'] == 201)):
index c734461..7b062c2 100644 (file)
@@ -34,6 +34,10 @@ spring:
         uri: https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}
         predicates:
         - Path=/ei-producer/**
+      - id: A1-EI2
+        uri: https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}
+        predicates:
+        - Path=/data-producer/**
 management:
   endpoint:
     gateway:
index dbdaa3c..f9e0248 100644 (file)
@@ -4,7 +4,7 @@
 The Link Failure use case test provides a python script that regularly polls DMaaP Message Router (MR) for "CUS Link Failure"
 messages.
 
-When such a message appears with the "eventSeverity" set to "CRITICAL" a configuration change message with the
+When such a message appears with the "eventSeverity" set to anything but "NORMAL", a configuration change message with the
 "administrative-state" set to "UNLOCKED" will be sent to the O-DU mapped to the O-RU that sent the alarm.
 
 When such a message appears with the "eventSeverity" set to "NORMAL" a printout will be made to signal that the
@@ -17,13 +17,42 @@ the `app` folder: `pip install -r requirements.txt`
 Also, the MR needs to be up and running with a topic created for the alarms and there must be an endpoint for the
 configuration change event that will accept these.
 
+The host names and the ports to the MR and SDNR services can be provided when the container is started if the default
+values are not correct. The topic can also be changed.
+
+The mapping from O-RU ID to O-DU ID is specified in the file `o-ru-to-o-du-map.txt`. This can be replaced by providing
+a different file when starting the application.
+
 For convenience, a message generator and a change event endpoint simulator are provided.
 
-# How to run
+# How to run from command line
 Go to the `app/` folder and run `python3 main.py`. The script will start and run until stopped. Use the `-h` option to
 see the options available for the script.
 
 
+# How to run in Docker
+Go to the `app/` folder and run `docker build -t oru-app .`.
+
+The container must be connected to the same network as the MR and SDNR are running in. Some of the parameters to the application
+can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by using the command, with available params listed:
+ `docker run --network [NETWORK NAME] --name oru-app -e VERBOSE=on -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] -e SDNR-HOST=[HOST NAME OF SDNR] -e SDNR-PORT=[PORT OF SDNR] oru-app`.
+
+To build the image for the message generator, run the following command from the `simulators` folder:
+`docker build -f Dockerfile-message-generator -t message-generator .`
+
+The message generator's container must be connected to the same network as the other components are running in. Some of the
+parameters to the application can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by
+using the command, with available params listed:
+ `docker run --network [NETWORK NAME] --name message-generator -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] message-generator`.
+
+To build the image for the SDNR simulator, run the following command from the `simulators` folder:
+`docker build -f Dockerfile-sdnr-sim -t message-generator .`
+
+The SDNR simulator's container must be connected to the same network as the the other components are running in. Some of the
+parameters to the application can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by
+using the command, with available params listed:
+ `docker run --network [NETWORK NAME] --name sdnr-simulator -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] sdnr-simulator`.
+
 ## License
 
 Copyright (C) 2021 Nordix Foundation.
index 394af8d..30541d4 100644 (file)
@@ -91,13 +91,13 @@ def read_o_ru_to_o_du_map_from_file(map_file):
 
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(prog='PROG')
-    parser.add_argument('--mrHost', help='The URL of the MR host', default="http://message-router.onap")
-    parser.add_argument('--mrPort', help='The port of the MR host', type=int, default=3904)
-    parser.add_argument('--mrTopic', help='The topic to poll messages from', default="unauthenticated.SEC_FAULT_OUTPUT")
-    parser.add_argument('--sdnrHost', help='The URL of the SNDR host', default="http://localhost")
-    parser.add_argument('--sdnrPort', help='The port of the SDNR host', type=int, default=9990)
-    parser.add_argument('--oRuTooDuMapFile', help='A file with the mapping between O-RU ID and O-DU ID as a dictionary', default="o-ru-to-o-du-map.txt")
-    parser.add_argument('--pollTime', help='The time between polls', type=int, default=10)
+    parser.add_argument('--mrHost', help='The URL of the MR host (default: %(default)s)', default="http://message-router.onap")
+    parser.add_argument('--mrPort', help='The port of the MR host (default: %(default)d)', type=int, default=3904)
+    parser.add_argument('--mrTopic', help='The topic to poll messages from (default: %(default)s)', default="unauthenticated.SEC_FAULT_OUTPUT")
+    parser.add_argument('--sdnrHost', help='The URL of the SNDR host (default: %(default)s)', default="http://localhost")
+    parser.add_argument('--sdnrPort', help='The port of the SDNR host (default: %(default)d)', type=int, default=9990)
+    parser.add_argument('--oRuTooDuMapFile', help='A file with the mapping between O-RU ID and O-DU ID as a dictionary (default: %(default)s)', default="o-ru-to-o-du-map.txt")
+    parser.add_argument('--pollTime', help='The time between polls (default: %(default)d)', type=int, default=10)
     parser.add_argument('-v', '--verbose', action='store_true', help='Turn on verbose printing')
     parser.add_argument('--version', action='version', version='%(prog)s 1.0')
     args = vars(parser.parse_args())