Move CSITs to clamp repo 68/142768/6
authorwaynedunican <wayne.dunican@est.tech>
Wed, 10 Dec 2025 15:08:16 +0000 (15:08 +0000)
committerWayne Dunican <wayne.dunican@est.tech>
Mon, 9 Feb 2026 10:05:19 +0000 (10:05 +0000)
Mostly copied over csit and compose folders from policy/docker but with some modifications:
- Removed containers in compose files not used in clamp tests
- Removed all robot tests other than clamp
- Removed all config and resource files not needed to run clamp tests

Issue-ID: POLICY-5513
Change-Id: I96d5564bc89bb6f6422e5723691fd5c9ae9632cc
Signed-off-by: waynedunican <wayne.dunican@est.tech>
122 files changed:
compose/README.md [new file with mode: 0644]
compose/compose.acm.scale.yml [new file with mode: 0644]
compose/compose.common.yml [new file with mode: 0644]
compose/compose.postgres.yml [new file with mode: 0644]
compose/compose.yaml [new file with mode: 0644]
compose/config/apex-pdp/OnapPfConfig.json [new file with mode: 0644]
compose/config/apex-pdp/groups.json [new file with mode: 0644]
compose/config/apex-pdp/logback.xml [new file with mode: 0644]
compose/config/api/apiParameters.yaml [new file with mode: 0644]
compose/config/api/groups.json [new file with mode: 0644]
compose/config/api/logback.xml [new file with mode: 0644]
compose/config/clamp/groups.json [new file with mode: 0644]
compose/config/clamp/logback.xml [new file with mode: 0644]
compose/config/db-migrator/init_pg.sh [new file with mode: 0755]
compose/config/db-pg/db-pg.conf [new file with mode: 0644]
compose/config/db-pg/db-pg.sh [new file with mode: 0755]
compose/config/nginx/nginx-acm.conf [new file with mode: 0644]
compose/config/nginx/nginx.conf [new file with mode: 0644]
compose/config/pap/groups.json [new file with mode: 0644]
compose/config/pap/logback.xml [new file with mode: 0644]
compose/config/pap/papParameters.yaml [new file with mode: 0644]
compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json [new file with mode: 0644]
compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json [new file with mode: 0644]
compose/config/sim-all/cdsresponse/apex-example-cba-restart.json [new file with mode: 0644]
compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json [new file with mode: 0644]
compose/config/sim-all/logback.xml [new file with mode: 0644]
compose/config/sim-all/simParameters.json [new file with mode: 0644]
compose/export-ports.sh [new file with mode: 0755]
compose/get-k8s-versions.sh [new file with mode: 0755]
compose/get-versions-regression.sh [new file with mode: 0755]
compose/get-versions.sh [new file with mode: 0755]
compose/loaddockerimage.sh [new file with mode: 0755]
compose/metrics/dashboard.yaml [new file with mode: 0644]
compose/metrics/dashboards/dashboard-for-springboot.json [new file with mode: 0644]
compose/metrics/dashboards/dashboard-jvm-basic.json [new file with mode: 0644]
compose/metrics/dashboards/sla-metrics.json [new file with mode: 0644]
compose/metrics/datasource.yaml [new file with mode: 0644]
compose/metrics/prometheus.yml [new file with mode: 0644]
compose/start-acm-replica.sh [new file with mode: 0755]
compose/start-compose.sh [new file with mode: 0755]
compose/stop-compose.sh [new file with mode: 0755]
compose/wait_for_port.sh [new file with mode: 0755]
csit/README.md [new file with mode: 0644]
csit/resources/Dockerfile [new file with mode: 0644]
csit/resources/scripts/build-csit-docker-image.sh [new file with mode: 0755]
csit/resources/scripts/cluster_setup.sh [new file with mode: 0755]
csit/resources/scripts/config_setup.sh [new file with mode: 0755]
csit/resources/scripts/get-cluster-info.sh [new file with mode: 0755]
csit/resources/scripts/node-templates.sh [new file with mode: 0755]
csit/resources/scripts/robot_setup.sh [new file with mode: 0755]
csit/resources/scripts/run-test.sh [new file with mode: 0755]
csit/resources/scripts/wait_for_rest.sh [new file with mode: 0755]
csit/resources/tests/clamp-common.robot [new file with mode: 0644]
csit/resources/tests/clamp-db-restore.robot [new file with mode: 0644]
csit/resources/tests/clamp-health-check.robot [new file with mode: 0644]
csit/resources/tests/clamp-migrate-rollback.robot [new file with mode: 0644]
csit/resources/tests/clamp-single-element-test.robot [new file with mode: 0644]
csit/resources/tests/clamp-slas.robot [new file with mode: 0644]
csit/resources/tests/clamp-timeout-test.robot [new file with mode: 0644]
csit/resources/tests/clamp-trace-test.robot [new file with mode: 0644]
csit/resources/tests/common-library.robot [new file with mode: 0644]
csit/resources/tests/data/ACDepriming.json [new file with mode: 0644]
csit/resources/tests/data/ACPriming.json [new file with mode: 0644]
csit/resources/tests/data/AcDocker.json [new file with mode: 0644]
csit/resources/tests/data/AcK8s.json [new file with mode: 0644]
csit/resources/tests/data/DeployAC.json [new file with mode: 0644]
csit/resources/tests/data/OutProperties.json [new file with mode: 0644]
csit/resources/tests/data/PrepareAC.json [new file with mode: 0644]
csit/resources/tests/data/ReviewAC.json [new file with mode: 0644]
csit/resources/tests/data/SettingSimPropertiesDelay.json [new file with mode: 0644]
csit/resources/tests/data/SettingSimPropertiesFail.json [new file with mode: 0644]
csit/resources/tests/data/SettingSimPropertiesSuccess.json [new file with mode: 0644]
csit/resources/tests/data/SettingSimPropertiesTimeout.json [new file with mode: 0644]
csit/resources/tests/data/StateChangeRunningAC.json [new file with mode: 0644]
csit/resources/tests/data/UndeployAC.json [new file with mode: 0644]
csit/resources/tests/data/VesEventForPnfPolicy.json [new file with mode: 0644]
csit/resources/tests/data/VesEventForVnfPolicy.json [new file with mode: 0644]
csit/resources/tests/data/ac-definition-migration-from.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-definition-migration-to.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-definition-simple.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-definition-timeout.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-migration-fail.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-migration-from.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-migration-restored.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-migration-to.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-precheck-migration.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-simple.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-timeout.yaml [new file with mode: 0644]
csit/resources/tests/data/ac-instance-update.yaml [new file with mode: 0644]
csit/resources/tests/data/acelement-usecase.yaml [new file with mode: 0644]
csit/resources/tests/data/acelement-usecaseDocker.yaml [new file with mode: 0644]
csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json [new file with mode: 0644]
csit/resources/tests/data/create.group.request.json [new file with mode: 0644]
csit/resources/tests/data/deploy.group.request.json [new file with mode: 0644]
csit/resources/tests/data/event.json [new file with mode: 0644]
csit/resources/tests/data/http-usecase.yaml [new file with mode: 0644]
csit/resources/tests/data/onap.pnf.metadataSet.Test.json [new file with mode: 0644]
csit/resources/tests/data/onap.policies.apex.pnf.Test.json [new file with mode: 0644]
csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json [new file with mode: 0644]
csit/resources/tests/data/onap.policies.apex.vnf.Test.json [new file with mode: 0644]
csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.guard.decision.request.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.monitoring.decision.request.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.naming.decision.request.json [new file with mode: 0644]
csit/resources/tests/data/onap.policy.optimization.decision.request.json [new file with mode: 0644]
csit/resources/tests/data/policy_deploy.json [new file with mode: 0644]
csit/resources/tests/data/query/compositiondefinition-from.sql [new file with mode: 0644]
csit/resources/tests/data/query/compositiondefinition-to.sql [new file with mode: 0644]
csit/resources/tests/data/query/compositiondefinition-update.sql [new file with mode: 0644]
csit/resources/tests/data/query/instance.sql [new file with mode: 0644]
csit/resources/tests/data/script/execute-query.sh [new file with mode: 0755]
csit/resources/tests/data/script/execute-queryk8.sh [new file with mode: 0755]
csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json [new file with mode: 0644]
csit/resources/tests/kafka_consumer.py [new file with mode: 0755]
csit/resources/tests/kafka_producer.py [new file with mode: 0755]
csit/resources/tests/make_topics.py [new file with mode: 0755]
csit/run-acm-regression.sh [new file with mode: 0755]
csit/run-k8s-csit.sh [new file with mode: 0755]
csit/run-project-csit.sh [new file with mode: 0755]

diff --git a/compose/README.md b/compose/README.md
new file mode 100644 (file)
index 0000000..692bc06
--- /dev/null
@@ -0,0 +1,112 @@
+# Policy Framework Docker Compose
+
+The PF docker compose starts a small instance of docker containers for PF components.
+
+## Features
+
+- Starts all components, including Prometheus/Grafana dashboard
+- Can start specific components
+- Expose fixed ports so all the REST endpoints can be called with localhost:component_port
+
+## Tech
+
+Things to be installed beforehand:
+
+- Linux VM if using Windows
+- Docker
+- Docker compose
+- Any editor
+
+## Installation
+
+Assuming the docker repository has been cloned and workdir is ../docker/compose
+
+- Install all PF components
+```sh
+./start-compose.sh
+```
+
+- Install an specific PF component
+(accepted options: api pap apex-pdp distribution drools-pdp drools-apps xacml-pdp
+policy-clamp-runtime-acm)
+
+
+```sh
+./start-compose.sh component
+
+# that will start apex-pdp and its dependencies (pap, api, db, simulator)
+./start-compose.sh apex-pdp
+```
+
+- Install an specific PF component with Grafana dashboard
+(accepted options: api pap apex-pdp distribution drools-pdp drools-apps xacml-pdp
+policy-clamp-runtime-acm)
+
+
+```sh
+./start-compose.sh component --grafana
+
+# that will start apex-pdp and its dependencies (pap, api, db, simulator) + grafana and prometheus server
+./start-compose.sh apex-pdp --grafana
+```
+
+## Docker image download localization
+
+The docker images are always downloaded from nexus repository, but if needed to build a local
+image, do an export ``export USE_LOCAL_IMAGES=true`` or edit the image tag in the docker compose
+file. That will ensure that the newly built images locally are being used by not requesting a
+download from nexus and using the image tagged as latest.
+
+> When using the export command way, keep in mind that all policy images will need to be available
+> locally.
+
+
+## Docker image versions
+
+The start-compose script is always looking for the latest SNAPSHOT version available (will
+look locally first, then download from nexus if not available).
+Note: if latest Policy-API docker image is 2.8-SNAPSHOT-latest, but on nexus it was released
+2 days ago and in local environment it's 3 months old - it will use the 3 months old image,
+so it's recommended to keep an eye on it.
+
+If needed, the version can be edited on any docker compose yml file.
+
+i.e: need to change db-migrator version
+from compose.{database}.yml:
+``image: ${CONTAINER_LOCATION}onap/policy-db-migrator:${POLICY_DOCKER_VERSION}``
+
+replace the ${POLICY_DOCKER_VERSION} for the specific version needed
+
+
+## Logs
+
+Use ``docker compose logs`` or `docker logs ${container_name}` instructions on how to collect logs.
+
+## Uninstall
+
+Simply run the ``stop-compose.sh`` script. This will also generate logs from the services started
+with compose.
+
+```sh
+./stop-compose.sh
+```
+
+## Database support
+
+From Paris version onwards, this docker compose setup uses Postgres database; MariaDB support has
+been removed.
+
+
+### Docker compose files
+
+To make it easier and clear how the docker compose system works, there are three files describing
+the services:
+- compose.common.yml
+  - Simulator service
+  - ACM-R Participants that don't connect directly to database
+  - Messaging services (kafka, zookeeper)
+  - Metrics services (prometheus, grafana, jaeger)
+- compose.postgres.yml
+  - Postgres database and policy-db-migrator working towards it
+- compose.yml
+  - All the policy components.
diff --git a/compose/compose.acm.scale.yml b/compose/compose.acm.scale.yml
new file mode 100644 (file)
index 0000000..8970e2c
--- /dev/null
@@ -0,0 +1,175 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2024-2026 OpenInfra Foundation Europe. All rights reserved.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=====================================================
+#
+
+include:
+  - compose.yaml
+
+services:
+  policy-clamp-runtime-acm-replica:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION}
+    hostname: policy-clamp-runtime-acm
+    depends_on:
+      - policy-db-migrator
+      - apex-pdp
+      - kafka
+      - jaeger
+      - policy-clamp-ac-pf-ppnt
+      - policy-clamp-ac-sim-ppnt-1
+      - policy-clamp-ac-sim-ppnt-2
+      - policy-clamp-ac-sim-ppnt-3
+    expose:
+      - 6969
+    deploy:
+      mode: replicated
+      replicas: ${REPLICAS:-2}
+    restart:
+      on-failure:3
+    environment:
+      RUNTIME_USER: runtimeUser
+      RUNTIME_PASSWORD: zb!XztG34
+      SQL_HOST: postgres
+      SQL_PORT: 5432
+      SQL_USER: policy_user
+      SQL_PASSWORD: policy_user
+      TOPIC_COMM_INFRASTRUCTURE: kafka
+      ALLOW_TRACING: true
+      PROMETHEUS_PORT: 6969
+      OTEL_SERVICE_NAME: acm-r
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      JAVA_TOOL_OPTIONS: >-
+        -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml"
+        -Dcom.sun.management.jmxremote.rmi.port=9090
+        -Dcom.sun.management.jmxremote=true
+        -Dcom.sun.management.jmxremote.port=9090
+        -Dcom.sun.management.jmxremote.ssl=false
+        -Dcom.sun.management.jmxremote.authenticate=false
+        -Dcom.sun.management.jmxremote.local.only=false
+        -Dotel.java.global-autoconfigure.enabled=true
+    volumes:
+      - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 60s
+    entrypoint: java -jar /app/app.jar
+
+  policy-clamp-ac-http-ppnt-replica:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    hostname: policy-clamp-ac-http-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    expose:
+      - 6969
+    deploy:
+      mode: replicated
+      replicas: ${REPLICAS:-2}
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: http-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/httpparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 60s
+
+  policy-clamp-ac-k8s-ppnt-replica:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    hostname: policy-clamp-ac-k8s-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: k8s-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    expose:
+      - 6969
+    deploy:
+      mode: replicated
+      replicas: ${REPLICAS:-2}
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/k8sparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 20s
+
+  policy-clamp-ac-pf-ppnt-replica:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    hostname: policy-clamp-ac-pf-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    expose:
+      - 6969
+    deploy:
+      mode: replicated
+      replicas: ${REPLICAS:-2}
+    environment:
+      API_USER: policyadmin
+      API_PASSWORD: zb!XztG34
+      PAP_USER: policyadmin
+      PAP_PASSWORD: zb!XztG34
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: policy-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/policyparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 30s
+
+  nginx:
+    image: ${CONTAINER_LOCATION}library/nginx:latest
+    volumes:
+      - ./config/nginx/nginx-acm.conf:/etc/nginx/nginx.conf:ro
+    depends_on:
+      - policy-clamp-runtime-acm-replica
+    ports:
+      - ${ACM_PORT}:${ACM_PORT}
diff --git a/compose/compose.common.yml b/compose/compose.common.yml
new file mode 100644 (file)
index 0000000..5d6c321
--- /dev/null
@@ -0,0 +1,192 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2024-2026 OpenInfra Foundation Europe. All rights reserved.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=====================================================
+#
+
+services:
+
+  simulator:
+    image: ${CONTAINER_LOCATION}onap/policy-models-simulator:${POLICY_MODELS_VERSION}
+    container_name: simulator
+    hostname: simulator
+    networks:
+      default:
+        aliases:
+          - aai-sim
+          - grpc-sim
+          - sdnc-sim
+          - so-sim
+    volumes:
+      - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro
+      - ./config/sim-all/logback.xml:/opt/app/policy/simulators/etc/mounted/logback.xml:ro
+    expose:
+      - 6666
+      - 6668
+      - 6669
+      - 6680
+    ports:
+      - ${SIMULATOR_PORT}:6666
+
+  policy-clamp-ac-sim-ppnt-1:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-sim-ppnt-1
+    hostname: policy-clamp-ac-sim-ppnt-1
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: sim-ppnt-1
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
+      applicationName: sim-ppnt-1
+      groupId: policy-clamp-ac-sim-ppnt-1
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+    ports:
+      - ${SIM_PARTICIPANT1_PORT}:6969
+
+  policy-clamp-ac-sim-ppnt-2:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-sim-ppnt-2
+    hostname: policy-clamp-ac-sim-ppnt-2
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: sim-ppnt-2
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c91
+      applicationName: sim-ppnt-2
+      groupId: policy-clamp-ac-sim-ppnt-2
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+    ports:
+      - ${SIM_PARTICIPANT2_PORT}:6969
+
+  policy-clamp-ac-sim-ppnt-3:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-sim-ppnt-3
+    hostname: policy-clamp-ac-sim-ppnt-3
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: sim-ppnt-3
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c92
+      applicationName: sim-ppnt-3
+      groupId: policy-clamp-ac-sim-ppnt-3
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement3
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+    ports:
+      - ${SIM_PARTICIPANT3_PORT}:6969
+
+# metrics services:
+  prometheus:
+    image: nexus3.onap.org:10001/prom/prometheus:latest
+    container_name: prometheus
+    hostname: prometheus
+    ports:
+      - ${PROMETHEUS_PORT}:9090
+    volumes:
+      - ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
+
+  grafana:
+    image: nexus3.onap.org:10001/grafana/grafana:latest
+    container_name: grafana
+    hostname: grafana
+    depends_on:
+      - prometheus
+    ports:
+      - ${GRAFANA_PORT}:3000
+    volumes:
+      - ./metrics/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
+      - ./metrics/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
+      - ./metrics/dashboards:/var/lib/grafana/dashboards
+
+# messaging services:
+  zookeeper:
+    image: nexus3.onap.org:10001/confluentinc/cp-zookeeper:latest
+    container_name: zookeeper
+    hostname: zookeeper
+    ports:
+      - "2181:2181"
+    environment:
+      ZOOKEEPER_CLIENT_PORT: 2181
+
+  kafka:
+    image: nexus3.onap.org:10001/confluentinc/cp-kafka:7.4.9
+    container_name: kafka
+    hostname: kafka
+    depends_on:
+      - zookeeper
+    ports:
+      - "9092:9092"
+      - "29092:29092"
+    environment:
+      KAFKA_BROKER_ID: 1
+      KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
+      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
+      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
+      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
+      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
+      KAFKA_ADVERTISED_HOST_NAME: kafka
+
+  jaeger:
+    image: nexus3.onap.org:10001/jaegertracing/all-in-one:1.58
+    container_name: jaeger
+    ports:
+      - "4318:4318"
+      - "4317:4317"
+      - "14250:14250"
+      - "16686:16686"
+    environment:
+      - COLLECTOR_OTLP_ENABLED=true
+
+# integration tests:
+  csit-tests:
+    image: onap/policy-csit-robot:latest
+    container_name: policy-csit
+    hostname: policy-csit
+    volumes:
+      - ${ROBOT_LOG_DIR:-/tmp}:/tmp/results
+      - /tmp/distribution:/tmp/distribution
+    environment:
+      ROBOT_FILE: ${ROBOT_FILES:-none}
+      TEST_ENV: ${TEST_ENV:-docker}
+      PROJECT: ${PROJECT:-policy}
diff --git a/compose/compose.postgres.yml b/compose/compose.postgres.yml
new file mode 100644 (file)
index 0000000..bb497cd
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2024 Nordix Foundation.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+
+# Services running against postgres database
+
+services:
+  postgres:
+    image: nexus3.onap.org:10001/library/postgres:${POLICY_POSTGRES_VER}
+    container_name: postgres
+    hostname: postgres
+    command: [ '--idle_in_transaction_session_timeout=28800' ]
+    env_file: config/db-pg/db-pg.conf
+    volumes:
+      - ./config/db-pg:/docker-entrypoint-initdb.d:ro
+    expose:
+      - 5432
+    ports:
+      - "5432:5432"
+
+  policy-db-migrator:
+    image: ${CONTAINER_LOCATION}onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
+    container_name: policy-db-migrator
+    hostname: policy-db-migrator
+    depends_on:
+      - postgres
+    expose:
+      - 6824
+    env_file: config/db-pg/db-pg.conf
+    environment:
+      POSTGRES_PASSWORD: policy_user
+      SQL_DB: ${SCHEMAS_TO_BE_CREATED}
+      SQL_HOST: postgres
+    volumes:
+      - ./config/db-migrator/init_pg.sh:/opt/app/policy/bin/db_migrator_policy_init_pg.sh:ro
+      - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+    entrypoint: /opt/app/policy/bin/wait_for_port.sh
+    command: [
+      '-c',
+      '/opt/app/policy/bin/db_migrator_policy_init_pg.sh',
+      'postgres', '5432'
+    ]
diff --git a/compose/compose.yaml b/compose/compose.yaml
new file mode 100644 (file)
index 0000000..7cf3b22
--- /dev/null
@@ -0,0 +1,287 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+#  Modifications Copyright 2021-2026 OpenInfra Foundation Europe. All rights reserved.
+#  Modifications Copyright 2024-2025 Deutsche Telekom
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=====================================================
+#
+
+include:
+  - compose.common.yml
+  - compose.${database:-postgres}.yml
+
+services:
+
+  api:
+    image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
+    container_name: policy-api
+    hostname: policy-api
+    depends_on:
+      - policy-db-migrator
+    ports:
+      - ${API_PORT}:6969
+    environment:
+      JAVA_TOOL_OPTIONS: >-
+        -Dlogging.config="/opt/app/policy/api/etc/logback.xml"
+      SPRING_PROFILES_ACTIVE: ${API_PROFILE:-default}
+      SPRING_CONFIG_LOCATION: /opt/app/policy/api/etc/apiParameters.yaml
+    volumes:
+      - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
+      - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
+      - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
+    entrypoint: ./wait_for_port.sh
+    command: [
+      '-c', 'java -jar /app/api.jar',
+      'policy-db-migrator', '6824'
+    ]
+
+  pap:
+    image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION}
+    container_name: policy-pap
+    hostname: policy-pap
+    depends_on:
+      - api
+      - kafka
+    ports:
+      - ${PAP_PORT}:6969
+    environment:
+      JAVA_TOOL_OPTIONS: >-
+        -Dlogging.config="/opt/app/policy/pap/etc/logback.xml"
+      SPRING_PROFILES_ACTIVE: ${PAP_PROFILE:-default}
+      SPRING_CONFIG_LOCATION: /opt/app/policy/pap/etc/papParameters.yaml
+    volumes:
+      - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
+      - ./config/${PROJECT:-api}/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
+      - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro
+      - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
+    entrypoint: ./wait_for_port.sh
+    command: [
+      '-c', 'java -jar /app/pap.jar --group-config-file=/opt/app/policy/pap/etc/mounted/groups.json',
+      'api', '6969',
+      'kafka', '9092'
+    ]
+
+  apex-pdp:
+    image: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
+    container_name: policy-apex-pdp
+    hostname: policy-apex-pdp
+    depends_on:
+      - simulator
+      - kafka
+      - pap
+    ports:
+      - ${APEX_PORT}:6969
+      - ${APEX_EVENTS_PORT}:23324
+    volumes:
+      - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
+      - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro
+      - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+    entrypoint: /opt/app/policy/bin/wait_for_port.sh
+    command: [
+      '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
+      'kafka', '9092',
+      'pap', '6969'
+    ]
+
+  policy-clamp-runtime-acm:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION}
+    container_name: policy-clamp-runtime-acm
+    hostname: policy-clamp-runtime-acm
+    depends_on:
+      - apex-pdp
+      - kafka
+      - jaeger
+      - policy-clamp-ac-pf-ppnt
+      - policy-clamp-ac-sim-ppnt-1
+      - policy-clamp-ac-sim-ppnt-2
+      - policy-clamp-ac-sim-ppnt-3
+    ports:
+      - ${ACM_PORT}:6969
+    restart:
+      on-failure:3
+    environment:
+      RUNTIME_USER: runtimeUser
+      RUNTIME_PASSWORD: zb!XztG34
+      SQL_HOST: postgres
+      SQL_PORT: 5432
+      SQL_USER: policy_user
+      SQL_PASSWORD: policy_user
+      TOPIC_COMM_INFRASTRUCTURE: kafka
+      ALLOW_TRACING: true
+      PROMETHEUS_PORT: 6969
+      OTEL_SERVICE_NAME: acm-r
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      JAVA_TOOL_OPTIONS: >-
+        -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml"
+        -Dcom.sun.management.jmxremote.rmi.port=9090
+        -Dcom.sun.management.jmxremote=true
+        -Dcom.sun.management.jmxremote.port=9090
+        -Dcom.sun.management.jmxremote.ssl=false
+        -Dcom.sun.management.jmxremote.authenticate=false
+        -Dcom.sun.management.jmxremote.local.only=false
+        -Dotel.java.global-autoconfigure.enabled=true
+      SPRING_PROFILES_ACTIVE: ${CLAMP_PROFILE:-default}
+    volumes:
+      - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 60s
+    entrypoint: java -jar /app/app.jar
+
+  policy-clamp-ac-http-ppnt:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-http-ppnt
+    hostname: policy-clamp-ac-http-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    ports:
+      - "30290:6969"
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: http-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/httpparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 60s
+
+  policy-clamp-ac-k8s-ppnt:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-k8s-ppnt
+    hostname: policy-clamp-ac-k8s-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: k8s-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    ports:
+      - "30295:6969"
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/k8sparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 20s
+
+  policy-clamp-ac-pf-ppnt:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-pf-ppnt
+    hostname: policy-clamp-ac-pf-ppnt
+    depends_on:
+      - kafka
+      - api
+      - jaeger
+    ports:
+      - ${POLICY_PARTICIPANT_PORT}:6969
+    environment:
+      API_USER: policyadmin
+      API_PASSWORD: zb!XztG34
+      PAP_USER: policyadmin
+      PAP_PASSWORD: zb!XztG34
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: policy-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+      SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/policyparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 30s
+
+  policy-clamp-ac-a1pms-ppnt:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-a1pms-ppnt
+    hostname: policy-clamp-ac-a1pms-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: a1pms-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+    ports:
+      - "30296:6969"
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/a1pmsparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 20s
+
+  policy-clamp-ac-kserve-ppnt:
+    image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-kserve-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+    container_name: policy-clamp-ac-kserve-ppnt
+    hostname: policy-clamp-ac-kserve-ppnt
+    depends_on:
+      - kafka
+      - jaeger
+    environment:
+      HTTP_USER: participantUser
+      HTTP_PASSWORD: zb!XztG34
+      topicCommInfrastructure: kafka
+      allowTracing: true
+      OTEL_SERVICE_NAME: kserve-ppnt
+      OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
+      OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
+      OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+    ports:
+      - "30297:6969"
+    healthcheck:
+      test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/kserveparticipant/health/readiness | grep UP || exit 1"
+      interval: 30s
+      timeout: 10s
+      retries: 5
+      start_period: 20s
diff --git a/compose/config/apex-pdp/OnapPfConfig.json b/compose/config/apex-pdp/OnapPfConfig.json
new file mode 100644 (file)
index 0000000..6242b90
--- /dev/null
@@ -0,0 +1,50 @@
+{
+  "name": "OnapPfParameterGroup",
+  "restServerParameters": {
+    "host": "0.0.0.0",
+    "port": 6969,
+    "userName": "policyadmin",
+    "password": "zb!XztG34",
+    "https": false,
+    "prometheus": true
+  },
+  "pdpStatusParameters": {
+    "pdpGroup": "defaultGroup",
+    "timeIntervalMs": 20000,
+    "pdpType": "apex",
+    "description": "Pdp Heartbeat",
+    "supportedPolicyTypes": [
+      {
+        "name": "onap.policies.controlloop.operational.common.Apex",
+        "version": "1.0.0"
+      },
+      {
+        "name": "onap.policies.native.Apex",
+        "version": "1.0.0"
+      }
+    ]
+  },
+  "topicParameterGroup": {
+    "topicSources": [
+      {
+        "topic": "policy-pdp-pap",
+        "servers": [
+          "kafka:9092"
+        ],
+        "topicCommInfrastructure": "kafka",
+        "useHttps": false,
+        "fetchTimeout": 15000
+      }
+    ],
+    "topicSinks": [
+      {
+        "topic": "policy-pdp-pap",
+        "servers": [
+          "kafka:9092"
+        ],
+        "topicCommInfrastructure": "kafka",
+        "useHttps": false
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/compose/config/apex-pdp/groups.json b/compose/config/apex-pdp/groups.json
new file mode 100644 (file)
index 0000000..bd5c286
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "groups": [
+    {
+      "name": "defaultGroup",
+      "version": "1.0.0",
+      "description": "The default group that registers all supported policy types and pdps.",
+      "pdpGroupState": "ACTIVE",
+      "pdpSubgroups": [
+        {
+          "pdpType": "apex",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Apex",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        }
+      ]
+    }
+  ]
+}
diff --git a/compose/config/apex-pdp/logback.xml b/compose/config/apex-pdp/logback.xml
new file mode 100644 (file)
index 0000000..eb5613c
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+   Modifications Copyright (C) 2019 Nordix Foundation.
+   Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <property name="logDir" value="${POLICY_LOGS}" />
+
+    <property name="errorLog" value="error" />
+    <property name="debugLog" value="debug" />
+    <property name="networkLog" value="network" />
+
+    <property name="debugPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+    <property name="errorPattern" value="${debugPattern}" />
+    <property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+    <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${errorLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>WARN</level>
+        </filter>
+        <encoder>
+            <pattern>${errorPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="ErrorOut" />
+    </appender>
+
+    <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${debugLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${debugPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="DebugOut" />
+    </appender>
+
+    <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${networkLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${networkPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="NetworkOut" />
+    </appender>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="STDOUT" />
+    </appender>
+
+    <logger name="network" level="INFO" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty" level="ERROR" />
+
+    <root level="INFO">
+        <appender-ref ref="AsyncDebugOut" />
+        <appender-ref ref="AsyncErrorOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </root>
+
+</configuration>
diff --git a/compose/config/api/apiParameters.yaml b/compose/config/api/apiParameters.yaml
new file mode 100644 (file)
index 0000000..19aa7f7
--- /dev/null
@@ -0,0 +1,84 @@
+server:
+  port: 6969
+  ssl:
+    enabled: false
+  servlet:
+    context-path: /policy/api/v1
+
+spring:
+  security.user:
+    name: policyadmin
+    password: zb!XztG34
+  mvc.converters.preferred-json-mapper: gson
+  datasource:
+    url: jdbc:postgresql://postgres:5432/policyadmin
+    driverClassName: org.postgresql.Driver
+    username: policy_user
+    password: policy_user
+  jpa:
+    hibernate:
+      ddl-auto: none
+      naming:
+        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+        implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
+
+policy-api:
+  name: ApiGroup
+
+database:
+  name: PolicyProviderParameterGroup
+  implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl
+  driver: org.postgresql.Driver
+  url: jdbc:postgresql://postgres:5432/policyadmin
+  user: policy_user
+  password: policy_user
+  persistenceUnit: PolicyDb
+
+policy-preload:
+  policyTypes:
+  - policytypes/onap.policies.monitoring.tcagen2.yaml
+  - policytypes/onap.policies.monitoring.tcagen2.v2.yaml
+  - policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
+  - policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml
+  - policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml
+  - policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml
+  - policytypes/onap.policies.Optimization.yaml
+  - policytypes/onap.policies.optimization.Resource.yaml
+  - policytypes/onap.policies.optimization.Service.yaml
+  - policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml
+  - policytypes/onap.policies.optimization.resource.DistancePolicy.yaml
+  - policytypes/onap.policies.optimization.resource.HpaPolicy.yaml
+  - policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml
+  - policytypes/onap.policies.optimization.resource.PciPolicy.yaml
+  - policytypes/onap.policies.optimization.service.QueryPolicy.yaml
+  - policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml
+  - policytypes/onap.policies.optimization.resource.Vim_fit.yaml
+  - policytypes/onap.policies.optimization.resource.VnfPolicy.yaml
+  - policytypes/onap.policies.controlloop.guard.Common.yaml
+  - policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml
+  - policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml
+  - policytypes/onap.policies.controlloop.guard.common.MinMax.yaml
+  - policytypes/onap.policies.controlloop.guard.common.Filter.yaml
+  - policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml
+  - policytypes/onap.policies.Naming.yaml
+  - policytypes/onap.policies.Match.yaml
+  - policytypes/onap.policies.native.Drools.yaml
+  - policytypes/onap.policies.native.Xacml.yaml
+  - policytypes/onap.policies.native.Apex.yaml
+  - policytypes/onap.policies.controlloop.operational.Common.yaml
+  - policytypes/onap.policies.controlloop.operational.common.Apex.yaml
+  - policytypes/onap.policies.controlloop.operational.common.Drools.yaml
+  - policytypes/onap.policies.native.opa.yaml
+  policies:
+  - policies/opa.policy.slice.capacity.check.tosca.yaml
+  - policies/sdnc.policy.naming.input.tosca.yaml
+
+management:
+  endpoints:
+    web:
+      base-path: /
+      exposure:
+        include: health,metrics,prometheus
+      path-mapping:
+        -metrics: plain-metrics
+        -prometheus: metrics
diff --git a/compose/config/api/groups.json b/compose/config/api/groups.json
new file mode 100644 (file)
index 0000000..6ee30e1
--- /dev/null
@@ -0,0 +1,137 @@
+{
+  "groups": [
+    {
+      "name": "defaultGroup",
+      "version": "1.0.0",
+      "description": "The default group that registers all supported policy types and pdps.",
+      "pdpGroupState": "ACTIVE",
+      "pdpSubgroups": [
+        {
+          "pdpType": "xacml",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.MinMax",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Blacklist",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Filter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.monitoring.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.AffinityPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.DistancePolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.HpaPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.OptimizationPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.PciPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.QueryPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.SubscriberPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.Vim_fit",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.VnfPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Xacml",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.Naming",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.match.*",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": [
+            {
+              "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+              "version": "1.0.0"
+            }
+          ]
+        },
+        {
+          "pdpType": "drools",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Drools",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Controller",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Artifact",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        },
+        {
+          "pdpType": "apex",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Apex",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        }
+      ]
+    }
+  ]
+}
diff --git a/compose/config/api/logback.xml b/compose/config/api/logback.xml
new file mode 100644 (file)
index 0000000..83a7099
--- /dev/null
@@ -0,0 +1,207 @@
+<!--
+  ============LICENSE_START=======================================================
+  policy-api
+  ================================================================================
+  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ============LICENSE_END=========================================================
+  -->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <property name="logDir" value="${POLICY_LOGS}" />
+
+    <property name="errorLog" value="error" />
+    <property name="debugLog" value="debug" />
+    <property name="networkLog" value="network" />
+
+    <property name="metricLog" value="metric" />
+    <property name="transactionLog" value="audit" />
+
+    <property name="debugPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+    <property name="errorPattern" value="${debugPattern}" />
+    <property name="networkPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+    <property
+        name="mpPreamble"
+        value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" />
+
+    <property
+        name="mpTime"
+        value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" />
+
+    <property
+        name="mpLine1"
+        value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" />
+
+    <property
+        name="mpLine2"
+        value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" />
+
+    <property
+        name="mpLine3"
+        value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" />
+
+    <property
+        name="mpLine4"
+        value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
+
+
+    <property name="metricPattern"
+        value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" />
+
+    <property name="transactionPattern" value="${metricPattern}" />
+
+    <appender name="ErrorOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${errorLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>WARN</level>
+        </filter>
+        <encoder>
+            <pattern>${errorPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncErrorOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="ErrorOut" />
+    </appender>
+
+    <appender name="DebugOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${debugLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${debugPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncDebugOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="DebugOut" />
+    </appender>
+
+    <appender name="NetworkOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${networkLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${networkPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncNetworkOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="NetworkOut" />
+    </appender>
+
+    <appender name="MetricOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${metricLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${metricPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncMetricOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="MetricOut" />
+    </appender>
+
+    <appender name="TransactionOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${transactionLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${transactionPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncTransactionOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="TransactionOut" />
+    </appender>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="STDOUT" />
+    </appender>
+
+
+    <logger name="network" level="INFO" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty.server.RequestLog" level="info"
+        additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty" level="ERROR" />
+
+    <root level="INFO">
+        <appender-ref ref="AsyncDebugOut" />
+        <appender-ref ref="AsyncErrorOut" />
+        <appender-ref ref="AsyncMetricOut" />
+        <appender-ref ref="AsyncTransactionOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </root>
+
+</configuration>
diff --git a/compose/config/clamp/groups.json b/compose/config/clamp/groups.json
new file mode 100644 (file)
index 0000000..6ee30e1
--- /dev/null
@@ -0,0 +1,137 @@
+{
+  "groups": [
+    {
+      "name": "defaultGroup",
+      "version": "1.0.0",
+      "description": "The default group that registers all supported policy types and pdps.",
+      "pdpGroupState": "ACTIVE",
+      "pdpSubgroups": [
+        {
+          "pdpType": "xacml",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.MinMax",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Blacklist",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Filter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.monitoring.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.AffinityPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.DistancePolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.HpaPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.OptimizationPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.PciPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.QueryPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.SubscriberPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.Vim_fit",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.VnfPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Xacml",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.Naming",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.match.*",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": [
+            {
+              "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+              "version": "1.0.0"
+            }
+          ]
+        },
+        {
+          "pdpType": "drools",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Drools",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Controller",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Artifact",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        },
+        {
+          "pdpType": "apex",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Apex",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        }
+      ]
+    }
+  ]
+}
diff --git a/compose/config/clamp/logback.xml b/compose/config/clamp/logback.xml
new file mode 100644 (file)
index 0000000..d583333
--- /dev/null
@@ -0,0 +1,212 @@
+<!--
+  ============LICENSE_START=======================================================
+  policy-clamp
+  ================================================================================
+  Copyright (C) 2021,2025 Nordix Foundation.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+  -->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <property name="logDir" value="${POLICY_LOGS}" />
+
+    <property name="errorLog" value="error" />
+    <property name="debugLog" value="debug" />
+    <property name="networkLog" value="acm-network" />
+
+    <property name="metricLog" value="metric" />
+    <property name="transactionLog" value="audit" />
+
+    <property name="debugPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+    <property name="errorPattern" value="${debugPattern}" />
+    <property name="networkPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+    <property
+        name="mpPreamble"
+        value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" />
+
+    <property
+        name="mpTime"
+        value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" />
+
+    <property
+        name="mpLine1"
+        value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" />
+
+    <property
+        name="mpLine2"
+        value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" />
+
+    <property
+        name="mpLine3"
+        value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" />
+
+    <property
+        name="mpLine4"
+        value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
+
+
+    <property name="metricPattern"
+        value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" />
+
+    <property name="transactionPattern" value="${metricPattern}" />
+
+    <appender name="ErrorOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${errorLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>WARN</level>
+        </filter>
+        <encoder>
+            <pattern>${errorPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncErrorOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="ErrorOut" />
+    </appender>
+
+    <appender name="DebugOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${debugLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${debugPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncDebugOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="DebugOut" />
+    </appender>
+
+    <appender name="NetworkOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${networkLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${networkPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncNetworkOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="NetworkOut" />
+    </appender>
+
+    <appender name="MetricOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${metricLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${metricPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncMetricOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="MetricOut" />
+    </appender>
+
+    <appender name="TransactionOut"
+        class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${transactionLog}.log</file>
+        <rollingPolicy
+            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${transactionPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncTransactionOut"
+        class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="TransactionOut" />
+    </appender>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="STDOUT" />
+    </appender>
+
+    <logger name="network" level="OFF" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="acm-network" level="INFO" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty" level="ERROR" />
+
+    <root level="INFO">
+        <appender-ref ref="AsyncDebugOut" />
+        <appender-ref ref="AsyncErrorOut" />
+        <appender-ref ref="AsyncMetricOut" />
+        <appender-ref ref="AsyncTransactionOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </root>
+
+</configuration>
diff --git a/compose/config/db-migrator/init_pg.sh b/compose/config/db-migrator/init_pg.sh
new file mode 100755 (executable)
index 0000000..712d0d2
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+#  Copyright (C) 2022, 2024 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+export POLICY_HOME=/opt/app/policy
+export SQL_USER=${PGSQL_USER}
+export SQL_PASSWORD=${PGSQL_PASSWORD}
+export SCRIPT_DIRECTORY=postgres
+
+for schema in ${SQL_DB}; do
+    echo "Initializing $schema..."
+    /opt/app/policy/bin/prepare_upgrade.sh ${schema}
+
+    /opt/app/policy/bin/db-migrator-pg -s ${schema} -o report
+
+    /opt/app/policy/bin/db-migrator-pg -s ${schema} -o upgrade
+    rc=$?
+
+    /opt/app/policy/bin/db-migrator-pg -s ${schema} -o report
+
+    if [ "$rc" != 0 ]; then
+        break
+    fi
+done
+
+nc -l -p 6824
+
+exit $rc
diff --git a/compose/config/db-pg/db-pg.conf b/compose/config/db-pg/db-pg.conf
new file mode 100644 (file)
index 0000000..ee26454
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (C) 2022, 2024 Nordix Foundation. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+PGSQL_ROOT_PASSWORD=secret
+PGSQL_USER=policy_user
+PGSQL_PASSWORD=policy_user
+PGPASSWORD=policy_user
+POSTGRES_PASSWORD=policy_user
diff --git a/compose/config/db-pg/db-pg.sh b/compose/config/db-pg/db-pg.sh
new file mode 100755 (executable)
index 0000000..681191f
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash -xv
+# Copyright (C) 2022, 2024 Nordix Foundation. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+psql -U postgres -d postgres --command "CREATE USER ${PGSQL_USER} WITH PASSWORD '${PGSQL_PASSWORD}';"
+
+for db in migration pooling policyadmin policyclamp operationshistory clampacm
+do
+    psql -U postgres -d postgres --command "CREATE DATABASE ${db};"
+    psql -U postgres -d postgres --command "ALTER DATABASE ${db} OWNER TO ${PGSQL_USER} ;"
+    psql -U postgres -d postgres --command "GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${PGSQL_USER} ;"
+done
\ No newline at end of file
diff --git a/compose/config/nginx/nginx-acm.conf b/compose/config/nginx/nginx-acm.conf
new file mode 100644 (file)
index 0000000..59d1210
--- /dev/null
@@ -0,0 +1,17 @@
+user nginx;
+
+events {
+    worker_connections 1000;
+}
+
+http {
+    upstream runtime {
+        server policy-clamp-runtime-acm-replica:6969;
+    }
+    server {
+        listen 30007;
+        location / {
+            proxy_pass http://runtime;
+        }
+    }
+}
diff --git a/compose/config/nginx/nginx.conf b/compose/config/nginx/nginx.conf
new file mode 100644 (file)
index 0000000..08d6562
--- /dev/null
@@ -0,0 +1,18 @@
+user nginx;
+
+events {
+    worker_connections 1000;
+}
+
+http {
+    upstream pdps {
+        server apexpdp:6969;
+        server apexpdp:23324;
+    }
+    server {
+        listen 30001;
+        location / {
+            proxy_pass http://pdps;
+        }
+    }
+}
diff --git a/compose/config/pap/groups.json b/compose/config/pap/groups.json
new file mode 100644 (file)
index 0000000..bd5c286
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "groups": [
+    {
+      "name": "defaultGroup",
+      "version": "1.0.0",
+      "description": "The default group that registers all supported policy types and pdps.",
+      "pdpGroupState": "ACTIVE",
+      "pdpSubgroups": [
+        {
+          "pdpType": "apex",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Apex",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 0,
+          "desiredInstanceCount": 1,
+          "policies": []
+        }
+      ]
+    }
+  ]
+}
diff --git a/compose/config/pap/logback.xml b/compose/config/pap/logback.xml
new file mode 100644 (file)
index 0000000..a88f60a
--- /dev/null
@@ -0,0 +1,120 @@
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2019 Nordix Foundation.
+   Modifications Copyright (C) 2019 AT&T Intellectual Property.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <property name="logDir" value="${POLICY_LOGS}" />
+
+    <property name="errorLog" value="error" />
+    <property name="debugLog" value="debug" />
+    <property name="networkLog" value="network" />
+
+    <property name="debugPattern"
+        value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+    <property name="errorPattern" value="${debugPattern}" />
+    <property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+    <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${errorLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>WARN</level>
+        </filter>
+        <encoder>
+            <pattern>${errorPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="ErrorOut" />
+    </appender>
+
+    <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${debugLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${debugPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="DebugOut" />
+    </appender>
+
+    <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${logDir}/${networkLog}.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+            </fileNamePattern>
+            <maxFileSize>50MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>10GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${networkPattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="NetworkOut" />
+    </appender>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
+        <appender-ref ref="STDOUT" />
+    </appender>
+
+    <logger name="network" level="INFO" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
+        <appender-ref ref="AsyncNetworkOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </logger>
+
+    <logger name="org.eclipse.jetty" level="ERROR" />
+
+    <root level="INFO">
+        <appender-ref ref="AsyncDebugOut" />
+        <appender-ref ref="AsyncErrorOut" />
+        <appender-ref ref="AsyncStdOut" />
+    </root>
+
+</configuration>
diff --git a/compose/config/pap/papParameters.yaml b/compose/config/pap/papParameters.yaml
new file mode 100644 (file)
index 0000000..868fc9a
--- /dev/null
@@ -0,0 +1,86 @@
+spring:
+  security:
+    user:
+      name: policyadmin
+      password: zb!XztG34
+  http:
+    converters:
+      preferred-json-mapper: gson
+  datasource:
+    url: jdbc:postgresql://postgres:5432/policyadmin
+    driverClassName: org.postgresql.Driver
+    username: policy_user
+    password: policy_user
+  jpa:
+    hibernate:
+      ddl-auto: none
+      naming:
+        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+        implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
+
+server:
+  port: 6969
+  servlet:
+    context-path: /policy/pap/v1
+  ssl:
+    enabled: false
+
+pap:
+  name: PapGroup
+  topic:
+    pdp-pap.name: policy-pdp-pap
+    notification.name: policy-notification
+    heartbeat.name: policy-heartbeat
+  pdpParameters:
+    heartBeatMs: 120000
+    updateParameters:
+      maxRetryCount: 1
+      maxWaitMs: 30000
+    stateChangeParameters:
+      maxRetryCount: 1
+      maxWaitMs: 30000
+  topicParameterGroup:
+    topicSources:
+    - topic: ${pap.topic.pdp-pap.name}
+      servers:
+      - kafka:9092
+      topicCommInfrastructure: kafka
+      useHttps: false
+      fetchTimeout: 15000
+    - topic: ${pap.topic.heartbeat.name}
+      effectiveTopic: ${pap.topic.pdp-pap.name}
+      consumerGroup: policy-pap
+      servers:
+      - kafka:9092
+      topicCommInfrastructure: kafka
+      useHttps: false
+      fetchTimeout: 15000
+    topicSinks:
+    - topic: ${pap.topic.pdp-pap.name}
+      servers:
+      - kafka:9092
+      topicCommInfrastructure: kafka
+      useHttps: false
+    - topic: ${pap.topic.notification.name}
+      servers:
+      - kafka:9092
+      topicCommInfrastructure: kafka
+      useHttps: false
+  healthCheckRestClientParameters:
+  - clientName: api
+    hostname: policy-api
+    port: 6969
+    userName: policyadmin
+    password: zb!XztG34
+    useHttps: false
+    basePath: policy/api/v1/healthcheck
+
+management:
+  endpoints:
+    web:
+      base-path: /
+      exposure:
+        include: health, metrics, prometheus
+      path-mapping:
+        -metrics: plain-metrics
+        -prometheus: metrics
diff --git a/compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json b/compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json
new file mode 100644 (file)
index 0000000..2e2105f
--- /dev/null
@@ -0,0 +1,44 @@
+{
+  "vnf-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0",
+  "vnf-name": "vfw-cnf-cds-test-1-vnf",
+  "vnf-type": "vfw_cnf_cds/null",
+  "service-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0",
+  "prov-status": "ACTIVE",
+  "orchestration-status": "Assigned",
+  "in-maint": false,
+  "is-closed-loop-disabled": false,
+  "resource-version": "1607506390862",
+  "model-invariant-id": "vTEST_XYZ",
+  "model-version-id": "vTEST",
+  "model-customization-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0",
+  "relationship-list": {
+    "relationship": [
+      {
+        "related-to": "service-instance",
+        "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+        "related-link": "/aai/v14/business/customers/customer/DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf/service-subscriptions/service-subscription/vFWDT/service-instances/service-instance/55322ada-145a-492e-b196-0d171539a4b2",
+        "relationship-data": [
+          {
+            "relationship-key": "customer.global-customer-id",
+            "relationship-value": "DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf"
+          },
+          {
+            "relationship-key": "service-subscription.service-type",
+            "relationship-value": "vFWDT"
+          },
+          {
+            "relationship-key": "service-instance.service-instance-id",
+            "relationship-value": "55322ada-145a-492e-b196-0d171539a4b2"
+          }
+        ],
+        "related-to-property": [
+          {
+            "property-key": "service-instance.service-instance-name",
+            "property-value": "Service_Ete_Namea337dd5b-4620-4ea6-bc3f-6edf1124d659"
+          }
+        ]
+      }
+    ]
+  }
+}
+
diff --git a/compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json b/compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json
new file mode 100644 (file)
index 0000000..4f03bbf
--- /dev/null
@@ -0,0 +1,33 @@
+{
+    "correlationUUID": null,
+    "commonHeader": {
+        "timestamp": "2020-12-16T10:29:00.450Z",
+        "originatorId": "POLICY",
+        "requestId": "f392e439-c176-411b-b972-8acadac0f8df",
+        "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006",
+        "flags": null
+    },
+    "actionIdentifiers": {
+        "blueprintName": "apex-example-cba",
+        "blueprintVersion": "1.0.0",
+        "actionName": "modify-config",
+        "mode": "sync"
+    },
+    "status": {
+        "code": 200,
+        "eventType": "EVENT_COMPONENT_EXECUTED",
+        "timestamp": "2020-12-16T10:29:01.737Z",
+        "errorMessage": null,
+        "message": "success"
+    },
+    "payload": {
+        "modify-config-response": {
+            "execute-command-logs": [
+                "INFO:root:Arguments : Active,,"
+            ],
+            "prepare-environment-logs": [
+                "Installed pip packages:\n   requirements.txt\n\n"
+            ]
+        }
+    }
+}
diff --git a/compose/config/sim-all/cdsresponse/apex-example-cba-restart.json b/compose/config/sim-all/cdsresponse/apex-example-cba-restart.json
new file mode 100644 (file)
index 0000000..694bc6d
--- /dev/null
@@ -0,0 +1,33 @@
+{
+    "correlationUUID": null,
+    "commonHeader": {
+        "timestamp": "2020-12-16T10:30:46.213Z",
+        "originatorId": "POLICY",
+        "requestId": "f392e439-c176-411b-b972-8acadac0f8df",
+        "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006",
+        "flags": null
+    },
+    "actionIdentifiers": {
+        "blueprintName": "apex-example-cba",
+        "blueprintVersion": "1.0.0",
+        "actionName": "restart",
+        "mode": "sync"
+    },
+    "status": {
+        "code": 200,
+        "eventType": "EVENT_COMPONENT_EXECUTED",
+        "timestamp": "2020-12-16T10:30:46.828Z",
+        "errorMessage": null,
+        "message": "success"
+    },
+    "payload": {
+        "restart-response": {
+            "execute-command-logs": [
+                "INFO:root:Arguments : Active,,"
+            ],
+            "prepare-environment-logs": [
+                "Installed pip packages:\n   requirements.txt\n\n"
+            ]
+        }
+    }
+}
diff --git a/compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json b/compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json
new file mode 100644 (file)
index 0000000..7009a35
--- /dev/null
@@ -0,0 +1,35 @@
+{
+    "commonHeader": {
+        "timestamp": "2020-08-24T14:45:07.491Z",
+        "originatorId": "CDS",
+        "requestId": "123456",
+        "subRequestId": "123-123",
+        "flags": null
+    },
+    "actionIdentifiers": {
+        "blueprintName": "controlloop-hostname-update",
+        "blueprintVersion": "1.0.4",
+        "actionName": "update-config",
+        "mode": "sync"
+    },
+    "status": {
+        "code": 200,
+        "eventType": "EVENT_COMPONENT_EXECUTED",
+        "timestamp": "2020-08-24T14:45:12.863Z",
+        "errorMessage": null,
+        "message": "success"
+    },
+    "payload": {
+        "update-config-response": {
+            "execute-command-logs": [
+                "INFO:root:<data xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"/>",
+                "INFO:root:configuring Device....",
+                "INFO:root:Done Device Configuration Successfully",
+                "INFO:root:Device Configuration After modification",
+                "INFO:root:http://10.101.200.10:32777/restconf/config/network-topology:network-topology/topology/topology-netconf/node/927b2580-36d9-4f13-8421-3c9d43b7a57e/yang-ext:mount",
+                "INFO:root:<data xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><system xmlns=\"urn:opendaylight:hostname\"><hostname>testhost-1212332324343</hostname></system></data>"
+            ],
+            "prepare-environment-logs": ["Installed pip packages:\n   requirements.txt\n\n"]
+        }
+    }
+}
diff --git a/compose/config/sim-all/logback.xml b/compose/config/sim-all/logback.xml
new file mode 100644 (file)
index 0000000..131b0fe
--- /dev/null
@@ -0,0 +1,42 @@
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2020 AT&T Intellectual Property.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+    <!--
+        This is only used for testing and only a snapshot docker image is generated,
+        thus it is not necessary for the messages to following the ONAP standard.
+        Therefore, keeping it short so it's easier to wade through the output.
+
+        Also sending all output to stdout instead of to a log file; it can be viewed
+        via "docker logs" or captured by kubernetes.
+     -->
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>%d %level  %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="STDOUT" />
+    </root>
+
+</configuration>
diff --git a/compose/config/sim-all/simParameters.json b/compose/config/sim-all/simParameters.json
new file mode 100644 (file)
index 0000000..257814f
--- /dev/null
@@ -0,0 +1,43 @@
+{
+    "restServers": [
+        {
+            "name": "A&AI simulator",
+            "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs",
+            "host": "0.0.0.0",
+            "port": 6666,
+            "https": false,
+            "userName": "policy@policy.onap.org",
+            "password": "demo123456!",
+            "resourceLocation": "/opt/app/policy/simulators/etc/mounted/aairesponse/"
+        },
+        {
+            "name": "SDNC simulator",
+            "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs",
+            "host": "0.0.0.0",
+            "port": 6668,
+            "https": false
+        },
+        {
+            "name": "SO simulator",
+            "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs",
+            "host": "0.0.0.0",
+            "port": 6669,
+            "https": false,
+            "userName": "InfraPortalClient",
+            "password": "password1$"
+        }
+    ],
+
+    "grpcServer": {
+        "name": "CDS simulator",
+        "providerClass": "org.onap.policy.simulators.CdsSimulator",
+        "host": "0.0.0.0",
+        "port": 6680,
+        "timeout": 30,
+        "username": "ccsdkapps",
+        "password": "ccsdkapps",
+        "resourceLocation": "/opt/app/policy/simulators/etc/mounted/cdsresponse/",
+        "successRepeatCount": 0,
+        "requestedResponseDelayMs": 0
+    }
+}
diff --git a/compose/export-ports.sh b/compose/export-ports.sh
new file mode 100755 (executable)
index 0000000..6d24059
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright 2023-2025 OpenInfra Foundation Europe. All rights reserved.
+# Modifications Copyright 2024 Deutsche Telekom
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES
+export APEX_PORT=30001
+export APEX_EVENTS_PORT=23324
+export API_PORT=30002
+export PAP_PORT=30003
+export ACM_PORT=30007
+export POLICY_PARTICIPANT_PORT=30008
+export SIM_PARTICIPANT1_PORT=30011
+export SIM_PARTICIPANT2_PORT=30013
+export SIM_PARTICIPANT3_PORT=30014
+export SIMULATOR_PORT=30904
+export KAFKA_PORT=29092
+export PROMETHEUS_PORT=30259
+export GRAFANA_PORT=30269
diff --git a/compose/get-k8s-versions.sh b/compose/get-k8s-versions.sh
new file mode 100755 (executable)
index 0000000..1adc8ad
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/bash
+
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
+#  Modifications Copyright 2024-2025 Deutsche Telekom
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# Fetches the latest snapshot tags of policy components and updates the values.yaml in policy helm chart.
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+VALUES_YML=${WORKSPACE}/helm/policy/values.yaml
+
+policy_components=(policy-api policy-pap policy-apex-pdp policy-models-simulator policy-pdpd-cl policy-xacml-pdp policy-distribution policy-db-migrator policy-opa-pdp)
+
+clamp_components=(policy-clamp-runtime-acm policy-clamp-ac-kserve-ppnt policy-clamp-ac-k8s-ppnt policy-clamp-ac-pf-ppnt policy-clamp-ac-http-ppnt policy-clamp-ac-sim-ppnt policy-clamp-ac-a1pms-ppnt)
+
+version_tags=$(source ${WORKSPACE}/compose/get-versions.sh)
+export version_tags
+
+function update_yaml() {
+   local version=$(cut -d ":" -f2 <<< $(echo $version_tags | tr ' ' '\n' | grep "$1:" | tr -d '"'))
+   echo "$2:$version"
+   sed -i -e "s#onap/$2:[^=&]*#onap/$2:$version#g" $VALUES_YML
+}
+
+function update_image_tags() {
+    sub_components=("$@")
+    for sub_component in ${sub_components[@]}
+    do
+        if [[ $1 == 'clamp' ]]
+        then
+           component=policy-clamp-ac-sim-ppnt
+        elif [[ $1 == 'policy' ]]
+       then
+            component=$sub_component
+       fi
+        update_yaml $component $sub_component
+    done
+}
+
+echo "Update the latest image tags:"
+update_image_tags policy ${policy_components[@]}
+update_image_tags clamp ${clamp_components[@]}
diff --git a/compose/get-versions-regression.sh b/compose/get-versions-regression.sh
new file mode 100755 (executable)
index 0000000..a867e47
--- /dev/null
@@ -0,0 +1,137 @@
+#! /bin/bash
+
+# ============LICENSE_START====================================================
+#  Copyright (C) 2024 Nordix Foundation. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+
+function getDockerVersion
+{
+    REPO=${1}
+    GERRIT_BRANCH=${2}
+    DEFAULT_DOCKER_IMAGE_NAME=${3:-}
+    DEFAULT_DOCKER_IMAGE_VERSION=${4:-}
+
+    REPO_RELEASE_DATA=$(
+        curl -qL --silent \
+            "https://github.com/onap/policy-parent/raw/${GERRIT_BRANCH}/integration/src/main/resources/release/pf_release_data.csv" |
+        grep "^policy/$REPO"
+    )
+
+    # shellcheck disable=SC2034
+    read -r repo \
+        latest_released_tag \
+        latest_snapshot_tag \
+        changed_files \
+        docker_images \
+        <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )"
+
+    if [[ -z "$docker_images" ]]
+    then
+        if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]]
+        then
+            echo "repo $REPO does not produce a docker image, execution terminated"
+            exit 1
+        else
+            docker_images="$DEFAULT_DOCKER_IMAGE_NAME"
+        fi
+    fi
+
+    # docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}')
+    docker_image_version=$latest_snapshot_tag
+    docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//")
+
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    fi
+
+    docker_image_version="$latest_released_tag"
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    fi
+
+    docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION"
+    if \
+        curl -qL --silent \
+            "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+            grep -q "$docker_image_version"
+    then
+        echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+        return
+    else
+        echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\""
+        exit 1
+    fi
+}
+
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+if [ $# -eq 0 ]; then
+    echo "No release versions provided. Fetching the default version for ACM and participants"
+    echo "Usage: $0 <acm_release> <participant_release> ..."
+    ACM_RELEASE=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                        "${WORKSPACE}"/.gitreview)
+    PPNT_RELEASE=$ACM_RELEASE
+fi
+if [ $1 ]; then
+    ACM_RELEASE=$1
+fi
+
+if [ $2 ]; then
+    PPNT_RELEASE=$2
+fi
+
+export POLICY_MARIADB_VER=10.10.2
+echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
+
+export POLICY_POSTGRES_VER=11.1
+echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER}
+
+getDockerVersion models $ACM_RELEASE "'policy-models-simulator'" 3.0.1
+export POLICY_MODELS_VERSION="$docker_image_version"
+
+getDockerVersion docker $ACM_RELEASE
+export POLICY_DOCKER_VERSION="$docker_image_version"
+
+getDockerVersion api $ACM_RELEASE
+export POLICY_API_VERSION="$docker_image_version"
+
+getDockerVersion pap $ACM_RELEASE
+export POLICY_PAP_VERSION="$docker_image_version"
+
+getDockerVersion apex-pdp $ACM_RELEASE
+export POLICY_APEX_PDP_VERSION="$docker_image_version"
+
+getDockerVersion clamp $ACM_RELEASE
+export POLICY_CLAMP_VERSION="$docker_image_version"
+
+getDockerVersion clamp $PPNT_RELEASE
+export POLICY_CLAMP_PPNT_VERSION="$docker_image_version"
diff --git a/compose/get-versions.sh b/compose/get-versions.sh
new file mode 100755 (executable)
index 0000000..0a9f89e
--- /dev/null
@@ -0,0 +1,138 @@
+#! /bin/bash
+# ============LICENSE_START====================================================
+#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021-2025 Nordix Foundation.
+#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+#  Modifications Copyright 2024-2025 Deutsche Telekom
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+#default values
+export POLICY_POSTGRES_VER=16.4
+echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER}
+
+if [ -n "${USE_LOCAL_IMAGES}" ] && [ "${USE_LOCAL_IMAGES}" = "true" ]; then
+    echo "Running with local images."
+    export POLICY_DOCKER_VERSION="latest"
+    export POLICY_MODELS_VERSION="latest"
+    export POLICY_API_VERSION="latest"
+    export POLICY_PAP_VERSION="latest"
+    export POLICY_APEX_PDP_VERSION="latest"
+    export POLICY_CLAMP_VERSION="latest"
+    export POLICY_CLAMP_PPNT_VERSION=$POLICY_CLAMP_VERSION
+    export POLICY_DROOLS_APPS_VERSION="latest"
+    export CONTAINER_LOCATION=""
+
+else
+    echo "Downloading latest released images..."
+    export CONTAINER_LOCATION="nexus3.onap.org:10001/"
+    GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                        "${WORKSPACE}"/.gitreview)
+
+    echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+
+    function getDockerVersion
+    {
+        REPO=${1}
+        DEFAULT_DOCKER_IMAGE_NAME=${2:-}
+        DEFAULT_DOCKER_IMAGE_VERSION=${3:-}
+
+        REPO_RELEASE_DATA=$(
+            curl -qL --silent \
+                "https://github.com/onap/policy-parent/raw/$GERRIT_BRANCH/integration/src/main/resources/release/pf_release_data.csv" |
+            grep "^policy/$REPO"
+        )
+
+        # shellcheck disable=SC2034
+        read -r repo \
+            latest_released_tag \
+            latest_snapshot_tag \
+            changed_files \
+            docker_images \
+            <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )"
+
+        if [[ -z "$docker_images" ]]
+        then
+            if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]]
+            then
+                echo "repo $REPO does not produce a docker image, execution terminated"
+                exit 1
+            else
+                docker_images="$DEFAULT_DOCKER_IMAGE_NAME"
+            fi
+        fi
+
+        # docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}')
+        docker_image_version=$latest_snapshot_tag
+        docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//")
+
+        if \
+            curl -qL --silent \
+                "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" |
+                grep -q "$docker_image_version"
+        then
+            echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+            return
+        fi
+
+        docker_image_version="$latest_released_tag"
+        if \
+            curl -qL --silent \
+                "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+                grep -q "$docker_image_version"
+        then
+            echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+            return
+        fi
+
+        docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION"
+        if \
+            curl -qL --silent \
+                "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" |
+                grep -q "$docker_image_version"
+        then
+            echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\""
+            return
+        else
+            echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\""
+            exit 1
+        fi
+    }
+
+    getDockerVersion docker
+    export POLICY_DOCKER_VERSION="$docker_image_version"
+
+    getDockerVersion models
+    export POLICY_MODELS_VERSION="$docker_image_version"
+
+    getDockerVersion api
+    export POLICY_API_VERSION="$docker_image_version"
+
+    getDockerVersion pap
+    export POLICY_PAP_VERSION="$docker_image_version"
+
+    getDockerVersion apex-pdp
+    export POLICY_APEX_PDP_VERSION="$docker_image_version"
+
+    getDockerVersion clamp
+    export POLICY_CLAMP_VERSION="$docker_image_version"
+    export POLICY_CLAMP_PPNT_VERSION=$POLICY_CLAMP_VERSION
+fi
diff --git a/compose/loaddockerimage.sh b/compose/loaddockerimage.sh
new file mode 100755 (executable)
index 0000000..200cedb
--- /dev/null
@@ -0,0 +1,85 @@
+#! /bin/bash -x
+
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023 Nordix Foundation. All rights reserved.
+
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# This script gets executed in Nordix infra for consuming locally generated docker images for k8s tests.
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+
+
+echo "Setting project configuration for: $PROJECT"
+case $PROJECT in
+
+clamp | policy-clamp)
+    echo "CLAMP"
+    env
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:$POLICY_CLAMP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:$POLICY_CLAMP_VERSION -o ./runtime_image.tar
+        microk8s images import ./runtime_image.tar
+    fi
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-clamp-ac-http-ppnt:$POLICY_CLAMP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-clamp-ac-http-ppnt:$POLICY_CLAMP_VERSION -o ./http_ppnt_image.tar
+        microk8s images import ./http_ppnt_image.tar
+    fi
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-clamp-ac-k8s-ppnt:$POLICY_CLAMP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-clamp-ac-k8s-ppnt:$POLICY_CLAMP_VERSION -o ./k8s_ppnt_image.tar
+        microk8s images import ./k8s_ppnt_image.tar
+    fi
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-clamp-ac-pf-ppnt:$POLICY_CLAMP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-clamp-ac-pf-ppnt:$POLICY_CLAMP_VERSION -o ./pf_ppnt_image.tar
+        microk8s images import ./pf_ppnt_image.tar
+    fi
+    ;;
+
+api | policy-api)
+    echo "API"
+    env
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-api:$POLICY_API_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-api:$POLICY_API_VERSION -o ./image.tar
+        microk8s images import ./image.tar
+    fi
+    ;;
+
+pap | policy-pap)
+    echo "PAP"
+    env
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-pap:$POLICY_PAP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-pap:$POLICY_PAP_VERSION -o ./image.tar
+        microk8s images import ./image.tar
+    fi
+    ;;
+
+apex-pdp | policy-apex-pdp)
+    echo "APEX"
+    env
+    if [ "$(docker images nexus3.onap.org:10001/onap/policy-apex-pdp:$POLICY_APEX_PDP_VERSION | grep -v REPOSITORY | wc -l)" == 1 ];  then
+        docker save nexus3.onap.org:10001/onap/policy-apex-pdp:$POLICY_APEX_PDP_VERSION -o ./image.tar
+        microk8s images import ./image.tar
+    fi
+    ;;
+
+*)
+    echo "UNKNOWN"
+    ;;
+esac
diff --git a/compose/metrics/dashboard.yaml b/compose/metrics/dashboard.yaml
new file mode 100644 (file)
index 0000000..b6e31e4
--- /dev/null
@@ -0,0 +1,33 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2022 Nordix Foundation.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+
+apiVersion: 1
+
+providers:
+  - name: 'Policy Framework'
+    orgId: 1
+    folder: 'Policy Framework'
+    folderUid: ''
+    type: file
+    disableDeletion: false
+    updateIntervalSeconds: 60
+    allowUiUpdates: true
+    editable: true
+    options:
+      path: /var/lib/grafana/dashboards
+      foldersFromFilesStructure: true
diff --git a/compose/metrics/dashboards/dashboard-for-springboot.json b/compose/metrics/dashboards/dashboard-for-springboot.json
new file mode 100644 (file)
index 0000000..d7654df
--- /dev/null
@@ -0,0 +1,3938 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "builtIn": 1,
+        "datasource": {
+          "type": "datasource",
+          "uid": "grafana"
+        },
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "target": {
+          "limit": 100,
+          "matchAny": false,
+          "tags": [],
+          "type": "dashboard"
+        },
+        "type": "dashboard"
+      }
+    ]
+  },
+  "description": "Dashboard for Spring Boot Statistics(by micrometer-prometheus)",
+  "editable": true,
+  "fiscalYearStartMonth": 0,
+  "gnetId": 14430,
+  "graphTooltip": 0,
+  "id": 5,
+  "links": [],
+  "liveNow": false,
+  "panels": [
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 54,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Basic Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 0,
+        "y": 1
+      },
+      "id": 52,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "process_uptime_seconds{application=\"$application\",instance=\"$instance\"}",
+          "format": "time_series",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Uptime",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "dateTimeAsIso"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 6,
+        "y": 1
+      },
+      "id": 56,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "process_start_time_seconds{application=\"$application\",instance=\"$instance\"}*1000",
+          "format": "time_series",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Start time",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "max": 100,
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50,172,45,0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237,129,40,0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245,54,54,0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 12,
+        "y": 1
+      },
+      "id": 58,
+      "maxDataPoints": 100,
+      "options": {
+        "minVizHeight": 75,
+        "minVizWidth": 75,
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showThresholdLabels": false,
+        "showThresholdMarkers": true,
+        "sizing": "auto"
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "sum(jvm_memory_used_bytes{application=\"$application\",instance=\"$instance\",area=\"heap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\",area=\"heap\"})",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Heap Used",
+      "type": "gauge"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            },
+            {
+              "options": {
+                "from": -1e+32,
+                "result": {
+                  "text": "N/A"
+                },
+                "to": 0
+              },
+              "type": "range"
+            }
+          ],
+          "max": 100,
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50,172,45,0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237,129,40,0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245,54,54,0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 18,
+        "y": 1
+      },
+      "id": 60,
+      "maxDataPoints": 100,
+      "options": {
+        "minVizHeight": 75,
+        "minVizWidth": 75,
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showThresholdLabels": false,
+        "showThresholdMarkers": true,
+        "sizing": "auto"
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "sum(jvm_memory_used_bytes{application=\"$application\",instance=\"$instance\",area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\",area=\"nonheap\"})",
+          "format": "time_series",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Non-Heap Used",
+      "type": "gauge"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 0,
+        "y": 7
+      },
+      "id": 95,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "multi",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "system_cpu_usage{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "System CPU Usage",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "process_cpu_usage{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Process CPU Usage",
+          "refId": "B"
+        }
+      ],
+      "title": "CPU Usage",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 12,
+        "y": 7
+      },
+      "id": 96,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "multi",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "system_load_average_1m{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Load Average [1m]",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "system_cpu_count{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "CPU Core Size",
+          "refId": "B"
+        }
+      ],
+      "title": "Load Average",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 8,
+        "x": 0,
+        "y": 14
+      },
+      "id": 66,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "http_server_requests_seconds_count{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Server Requests Count",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 8,
+        "x": 8,
+        "y": 14
+      },
+      "id": 110,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "http_server_requests_seconds_sum{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Server Requests Sum",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 8,
+        "x": 16,
+        "y": 14
+      },
+      "id": 111,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "http_server_requests_seconds_max{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Server Requests Max",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 20
+      },
+      "id": 48,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Statistics - Memory",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 8,
+        "x": 0,
+        "y": 21
+      },
+      "id": 85,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "repeat": "memory_pool_heap",
+      "repeatDirection": "h",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_memory_used_bytes{instance=\"$instance\",application=\"$application\",id=\"$memory_pool_heap\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Used",
+          "refId": "C"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_memory_committed_bytes{instance=\"$instance\",application=\"$application\",id=\"$memory_pool_heap\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Commited",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_memory_max_bytes{instance=\"$instance\",application=\"$application\",id=\"$memory_pool_heap\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Max",
+          "refId": "B"
+        }
+      ],
+      "title": "$memory_pool_heap (heap)",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 6,
+        "x": 0,
+        "y": 31
+      },
+      "id": 88,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "repeat": "memory_pool_nonheap",
+      "repeatDirection": "h",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_memory_used_bytes{instance=\"$instance\",id=\"CodeHeap 'non-nmethods'\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Used",
+          "refId": "C"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_memory_committed_bytes{instance=\"$instance\",id=\"CodeHeap 'non-nmethods'\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Commited",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_memory_max_bytes{instance=\"$instance\",id=\"CodeHeap 'non-nmethods'\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Max",
+          "refId": "B"
+        }
+      ],
+      "title": "$memory_pool_nonheap (non-heap)",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 41
+      },
+      "id": 80,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(jvm_classes_unloaded_classes_total{instance=\"$instance\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Classes Unloaded",
+          "refId": "A"
+        }
+      ],
+      "title": "Classes Unloaded",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 12,
+        "y": 49
+      },
+      "id": 83,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\",id=\"mapped\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Used Bytes",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\",id=\"mapped\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Capacity Bytes",
+          "refId": "B"
+        }
+      ],
+      "title": "Mapped Buffers",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 0,
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 51
+      },
+      "id": 50,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_classes_loaded_classes{instance=\"$instance\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Classes Loaded",
+          "refId": "A"
+        }
+      ],
+      "title": "Classes Loaded",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 56
+      },
+      "id": 78,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(jvm_gc_memory_allocated_bytes_total{instance=\"$instance\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "allocated",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(jvm_gc_memory_promoted_bytes_total{instance=\"$instance\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "promoted",
+          "refId": "B"
+        }
+      ],
+      "title": "Memory Allocate/Promote",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 0,
+        "y": 59
+      },
+      "id": 82,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\",application=\"$application\",id=\"direct\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Used Bytes",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\",application=\"$application\",id=\"direct\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Capacity Bytes",
+          "refId": "B"
+        }
+      ],
+      "title": "Direct Buffers",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 66
+      },
+      "id": 68,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_daemon_threads{instance=\"$instance\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Daemon",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_live_threads{instance=\"$instance\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Live",
+          "refId": "B"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_peak_threads{instance=\"$instance\",application=\"$application\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Peak",
+          "refId": "C"
+        }
+      ],
+      "title": "Threads",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 74
+      },
+      "id": 72,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Statistics - GC",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 12,
+        "x": 0,
+        "y": 75
+      },
+      "id": 74,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(jvm_gc_pause_seconds_count{instance=\"$instance\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{action}} [{{cause}}]",
+          "refId": "A"
+        }
+      ],
+      "title": "GC Count",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 12,
+        "x": 12,
+        "y": 75
+      },
+      "id": 76,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "irate(jvm_gc_pause_seconds_sum{instance=\"$instance\",application=\"$application\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{action}} [{{cause}}]",
+          "refId": "A"
+        }
+      ],
+      "title": "GC Stop the World Duration",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 85
+      },
+      "id": 34,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "HikariCP Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "normal"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 86
+      },
+      "id": 36,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "hikaricp_connections_active{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Active",
+          "refId": "B"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "hikaricp_connections_idle{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Idle",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "hikaricp_connections_pending{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Pending",
+          "refId": "C"
+        }
+      ],
+      "title": "Connections",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 86
+      },
+      "id": 40,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "hikaricp_connections_acquire_seconds_sum{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"} / hikaricp_connections_acquire_seconds_count{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Acquire Time",
+          "refId": "A"
+        }
+      ],
+      "title": "Connection Acquire Time",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 8,
+        "x": 0,
+        "y": 94
+      },
+      "id": 38,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "hikaricp_connections_creation_seconds_sum{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"} / hikaricp_connections_creation_seconds_count{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Creation Time",
+          "refId": "A"
+        }
+      ],
+      "title": "Connection Creation Time",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 8,
+        "x": 8,
+        "y": 94
+      },
+      "id": 42,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "hikaricp_connections_usage_seconds_sum{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"} / hikaricp_connections_usage_seconds_count{instance=\"$instance\",application=\"$application\",pool=\"$hikaricp\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "Usage Time",
+          "refId": "A"
+        }
+      ],
+      "title": "Connection Usage Time",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 100
+      },
+      "id": 101,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Database Stats",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 3,
+        "x": 0,
+        "y": 101
+      },
+      "id": 102,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "fieldOptions": {
+          "calcs": [
+            "lastNotNull"
+          ]
+        },
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "last"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jdbc_connections_active{instance=\"$instance\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Active Connections",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 3,
+        "x": 3,
+        "y": 101
+      },
+      "id": 106,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "fieldOptions": {
+          "calcs": [
+            "lastNotNull"
+          ]
+        },
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "last"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jdbc_connections_idle{instance=\"$instance\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Idle Connections",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 6,
+        "x": 6,
+        "y": 101
+      },
+      "id": 108,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "fieldOptions": {
+          "calcs": [
+            "lastNotNull"
+          ]
+        },
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "last"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(spring_data_repository_invocations_seconds_count{instance=\"$instance\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Total query executions",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 104
+      },
+      "id": 107,
+      "maxDataPoints": 100,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "min",
+            "max"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(rate(spring_data_repository_invocations_seconds_max{instance=\"$instance\"}[$__range]))",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "rate",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Response Time",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 112
+      },
+      "id": 18,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 24,
+        "x": 0,
+        "y": 113
+      },
+      "id": 4,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "irate(http_server_requests_seconds_count{instance=\"$instance\",application=\"$application\",uri!~\".*actuator.*\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Request Count",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 24,
+        "x": 0,
+        "y": 120
+      },
+      "id": 2,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "expr": "irate(http_server_requests_seconds_sum{instance=\"$instance\"}[$__range]) / irate(http_server_requests_seconds_count{instance=\"$instance\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{uri}}",
+          "range": true,
+          "refId": "A"
+        }
+      ],
+      "title": "Response Time",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 127
+      },
+      "id": 8,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Logback Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 0,
+        "y": 128
+      },
+      "id": 6,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "alias": "",
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "expr": "irate(logback_events_total{instance=\"$instance\",level=\"info\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "info",
+          "range": true,
+          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
+          "refId": "A"
+        }
+      ],
+      "title": "INFO logs",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 12,
+        "y": 128
+      },
+      "id": 10,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "alias": "",
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "expr": "irate(logback_events_total{instance=\"$instance\",level=\"error\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "error",
+          "range": true,
+          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
+          "refId": "A"
+        }
+      ],
+      "title": "ERROR logs",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 0,
+        "y": 135
+      },
+      "id": 14,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "alias": "",
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "expr": "irate(logback_events_total{instance=\"$instance\",level=\"warn\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "warn",
+          "range": true,
+          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
+          "refId": "A"
+        }
+      ],
+      "title": "WARN logs",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 8,
+        "y": 135
+      },
+      "id": 16,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "alias": "",
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "irate(logback_events_total{instance=\"$instance\",application=\"$application\",level=\"debug\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "debug",
+          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
+          "refId": "A"
+        }
+      ],
+      "title": "DEBUG logs",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 16,
+        "y": 135
+      },
+      "id": 20,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "alias": "",
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "expr": "irate(logback_events_total{instance=\"$instance\",level=\"trace\"}[$__range])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "trace",
+          "range": true,
+          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
+          "refId": "A"
+        }
+      ],
+      "title": "TRACE logs",
+      "type": "timeseries"
+    }
+  ],
+  "refresh": "10s",
+  "schemaVersion": 39,
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "current": {
+          "selected": false,
+          "text": "policy-api:6969",
+          "value": "policy-api:6969"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "label_values(jvm_classes_loaded_classes,instance)",
+        "hide": 0,
+        "includeAll": false,
+        "label": "Instance",
+        "multi": false,
+        "name": "instance",
+        "options": [],
+        "query": {
+          "query": "label_values(jvm_classes_loaded_classes,instance)",
+          "refId": "Prometheus-instance-Variable-Query"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "current": {
+          "isNone": true,
+          "selected": false,
+          "text": "None",
+          "value": ""
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "",
+        "hide": 0,
+        "includeAll": false,
+        "label": "Application",
+        "multi": false,
+        "name": "application",
+        "options": [],
+        "query": {
+          "query": "label_values(jvm_classes_loaded{instance=\"$instance\"},application)",
+          "refId": "Prometheus-application-Variable-Query"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "current": {
+          "selected": false,
+          "text": "HikariPool-1",
+          "value": "HikariPool-1"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "",
+        "hide": 0,
+        "includeAll": false,
+        "label": "HikariCP-Pool",
+        "multi": false,
+        "name": "hikaricp",
+        "options": [],
+        "query": {
+          "query": "label_values(hikaricp_connections{instance=\"$instance\",application=\"$application\"},pool)",
+          "refId": "Prometheus-hikaricp-Variable-Query"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "current": {
+          "selected": false,
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "",
+        "hide": 0,
+        "includeAll": true,
+        "label": "Memory Pool (heap)",
+        "multi": false,
+        "name": "memory_pool_heap",
+        "options": [],
+        "query": {
+          "query": "label_values(jvm_memory_used_bytes{application=\"$application\",instance=\"$instance\",area=\"heap\"},id)",
+          "refId": "Prometheus-memory_pool_heap-Variable-Query"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "current": {
+          "selected": false,
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "",
+        "hide": 0,
+        "includeAll": true,
+        "label": "Memory Pool (nonheap)",
+        "multi": false,
+        "name": "memory_pool_nonheap",
+        "options": [],
+        "query": {
+          "query": "label_values(jvm_memory_used_bytes{application=\"$application\",instance=\"$instance\",area=\"nonheap\"},id)",
+          "refId": "Prometheus-memory_pool_nonheap-Variable-Query"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      }
+    ]
+  },
+  "time": {
+    "from": "now-30m",
+    "to": "now"
+  },
+  "timepicker": {
+    "refresh_intervals": [
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "",
+  "title": "Spring Boot Statistics & Endpoint Metrics",
+  "uid": "OS7-NUiGz",
+  "version": 2,
+  "weekStart": ""
+}
\ No newline at end of file
diff --git a/compose/metrics/dashboards/dashboard-jvm-basic.json b/compose/metrics/dashboards/dashboard-jvm-basic.json
new file mode 100644 (file)
index 0000000..a7c2605
--- /dev/null
@@ -0,0 +1,3103 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "builtIn": 1,
+        "datasource": {
+          "type": "datasource",
+          "uid": "grafana"
+        },
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "limit": 100,
+        "name": "Annotations & Alerts",
+        "showIn": 0,
+        "target": {
+          "limit": 100,
+          "matchAny": false,
+          "tags": [],
+          "type": "dashboard"
+        },
+        "type": "dashboard"
+      },
+      {
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "enable": true,
+        "expr": "resets(process_uptime_seconds{job=\"$job\"}[1m]) > 0",
+        "iconColor": "rgba(255, 96, 96, 1)",
+        "name": "Restart Detection",
+        "showIn": 0,
+        "step": "1m",
+        "tagKeys": "restart-tag",
+        "textFormat": "uptime reset",
+        "titleFormat": "Restart"
+      }
+    ]
+  },
+  "description": "Dashboard for JVM Basic Metrics",
+  "editable": true,
+  "fiscalYearStartMonth": 0,
+  "gnetId": 4701,
+  "graphTooltip": 1,
+  "id": 5,
+  "links": [],
+  "liveNow": false,
+  "panels": [
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 125,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Quick Facts",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 3,
+        "x": 0,
+        "y": 1
+      },
+      "id": 63,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "(time()-process_start_time_seconds{job=\"$job\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "metric": "",
+          "range": true,
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Uptime",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "dateTimeAsIso"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 9,
+        "x": 3,
+        "y": 1
+      },
+      "id": 92,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "process_start_time_seconds{job=\"$job\"}*1000",
+          "format": "time_series",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Start time",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 2,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50, 172, 45, 0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237, 129, 40, 0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245, 54, 54, 0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 6,
+        "x": 12,
+        "y": 1
+      },
+      "id": 65,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Heap used",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 2,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            },
+            {
+              "options": {
+                "from": -1e+32,
+                "result": {
+                  "text": "N/A"
+                },
+                "to": 0
+              },
+              "type": "range"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50, 172, 45, 0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237, 129, 40, 0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245, 54, 54, 0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 3,
+        "w": 6,
+        "x": 18,
+        "y": 1
+      },
+      "id": 75,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Non-Heap used",
+      "type": "stat"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 4
+      },
+      "id": 127,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Memory",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 0,
+        "y": 5
+      },
+      "id": 24,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_committed{job=\"$job\", area=\"heap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "committed",
+          "refId": "B",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "refId": "C",
+          "step": 2400
+        }
+      ],
+      "title": "JVM Heap",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 6,
+        "y": 5
+      },
+      "id": 25,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_commited{job=\"$job\", area=\"nonheap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "committed",
+          "refId": "B",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "refId": "C",
+          "step": 2400
+        }
+      ],
+      "title": "JVM Non-Heap",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 12,
+        "y": 5
+      },
+      "id": 26,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_used{job=\"$job\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_committed{job=\"$job\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "committed",
+          "refId": "B",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_bytes_max{job=\"$job\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "refId": "C",
+          "step": 2400
+        }
+      ],
+      "title": "JVM Total",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 18,
+        "y": 5
+      },
+      "id": 86,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_virtual_memory_bytes{job=\"$job\"}",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "vss",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_resident_memory_bytes{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "rss",
+          "refId": "B"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_resident_memory_bytes{job=\"$job\"} + process_virtual_memory_bytes{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "total",
+          "refId": "D"
+        }
+      ],
+      "title": "JVM Process Memory",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 12
+      },
+      "id": 128,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Misc",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 1,
+          "mappings": [],
+          "max": 1,
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "percentunit"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 0,
+        "y": 13
+      },
+      "id": 106,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "rate(process_cpu_seconds_total{job=\"$job\"}[$__range])",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "system + process",
+          "metric": "",
+          "range": true,
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "avg_over_time(process_cpu_usage{job=\"$job\"}[$__range])",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "process-1h",
+          "range": true,
+          "refId": "C"
+        }
+      ],
+      "title": "CPU Usage",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 0,
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 6,
+        "y": 13
+      },
+      "id": 61,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_open_fds{job=\"$job\"}",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "open",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_max_fds{job=\"$job\"}",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "metric": "",
+          "refId": "B",
+          "step": 2400
+        }
+      ],
+      "title": "File Descriptors",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 0,
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 12,
+        "y": 13
+      },
+      "id": 32,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_state{state=\"RUNNABLE\", job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "live",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_daemon{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "daemon",
+          "metric": "",
+          "refId": "B",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_peak{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "peak",
+          "refId": "C",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_current{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "process",
+          "refId": "D",
+          "step": 2400
+        }
+      ],
+      "title": "Threads",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": [
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "blocked"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#bf1b00",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          },
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "new"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#fce2de",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          },
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "runnable"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#7eb26d",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          },
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "terminated"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#511749",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          },
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "timed-waiting"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#c15c17",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          },
+          {
+            "matcher": {
+              "id": "byName",
+              "options": "waiting"
+            },
+            "properties": [
+              {
+                "id": "color",
+                "value": {
+                  "fixedColor": "#eab839",
+                  "mode": "fixed"
+                }
+              }
+            ]
+          }
+        ]
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 18,
+        "y": 13
+      },
+      "id": 124,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_threads_state{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "{{state}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Thread States",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 20
+      },
+      "id": 129,
+      "panels": [],
+      "repeat": "persistence_counts",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Memory Pools (Heap)",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 0,
+        "y": 21
+      },
+      "id": 3,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "repeat": "jvm_memory_pool_heap",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 1800
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_commited{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "commited",
+          "metric": "",
+          "refId": "B",
+          "step": 1800
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "metric": "",
+          "refId": "C",
+          "step": 1800
+        }
+      ],
+      "title": "JVM Memory Pool heap",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 28
+      },
+      "id": 130,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "JVM Memory Pools (Non-Heap)",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 0,
+        "y": 29
+      },
+      "id": 78,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "repeat": "jvm_memory_pool_nonheap",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 1800
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_committed{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "commited",
+          "metric": "",
+          "refId": "B",
+          "step": 1800
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "max",
+          "metric": "",
+          "refId": "C",
+          "step": 1800
+        }
+      ],
+      "title": "JVM Memory Pool nonheap",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 36
+      },
+      "id": 131,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Garbage Collection",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "ops"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 0,
+        "y": 37
+      },
+      "id": 98,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "sum(rate(jvm_gc_collection_seconds_count{job=\"$job\"}[$__range]))",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "rate",
+          "range": true,
+          "refId": "A"
+        }
+      ],
+      "title": "Collections",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 8,
+        "y": 37
+      },
+      "id": 101,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(rate(jvm_gc_collection_seconds_sum{job=\"$job\"}[$__range]))/sum(rate(jvm_gc_collection_seconds_count{job=\"$job\"}[$__range]))",
+          "format": "time_series",
+          "hide": false,
+          "instant": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "avg",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "expr": "jvm_gc_pause_seconds_max{job=\"$job\"}",
+          "format": "time_series",
+          "hide": false,
+          "instant": false,
+          "intervalFactor": 1,
+          "legendFormat": "max {{action}} ({{cause}})",
+          "refId": "B"
+        }
+      ],
+      "title": "Pause Durations",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "Bps"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 8,
+        "x": 16,
+        "y": 37
+      },
+      "id": 99,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(rate(jvm_memory_pool_allocated_bytes_total{job=\"$job\"}[$__range]))",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "allocated",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(rate(jvm_memory_pool_allocated_bytes_created{job=\"$job\"}[$__range]))",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "created",
+          "refId": "B"
+        }
+      ],
+      "title": "Allocated/Created",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 44
+      },
+      "id": 132,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Classloading",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 0,
+        "y": 45
+      },
+      "id": 37,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "jvm_classes_loaded{job=\"$job\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "loaded",
+          "metric": "",
+          "range": true,
+          "refId": "A",
+          "step": 1200
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "disableTextWrap": false,
+          "editorMode": "code",
+          "expr": "jvm_classes_loaded_total{job=\"$job\"}",
+          "fullMetaSearch": false,
+          "hide": false,
+          "includeNullMetadata": true,
+          "instant": false,
+          "legendFormat": "__auto",
+          "range": true,
+          "refId": "B",
+          "useBackend": false
+        }
+      ],
+      "title": "Classes loaded",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 12,
+        "y": 45
+      },
+      "id": 38,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "delta(jvm_classes_loaded_classes{job=\"$job\"}[$__range])",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "delta-1m",
+          "metric": "",
+          "range": true,
+          "refId": "A",
+          "step": 1200
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "editorMode": "code",
+          "exemplar": true,
+          "expr": "delta(jvm_classes_loaded_total{job=\"$job\"}[$__range])",
+          "format": "time_series",
+          "hide": false,
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "delta-1m",
+          "metric": "",
+          "range": true,
+          "refId": "B",
+          "step": 1200
+        }
+      ],
+      "title": "Class delta",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 52
+      },
+      "id": 133,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Buffer Pools",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 0,
+        "y": 53
+      },
+      "id": 33,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"direct\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"direct\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "capacity",
+          "metric": "",
+          "refId": "B",
+          "step": 2400
+        }
+      ],
+      "title": "Direct Buffers",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 0,
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 6,
+        "y": 53
+      },
+      "id": 83,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"direct\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "count",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        }
+      ],
+      "title": "Direct Buffers",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "bytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 12,
+        "y": 53
+      },
+      "id": 85,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"mapped\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "used",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"mapped\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "capacity",
+          "metric": "",
+          "refId": "B",
+          "step": 2400
+        }
+      ],
+      "title": "Mapped Buffers (Bytes)",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "decimals": 0,
+          "mappings": [],
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 6,
+        "x": 18,
+        "y": 53
+      },
+      "id": 84,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "list",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"mapped\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "count",
+          "metric": "",
+          "refId": "A",
+          "step": 2400
+        }
+      ],
+      "title": "Mapped Buffers",
+      "type": "timeseries"
+    }
+  ],
+  "refresh": "30s",
+  "schemaVersion": 39,
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "current": {
+          "selected": false,
+          "text": "xacml-pdp-metrics",
+          "value": "xacml-pdp-metrics"
+        },
+        "datasource": {
+          "type": "prometheus",
+          "uid": "dkSf71fnz"
+        },
+        "definition": "label_values(job)",
+        "hide": 0,
+        "includeAll": false,
+        "label": "Job",
+        "multi": false,
+        "name": "job",
+        "options": [],
+        "query": {
+          "query": "label_values(job)",
+          "refId": "StandardVariableQuery"
+        },
+        "refresh": 2,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 1,
+        "tagValuesQuery": "",
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      }
+    ]
+  },
+  "time": {
+    "from": "now-30m",
+    "to": "now"
+  },
+  "timepicker": {
+    "now": true,
+    "refresh_intervals": [
+      "5s",
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "browser",
+  "title": "JVM Basic Metrics",
+  "uid": "SLdKRfB7z",
+  "version": 2,
+  "weekStart": ""
+}
\ No newline at end of file
diff --git a/compose/metrics/dashboards/sla-metrics.json b/compose/metrics/dashboards/sla-metrics.json
new file mode 100644 (file)
index 0000000..d48be38
--- /dev/null
@@ -0,0 +1,1919 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "builtIn": 1,
+        "datasource": {
+          "type": "datasource",
+          "uid": "grafana"
+        },
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "target": {
+          "limit": 100,
+          "matchAny": false,
+          "tags": [],
+          "type": "dashboard"
+        },
+        "type": "dashboard"
+      }
+    ]
+  },
+  "description": "Dashboard for Service Level Agreeements",
+  "editable": true,
+  "fiscalYearStartMonth": 0,
+  "gnetId": 14430,
+  "graphTooltip": 0,
+  "id": 3,
+  "links": [],
+  "liveNow": false,
+  "panels": [
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 54,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Basic Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 0,
+        "y": 1
+      },
+      "id": 52,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_uptime_seconds",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "{{job}}",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Uptime",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "dateTimeAsIso"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 6,
+        "y": 1
+      },
+      "id": 56,
+      "maxDataPoints": 100,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "percentChangeColorMode": "standard",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showPercentChange": false,
+        "textMode": "auto",
+        "wideLayout": true
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "process_start_time_seconds{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"}*1000",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "{{instance}}",
+          "metric": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Start time",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            }
+          ],
+          "max": 100,
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50, 172, 45, 0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237, 129, 40, 0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245, 54, 54, 0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 0,
+        "y": 7
+      },
+      "id": 58,
+      "maxDataPoints": 100,
+      "options": {
+        "minVizHeight": 75,
+        "minVizWidth": 75,
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showThresholdLabels": false,
+        "showThresholdMarkers": true,
+        "sizing": "auto"
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Heap Used",
+      "type": "gauge"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "decimals": 1,
+          "mappings": [
+            {
+              "options": {
+                "match": "null",
+                "result": {
+                  "text": "N/A"
+                }
+              },
+              "type": "special"
+            },
+            {
+              "options": {
+                "from": -1e+32,
+                "result": {
+                  "text": "N/A"
+                },
+                "to": 0
+              },
+              "type": "range"
+            }
+          ],
+          "max": 100,
+          "min": 0,
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "rgba(50, 172, 45, 0.97)",
+                "value": null
+              },
+              {
+                "color": "rgba(237, 129, 40, 0.89)",
+                "value": 70
+              },
+              {
+                "color": "rgba(245, 54, 54, 0.9)",
+                "value": 90
+              }
+            ]
+          },
+          "unit": "percent"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 6,
+        "x": 6,
+        "y": 7
+      },
+      "id": 60,
+      "maxDataPoints": 100,
+      "options": {
+        "minVizHeight": 75,
+        "minVizWidth": 75,
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "showThresholdLabels": false,
+        "showThresholdMarkers": true,
+        "sizing": "auto"
+      },
+      "pluginVersion": "11.1.0",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 2,
+          "legendFormat": "",
+          "refId": "A",
+          "step": 14400
+        }
+      ],
+      "title": "Non-Heap Used",
+      "type": "gauge"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 13
+      },
+      "id": 96,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "avg(system_load_average_1m{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Load Average [1m] ",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "avg(system_cpu_count{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "CPU Core Size",
+          "refId": "B"
+        }
+      ],
+      "title": "Load Average",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisBorderShow": false,
+            "axisCenteredZero": false,
+            "axisColorMode": "text",
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "insertNulls": false,
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "percentunit"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 7,
+        "w": 12,
+        "x": 0,
+        "y": 21
+      },
+      "id": 95,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "lastNotNull",
+            "max",
+            "min"
+          ],
+          "displayMode": "table",
+          "placement": "bottom",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "avg(system_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "System CPU Usage",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "avg(process_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "Process CPU Usage",
+          "refId": "B"
+        }
+      ],
+      "title": "CPU Usage",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "decbytes"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 28
+      },
+      "id": 113,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "min",
+            "max"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "avg by (id) (jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})",
+          "interval": "",
+          "legendFormat": "{{id}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Memory Usage",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 36
+      },
+      "id": 18,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "none"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 23,
+        "x": 0,
+        "y": 37
+      },
+      "id": 4,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "sum"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "rate(http_server_requests_seconds_count{uri!~\".*metrics.*|.*prometheus.*\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Request Count",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "s"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 23,
+        "x": 0,
+        "y": 47
+      },
+      "id": 2,
+      "options": {
+        "legend": {
+          "calcs": [
+            "mean",
+            "max",
+            "min",
+            "lastNotNull"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(http_server_requests_seconds_sum{job=~\"api-metrics|acm-metrics|pap-metrics\",outcome=\"SUCCESS\",uri!~\".*metrics.*|.*prometheus.*\"}[$__range]) / irate(http_server_requests_seconds_count{job=~\"api-metrics|acm-metrics|pap-metrics\",outcome=\"SUCCESS\",uri!~\".*metrics.*|.*prometheus.*\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Response Time",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 10,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": true,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "links": [],
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "locale"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 10,
+        "w": 22,
+        "x": 0,
+        "y": 57
+      },
+      "id": 111,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "max"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "http_server_requests_seconds_max{job=~\"api-metrics|acm-metrics|pap-metrics\",uri!~\".*metrics.*|.*prometheus.*\"}",
+          "format": "time_series",
+          "interval": "",
+          "intervalFactor": 1,
+          "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}",
+          "refId": "A"
+        }
+      ],
+      "title": "HTTP Server Requests Max",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 67
+      },
+      "id": 115,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Deployment statistics",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 3,
+        "x": 0,
+        "y": 68
+      },
+      "id": 117,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pap_policy_deployments_total{operation=\"deploy\",status=\"SUCCESS\"}",
+          "interval": "",
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "title": "Successful deployments",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 3,
+        "x": 3,
+        "y": 68
+      },
+      "id": 118,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pap_policy_deployments_total{operation=\"undeploy\",status=\"SUCCESS\"}",
+          "interval": "",
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "title": "Successful undeployments",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 1
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 3,
+        "x": 6,
+        "y": 68
+      },
+      "id": 119,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pap_policy_deployments_total{operation=\"deploy\",status=\"FAILURE\"}",
+          "interval": "",
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "title": "Failed deployments",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 1
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 6,
+        "w": 3,
+        "x": 9,
+        "y": 68
+      },
+      "id": 120,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pap_policy_deployments_total{operation=\"undeploy\",status=\"FAILURE\"}",
+          "interval": "",
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "title": "Failed undeployments",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "Policy Executions Total for APEX-PDP",
+      "fieldConfig": {
+        "defaults": {
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 74
+      },
+      "id": 128,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\",status=\"SUCCESS\"}",
+          "interval": "",
+          "legendFormat": "Successful",
+          "refId": "A"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\",status=\"FAIL\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "Failed",
+          "refId": "B"
+        },
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\",status=\"TOTAL\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "Total",
+          "refId": "C"
+        }
+      ],
+      "title": "Policy Executions",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 400
+              }
+            ]
+          },
+          "unit": "ms"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 82
+      },
+      "id": 122,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "min",
+            "max"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "irate(pap_policy_deployments_seconds_sum[$__range])/irate(pap_policy_deployments_seconds_count[$__range])",
+          "interval": "",
+          "legendFormat": "{{operation}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "title": "Deployment timing",
+      "type": "timeseries"
+    },
+    {
+      "collapsed": false,
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 90
+      },
+      "id": 124,
+      "panels": [],
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "refId": "A"
+        }
+      ],
+      "title": "Apex-PDP",
+      "type": "row"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "fixed"
+          },
+          "mappings": [
+            {
+              "options": {
+                "0": {
+                  "color": "red",
+                  "index": 0,
+                  "text": "Undefined"
+                },
+                "1": {
+                  "color": "#ffffff",
+                  "index": 1,
+                  "text": "Stopped"
+                },
+                "2": {
+                  "color": "blue",
+                  "index": 2,
+                  "text": "Ready"
+                },
+                "3": {
+                  "color": "green",
+                  "index": 3,
+                  "text": "Running"
+                },
+                "4": {
+                  "color": "yellow",
+                  "index": 4,
+                  "text": "Stopping"
+                }
+              },
+              "type": "value"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 5,
+        "x": 0,
+        "y": 91
+      },
+      "id": 126,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "text": {
+          "titleSize": 20,
+          "valueSize": 20
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pdpa_engine_state{job=\"apex-pdp-metrics\"}",
+          "interval": "",
+          "legendFormat": "{{ engine_instance_id }}",
+          "refId": "A"
+        }
+      ],
+      "title": "Engines Stats",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "decimals": 0,
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "ms"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 8,
+        "x": 5,
+        "y": 91
+      },
+      "id": 130,
+      "options": {
+        "colorMode": "none",
+        "graphMode": "none",
+        "justifyMode": "auto",
+        "orientation": "horizontal",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "text": {
+          "titleSize": 25,
+          "valueSize": 25
+        },
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.3.4",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": false,
+          "expr": "(time() * 1000) - (pdpa_engine_last_start_timestamp_epoch{job=\"apex-pdp-metrics\"})",
+          "format": "time_series",
+          "instant": true,
+          "interval": "",
+          "legendFormat": "{{ engine_instance_id }}",
+          "refId": "A"
+        }
+      ],
+      "title": "Engine Uptime (since last start)",
+      "type": "stat"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "Number of APEX event execution counter per engine thread",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "auto",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "off"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green"
+              },
+              {
+                "color": "red",
+                "value": 80
+              }
+            ]
+          },
+          "unit": "ops"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 99
+      },
+      "id": 132,
+      "options": {
+        "legend": {
+          "calcs": [
+            "lastNotNull",
+            "min",
+            "max"
+          ],
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true
+        },
+        "tooltip": {
+          "mode": "single",
+          "sort": "none"
+        }
+      },
+      "pluginVersion": "8.4.5",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "rate(pdpa_engine_average_execution_time_seconds{job=\"apex-pdp-metrics\"}[$__range])",
+          "format": "time_series",
+          "interval": "",
+          "legendFormat": "{{ engine_instance_id }}",
+          "refId": "A"
+        }
+      ],
+      "title": "Avg Engine Execution Time",
+      "type": "timeseries"
+    },
+    {
+      "datasource": {
+        "type": "prometheus",
+        "uid": "dkSf71fnz"
+      },
+      "description": "Number of APEX event execution counter per engine thread",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic"
+          },
+          "custom": {
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            }
+          },
+          "mappings": [],
+          "unit": "short"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 107
+      },
+      "id": 133,
+      "options": {
+        "displayLabels": [
+          "percent"
+        ],
+        "legend": {
+          "displayMode": "table",
+          "placement": "right",
+          "showLegend": true,
+          "values": [
+            "value"
+          ]
+        },
+        "pieType": "donut",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "pluginVersion": "8.4.5",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "dkSf71fnz"
+          },
+          "exemplar": true,
+          "expr": "pdpa_engine_event_executions{job=\"apex-pdp-metrics\"}",
+          "format": "time_series",
+          "interval": "",
+          "legendFormat": "{{ engine_instance_id }}",
+          "refId": "A"
+        }
+      ],
+      "title": "Engine Executions Count",
+      "type": "piechart"
+    }
+  ],
+  "refresh": "10s",
+  "schemaVersion": 39,
+  "tags": [],
+  "templating": {
+    "list": []
+  },
+  "time": {
+    "from": "now-30m",
+    "to": "now"
+  },
+  "timepicker": {
+    "refresh_intervals": [
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "",
+  "title": "SLA's Metrics",
+  "uid": "ySoel0jnk",
+  "version": 7,
+  "weekStart": ""
+}
\ No newline at end of file
diff --git a/compose/metrics/datasource.yaml b/compose/metrics/datasource.yaml
new file mode 100644 (file)
index 0000000..b8220d0
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2022 Nordix Foundation.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+
+# config file version
+apiVersion: 1
+
+# list of datasources to insert/update depending
+# what's available in the database
+deleteDatasources:
+  - name: PolicyPrometheus
+    orgId: 1
+
+datasources:
+  # <string, required> name of the datasource. Required
+  - name: PolicyPrometheus
+    type: prometheus
+    access: proxy
+    orgId: 1
+    uid: "dkSf71fnz"
+    url: http://prometheus:9090/
+    password: ''
+    user: ''
+    database: ''
+    basicAuth: false
+    basicAuthUser: ''
+    basicAuthPassword: ''
+    withCredentials: false
+    isDefault: true
+    jsonData:
+      httpMethod: GET
+      tlsSkipVerify: true
+    secureJsonFields: {}
+    version: 2
+    readOnly: false
diff --git a/compose/metrics/prometheus.yml b/compose/metrics/prometheus.yml
new file mode 100644 (file)
index 0000000..cb182be
--- /dev/null
@@ -0,0 +1,107 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright (C) 2022-2026 OpenInfra Foundation Europe. All rights reserved.
+#  Modifications Copyright 2025 Deutsche Telekom
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+
+# global config
+global:
+  scrape_interval: 5s
+  evaluation_interval: 5s
+
+# Alertmanager configuration
+alerting:
+  alertmanagers:
+  - static_configs:
+    - targets:
+      # - alertmanager:9093
+
+# scrape config
+scrape_configs:
+
+- job_name: "api-metrics"
+  metrics_path: /policy/api/v1/metrics
+  static_configs:
+  - targets: ["policy-api:6969"]
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "pap-metrics"
+  metrics_path: /policy/pap/v1/metrics
+  static_configs:
+  - targets: ["policy-pap:6969"]
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "apex-pdp-metrics"
+  static_configs:
+  - targets:
+    - "policy-apex-pdp:6969"
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "drools-apps-metrics"
+  static_configs:
+  - targets:
+    - "policy-drools-apps:9696"
+  basic_auth:
+    username: "demo@people.osaaf.org"
+    password: "demo123456!"
+
+- job_name: "drools-pdp-metrics"
+  static_configs:
+  - targets:
+    - "policy-drools:9696"
+  basic_auth:
+    username: "demo@people.osaaf.org"
+    password: "demo123456!"
+
+- job_name: "distribution-metrics"
+  static_configs:
+  - targets:
+    - "policy-distribution:6969"
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "opa-pdp-metrics"
+  static_configs:
+  - targets:
+    - "policy-opa-pdp:8282"
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "xacml-pdp-metrics"
+  static_configs:
+  - targets:
+    - "policy-xacml-pdp:6969"
+  basic_auth:
+    username: "policyadmin"
+    password: "zb!XztG34"
+
+- job_name: "acm-metrics"
+  metrics_path: "/onap/policy/clamp/acm/actuator/prometheus"
+  static_configs:
+  - targets:
+    - "compose-policy-clamp-runtime-acm-replica-1:6969"
+    - "compose-policy-clamp-runtime-acm-replica-2:6969"
+  basic_auth:
+    username: "runtimeUser"
+    password: "zb!XztG34"
diff --git a/compose/start-acm-replica.sh b/compose/start-acm-replica.sh
new file mode 100755 (executable)
index 0000000..656e5ab
--- /dev/null
@@ -0,0 +1,100 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2025 OpenInfra Foundation Europe.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# Usage: --start to run the docker compose with acm replicas
+#        --stop to stop the docker compose containers
+#        --replicas number of replicas (defaults to 2)
+
+# Initialize variables
+START=false
+REPLICAS=2
+
+# Parse arguments
+while [[ "$#" -gt 0 ]]; do
+    case $1 in
+        --start)
+            START=true
+            shift
+            ;;
+        --stop)
+            START=false
+            shift
+            ;;
+        --replicas=*)
+            REPLICAS="${1#*=}"
+            shift
+            ;;
+        --grafana)
+              grafana=true
+              shift
+              ;;
+        *)
+            echo "Unknown option: $1"
+            exit 1
+            ;;
+    esac
+done
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+
+cd ${COMPOSE_FOLDER}
+
+echo "Configuring docker compose..."
+source export-ports.sh > /dev/null 2>&1
+source get-versions.sh > /dev/null 2>&1
+
+export REPLICAS
+
+if [ -z "$PROJECT" ]; then
+  export PROJECT=clamp
+fi
+
+export database=postgres
+
+
+if [ "$START" = true ]; then
+    if [ "$grafana" = true ]; then
+        echo "Starting policy-clamp-runtime-acm using ${database} + Grafana/Prometheus"
+        docker compose -f compose.acm.scale.yml up -d nginx grafana --remove-orphans
+        echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}"
+        echo "Grafana server: http://localhost:${GRAFANA_PORT}"
+    else
+        docker compose -f compose.acm.scale.yml up -d nginx
+    fi
+else
+    containers=$(docker compose -f compose.acm.scale.yml ps --all --format '{{.Service}}')
+
+    IFS=$'\n' read -d '' -r -a item_list <<< "$containers"
+    for item in "${item_list[@]}"
+    do
+        if [ -n "$item" ]; then
+            docker compose -f compose.acm.scale.yml logs $item >> $item.log
+        fi
+    done
+
+    docker compose -f compose.acm.scale.yml down -v --remove-orphans
+fi
+
+cd ${WORKSPACE}
diff --git a/compose/start-compose.sh b/compose/start-compose.sh
new file mode 100755 (executable)
index 0000000..115b30e
--- /dev/null
@@ -0,0 +1,98 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2022-2025 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+#Usage: $0 [policy-component] [OPTIONS]"
+#"  OPTIONS:"
+#"  --grafana              start the docker compose with grafana"
+#"  --mariadb              start the docker compose using mariadb"
+#"  --postgres [default]   start the docker compose using postgres db"
+#"  no policy-component will start all components"
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+
+# Set default values for the options
+grafana=false
+database=postgres
+
+# Parse the command-line arguments
+while [[ $# -gt 0 ]]
+do
+  key="$1"
+
+  case $key in
+    --grafana)
+      grafana=true
+      shift
+      ;;
+    --mariadb)
+      database=mariadb
+      shift
+      ;;
+    --postgres)
+      database=postgres
+      shift
+      ;;
+    --local)
+      export USE_LOCAL_IMAGES=true
+      shift
+      ;;
+    *)
+      component="$1"
+      shift
+      ;;
+  esac
+done
+
+cd ${COMPOSE_FOLDER}
+
+echo "Configuring docker compose..."
+source export-ports.sh > /dev/null 2>&1
+source get-versions.sh > /dev/null 2>&1
+
+# in case of csit running for PAP (groups should be for pap) but starts apex-pdp for dependencies.
+if [ -z "$PROJECT" ]; then
+  export PROJECT=$component
+fi
+
+export database
+
+if [ -n "$component" ]; then
+  if [ "$grafana" = true ]; then
+    echo "Starting ${component} using ${database} + Grafana/Prometheus"
+    docker compose up -d ${component} ${database} grafana
+
+    echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}"
+    echo "Grafana server: http://localhost:${GRAFANA_PORT}"
+
+  else
+    echo "Starting ${component} using ${database}"
+    docker compose up -d ${component} ${database}
+  fi
+else
+  export PROJECT=api # api has groups.json complete with all 3 pdps
+  echo "Starting all components using ${database}"
+  docker compose up -d
+fi
+
+cd ${WORKSPACE}
diff --git a/compose/stop-compose.sh b/compose/stop-compose.sh
new file mode 100755 (executable)
index 0000000..81c3981
--- /dev/null
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+echo "Shut down started!"
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+database=postgres
+
+while [[ $# -gt 0 ]]
+do
+  key="$1"
+
+  case $key in
+    --mariadb)
+      database=mariadb
+      shift
+      ;;
+    --postgres)
+      database=postgres
+      shift
+      ;;
+    *)
+      component="$1"
+      shift
+      ;;
+  esac
+done
+
+if [ -z "$component" ]; then
+  export component=api
+fi
+
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+
+cd ${COMPOSE_FOLDER}
+
+source export-ports.sh > /dev/null 2>&1
+source get-versions.sh > /dev/null 2>&1
+
+echo "Collecting logs from docker compose containers..."
+rm -rf *.log
+
+# this will collect logs by service instead of mixing all together
+containers=$(docker compose ps --all --format '{{.Service}}')
+
+IFS=$'\n' read -d '' -r -a item_list <<< "$containers"
+for item in "${item_list[@]}"
+do
+    if [ -n "$item" ]; then
+        docker compose logs $item >> $item.log
+        if [ "${DONT_PRINT_LOGS}" == "false" ]; then
+            cat $item.log
+        fi
+    fi
+done
+
+echo "Tearing down containers..."
+docker compose down -v --remove-orphans
+
+cd ${WORKSPACE}
diff --git a/compose/wait_for_port.sh b/compose/wait_for_port.sh
new file mode 100755 (executable)
index 0000000..6dcb3ca
--- /dev/null
@@ -0,0 +1,91 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+#  Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+#  Modifications Copyright (C) 2022-2023 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+usage() {
+    echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2
+    exit 1
+}
+
+tmout=300
+cmd=
+while getopts c:t: opt
+do
+    case "$opt" in
+        c)
+            cmd="$OPTARG"
+            ;;
+
+        t)
+            tmout="$OPTARG"
+            ;;
+
+        *)
+            usage
+            ;;
+    esac
+done
+
+nargs=$((OPTIND-1))
+shift "$nargs"
+
+even_args=$(($#%2))
+if [ $# -lt 2 ] || [ "$even_args" -ne 0 ]
+then
+    usage
+fi
+
+while [ $# -ge 2 ]
+do
+    export host="$1"
+    export port="$2"
+    shift
+    shift
+
+    echo "Waiting for $host port $port..."
+
+    while [ "$tmout" -gt 0 ]
+    do
+        if command -v docker > /dev/null 2>&1
+        then
+            docker ps --format "table {{ .Names }}\t{{ .Status }}"
+        fi
+
+        nc -vz "$host" "$port"
+        rc=$?
+
+        if [ $rc -eq 0 ]
+        then
+            break
+        else
+            tmout=$((tmout-1))
+            sleep 1
+        fi
+    done
+
+    if [ $rc -ne 0 ]
+    then
+        echo "$host port $port cannot be reached"
+        exit $rc
+    fi
+done
+
+$cmd
+
+exit 0
diff --git a/csit/README.md b/csit/README.md
new file mode 100644 (file)
index 0000000..9eff577
--- /dev/null
@@ -0,0 +1,30 @@
+# Running Policy Framework CSIT
+
+## Using Docker Compose environment
+
+Policy Framework Continuous System and Integration Tests are executed daily on jenkins jobs
+targeting master branch. The runs are available at https://jenkins.onap.org/view/policy/
+
+The CSIT suites are also used by developers as another guarantee that new code or changes
+delivered on main code do not affect the expected behaviour for the already delivered
+functionalities or new tests are added when a new functionality is added.
+
+To execute the tests on a local environment, the steps are the following:
+
+- after cloning the project, go to ../clamp/csit
+- to run a test, execute the run-project-csit.sh script
+
+`./run-project-csit.sh clamp`
+
+The command above with download the latest SNAPSHOT version available for the policy-component
+being tested. Version is collected from [PF Release Data](https://github.com/onap/policy-parent/blob/master/integration/src/main/resources/release/pf_release_data.csv)
+
+To start the containers with images generated in local environment, the script can be run with the
+flag `--local`
+
+`./run-project-csit.sh clamp --local`
+
+The command above with start the docker containers for `policy-clamp` using
+the latest image created at the local environment. When using the flag `--local` it will look for
+all the policy components needed for the test suites to be executed. The support services like
+PostgreSQL, Kafka, Prometheus, Grafana will always be downloaded if not present.
diff --git a/csit/resources/Dockerfile b/csit/resources/Dockerfile
new file mode 100644 (file)
index 0000000..4ee1c4b
--- /dev/null
@@ -0,0 +1,15 @@
+FROM nexus3.onap.org:10001/library/python:3.13-slim-bullseye
+ARG CSIT_SCRIPT=${CSIT_SCRIPT}
+ARG ROBOT_FILE=${ROBOT_FILE}
+ENV ROBOT_WORKSPACE=/opt/robotworkspace ROBOT_FILE=$ROBOT_FILE TEST_ENV=$TEST_ENV PROJECT=$PROJECT
+RUN apt-get update && \
+    apt-get install -y gcc postgresql-client \
+    && apt-get clean; \
+    python3 -m pip -qq install --upgrade pip; \
+    python3 -m pip -qq install --upgrade confluent-kafka; \
+    python3 -m pip -qq install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.6.0.*' --pre; \
+    python3 -m pip freeze; \
+    mkdir -p ${ROBOT_WORKSPACE}
+COPY scripts/run-test.sh tests/ ${ROBOT_WORKSPACE}/
+WORKDIR ${ROBOT_WORKSPACE}
+CMD ["sh", "-c", "./run-test.sh" ]
diff --git a/csit/resources/scripts/build-csit-docker-image.sh b/csit/resources/scripts/build-csit-docker-image.sh
new file mode 100755 (executable)
index 0000000..59b5871
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash -x
+#
+# Copyright 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+function clone_models() {
+    # download models examples
+    git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git "${WORKSPACE}"/csit/resources/tests/models
+
+    # create a couple of variations of the policy definitions
+    sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+        tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json \
+        >tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+    sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+        -e 's!"policy-version": 1!"policy-version": 2!' \
+        tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json \
+        >tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.v2.json
+}
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' "${WORKSPACE}"/.gitreview)
+export ROBOT_DOCKER_IMAGE="policy-csit-robot"
+
+cd "${WORKSPACE}"/csit/resources || exit
+
+IMAGE_ID=$(docker images -q "onap/${ROBOT_DOCKER_IMAGE}")
+
+if [ -n "$IMAGE_ID" ]; then
+    echo "Image onap/${ROBOT_DOCKER_IMAGE} exists. Removing..."
+    docker rmi "onap/${ROBOT_DOCKER_IMAGE}"
+fi
+
+# get models
+clone_models
+
+echo "Building robot framework docker image"
+
+has_buildx() {
+    docker buildx version >/dev/null 2>&1
+}
+
+echo "Checking for Docker Buildx..."
+
+if has_buildx; then
+    echo "Docker Buildx is already installed."
+else
+    echo "Attempting to install Docker Buildx..."
+    # Try enabling buildx via Docker CLI plugin
+    if docker buildx install >/dev/null 2>&1; then
+        echo "Docker Buildx enabled."
+    else
+        # Attempt installation depending on system
+        if command -v docker >/dev/null 2>&1; then
+            mkdir -p ~/.docker/cli-plugins
+            BUILD_VERSION="v0.11.2" # change if needed
+            curl -fsSL \
+              "https://github.com/docker/buildx/releases/download/${BUILD_VERSION}/buildx-${BUILD_VERSION}.linux-amd64" \
+              -o ~/.docker/cli-plugins/docker-buildx || true
+            chmod +x ~/.docker/cli-plugins/docker-buildx
+        fi
+
+        if has_buildx; then
+            echo "Docker Buildx installed successfully."
+        else
+            echo "Failed to install Docker Buildx. Falling back to normal docker build."
+        fi
+    fi
+fi
+
+if has_buildx; then
+    echo "Building with Docker Buildx..."
+    docker buildx build . --file Dockerfile  --tag "onap/${ROBOT_DOCKER_IMAGE}" --quiet
+else
+    echo "Building with normal Docker build..."
+    docker build . --file Dockerfile  --tag "onap/${ROBOT_DOCKER_IMAGE}" --quiet
+fi
+
+docker save -o policy-csit-robot.tar "onap/${ROBOT_DOCKER_IMAGE}":latest
+
+rm -rf "${WORKSPACE}"/csit/resources/policy-csit-robot.tar
+rm -rf "${WORKSPACE}"/csit/resources/tests/models/
diff --git a/csit/resources/scripts/cluster_setup.sh b/csit/resources/scripts/cluster_setup.sh
new file mode 100755 (executable)
index 0000000..21b3660
--- /dev/null
@@ -0,0 +1,251 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2025 OpenInfra Foundation Europe.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+WORKSPACE=$(git rev-parse --show-toplevel)
+export WORKSPACE
+
+export GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' "${WORKSPACE}"/.gitreview)
+
+# Source the shared config script
+source "$(dirname "$0")/config_setup.sh"
+
+KAFKA_DIR=${WORKSPACE}/helm/cp-kafka
+SET_VALUES=""
+
+ZK_CONTAINER="zookeeper-deployment"
+KAFKA_CONTAINER="kafka-deployment"
+
+function spin_microk8s_cluster() {
+    echo "Verify if Microk8s cluster is running.."
+    microk8s version
+    exitcode="${?}"
+
+    if [ "$exitcode" -ne 0 ]; then
+        echo "Microk8s cluster not available, Spinning up the cluster.."
+        sudo snap install microk8s --classic --channel=1.30/stable
+
+        if [ "${?}" -ne 0 ]; then
+            echo "Failed to install kubernetes cluster. Aborting.."
+            return 1
+        fi
+        echo "Microk8s cluster installed successfully"
+        sudo usermod -a -G microk8s $USER
+        echo "Enabling DNS and Storage plugins"
+        sudo microk8s.enable dns hostpath-storage
+        echo "Creating configuration file for Microk8s"
+        sudo mkdir -p $HOME/.kube
+        sudo chown -R $USER:$USER $HOME/.kube
+        sudo microk8s kubectl config view --raw >$HOME/.kube/config
+        sudo chmod 600 $HOME/.kube/config
+        echo "K8s installation completed"
+        echo "----------------------------------------"
+    else
+        echo "K8s cluster is already running"
+        echo "----------------------------------------"
+    fi
+
+    echo "Verify if kubectl is running.."
+    kubectl version
+    exitcode="${?}"
+
+    if [ "$exitcode" -ne 0 ]; then
+        echo "Kubectl not available, Installing.."
+        sudo snap install kubectl --classic --channel=1.30/stable
+
+        if [ "${?}" -ne 0 ]; then
+            echo "Failed to install Kubectl. Aborting.."
+            return 1
+        fi
+        echo "Kubectl installation completed"
+        echo "----------------------------------------"
+    else
+        echo "Kubectl is already running"
+        echo "----------------------------------------"
+        return 0
+    fi
+
+    echo "Verify if helm is running.."
+    helm version
+    exitcode="${?}"
+
+    if [ "$exitcode" -ne 0 ]; then
+        echo "Helm not available, Installing.."
+        sudo snap install helm --classic --channel=3.7
+
+        if [ "${?}" -ne 0 ]; then
+            echo "Failed to install Helm client. Aborting.."
+            return 1
+        fi
+        echo "Helm installation completed"
+        echo "----------------------------------------"
+    else
+        echo "Helm is already running"
+        echo "----------------------------------------"
+        return 0
+    fi
+}
+
+function install_kafka() {
+  echo "Installing Confluent kafka"
+  kubectl apply -f $KAFKA_DIR/zookeeper.yaml
+  kubectl apply -f $KAFKA_DIR/kafka.yaml
+  echo "----------------------------------------"
+}
+
+function uninstall_policy() {
+    echo "Removing the policy helm deployment"
+    helm uninstall csit-policy
+    helm uninstall prometheus
+    helm uninstall csit-robot
+    kubectl delete deploy $ZK_CONTAINER $KAFKA_CONTAINER
+    rm -rf ${WORKSPACE}/helm/policy/Chart.lock
+
+    if [ "$PROJECT" == "clamp" ] || [ "$PROJECT" == "policy-clamp" ]; then
+      helm uninstall policy-chartmuseum
+      helm repo remove chartmuseum-git policy-chartmuseum
+    fi
+
+    kubectl delete pvc --all
+    echo "Policy deployment deleted"
+    echo "Clean up docker"
+    docker image prune -f
+}
+
+function teardown_cluster() {
+    echo "Removing k8s cluster and k8s configuration file"
+    sudo snap remove microk8s;rm -rf $HOME/.kube/config
+    sudo snap remove helm;
+    sudo snap remove kubectl;
+    echo "MicroK8s Cluster removed"
+}
+
+function install_chartmuseum () {
+    echo "---------------------------------------------"
+    echo "Installing Chartmuseum helm repository..."
+    helm repo add chartmuseum-git https://chartmuseum.github.io/charts
+    helm repo update
+    helm install policy-chartmuseum chartmuseum-git/chartmuseum --set env.open.DISABLE_API=false --set service.type=NodePort --set service.nodePort=30208
+    helm plugin install https://github.com/chartmuseum/helm-push
+    echo "---------------------------------------------"
+}
+
+function get_pod_name() {
+  pods=$(kubectl get pods --no-headers -o custom-columns=':metadata.name' | grep $1)
+  read -rd '' -a pod_array <<< "$pods"
+  echo "${pod_array[@]}"
+}
+
+function wait_for_pods_running() {
+  local namespace="$1"
+  shift
+  local timeout_seconds="$1"
+  shift
+
+  IFS=',' read -ra pod_names <<< "$@"
+  shift
+
+  local pending_pods=("${pod_names[@]}")
+  local start_time
+  start_time=$(date +%s)
+
+  while [ ${#pending_pods[@]} -gt 0 ]; do
+    local current_time
+    current_time=$(date +%s)
+    local elapsed_time
+    elapsed_time=$((current_time - start_time))
+
+    if [ "$elapsed_time" -ge "$timeout_seconds" ]; then
+      echo "Timed out waiting for the pods to reach 'Running' state."
+      echo "Printing the current status of the deployment before exiting.."
+      kubectl get po;
+      kubectl describe pods;
+      echo "------------------------------------------------------------"
+      for pod in "${pending_pods[@]}"; do
+        echo "Logs of the pod $pod"
+        kubectl logs $pod
+        echo "---------------------------------------------------------"
+      done
+      exit 1
+    fi
+
+    local newly_running_pods=()
+
+    for pod_name_prefix in "${pending_pods[@]}"; do
+      local pod_names=$(get_pod_name "$pod_name_prefix")
+      IFS=' ' read -r -a pod_array <<< "$pod_names"
+      if [ "${#pod_array[@]}" -eq 0 ]; then
+             echo "*** Error: No pods found for the deployment $pod_name_prefix . Exiting ***"
+             return 1
+      fi
+      for pod in "${pod_array[@]}"; do
+         local pod_status
+         local pod_ready
+         pod_status=$(kubectl get pod "$pod" -n "$namespace" --no-headers -o custom-columns=STATUS:.status.phase 2>/dev/null)
+         pod_ready=$(kubectl get pod "$pod" -o jsonpath='{.status.containerStatuses[*].ready}')
+
+         if [ "$pod_status" == "Running" ] && { [ "$pod_ready" == "true" ] || [ "$pod_ready" == "true true" ]; }; then
+           echo "Pod '$pod' in namespace '$namespace' is now in 'Running' state and 'Readiness' is true"
+         else
+           newly_running_pods+=("$pod")
+           echo "Waiting for pod '$pod' in namespace '$namespace' to reach 'Running' and 'Ready' state..."
+         fi
+      done
+    done
+
+    pending_pods=("${newly_running_pods[@]}")
+
+    sleep 5
+  done
+
+  echo "All specified pods are in the 'Running and Ready' state. Exiting the function."
+}
+
+OPERATION="$1"
+PROJECT="$2"
+LOCALIMAGE="${3:-false}"
+
+if [ $OPERATION == "install" ]; then
+    spin_microk8s_cluster
+    if [ "${?}" -eq 0 ]; then
+        export KAFKA_CONTAINERS=($KAFKA_CONTAINER,$ZK_CONTAINER)
+        install_kafka
+        wait_for_pods_running default 300 $KAFKA_CONTAINERS
+        set_project_config "$PROJECT"
+        echo "Installing policy helm charts in the default namespace"
+        source ${WORKSPACE}/compose/get-k8s-versions.sh
+        if [ $LOCALIMAGE == "true" ]; then
+            echo "loading local image"
+            source ${WORKSPACE}/compose/get-versions.sh
+            ${WORKSPACE}/compose/loaddockerimage.sh
+        fi
+        cd ${WORKSPACE}/helm || exit
+        helm dependency build policy
+        helm install csit-policy policy ${SET_VALUES}
+        helm install prometheus prometheus
+        wait_for_pods_running default 900 ${READINESS_CONTAINERS[@]}
+        echo "Policy chart installation completed"
+        echo "-------------------------------------------"
+    fi
+elif [ $OPERATION == "uninstall" ]; then
+    uninstall_policy
+elif [ $OPERATION == "clean" ]; then
+    teardown_cluster
+else
+    echo "Invalid arguments provided. Usage: $0 [options..] {install {project_name} | uninstall | clean} {uselocalimage = true/false}"
+fi
diff --git a/csit/resources/scripts/config_setup.sh b/csit/resources/scripts/config_setup.sh
new file mode 100755 (executable)
index 0000000..eef2d62
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2025 Nordix Foundation. All rights reserved.
+#  Modifications Copyright 2025 Deutsche Telekom
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+export POLICY_CLAMP_ROBOT="clamp-health-check.robot clamp-db-restore.robot clamp-single-element-test.robot clamp-timeout-test.robot clamp-migrate-rollback.robot clamp-trace-test.robot clamp-slas.robot"
+export POLICY_API_ROBOT="api-test.robot api-slas.robot"
+export POLICY_PAP_ROBOT="pap-test.robot pap-slas.robot"
+export POLICY_APEX_PDP_ROBOT="apex-pdp-test.robot apex-slas.robot"
+export POLICY_XACML_PDP_ROBOT="xacml-pdp-test.robot xacml-pdp-slas.robot"
+export POLICY_OPA_PDP_ROBOT="opa-pdp-test.robot opa-pdp-slas.robot"
+export POLICY_DROOLS_PDP_ROBOT="drools-pdp-test.robot"
+export POLICY_DISTRIBUTION_ROBOT="distribution-test.robot"
+
+export POLICY_API_CONTAINER="policy-api"
+export POLICY_PAP_CONTAINER="policy-pap"
+export POLICY_CLAMP_CONTAINER="policy-clamp-runtime-acm"
+export POLICY_APEX_CONTAINER="policy-apex-pdp"
+export POLICY_DROOLS_CONTAINER="policy-drools-pdp"
+export POLICY_XACML_CONTAINER="policy-xacml-pdp"
+export POLICY_OPA_CONTAINER="policy-opa-pdp"
+export POLICY_DISTRIBUTION_CONTAINER="policy-distribution"
+export POLICY_K8S_PPNT_CONTAINER="policy-clamp-ac-k8s-ppnt"
+export POLICY_HTTP_PPNT_CONTAINER="policy-clamp-ac-http-ppnt"
+export POLICY_SIM_PPNT_CONTAINER1="policy-clamp-ac-sim-ppnt-1"
+export POLICY_SIM_PPNT_CONTAINER2="policy-clamp-ac-sim-ppnt-2"
+export POLICY_SIM_PPNT_CONTAINER3="policy-clamp-ac-sim-ppnt-3"
+export POLICY_PF_PPNT_CONTAINER="policy-clamp-ac-pf-ppnt"
+export JAEGER_CONTAINER="jaeger"
+
+function install_chartmuseum () {
+    echo "---------------------------------------------"
+    echo "Installing Chartmuseum helm repository..."
+    helm repo add chartmuseum-git https://chartmuseum.github.io/charts
+    helm repo update
+    helm install policy-chartmuseum chartmuseum-git/chartmuseum --set env.open.DISABLE_API=false --set service.type=NodePort --set service.nodePort=30208
+    helm plugin install https://github.com/chartmuseum/helm-push
+    echo "---------------------------------------------"
+}
+
+function set_project_config() {
+    echo "Setting project configuration for: $PROJECT"
+    case $PROJECT in
+    clamp | policy-clamp)
+        export ROBOT_FILE=$POLICY_CLAMP_ROBOT
+        export READINESS_CONTAINERS=($POLICY_CLAMP_CONTAINER,$POLICY_APEX_CONTAINER,$POLICY_PF_PPNT_CONTAINER,$POLICY_K8S_PPNT_CONTAINER,
+            $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER1,$POLICY_SIM_PPNT_CONTAINER2,$POLICY_SIM_PPNT_CONTAINER3,$JAEGER_CONTAINER)
+        export SET_VALUES="--set $POLICY_CLAMP_CONTAINER.enabled=true --set $POLICY_APEX_CONTAINER.enabled=true
+            --set $POLICY_PF_PPNT_CONTAINER.enabled=true --set $POLICY_K8S_PPNT_CONTAINER.enabled=true
+            --set $POLICY_HTTP_PPNT_CONTAINER.enabled=true --set $POLICY_SIM_PPNT_CONTAINER1.enabled=true
+            --set $POLICY_SIM_PPNT_CONTAINER2.enabled=true --set $POLICY_SIM_PPNT_CONTAINER3.enabled=true
+            --set $JAEGER_CONTAINER.enabled=true"
+        install_chartmuseum
+        ;;
+    api | policy-api)
+        export ROBOT_FILE=$POLICY_API_ROBOT
+        export READINESS_CONTAINERS=($POLICY_API_CONTAINER)
+        ;;
+    pap | policy-pap)
+        export ROBOT_FILE=$POLICY_PAP_ROBOT
+        export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_API_CONTAINER,$POLICY_XACML_CONTAINER)
+        export SET_VALUES="--set $POLICY_APEX_CONTAINER.enabled=true --set $POLICY_XACML_CONTAINER.enabled=true"
+        ;;
+    apex-pdp | policy-apex-pdp)
+        export ROBOT_FILE=$POLICY_APEX_PDP_ROBOT
+        export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER)
+        export SET_VALUES="--set $POLICY_APEX_CONTAINER.enabled=true"
+        ;;
+    xacml-pdp | policy-xacml-pdp)
+        export ROBOT_FILE=($POLICY_XACML_PDP_ROBOT)
+        export READINESS_CONTAINERS=($POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_XACML_CONTAINER)
+        export SET_VALUES="--set $POLICY_XACML_CONTAINER.enabled=true"
+        ;;
+    opa-pdp | policy-opa-pdp)
+        export ROBOT_FILE=($POLICY_OPA_PDP_ROBOT)
+        export READINESS_CONTAINERS=($POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_OPA_CONTAINER)
+        export SET_VALUES="--set $POLICY_OPA_CONTAINER.enabled=true"
+        ;;
+    drools-pdp | policy-drools-pdp)
+        export ROBOT_FILE=($POLICY_DROOLS_PDP_ROBOT)
+        export READINESS_CONTAINERS=($POLICY_DROOLS_CONTAINER)
+        export SET_VALUES="--set $POLICY_DROOLS_CONTAINER.enabled=true"
+        ;;
+    distribution | policy-distribution)
+        export ROBOT_FILE=($POLICY_DISTRIBUTION_ROBOT)
+        export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,$POLICY_DISTRIBUTION_CONTAINER)
+        export SET_VALUES="--set $POLICY_APEX_CONTAINER.enabled=true --set $POLICY_DISTRIBUTION_CONTAINER.enabled=true"
+        ;;
+    *)
+        echo "Unknown project supplied. Enabling all policy charts for the deployment"
+        export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,
+                    $POLICY_DISTRIBUTION_CONTAINER,$POLICY_DROOLS_CONTAINER,$POLICY_XACML_CONTAINER,$POLICY_OPA_CONTAINER,
+                    $POLICY_CLAMP_CONTAINER,$POLICY_PF_PPNT_CONTAINER,$POLICY_K8S_PPNT_CONTAINER,
+                    $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER1,$POLICY_SIM_PPNT_CONTAINER2,$POLICY_SIM_PPNT_CONTAINER3)
+        export SET_VALUES="--set $POLICY_APEX_CONTAINER.enabled=true --set $POLICY_XACML_CONTAINER.enabled=true
+            --set $POLICY_OPA_CONTAINER.enabled=true --set $POLICY_DISTRIBUTION_CONTAINER.enabled=true --set $POLICY_DROOLS_CONTAINER.enabled=true
+            --set $POLICY_CLAMP_CONTAINER.enabled=true --set $POLICY_PF_PPNT_CONTAINER.enabled=true
+            --set $POLICY_K8S_PPNT_CONTAINER.enabled=true --set $POLICY_HTTP_PPNT_CONTAINER.enabled=true
+            --set $POLICY_K8S_PPNT_CONTAINER.enabled=true --set $POLICY_SIM_PPNT_CONTAINER1.enabled=true
+            --set $POLICY_SIM_PPNT_CONTAINER2.enabled=true --set $POLICY_SIM_PPNT_CONTAINER3.enabled=true"
+        ;;
+    esac
+}
diff --git a/csit/resources/scripts/get-cluster-info.sh b/csit/resources/scripts/get-cluster-info.sh
new file mode 100755 (executable)
index 0000000..1252f3e
--- /dev/null
@@ -0,0 +1,170 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2023-2025 Nordix Foundation. All rights reserved.
+#  Modifications Copyright © 2024 Deutsche Telekom
+# ================================================================================
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# This script will be used to gather cluster information
+# for JMeter to work towards the installed cluster
+
+# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES
+export APEX_PORT=30001
+export API_PORT=30002
+export PAP_PORT=30003
+export XACML_PORT=30004
+export DROOLS_PORT=30005
+export DIST_PORT=30006
+export ACM_PORT=30007
+export PF_PARTICIPANT_PORT=30008
+export HTTP_PARTICIPANT_PORT=30009
+export K8S_PARTICIPANT_PORT=30010
+export SIM_PARTICIPANT_PORT=30011
+export OPA_PORT=30012
+export SIMULATOR_PORT=30904
+
+# Retrieve pod names
+function get_pod_name() {
+  microk8s kubectl get pods --no-headers -o custom-columns=':metadata.name' | grep $1
+}
+
+function get_pod_names() {
+  export APEX_POD=$(get_pod_name apex)
+  export PAP_POD=$(get_pod_name pap)
+  export API_POD=$(get_pod_name api)
+  export DMAAP_POD=$(get_pod_name message-router)
+  export XACML_POD=$(get_pod_name xacml)
+  export OPA_POD=$(get_pod_name opa-pdp)
+  export DROOLS_POD=$(get_pod_name drools-pdp)
+  export DIST_POD=$(get_pod_name distribution)
+  export ACM_POD=$(get_pod_name acm-runtime)
+  export POLICY_PPNT_POD=$(get_pod_name policy-ppnt)
+  export POLICY_HTTP_POD=$(get_pod_name http-ppnt)
+  export POLICY_SIM_POD=$(get_pod_name sim-ppnt)
+  export POLICY_K8S_POD=$(get_pod_name k8s-ppnt)
+}
+
+# Retrieve service names
+function get_svc_name() {
+  microk8s kubectl get svc --no-headers -o custom-columns=':metadata.name' | grep $1
+}
+
+function get_svc_names() {
+  export APEX_SVC=$(get_svc_name policy-apex-pdp)
+  export PAP_SVC=$(get_svc_name policy-pap)
+  export API_SVC=$(get_svc_name policy-api)
+  export DMAAP_SVC=$(get_svc_name message-router)
+  export DROOLS_SVC=$(get_svc_name drools-pdp)
+  export XACML_SVC=$(get_svc_name policy-xacml-pdp)
+  export OPA_SVC=$(get_svc_name policy-opa-pdp)
+  export DIST_SVC=$(get_svc_name policy-distribution)
+  export ACM_SVC=$(get_svc_name policy-clamp-runtime-acm)
+  export POLICY_PPNT_SVC=$(get_svc_name policy-clamp-ac-pf-ppnt)
+  export POLICY_HTTP_SVC=$(get_svc_name policy-clamp-ac-http-ppnt)
+  export POLICY_SIM_SVC=$(get_svc_name policy-clamp-ac-sim-ppnt)
+  export POLICY_K8S_SVC=$(get_svc_name policy-clamp-ac-k8s-ppnt)
+}
+
+# Assign set port values
+function patch_port() {
+  microk8s kubectl patch service "$1-svc" --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$2"'}]'
+}
+
+function patch_ports() {
+  patch_port "$APEX_SVC" $APEX_PORT
+  patch_port "$API_SVC" $API_PORT
+  patch_port "$PAP_SVC" $PAP_PORT
+  patch_port "$ACM_SVC" $ACM_PORT
+  patch_port "$POLICY_PPNT_SVC" $PF_PARTICIPANT_PORT
+  patch_port "$POLICY_HTTP_SVC" $HTTP_PARTICIPANT_PORT
+  patch_port "$POLICY_SIM_SVC" $SIM_PARTICIPANT_PORT
+  patch_port "$POLICY_K8S_SVC" $K8S_PARTICIPANT_PORT
+  patch_port "$DIST_SVC" $DIST_PORT
+  patch_port "$DROOLS_SVC" $DROOLS_PORT
+  patch_port "$XACML_SVC" $XACML_PORT
+  patch_port "$OPA_SVC" $OPA_PORT
+}
+
+function setup_message_router_svc() {
+  microk8s kubectl expose service message-router --name message-router-svc --type NodePort --protocol TCP --port 3904 --target-port 3904
+  microk8s kubectl patch service message-router-svc --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$SIMULATOR_PORT"'}]'
+}
+
+# Expose services in order to perform tests from JMeter
+function expose_service() {
+  microk8s kubectl expose service $1 --name $1"-svc" --type NodePort --protocol TCP --port 6969 --target-port 6969
+}
+
+function expose_service_opa_pdp() {
+  microk8s kubectl expose service $1 --name $1"-svc" --type NodePort --protocol TCP --port 8282 --target-port 8282
+}
+
+function expose_services() {
+    expose_service $APEX_SVC
+    expose_service $PAP_SVC
+    expose_service $API_SVC
+    expose_service $XACML_SVC
+    expose_service $DROOLS_SVC
+    expose_service $DIST_SVC
+    expose_service $ACM_SVC
+    expose_service $POLICY_PPNT_SVC
+    expose_service $POLICY_HTTP_SVC
+    expose_service $POLICY_SIM_SVC
+    expose_service $POLICY_K8S_SVC
+    expose_service_opa_pdp $OPA_SVC
+
+    setup_message_router_svc
+    sleep 2
+    patch_ports
+}
+
+# Port forward Kafka to handle traffic to/from JMeter
+function setup_kafka_connection() {
+  # Get the Kafka pod name
+  KAFKA_POD=$(kubectl get pods -l app=kafka -o jsonpath="{.items[0].metadata.name}")
+
+  # Set up port forwarding
+  kubectl port-forward pod/$KAFKA_POD 29092:29092 &
+  PF_PID=$!
+
+  # Wait for port forwarding to be established
+  sleep 5
+
+  KAFKA_POD_IP=$(kubectl get pod $KAFKA_POD -o jsonpath='{.status.podIP}')
+
+  # Update hosts file
+  echo "127.0.0.1 $KAFKA_POD" | sudo tee -a /etc/hosts
+
+  export KAFKA_HOST="127.0.0.1"
+  export KAFKA_PORT="29092"
+}
+
+function teardown_kafka_connection() {
+  kill $PF_PID
+  sudo sed -i "/$KAFKA_POD/d" /etc/hosts
+}
+
+####MAIN###
+if [ "$1" = "teardown" ]; then
+  teardown_kafka_connection
+else
+  get_pod_names
+  get_svc_names
+  expose_services
+  setup_kafka_connection
+fi
\ No newline at end of file
diff --git a/csit/resources/scripts/node-templates.sh b/csit/resources/scripts/node-templates.sh
new file mode 100755 (executable)
index 0000000..4dc19d2
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright 2023 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                    "${WORKSPACE}"/.gitreview)
+
+echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+
+rm -rf "${WORKSPACE}"/models
+mkdir "${WORKSPACE}"/models
+
+# download models examples
+git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git \
+    "${WORKSPACE}"/models
+
+export DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
+
+export NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates
+
+# create a couple of variations of the policy definitions
+sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+        "${DATA}"/vCPE.policy.monitoring.input.tosca.json \
+    >"${DATA}"/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+        -e 's!"policy-version": 1!"policy-version": 2!' \
+        "${DATA}"/vCPE.policy.monitoring.input.tosca.json \
+    >"${DATA}"/vCPE.policy.monitoring.input.tosca.v2.json
diff --git a/csit/resources/scripts/robot_setup.sh b/csit/resources/scripts/robot_setup.sh
new file mode 100755 (executable)
index 0000000..9b1332f
--- /dev/null
@@ -0,0 +1,163 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2025 OpenInfra Foundation Europe.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+WORKSPACE=$(git rev-parse --show-toplevel)
+export WORKSPACE
+
+export ROBOT_FILE=""
+
+PROJECT="$1"
+CSIT_SCRIPT="scripts/run-test.sh"
+ROBOT_DOCKER_IMAGE="policy-csit-robot"
+ROBOT_LOG_DIR=${WORKSPACE}/csit/archives
+
+# Source the shared config script
+source "$(dirname "$0")/config_setup.sh"
+
+DISTRIBUTION_CSAR=${WORKSPACE}/csit/resources/tests/data/csar
+DIST_TEMP_FOLDER=/tmp/distribution
+
+function clone_models() {
+    local retry_count=3
+    local success=false
+    cd tests || exit
+    sudo rm -rf models/
+    for ((i = 1; i <= retry_count; i++)); do
+        git clone "https://gerrit.onap.org/r/policy/models" && success=true && break
+        echo "Retrying git clone ($i/$retry_count)..."
+        sleep 5
+    done
+
+    cd ../
+    if [ "$success" = false ]; then
+        echo "Error: failed to clone policy-models repository after $retry_count attempts"
+        exit 1
+    fi
+
+    sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+        tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json \
+        >tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+    sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+        -e 's!"policy-version": 1!"policy-version": 2!' \
+        tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json \
+        >tests/models/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.v2.json
+
+}
+
+function copy_csar_file() {
+    zip -F "${DISTRIBUTION_CSAR}"/sample_csar_with_apex_policy.csar \
+        --out "${DISTRIBUTION_CSAR}"/csar_temp.csar -q
+    sudo rm -rf "${DIST_TEMP_FOLDER}"
+    sudo mkdir "${DIST_TEMP_FOLDER}"
+    sudo cp "${DISTRIBUTION_CSAR}"/csar_temp.csar "${DISTRIBUTION_CSAR}"/temp.csar
+    sudo mv "${DISTRIBUTION_CSAR}"/temp.csar ${DIST_TEMP_FOLDER}/sample_csar_with_apex_policy.csar
+}
+
+function build_robot_image() {
+    echo "Build docker image for robot framework"
+    cd "${WORKSPACE}"/csit/resources || exit
+    clone_models
+    if [ "${PROJECT}" == "distribution" ] || [ "${PROJECT}" == "policy-distribution" ]; then
+        copy_csar_file
+    fi
+    echo "Build robot framework docker image"
+    sudo apt install gnupg2 pass -y
+    export DOCKERPW=docker
+    echo "$DOCKERPW" | docker login -u docker --password-stdin nexus3.onap.org:10001
+    docker build . --file Dockerfile \
+        --build-arg CSIT_SCRIPT="$CSIT_SCRIPT" \
+        --build-arg ROBOT_FILE="$ROBOT_FILE" \
+        --tag "${ROBOT_DOCKER_IMAGE}" --no-cache
+    echo "---------------------------------------------"
+}
+
+function push_acelement_chart() {
+    echo "Pushing acelement chart to the chartmuseum repo..."
+    helm repo add policy-chartmuseum http://localhost:30208
+    cd tests || exit
+    local retry_count=3
+    local success=false
+    for ((i = 1; i <= retry_count; i++)); do
+        git clone "https://gerrit.onap.org/r/policy/clamp" && success=true && break
+        echo "Retrying git clone ($i/$retry_count)..."
+        sleep 5
+    done
+
+    ACELEMENT_CHART=${WORKSPACE}/csit/resources/tests/clamp/examples/src/main/resources/clamp/acm/acelement-helm/acelement
+    helm cm-push "$ACELEMENT_CHART" policy-chartmuseum
+    helm repo update
+    rm -rf "${WORKSPACE}"/csit/resources/tests/clamp/
+    echo "-------------------------------------------"
+}
+
+function print_robot_log() {
+    count_pods=0
+    while [[ ${count_pods} -eq 0 ]]; do
+        echo "Waiting for pods to come up..."
+        sleep 5
+        count_pods=$(kubectl get pods --output name | wc -l)
+    done
+    robotpod=$(kubectl get po | grep policy-csit)
+    podName=$(echo "$robotpod" | awk '{print $1}')
+    echo "The robot tests will begin once the policy components {${READINESS_CONTAINERS[*]}} are up and running..."
+    kubectl wait --for=jsonpath='{.status.phase}'=Running --timeout=18m pod/"$podName"
+    echo "Policy deployment status:"
+    kubectl get po
+    kubectl get all -A
+    echo "Robot Test logs:"
+    kubectl logs -f "$podName"
+}
+
+function start_csit() {
+    build_robot_image
+    if [ "${?}" -eq 0 ]; then
+        echo "Importing robot image into microk8s registry"
+        docker save -o policy-csit-robot.tar ${ROBOT_DOCKER_IMAGE}:latest
+        sudo microk8s ctr image import policy-csit-robot.tar
+        rm -rf "${WORKSPACE}"/csit/resources/policy-csit-robot.tar
+        rm -rf "${WORKSPACE}"/csit/resources/tests/models/
+        echo "---------------------------------------------"
+        if [ "$PROJECT" == "clamp" ] || [ "$PROJECT" == "policy-clamp" ]; then
+          POD_READY_STATUS="0/1"
+          while [[ ${POD_READY_STATUS} != "1/1" ]]; do
+            echo "Waiting for chartmuseum pod to come up..."
+            sleep 5
+            POD_READY_STATUS=$(kubectl get pods | grep -e "policy-chartmuseum" | awk '{print $2}')
+          done
+          push_acelement_chart
+        fi
+        echo "Installing Robot framework pod for running CSIT"
+        cd "${WORKSPACE}"/helm || exit
+        mkdir -p "${ROBOT_LOG_DIR}"
+        helm install csit-robot robot --set robot="$ROBOT_FILE" --set "readiness={$(echo "${READINESS_CONTAINERS}" | sed 's/[{}]//g' | sed 's/,$//')}" --set robotLogDir=$ROBOT_LOG_DIR
+        print_robot_log
+    fi
+}
+
+if [ "$PROJECT" ]; then
+    set_project_config "$PROJECT"
+    export ROBOT_LOG_DIR=${WORKSPACE}/csit/archives/${PROJECT}
+    echo "CSIT will be invoked from $ROBOT_FILE"
+    echo "Readiness containers: ${READINESS_CONTAINERS[*]}"
+    echo "-------------------------------------------"
+    start_csit
+else
+    echo "No project supplied for running CSIT"
+fi
diff --git a/csit/resources/scripts/run-test.sh b/csit/resources/scripts/run-test.sh
new file mode 100755 (executable)
index 0000000..eca4769
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
+#  Modifications Copyright 2024 Deutsche Telekom
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+echo "Invoking the robot tests from: ${ROBOT_FILE}"
+
+DEFAULT_PORT=6969
+DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies
+NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates
+
+POLICY_API_IP=policy-api:${DEFAULT_PORT}
+
+POLICY_PAP_IP=policy-pap:${DEFAULT_PORT}
+
+APEX_IP=policy-apex-pdp:${DEFAULT_PORT}
+APEX_EVENTS_IP=policy-apex-pdp:23324
+
+POLICY_PDPX_IP=policy-xacml-pdp:${DEFAULT_PORT}
+POLICY_OPA_IP=policy-opa-pdp:8282
+
+POLICY_DROOLS_IP=policy-drools-pdp:9696
+DROOLS_IP_1=policy-drools-apps:${DEFAULT_PORT}
+DROOLS_IP_2=policy-drools-apps:9696
+
+DISTRIBUTION_IP=policy-distribution:${DEFAULT_PORT}
+
+POLICY_RUNTIME_ACM_IP=policy-clamp-runtime-acm:${DEFAULT_PORT}
+HTTP_PARTICIPANT_SIM1_IP=policy-clamp-ac-sim-ppnt-1:${DEFAULT_PORT}
+HTTP_PARTICIPANT_SIM2_IP=policy-clamp-ac-sim-ppnt-2:${DEFAULT_PORT}
+HTTP_PARTICIPANT_SIM3_IP=policy-clamp-ac-sim-ppnt-3:${DEFAULT_PORT}
+JAEGER_IP=jaeger:16686
+
+KAFKA_IP=kafka:9092
+PROMETHEUS_IP=prometheus:9090
+
+DIST_TEMP_FOLDER=/tmp/distribution
+
+ROBOT_VARIABLES="-v DATA:${DATA}
+-v NODETEMPLATES:${NODETEMPLATES}
+-v POLICY_API_IP:${POLICY_API_IP}
+-v POLICY_RUNTIME_ACM_IP:${POLICY_RUNTIME_ACM_IP}
+-v HTTP_PARTICIPANT_SIM1_IP:$HTTP_PARTICIPANT_SIM1_IP
+-v HTTP_PARTICIPANT_SIM2_IP:$HTTP_PARTICIPANT_SIM2_IP
+-v HTTP_PARTICIPANT_SIM3_IP:$HTTP_PARTICIPANT_SIM3_IP
+-v POLICY_PAP_IP:${POLICY_PAP_IP}
+-v APEX_IP:${APEX_IP}
+-v APEX_EVENTS_IP:${APEX_EVENTS_IP}
+-v KAFKA_IP:${KAFKA_IP}
+-v PROMETHEUS_IP:${PROMETHEUS_IP}
+-v POLICY_PDPX_IP:${POLICY_PDPX_IP}
+-v POLICY_OPA_IP:${POLICY_OPA_IP}
+-v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}
+-v DROOLS_IP:${DROOLS_IP_1}
+-v DROOLS_IP_2:${DROOLS_IP_2}
+-v TEMP_FOLDER:${DIST_TEMP_FOLDER}
+-v DISTRIBUTION_IP:${DISTRIBUTION_IP}
+-v TEST_ENV:${TEST_ENV}
+-v JAEGER_IP:${JAEGER_IP}"
+
+export ROBOT_VARIABLES
+
+echo "Run Robot test"
+echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
+echo "Starting Robot test suites ..."
+mkdir -p /tmp/results/
+python3 -m robot.run --name "${PROJECT}" -d /tmp/results/ ${ROBOT_VARIABLES} ${ROBOT_FILE}
+RESULT=$?
+echo "RESULT: ${RESULT}"
+
+exit $RESULT
diff --git a/csit/resources/scripts/wait_for_rest.sh b/csit/resources/scripts/wait_for_rest.sh
new file mode 100755 (executable)
index 0000000..b51a7fe
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+# Copyright (C) 2023-2025 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+usage() {
+    echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2
+    exit 1
+}
+tmout=300
+cmd=
+while getopts c:t: opt
+do
+    case "$opt" in
+        c)
+            cmd="$OPTARG"
+            ;;
+        t)
+            tmout="$OPTARG"
+            ;;
+        *)
+            usage
+            ;;
+    esac
+done
+nargs=$((OPTIND-1))
+shift "$nargs"
+even_args=$(($#%2))
+if [ $# -lt 2 ] || [ "$even_args" -ne 0 ]
+then
+    usage
+fi
+while [ $# -ge 2 ]
+do
+    export host="$1"
+    export port="$2"
+    shift
+    shift
+    echo "Checking if REST port $port is open on $host ..."
+    while [ "$tmout" -gt 0 ]
+    do
+        if command -v docker > /dev/null 2>&1
+        then
+            docker ps --format "table {{ .Image }}\t{{ .Names }}\t{{ .Status }}"
+        fi
+        curl "http://$host:$port" > /dev/null 2>&1
+        rc=$?
+        if [ $rc -eq 0 ]
+        then
+            break
+        else
+            tmout=$((tmout-5))
+            sleep 5
+        fi
+    done
+    if [ $rc -ne 0 ]; then
+        echo "REST port $port cannot be detected on host $host"
+        exit $rc
+    fi
+done
+$cmd
+exit 0
+
diff --git a/csit/resources/tests/clamp-common.robot b/csit/resources/tests/clamp-common.robot
new file mode 100644 (file)
index 0000000..1cb0874
--- /dev/null
@@ -0,0 +1,394 @@
+*** Settings ***
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library    Process
+Resource    common-library.robot
+
+*** Keywords ***
+
+ExecuteQuery
+    [Arguments]  ${file}
+    [Documentation]    Execute Query
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${executeQueryFile}  ${CURDIR}/data/script/execute-queryk8.sh
+    ...    ELSE    set Suite variable  ${executeQueryFile}  ${CURDIR}/data/script/execute-query.sh
+    ${result}=    Run Process    ${executeQueryFile}    ${file}
+    Should Be Equal As Strings    ${result.rc}     0
+
+VerifyHealthcheckApi
+    [Documentation]    Verify Healthcheck on policy-api
+    ${auth}=    PolicyAdminAuth
+    ${resp}=    MakeGetRequest  policy  ${POLICY_API_IP}  /policy/api/v1/health  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}   200
+
+VerifyHealthcheckPap
+    [Documentation]    Verify Healthcheck on policy-pap
+    ${auth}=    PolicyAdminAuth
+    ${resp}=    MakeGetRequest  policy  ${POLICY_PAP_IP}  /policy/pap/v1/health  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+VerifyPriming
+    [Arguments]  ${theCompositionId}  ${primestate}
+    [Documentation]    Verify the AC definitions are primed to the participants
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}   200
+    Should Be Equal As Strings  ${resp.json()['stateChangeResult']}  NO_ERROR
+    Run Keyword If  ${resp.status_code}==200  Should Be Equal As Strings  ${resp.json()['state']}  ${primestate}
+
+VerifyStateChangeResultPriming
+    [Arguments]  ${theCompositionId}  ${stateChangeResult}
+    [Documentation]    Verify the AC definitions are primed to the participants
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}   200
+    Run Keyword If  ${resp.status_code}==200  Should Be Equal As Strings  ${resp.json()['stateChangeResult']}  ${stateChangeResult}
+
+VerifyDeployStatus
+    [Arguments]  ${theCompositionId}  ${theInstanceId}  ${deploystate}
+    [Documentation]  Verify the Deploy status of automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings  ${resp.json()['stateChangeResult']}  NO_ERROR
+    Run Keyword If  ${resp.status_code}==200  Should Be Equal As Strings  ${resp.json()['deployState']}  ${deploystate}
+
+VerifySubStatus
+    [Arguments]  ${theCompositionId}  ${theInstanceId}
+    [Documentation]  Verify the Sub status of automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings  ${resp.json()['stateChangeResult']}  NO_ERROR
+    Run Keyword If  ${resp.status_code}==200  Should Be Equal As Strings  ${resp.json()['subState']}  NONE
+
+VerifyStateChangeResult
+    [Arguments]  ${theCompositionId}  ${theInstanceId}  ${stateChangeResult}
+    [Documentation]  Verify the Deploy status of automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Run Keyword If  ${resp.status_code}==200  Should Be Equal As Strings  ${resp.json()['stateChangeResult']}  ${stateChangeResult}
+
+VerifyPropertiesUpdated
+    [Arguments]  ${theCompositionId}  ${theInstanceId}  ${textToFind}
+    [Documentation]  Verify the Deploy status of automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Run Keyword If  ${resp.status_code}==200  Should Match Regexp  ${respstring}  ${textToFind}
+
+VerifyInternalStateElementsRuntime
+    [Arguments]  ${theCompositionId}  ${theInstanceId}  ${deploystate}
+    [Documentation]  Verify the Instance elements during operation
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings  ${resp.json()['deployState']}   ${deploystate}
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb80c6c34']['outProperties']['InternalState']}
+    Should Be Equal As Strings  ${respstring}  ${deploystate}
+
+VerifyMigratedElementsRuntime
+    [Arguments]  ${theCompositionId}  ${theInstanceId}
+    [Documentation]  Verify the Instance elements after Migration
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement
+    Should Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement2
+    Should Not Match Regexp  ${respstring}  Sim_SinkAutomationCompositionElement
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c34']['outProperties']['stage']}
+    Should Be Equal As Strings  ${respstring}  [1, 2]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c35']['outProperties']['stage']}
+    Should Be Equal As Strings  ${respstring}  [0, 1]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c37']['outProperties']['stage']}
+    Should Be Equal As Strings  ${respstring}  [0, 2]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c40']['outProperties']['stage']}
+    Should Be Equal As Strings  ${respstring}  [1, 2]
+
+VerifyPrepareElementsRuntime
+    [Arguments]  ${theCompositionId}  ${theInstanceId}
+    [Documentation]  Verify the Instance elements after Prepare
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c34']['outProperties']['prepareStage']}
+    Should Be Equal As Strings  ${respstring}  [1, 2]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c35']['outProperties']['prepareStage']}
+    Should Be Equal As Strings  ${respstring}  [0, 1]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c36']['outProperties']['prepareStage']}
+    Should Be Equal As Strings  ${respstring}  [0, 2]
+
+VerifyRollbackElementsRuntime
+    [Arguments]  ${theCompositionId}  ${theInstanceId}
+    [Documentation]  Verify the Instance elements after Rollback
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Not Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement
+    Should Match Regexp  ${respstring}  Sim_SinkAutomationCompositionElement
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c34']['outProperties']['rollbackStage']}
+    Should Be Equal As Strings  ${respstring}  [2, 1]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c35']['outProperties']['rollbackStage']}
+    Should Be Equal As Strings  ${respstring}  [1, 0]
+    ${respstring}   Convert To String   ${resp.json()['elements']['709c62b3-8918-41b9-a747-d21eb79c6c36']['outProperties']['rollbackStage']}
+    Should Be Equal As Strings  ${respstring}  [2, 0]
+
+VerifyMigratedElementsSim
+    [Arguments]  ${theInstanceId}
+    [Documentation]  Query on Participant Simulator 1
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement
+    Should Not Match Regexp  ${respstring}  Sim_SinkAutomationCompositionElement
+
+VerifyMigratedElementsSim3
+    [Arguments]  ${theInstanceId}
+    [Documentation]  Query on Participant Simulator 3
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM3_IP}  /onap/policy/simparticipant/v2/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement2
+    Should Not Match Regexp  ${respstring}  Sim_SinkAutomationCompositionElement
+
+VerifyRemovedElementsSim
+    [Arguments]  ${theInstanceId}
+    [Documentation]  Query on Participant Simulator 2
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM2_IP}  /onap/policy/simparticipant/v2/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Empty    ${resp.text}
+
+VerifyRollbackElementsSim
+    [Arguments]  ${theInstanceId}
+    [Documentation]  Query on Participant Simulator
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Not Match Regexp  ${respstring}  Sim_NewAutomationCompositionElement
+    Should Match Regexp  ${respstring}  Sim_SinkAutomationCompositionElement
+
+VerifyCompositionParticipantSim
+    [Arguments]  ${textToFind}
+    [Documentation]  Query composition on Participant Simulator
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/compositiondatas  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Match Regexp  ${respstring}  ${textToFind}
+
+VerifyParticipantSim
+    [Arguments]  ${theInstanceId}  ${textToFind}
+    [Documentation]  Query on Participant Simulator
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/instances/${theInstanceId}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${respstring}   Convert To String   ${resp.json()}
+    Should Match Regexp  ${respstring}  ${textToFind}
+
+VerifyUninstantiated
+    [Arguments]  ${theCompositionId}
+    [Documentation]  Verify the Uninstantiation of automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}   /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Run Keyword If  ${resp.status_code}==200  Length Should Be  ${resp.json()['automationCompositionList']}  0
+
+SetParticipantSimFail
+    [Arguments]  ${domain}
+    [Documentation]  Set Participant Simulator Fail.
+    ${auth}=    ParticipantAuth
+    ${postjson}=  Get file  ${CURDIR}/data/SettingSimPropertiesFail.json
+    ${resp}=   MakeJsonPutRequest  participant  ${domain}  /onap/policy/simparticipant/v2/parameters  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+SetParticipantSimSuccess
+    [Arguments]  ${domain}
+    [Documentation]  Set Participant Simulator Success.
+    ${auth}=    ParticipantAuth
+    ${postjson}=  Get file  ${CURDIR}/data/SettingSimPropertiesSuccess.json
+    ${resp}=   MakeJsonPutRequest  participant  ${domain}  /onap/policy/simparticipant/v2/parameters  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+SetParticipantSimTimeout
+    [Arguments]  ${domain}
+    [Documentation]  Set Participant Simulator Timeout.
+    ${auth}=    ParticipantAuth
+    ${postjson}=  Get file  ${CURDIR}/data/SettingSimPropertiesTimeout.json
+    ${resp}=   MakeJsonPutRequest  participant  ${domain}  /onap/policy/simparticipant/v2/parameters  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+SetParticipantSimDelay
+    [Documentation]  Set Participant Simulator Delay.
+    ${auth}=    ParticipantAuth
+    ${postjson}=  Get file  ${CURDIR}/data/SettingSimPropertiesDelay.json
+    ${resp}=   MakeJsonPutRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/parameters  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+
+ClampAuth
+    ${auth}=    Create List    runtimeUser    zb!XztG34
+    RETURN  ${auth}
+
+ParticipantAuth
+    ${auth}=    Create List    participantUser    zb!XztG34
+    RETURN  ${auth}
+
+MakeCommissionAcDefinition
+    [Arguments]   ${postyaml}
+    ${auth}=    ClampAuth
+    ${resp}=   MakeYamlPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions  ${postyaml}  ${auth}
+    ${respyaml}=  yaml.Safe Load  ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     201
+    RETURN  ${respyaml["compositionId"]}
+
+DePrimeAndDeleteACDefinition
+    [Arguments]   ${compositionId}
+    ${postjson}=  Get file  ${CURDIR}/data/ACDepriming.json
+    PrimeACDefinition  ${postjson}  ${compositionId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPriming  ${compositionId}  COMMISSIONED
+    DeleteACDefinition  ${compositionId}
+
+PrimeACDefinition
+    [Arguments]   ${postjson}  ${compositionId}
+    ${auth}=    ClampAuth
+    ${resp}=   MakeJsonPutRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionId}  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     202
+
+DeleteACDefinition
+    [Arguments]   ${compositionId}
+    ${auth}=    ClampAuth
+    Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+    ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/yaml    Content-Type=application/yaml
+    ${resp}=   DELETE On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}  headers=${headers}
+    Log    Received response from runtime acm ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+MakeJsonInstantiateAutomationComposition
+    [Arguments]  ${compositionId}  ${postjson}
+    ${auth}=    ClampAuth
+    ${updatedpostjson}=   Replace String     ${postjson}     COMPOSITIONIDPLACEHOLDER       ${compositionId}
+    ${resp}=   MakeJsonPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances  ${updatedpostjson}  ${auth}
+    ${respyaml}=  yaml.Safe Load  ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     201
+    RETURN  ${respyaml["instanceId"]}
+
+MakeYamlInstantiateAutomationComposition
+    [Arguments]  ${compositionId}  ${postyaml}
+    ${auth}=    ClampAuth
+    ${updatedpostyaml}=   Replace String     ${postyaml}     COMPOSITIONIDPLACEHOLDER       ${compositionId}
+    ${resp}=   MakeYamlPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances  ${updatedpostyaml}  ${auth}
+    ${respyaml}=  yaml.Safe Load  ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     201
+    RETURN  ${respyaml["instanceId"]}
+
+ChangeStatusAutomationComposition
+    [Arguments]  ${compositionId}   ${instanceId}   ${postjson}
+    ${auth}=    ClampAuth
+    ${resp}=   MakeJsonPutRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}  ${postjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     202
+
+DeleteAutomationComposition
+    [Arguments]  ${compositionId}  ${instanceId}
+    ${auth}=    ClampAuth
+    Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+    ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=   DELETE On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}     headers=${headers}
+    Log    Received response from runtime acm ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     202
+
+UndeployAndDeleteAutomationComposition
+    [Arguments]  ${compositionId}  ${instanceId}
+    ${postjson}=  Get file  ${CURDIR}/data/UndeployAC.json
+    ChangeStatusAutomationComposition  ${compositionId}   ${instanceId}  ${postjson}
+    Wait Until Keyword Succeeds    3 min    5 sec    VerifyDeployStatus  ${compositionId}  ${instanceId}  UNDEPLOYED
+    DeleteAutomationComposition  ${compositionId}  ${instanceId}
+    Wait Until Keyword Succeeds    1 min    5 sec    VerifyUninstantiated  ${compositionId}
+
+MigrateAc
+    [Arguments]   ${postyaml}  ${theCompositionId}  ${theCompositionTargetId}  ${theInstanceId}  ${theText}
+    ${auth}=    ClampAuth
+    ${updatedpostyaml}=   Replace String     ${postyaml}            COMPOSITIONIDPLACEHOLDER             ${theCompositionId}
+    ${updatedpostyaml}=   Replace String     ${updatedpostyaml}     COMPOSITIONTARGETIDPLACEHOLDER       ${theCompositionTargetId}
+    ${updatedpostyaml}=   Replace String     ${updatedpostyaml}     INSTACEIDPLACEHOLDER                 ${theInstanceId}
+    ${updatedpostyaml}=   Replace String     ${updatedpostyaml}     TEXTPLACEHOLDER                      ${theText}
+    ${resp}=   MakeYamlPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${theCompositionId}/instances  ${updatedpostyaml}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+MakePostRequest
+    [Arguments]  ${name}  ${domain}  ${url}  ${auth}
+    Log    Creating session http://${domain}
+    ${session}=  Create Session  ${name}  http://${domain}  auth=${auth}
+    ${resp}=   POST On Session     ${name}  ${url}
+    Log    Received response from ${name} ${resp.text}
+    RETURN  ${resp}
+
+MakeYamlPostRequest
+    [Arguments]  ${name}  ${domain}  ${url}  ${postyaml}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  ${name}  http://${domain}  auth=${auth}
+    ${headers}  Create Dictionary     Accept=application/yaml    Content-Type=application/yaml
+    ${resp}=  POST On Session  ${name}  ${url}  data=${postyaml}  headers=${headers}
+    Log  Received response from ${name} ${resp.text}
+    RETURN  ${resp}
+
+MakeJsonPostRequest
+    [Arguments]  ${name}  ${domain}  ${url}  ${postjson}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  ${name}  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=  POST On Session  ${name}  ${url}  data=${postjson}  headers=${headers}
+    Log  Received response from ${name} ${resp.text}
+    RETURN  ${resp}
+
+MakeJsonPutRequest
+    [Arguments]  ${name}  ${domain}  ${url}  ${postjson}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  ${name}  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=  PUT On Session  ${name}  ${url}  data=${postjson}  headers=${headers}
+    Log  Received response from ${name} ${resp.text}
+    RETURN  ${resp}
+
+MakeGetRequest
+    [Arguments]  ${name}  ${domain}  ${url}  ${auth}
+    Log    Creating session http://${domain}
+    ${session}=    Create Session      ${name}  http://${domain}   auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=   GET On Session     ${name}  ${url}     headers=${headers}
+    Log    Received response from ${name} ${resp.text}
+    RETURN  ${resp}
+
+VerifyKafkaInTraces
+    [Arguments]  ${domain}    ${service}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  jaeger  http://${domain}
+    ${tags}=    Create Dictionary    otel.library.name=io.opentelemetry.kafka-clients-2.6    messaging.system=kafka
+    ${tags_json}=    evaluate    json.dumps(${tags})    json
+    ${params}=    Create Dictionary    service=${service}    tags=${tags_json}    operation=policy-acruntime-participant publish    lookback=1h    limit=10
+    ${resp}=  GET On Session  jaeger  /api/traces  params=${params}    expected_status=200
+    Log  Received response from jaeger ${resp.text}
+    RETURN  ${resp}
+
+VerifyHttpInTraces
+    [Arguments]  ${domain}    ${service}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  jaeger  http://${domain}
+    ${tags}=    Create Dictionary    uri=/v2/compositions/{compositionId}
+    ${tags_json}=    evaluate    json.dumps(${tags})    json
+    ${params}=    Create Dictionary    service=${service}    tags=${tags_json}    operation=http put /v2/compositions/{compositionId}    lookback=1h    limit=10
+    ${resp}=  GET On Session  jaeger  /api/traces  params=${params}    expected_status=200
+    Log  Received response from jaeger ${resp.text}
+    RETURN  ${resp}
diff --git a/csit/resources/tests/clamp-db-restore.robot b/csit/resources/tests/clamp-db-restore.robot
new file mode 100644 (file)
index 0000000..013b25e
--- /dev/null
@@ -0,0 +1,82 @@
+*** Settings ***
+Name        Database Restore Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library     Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+
+InsertDataIntoDatabase
+    [Documentation]  Insert restored data into the Database.
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-from.sql
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-to.sql
+    ExecuteQuery    ${CURDIR}/data/query/instance.sql
+
+AcMigrationRestored
+    [Documentation]  Migration of an automation composition restored.
+    set Suite variable  ${compositionIdRestored}  d30b8017-4d64-4693-84d7-de9c4226b9f8
+    set Suite variable  ${InstanceIdRestored}  dd36aaa4-580f-4193-a52b-37c3a955b11a
+    set Suite variable  ${compositionTargetIdRestored}  6c1cf107-a2ca-4485-8129-02f9fae64d64
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${auth}=    ClampAuth
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-restored.yaml
+    ${resp}=   MakeYamlPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionIdRestored}/instances  ${postyaml}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionTargetIdRestored}  ${InstanceIdRestored}  DEPLOYED
+
+UpdateDataDatabase
+    [Documentation]  Update restored data into the Database.
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-update.sql
+
+ReviewAutomationCompositionRestored
+    [Documentation]  Review automation composition restored.
+    ${postjson}=  Get file  ${CURDIR}/data/ReviewAC.json
+    ChangeStatusAutomationComposition  ${compositionTargetIdRestored}   ${InstanceIdRestored}  ${postjson}
+    Wait Until Keyword Succeeds    10 min    5 sec    VerifySubStatus  ${compositionTargetIdRestored}  ${InstanceIdRestored}
+    VerifyCompositionParticipantSim   'MyTextUpdated'
+
+AcDeleteRestored
+    [Documentation]  Undeploy and delete of an automation composition restored.
+    UndeployAndDeleteAutomationComposition  ${compositionTargetIdRestored}  ${InstanceIdRestored}
+
+DeleteACDefinitionsRestored
+    [Documentation]  Deprime and delete of the compositions definition restored.
+    DePrimeAndDeleteACDefinition   ${compositionIdRestored}
+    DePrimeAndDeleteACDefinition   ${compositionTargetIdRestored}
+
+InsertDataIntoDatabase2
+    [Documentation]  Insert restored data into the Database.
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-from.sql
+    ExecuteQuery    ${CURDIR}/data/query/instance.sql
+
+SyncParticipant
+    [Documentation]  Manual sync participants.
+    ${auth}=    ClampAuth
+    Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+    ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
+    ${resp}=   PUT On Session     policy  /onap/policy/clamp/acm/v2/participants/sync
+    Log    Received response from runtime acm ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     202
+    Wait Until Keyword Succeeds    1 min    10 sec    VerifyCompositionParticipantSim   'InternalState'
+    VerifyParticipantSim  ${InstanceIdRestored}  myParameterToUpdate
+
+GetInstances
+    [Documentation]    Get all the instances from the database
+    ${auth}=    ClampAuth
+    Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+    ${session}=    Create Session    policy    http://${POLICY_RUNTIME_ACM_IP}    auth=${auth}
+    ${resp}=    GET On Session    policy    /onap/policy/clamp/acm/v2/instances
+    Log    Received response from ACM-R ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Length Should Be    ${resp.json()["automationCompositionList"]}    1
+
+AcDeleteRestored2
+    [Documentation]  Undeploy and delete of an automation composition restored.
+    UndeployAndDeleteAutomationComposition  ${compositionIdRestored}  ${InstanceIdRestored}
+    DePrimeAndDeleteACDefinition   ${compositionIdRestored}
diff --git a/csit/resources/tests/clamp-health-check.robot b/csit/resources/tests/clamp-health-check.robot
new file mode 100644 (file)
index 0000000..cf5dde2
--- /dev/null
@@ -0,0 +1,41 @@
+*** Settings ***
+Name        Health Check Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library     Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+HealthcheckAcm
+    [Documentation]    Healthcheck on Clamp Acm
+    ${auth}=    ClampAuth
+    ${resp}=    MakeGetRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  onap/policy/clamp/acm/actuator/health  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+HealthcheckParticipantSim
+    [Documentation]    Healthcheck on Participant Simulator
+    ${auth}=    ParticipantAuth
+    ${resp}=    MakeGetRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/health  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+
+HealthcheckApi
+    [Documentation]    Healthcheck on policy-api
+    Wait Until Keyword Succeeds    5 min    10 sec    VerifyHealthcheckApi
+
+HealthcheckPap
+    [Documentation]    Healthcheck on policy-pap
+    Wait Until Keyword Succeeds    5 min    10 sec    VerifyHealthcheckPap
+
+RegisterParticipants
+    [Documentation]  Register Participants.
+    ${auth}=    ClampAuth
+    Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+    ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
+    ${resp}=   PUT On Session     policy  /onap/policy/clamp/acm/v2/participants
+    Log    Received response from runtime acm ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     202
diff --git a/csit/resources/tests/clamp-migrate-rollback.robot b/csit/resources/tests/clamp-migrate-rollback.robot
new file mode 100644 (file)
index 0000000..e562a7f
--- /dev/null
@@ -0,0 +1,375 @@
+*** Settings ***
+Name        Migration and Rollback Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library     Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+CommissionAutomationComposition
+    [Documentation]  Commission automation composition definition.
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${compositionFile}  acelement-usecase.yaml
+
+    ...    ELSE    set Suite variable  ${compositionFile}  acelement-usecaseDocker.yaml
+    ${postyaml}=  Get file  ${CURDIR}/data/${compositionFile}
+    ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
+    set Suite variable  ${compositionId}  ${tmpCompositionId}
+
+CommissionAcDefinitionMigrationFrom
+    [Documentation]  Commission automation composition definition From.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-definition-migration-from.yaml
+    ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
+    set Suite variable  ${compositionFromId}  ${tmpCompositionId}
+
+CommissionAcDefinitionMigrationTo
+    [Documentation]  Commission automation composition definition To.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-definition-migration-to.yaml
+    ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
+    set Suite variable  ${compositionToId}  ${tmpCompositionId}
+
+PrimeACDefinitions
+    [Documentation]  Prime automation composition definition
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${compositionId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPriming  ${compositionId}  PRIMED
+
+FailPrimeACDefinitionFrom
+    [Documentation]  Prime automation composition definition Migration From with Fail.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${compositionFromId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResultPriming  ${compositionFromId}   FAILED
+
+PrimeACDefinitionFrom
+    [Documentation]  Prime automation composition definition Migration From.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${compositionFromId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPriming  ${compositionFromId}  PRIMED
+
+PrimeACDefinitionTo
+    [Documentation]  Prime automation composition definition Migration To.
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${compositionToId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPriming  ${compositionToId}  PRIMED
+
+DeleteUndeployedInstantiateAutomationComposition
+    [Documentation]  Delete Instantiate automation composition that has never been deployed.
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${instantiationfile}  AcK8s.json
+
+    ...    ELSE    set Suite variable  ${instantiationfile}  AcDocker.json
+    ${postjson}=  Get file  ${CURDIR}/data/${instantiationfile}
+    ${tmpInstanceId}=  MakeJsonInstantiateAutomationComposition  ${compositionId}  ${postjson}
+    DeleteAutomationComposition  ${compositionId}  ${tmpInstanceId}
+    Wait Until Keyword Succeeds    3 min    5 sec    VerifyUninstantiated  ${compositionId}
+
+InstantiateAutomationComposition
+    [Documentation]  Instantiate automation composition.
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${instantiationfile}  AcK8s.json
+
+    ...    ELSE    set Suite variable  ${instantiationfile}  AcDocker.json
+    ${postjson}=  Get file  ${CURDIR}/data/${instantiationfile}
+    ${tmpInstanceId}=  MakeJsonInstantiateAutomationComposition  ${compositionId}  ${postjson}
+    Set Suite Variable  ${instanceId}  ${tmpInstanceId}
+
+InstantiateAutomationCompositionTimeout
+    [Documentation]  Instantiate automation composition timeout.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-timeout.yaml
+    ${tmpInstanceId}=  MakeYamlInstantiateAutomationComposition   ${compositionFromId}   ${postyaml}
+    set Suite variable  ${instanceTimeoutId}    ${tmpInstanceId}
+
+DeployAutomationCompositionTimeout
+    [Documentation]  Deploy automation composition timeout.
+    SetParticipantSimTimeout  ${HTTP_PARTICIPANT_SIM1_IP}
+    SetParticipantSimTimeout  ${HTTP_PARTICIPANT_SIM2_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}  ${instanceTimeoutId}   ${postjson}
+    Wait Until Keyword Succeeds    5 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceTimeoutId}  TIMEOUT
+
+DeleteAutomationCompositionTimeout
+    [Documentation]  Delete automation composition timeout.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM2_IP}
+    UndeployAndDeleteAutomationComposition  ${compositionFromId}  ${instanceTimeoutId}
+
+InstantiateAutomationCompositionMigrationFrom
+    [Documentation]  Instantiate automation composition migration.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-from.yaml
+    ${updatedpostyaml}=   Replace String     ${postyaml}     TEXTPLACEHOLDER       MyTextInit
+    ${tmpInstanceId}=  MakeYamlInstantiateAutomationComposition   ${compositionFromId}   ${updatedpostyaml}
+    set Suite variable  ${instanceMigrationId}    ${tmpInstanceId}
+
+FailPrepareAutomationCompositionMigrationFrom
+    [Documentation]  Fail Prepare automation composition migration.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM2_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/PrepareAC.json
+    ChangeStatusAutomationComposition   ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+PrepareAutomationCompositionMigrationFrom
+    [Documentation]  Prepare automation composition migration.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM2_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/PrepareAC.json
+    ChangeStatusAutomationComposition   ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    10 min    5 sec    VerifySubStatus  ${compositionFromId}  ${instanceMigrationId}
+    VerifyPrepareElementsRuntime   ${compositionFromId}  ${instanceMigrationId}
+
+FailDeployAutomationCompositionMigration
+    [Documentation]  Fail Deploy automation composition.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+DeployAutomationComposition
+    [Documentation]  Deploy automation composition.
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionId}  ${instanceId}  ${postjson}
+    Wait Until Keyword Succeeds    10 min    5 sec    VerifyDeployStatus  ${compositionId}  ${instanceId}  DEPLOYED
+
+QueryPolicies
+    [Documentation]    Verify the new policies deployed
+    ${auth}=    PolicyAdminAuth
+    Sleep  10s
+    Log    Creating session http://${POLICY_PAP_IP}
+    ${session}=    Create Session      policy  http://${POLICY_PAP_IP}   auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=   GET On Session     policy  /policy/pap/v1/policies/deployed     headers=${headers}
+    Log    Received response from policy-pap {resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Dictionary Should Contain Value  ${resp.json()[0]}  onap.policies.native.apex.ac.element
+
+QueryPolicyTypes
+    [Documentation]    Verify the new policy types created
+    ${auth}=    PolicyAdminAuth
+    Sleep  10s
+    Log    Creating session http://${POLICY_API_IP}:6969
+    ${session}=    Create Session      policy  http://${POLICY_API_IP}   auth=${auth}
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+    ${resp}=   GET On Session     policy  /policy/api/v1/policytypes     headers=${headers}
+    Log    Received response from policy-api ${resp.text}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    List Should Contain Value  ${resp.json()['policy_types']}  onap.policies.native.Apex
+
+DeployAutomationCompositionMigration
+    [Documentation]  Deploy automation composition.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+
+SendOutPropertiesToRuntime
+    [Documentation]  Send Out Properties To Runtime
+    ${auth}=    ParticipantAuth
+    ${postjson}=  Get file  ${CURDIR}/data/OutProperties.json
+    ${updatedpostjson}=   Replace String     ${postjson}     INSTACEIDPLACEHOLDER       ${instanceMigrationId}
+    ${updatedpostjson}=   Replace String     ${updatedpostjson}     TEXTPLACEHOLDER       DumpTest
+    ${resp}=   MakeJsonPutRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/datas  ${updatedpostjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${resp}=   MakeJsonPutRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/datas  ${updatedpostjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    ${updatedpostjson}=   Replace String     ${postjson}     INSTACEIDPLACEHOLDER       ${instanceMigrationId}
+    ${updatedpostjson}=   Replace String     ${updatedpostjson}     TEXTPLACEHOLDER       MyTextToSend
+    ${resp}=   MakeJsonPutRequest  participant  ${HTTP_PARTICIPANT_SIM1_IP}  /onap/policy/simparticipant/v2/datas  ${updatedpostjson}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPropertiesUpdated  ${compositionFromId}  ${instanceMigrationId}  MyTextToSend
+
+FailReviewAutomationCompositionMigrationFrom
+    [Documentation]  Fail Review automation composition migration.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ReviewAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+ReviewAutomationCompositionMigrationFrom
+    [Documentation]  Review automation composition migration.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ReviewAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    10 min    5 sec    VerifySubStatus  ${compositionFromId}  ${instanceMigrationId}
+
+AutomationCompositionUpdate
+    [Documentation]  Update of an automation composition.
+    ${auth}=    ClampAuth
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-update.yaml
+    ${updatedpostyaml}=   Replace String     ${postyaml}     COMPOSITIONIDPLACEHOLDER       ${compositionFromId}
+    ${updatedpostyaml}=   Replace String     ${updatedpostyaml}     INSTACEIDPLACEHOLDER       ${instanceMigrationId}
+    ${updatedpostyaml}=   Replace String     ${updatedpostyaml}     TEXTPLACEHOLDER       MyTextUpdated
+    ${resp}=   MakeYamlPostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionFromId}/instances  ${updatedpostyaml}  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+    VerifyPropertiesUpdated  ${compositionFromId}  ${instanceMigrationId}  MyTextUpdated
+    VerifyParticipantSim  ${instanceMigrationId}  MyTextUpdated
+
+PrecheckAutomationCompositionMigration
+    [Documentation]  Precheck Migration of an automation composition.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-precheck-migration.yaml
+    MigrateAc  ${postyaml}  ${compositionFromId}  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifySubStatus  ${compositionFromId}  ${instanceMigrationId}
+
+AutomationCompositionMigrationTo
+    [Documentation]  Migration of an automation composition.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-to.yaml
+    MigrateAc  ${postyaml}  ${compositionFromId}  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionToId}  ${instanceMigrationId}  DEPLOYED
+    VerifyPropertiesUpdated  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    VerifyParticipantSim  ${instanceMigrationId}  TextForMigration
+    VerifyMigratedElementsRuntime  ${compositionToId}  ${instanceMigrationId}
+    VerifyMigratedElementsSim  ${instanceMigrationId}
+    VerifyRemovedElementsSim  ${instanceMigrationId}
+    VerifyMigratedElementsSim3  ${instanceMigrationId}
+
+FailAutomationCompositionMigration
+    [Documentation]  Fail Migration of an automation composition.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-fail.yaml
+    MigrateAc  ${postyaml}  ${compositionToId}  ${compositionFromId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionToId}  ${instanceMigrationId}  FAILED
+
+UnInstantiateAutomationComposition
+    [Documentation]  UnDeploy and Delete automation composition instance.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    UndeployAndDeleteAutomationComposition  ${compositionId}  ${instanceId}
+
+FailUnDeployAutomationCompositionMigrationTo
+    [Documentation]  Fail UnDeploy automation composition migrated.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/UndeployAC.json
+    ChangeStatusAutomationComposition  ${compositionToId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionToId}  ${instanceMigrationId}  FAILED
+
+UnDeployAutomationCompositionMigrationTo
+    [Documentation]  UnDeploy automation composition migrated.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/UndeployAC.json
+    ChangeStatusAutomationComposition  ${compositionToId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionToId}  ${instanceMigrationId}  UNDEPLOYED
+
+FailUnInstantiateAutomationCompositionMigrationTo
+    [Documentation]  Fail Delete automation composition instance migrated.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    DeleteAutomationComposition  ${compositionToId}  ${instanceMigrationId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionToId}  ${instanceMigrationId}  FAILED
+
+UnInstantiateAutomationCompositionMigrationTo
+    [Documentation]  Delete automation composition instance migrated.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    DeleteAutomationComposition  ${compositionToId}  ${instanceMigrationId}
+    Wait Until Keyword Succeeds    1 min    5 sec    VerifyUninstantiated  ${compositionToId}
+
+InstantiateAutomationCompositionRollback
+    [Documentation]  Instantiate automation composition for testing rollback.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-from.yaml
+    ${updatedpostyaml}=   Replace String     ${postyaml}     TEXTPLACEHOLDER       MyTextInit
+    ${tmpInstanceId}=  MakeYamlInstantiateAutomationComposition   ${compositionFromId}   ${updatedpostyaml}
+    set Suite variable  ${instanceMigrationId}    ${tmpInstanceId}
+
+DeployAutomationCompositionRollback
+    [Documentation]  Deploy automation for testing rollback.
+    ${auth}=    ClampAuth
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+
+FailAutomationCompositionMigrationRollback
+    [Documentation]  Fail Migration of an automation composition for testing rollback.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-to.yaml
+    MigrateAc  ${postyaml}  ${compositionFromId}  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+RollbackAutomationComposition
+    [Documentation]  Rollback of an automation composition.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${auth}=    ClampAuth
+    ${resp}=   MakePostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionFromId}/instances/${instanceMigrationId}/rollback  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     202
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+    VerifyPropertiesUpdated  ${compositionFromId}  ${instanceMigrationId}  MyTextInit
+    VerifyParticipantSim  ${instanceMigrationId}  MyTextInit
+    VerifyRollbackElementsRuntime  ${compositionFromId}  ${instanceMigrationId}
+    VerifyRollbackElementsSim  ${instanceMigrationId}
+
+UnInstantiateAutomationCompositionRollback
+    [Documentation]  Undeploy and Delete automation composition instance in fail rollback.
+    UndeployAndDeleteAutomationComposition  ${compositionFromId}  ${instanceMigrationId}
+
+InstantiateAutomationCompositionRollback2
+    [Documentation]  Instantiate automation composition for testing rollback.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-from.yaml
+    ${updatedpostyaml}=   Replace String     ${postyaml}     TEXTPLACEHOLDER       MyTextInit
+    ${tmpInstanceId}=  MakeYamlInstantiateAutomationComposition   ${compositionFromId}   ${updatedpostyaml}
+    set Suite variable  ${instanceMigrationId}    ${tmpInstanceId}
+
+DeployAutomationCompositionRollback2
+    [Documentation]  Deploy automation for testing rollback.
+    ${auth}=    ClampAuth
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${compositionFromId}   ${instanceMigrationId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+
+FailAutomationCompositionMigrationRollback2
+    [Documentation]  Fail Migration of an automation composition for testing rollback.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM2_IP}
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-to.yaml
+    MigrateAc  ${postyaml}  ${compositionFromId}  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+RollbackAutomationComposition2
+    [Documentation]  Rollback of an automation composition.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM2_IP}
+    ${auth}=    ClampAuth
+    ${resp}=   MakePostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionFromId}/instances/${instanceMigrationId}/rollback  ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     202
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyDeployStatus  ${compositionFromId}  ${instanceMigrationId}  DEPLOYED
+    VerifyPropertiesUpdated  ${compositionFromId}  ${instanceMigrationId}  MyTextInit
+    VerifyParticipantSim  ${instanceMigrationId}  MyTextInit
+    VerifyRollbackElementsRuntime  ${compositionFromId}  ${instanceMigrationId}
+    VerifyRollbackElementsSim  ${instanceMigrationId}
+
+FailAutomationCompositionMigrationRollback3
+    [Documentation]  Fail Migration of an automation composition for testing rollback.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-migration-to.yaml
+    MigrateAc  ${postyaml}  ${compositionFromId}  ${compositionToId}  ${instanceMigrationId}  TextForMigration
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+FailRollbackAutomationComposition
+    [Documentation]  Fail Rollback of an automation composition.
+    ${auth}=    ClampAuth
+    ${resp}=   MakePostRequest  ACM  ${POLICY_RUNTIME_ACM_IP}  /onap/policy/clamp/acm/v2/compositions/${compositionFromId}/instances/${instanceMigrationId}/rollback   ${auth}
+    Should Be Equal As Strings    ${resp.status_code}     202
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${compositionFromId}  ${instanceMigrationId}  FAILED
+
+UnInstantiateAutomationCompositionRollback2
+    [Documentation]  Undeploy and Delete automation composition instance in fail rollback.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    UndeployAndDeleteAutomationComposition  ${compositionFromId}  ${instanceMigrationId}
+
+FailDePrimeACDefinitionsFrom
+    [Documentation]  Fail DePrime automation composition definition migration From.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ACDepriming.json
+    PrimeACDefinition  ${postjson}  ${compositionFromId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResultPriming  ${compositionFromId}   FAILED
+
+DeleteACDefinitionFrom
+    [Documentation]  DePrime and Delete automation composition definition migration From.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    DePrimeAndDeleteACDefinition  ${compositionFromId}
+
+DeleteACDefinitions
+    [Documentation]  DePrime and Delete automation composition definition.
+    DePrimeAndDeleteACDefinition  ${compositionId}
+
+DeleteACDefinitionTo
+    [Documentation]  DePrime and Delete automation composition definition migration To.
+    DePrimeAndDeleteACDefinition  ${compositionToId}
+
diff --git a/csit/resources/tests/clamp-single-element-test.robot b/csit/resources/tests/clamp-single-element-test.robot
new file mode 100644 (file)
index 0000000..8a78ace
--- /dev/null
@@ -0,0 +1,57 @@
+*** Settings ***
+Name        AC With Single Element Workflow
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library    Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+CommissionAutomationCompositionSimple
+    [Documentation]  Commission simple automation composition definition.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-definition-simple.yaml
+    ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
+    set Suite variable  ${simpleCompositionId}  ${tmpCompositionId}
+
+PrimeACDefinitionsSimple
+    [Documentation]  Prime simple automation composition definition
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${simpleCompositionId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyPriming  ${simpleCompositionId}  PRIMED
+
+InstantiateAutomationCompositionSimple
+    [Documentation]  Instantiate simple automation composition.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-instance-simple.yaml
+    ${tmpInstanceId}=  MakeYamlInstantiateAutomationComposition   ${simpleCompositionId}   ${postyaml}
+    set Suite variable  ${simpleInstanceId}    ${tmpInstanceId}
+
+FailDeployAutomationCompositionSimple
+    [Documentation]  Fail Simple Deploy automation composition.
+    SetParticipantSimFail  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/DeployAC.json
+    ChangeStatusAutomationComposition  ${simpleCompositionId}   ${simpleInstanceId}  ${postjson}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResult  ${simpleCompositionId}  ${simpleInstanceId}  FAILED
+
+UnDeployAutomationCompositionSimple
+    [Documentation]  UnDeploy simple automation composition.
+    SetParticipantSimDelay
+    ${postjson}=  Get file  ${CURDIR}/data/UndeployAC.json
+    ChangeStatusAutomationComposition  ${simpleCompositionId}   ${simpleInstanceId}  ${postjson}
+    Wait Until Keyword Succeeds    1 min    5 sec    VerifyDeployStatus  ${simpleCompositionId}  ${simpleInstanceId}  UNDEPLOYING
+    Wait Until Keyword Succeeds    1 min    5 sec    VerifyInternalStateElementsRuntime  ${simpleCompositionId}   ${simpleInstanceId}  UNDEPLOYING
+    Wait Until Keyword Succeeds    3 min    5 sec    VerifyDeployStatus  ${simpleCompositionId}  ${simpleInstanceId}  UNDEPLOYED
+    VerifyInternalStateElementsRuntime  ${simpleCompositionId}   ${simpleInstanceId}  UNDEPLOYED
+
+UnInstantiateAutomationCompositionSimple
+    [Documentation]  Delete simple automation composition instance.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    DeleteAutomationComposition  ${simpleCompositionId}  ${simpleInstanceId}
+    Wait Until Keyword Succeeds    1 min    5 sec    VerifyUninstantiated  ${simpleCompositionId}
+
+DeleteACDefinitionSimple
+    [Documentation]  DePrime and Delete simple automation composition definition.
+    DePrimeAndDeleteACDefinition  ${simpleCompositionId}
diff --git a/csit/resources/tests/clamp-slas.robot b/csit/resources/tests/clamp-slas.robot
new file mode 100644 (file)
index 0000000..a1ffd12
--- /dev/null
@@ -0,0 +1,58 @@
+*** Settings ***
+Name        Service Level Agreement Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     json
+Resource    common-library.robot
+
+*** Keywords ***
+ValidateResponseTimeForClamp
+    [Arguments]  ${uri}  ${method}
+    [Documentation]  Check if uri response is under the 1500ms required time for clamp metrics
+    ValidateResponseTime  acm-metrics  ${uri}  ${method}  1500
+
+*** Test Cases ***
+WaitForPrometheusServer
+    [Documentation]  Sleep time to wait for Prometheus server to gather all metrics
+    Sleep    5 seconds
+
+ValidateResponseTimeForHealthcheck
+    [Documentation]  Validate component healthcheck response time
+    ValidateResponseTimeForClamp  /actuator/health  GET
+
+ValidateResponseTimeQueryAcDefinition
+    [Documentation]  Validate query AC Definitions response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}  GET
+
+ValidateResponseTimeQueryAcInstance
+    [Documentation]  Validate query AC instance response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}/instances/{instanceId}  GET
+
+ValidateResponseTimeQueryAcInstances
+    [Documentation]  Validate query all AC instances response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}/instances  GET
+
+ValidateResponseTimeStateChange
+    [Documentation]  Validate AC instance StateChange response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}/instances/{instanceId}  PUT
+
+ValidateResponseTimeCallParticipants
+    [Documentation]  Validate call AC participants response time
+    ValidateResponseTimeForClamp  /v2/participants  PUT
+
+ValidateResponseTimeCommissioning
+    [Documentation]  Validate commission AC Definitions response time
+    ValidateResponseTimeForClamp  /v2/compositions  POST
+
+ValidateResponseTimeInstantiation
+    [Documentation]  Validate create AC Instance response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}/instances  POST
+
+ValidateResponseTimeDeleteInstance
+    [Documentation]  Validate delete AC Instance response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}/instances/{instanceId}  DELETE
+
+ValidateResponseTimeDeleteDefinition
+    [Documentation]  Validate delete AC Definition response time
+    ValidateResponseTimeForClamp  /v2/compositions/{compositionId}  DELETE
diff --git a/csit/resources/tests/clamp-timeout-test.robot b/csit/resources/tests/clamp-timeout-test.robot
new file mode 100644 (file)
index 0000000..b430d18
--- /dev/null
@@ -0,0 +1,30 @@
+*** Settings ***
+Name        Timeout Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library     Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+CommissionAcDefinitionTimeout
+    [Documentation]  Commission automation composition definition Timeout.
+    ${postyaml}=  Get file  ${CURDIR}/data/ac-definition-timeout.yaml
+    ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
+    set Suite variable  ${compositionTimeoutId}  ${tmpCompositionId}
+
+TimeoutPrimeACDefinition
+    [Documentation]  Prime automation composition definition Timeout.
+    SetParticipantSimTimeout  ${HTTP_PARTICIPANT_SIM1_IP}
+    ${postjson}=  Get file  ${CURDIR}/data/ACPriming.json
+    PrimeACDefinition  ${postjson}  ${compositionTimeoutId}
+    Wait Until Keyword Succeeds    2 min    5 sec    VerifyStateChangeResultPriming  ${compositionTimeoutId}   TIMEOUT
+
+DeleteACDefinitionTimeout
+    [Documentation]  DePrime and Delete automation composition definition Timeout.
+    SetParticipantSimSuccess  ${HTTP_PARTICIPANT_SIM1_IP}
+    DePrimeAndDeleteACDefinition  ${compositionTimeoutId}
diff --git a/csit/resources/tests/clamp-trace-test.robot b/csit/resources/tests/clamp-trace-test.robot
new file mode 100644 (file)
index 0000000..c6035d6
--- /dev/null
@@ -0,0 +1,45 @@
+*** Settings ***
+Name        Tracing and Logs Suite
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     String
+Library     json
+Library     yaml
+Library     Process
+Resource    common-library.robot
+Resource    clamp-common.robot
+
+*** Test Cases ***
+CheckTraces
+    [Documentation]    Verify that traces are being recorded in jaeger
+    Log    Verifying Jaeger traces
+    ${acmResp}=    VerifyTracingWorks    ${JAEGER_IP}    acm-r
+    ${httpSim1Resp}=    VerifyTracingWorks    ${JAEGER_IP}    sim-ppnt-1
+    ${policyResp}=    VerifyTracingWorks    ${JAEGER_IP}    policy-ppnt
+    ${httpSim2Resp}=    VerifyTracingWorks    ${JAEGER_IP}    sim-ppnt-2
+    Should Not Be Empty    ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
+    Log  Received spanID is ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${httpSim1Resp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${policyResp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${httpSim2Resp.json()["data"][0]["spans"][0]["spanID"]}
+
+CheckKafkaPresentInTraces
+    [Documentation]    Verify that kafka traces are being recorded in jaeger
+    Log    Verifying Kafka Jaeger traces
+    ${acmResp}=    VerifyKafkaInTraces    ${JAEGER_IP}    acm-r
+    ${httpSim1Resp}=    VerifyKafkaInTraces    ${JAEGER_IP}    sim-ppnt-1
+    ${policyResp}=    VerifyKafkaInTraces    ${JAEGER_IP}    policy-ppnt
+    ${httpSim2Resp}=    VerifyKafkaInTraces    ${JAEGER_IP}    sim-ppnt-2
+    Should Not Be Empty    ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
+    Log  Received spanID is ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${httpSim1Resp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${policyResp.json()["data"][0]["spans"][0]["spanID"]}
+    Should Not Be Empty    ${httpSim2Resp.json()["data"][0]["spans"][0]["spanID"]}
+
+CheckHttpPresentInAcmTraces
+    [Documentation]    Verify that http traces are being recorded in jaeger
+    Log    Verifying Http Jaeger traces
+    ${acmResp}=    VerifyHttpInTraces    ${JAEGER_IP}    acm-r
+    Should Not Be Empty    ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
+    Log  Received spanID is ${acmResp.json()["data"][0]["spans"][0]["spanID"]}
\ No newline at end of file
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot
new file mode 100644 (file)
index 0000000..89a9c72
--- /dev/null
@@ -0,0 +1,199 @@
+*** Settings ***
+Library    Collections
+Library    RequestsLibrary
+Library    OperatingSystem
+Library    json
+Library    Process
+
+*** Keywords ***
+
+PolicyAdminAuth
+    ${policyadmin}=   Create list   policyadmin    zb!XztG34
+    RETURN  ${policyadmin}
+
+PerformPatchRequest
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${patchjson}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
+    ${resp}=  PATCH On Session  policy  ${url}  data=${patchjson}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+PerformPostRequest
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${postjson}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
+    ${resp}=  POST On Session  policy  ${url}  data=${postjson}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+PerformPostRequestWithYaml
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${postyaml}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/yaml  Content-Type=application/yaml
+    ${resp}=  POST On Session  policy  ${url}  data=${postyaml}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+PerformPutRequest
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
+    ${resp}=  PUT On Session  policy  ${url}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+PerformGetRequest
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
+    ${resp}=  GET On Session  policy  ${url}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+PerformDeleteRequest
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
+    ${resp}=  DELETE On Session  policy  ${url}  headers=${headers}  expected_status=${expectedstatus}
+    Log  Received response from policy ${resp.text}
+
+CreatePolicy
+    [Arguments]  ${url}  ${expectedstatus}  ${postjson}  ${policyname}  ${policyversion}
+    [Documentation]  Create the specific policy
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postjson}  null  ${policyadmin}
+
+CreatePolicyWithYaml
+    [Arguments]  ${url}  ${expectedstatus}  ${postyaml}
+    [Documentation]  Create the specific policy
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformPostRequestWithYaml  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postyaml}  null  ${policyadmin}
+
+CreateFailurePolicyWithYaml
+    [Arguments]  ${url}  ${expectedstatus}  ${postyaml}  ${keyword}
+    [Documentation]  Trying to create policy with Invalid Data
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformPostRequestWithYaml  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postyaml}  null  ${policyadmin}
+    Should Contain    ${resp.text}    ${keyword}
+
+
+CreatePolicySuccessfully
+    [Arguments]  ${url}  ${postjson}  ${policyname}  ${policyversion}
+    [Documentation]  Create the specific policy
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  201  ${postjson}  null  ${policyadmin}
+    Dictionary Should Contain Key  ${resp.json()['topology_template']['policies'][0]}  ${policyname}
+    Should Be Equal As Strings  ${resp.json()['topology_template']['policies'][0]['${policyname}']['version']}  ${policyversion}
+
+CreateNodeTemplate
+    [Arguments]  ${url}  ${expectedstatus}  ${postjson}  ${nodeTemplateListLength}
+    [Documentation]  Create the node templates
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postjson}  \  ${policyadmin}
+    Run Keyword If  ${expectedstatus}==201  Length Should Be  ${resp.json()['topology_template']['node_templates']}  ${nodeTemplateListLength}
+
+
+QueryPdpGroups
+    [Documentation]    Verify pdp group query - suphosts upto 2 groups
+    [Arguments]  ${groupsLength}  ${group1Name}  ${group1State}  ${policiesLengthInGroup1}  ${group2Name}  ${group2State}  ${policiesLengthInGroup2}
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps  200  null  ${policyadmin}
+    Length Should Be  ${resp.json()['groups']}  ${groupsLength}
+    Should Be Equal As Strings  ${resp.json()['groups'][0]['name']}  ${group1Name}
+    Should Be Equal As Strings  ${resp.json()['groups'][0]['pdpGroupState']}  ${group1State}
+    Length Should Be  ${resp.json()['groups'][0]['pdpSubgroups'][0]['policies']}  ${policiesLengthInGroup1}
+    Run Keyword If  ${groupsLength}>1  Should Be Equal As Strings  ${resp.json()['groups'][1]['name']}  ${group2Name}
+    Run Keyword If  ${groupsLength}>1  Should Be Equal As Strings  ${resp.json()['groups'][1]['pdpGroupState']}  ${group2State}
+    Run Keyword If  ${groupsLength}>1  Length Should Be  ${resp.json()['groups'][1]['pdpSubgroups'][0]['policies']}  ${policiesLengthInGroup2}
+
+QueryPolicyAudit
+    [Arguments]  ${url}  ${expectedstatus}  ${pdpGroup}  ${pdpType}  ${policyName}  ${expectedAction}
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  ${url}  ${expectedstatus}  recordCount=4   ${policyadmin}
+    Log  Received response from queryPolicyAudit ${resp.text}
+    FOR    ${responseEntry}    IN    @{resp.json()}
+    Exit For Loop IF      '${responseEntry['policy']['name']}'=='${policyName}' and '${responseEntry['action']}'=='${expectedAction}'
+    END
+    Should Be Equal As Strings    ${responseEntry['pdpGroup']}  ${pdpGroup}
+    Should Be Equal As Strings    ${responseEntry['pdpType']}  ${pdpType}
+    Should Be Equal As Strings    ${responseEntry['policy']['name']}  ${policyName}
+    Should Be Equal As Strings    ${responseEntry['policy']['version']}  1.0.0
+    Should Be Equal As Strings    ${responseEntry['action']}  ${expectedAction}
+    Should Be Equal As Strings    ${responseEntry['user']}  policyadmin
+
+QueryPolicyStatus
+    [Documentation]    Verify policy deployment status
+    [Arguments]  ${policyName}  ${pdpGroup}  ${pdpType}  ${pdpName}  ${policyTypeName}
+    ${policyadmin}=  PolicyAdminAuth
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/policies/status  200  null   ${policyadmin}
+    FOR    ${responseEntry}    IN    @{resp.json()}
+    Exit For Loop IF      '${responseEntry['policy']['name']}'=='${policyName}'
+    END
+    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings    ${responseEntry['pdpGroup']}  ${pdpGroup}
+    Should Be Equal As Strings    ${responseEntry['pdpType']}  ${pdpType}
+    Should Be Equal As Strings    ${responseEntry['policy']['name']}  ${policyName}
+    Should Be Equal As Strings    ${responseEntry['policy']['version']}  1.0.0
+    Should Be Equal As Strings    ${responseEntry['policyType']['name']}  ${policyTypeName}
+    Should Be Equal As Strings    ${responseEntry['policyType']['version']}  1.0.0
+    Should Be Equal As Strings    ${responseEntry['deploy']}  True
+    Should Be Equal As Strings    ${responseEntry['state']}  SUCCESS
+
+GetMetrics
+    [Arguments]  ${domain}  ${auth}  ${context_path}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
+    ${resp}=  GET On Session  policy  ${context_path}metrics  expected_status=200
+    Log  Received response from policy ${resp.text}
+    RETURN  ${resp}
+
+VerifyTracingWorks
+    [Arguments]  ${domain}    ${service}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  jaeger  http://${domain}
+    ${resp}=  GET On Session  jaeger  /api/traces  params=service=${service}    expected_status=200
+    Log  Received response from jaeger ${resp.text}
+    RETURN  ${resp}
+
+QueryPrometheus
+    [Arguments]  ${query}
+    ${params}=  Create Dictionary  query=${query}
+    ${resp}=  GET  http://${PROMETHEUS_IP}/api/v1/query  ${params}
+    Status Should Be    OK
+    Log  Received response from Prometheus ${resp.text}
+    RETURN  ${resp.json()}
+
+ValidateResponseTime
+    [Arguments]  ${job}  ${uri}  ${method}  ${timeLimit}
+    [Documentation]  Check if uri response is under the required time
+    ${resp}=  QueryPrometheus  http_server_requests_seconds_sum{uri="${uri}",method="${method}",job="${job}"}/http_server_requests_seconds_count{uri="${uri}",method="${method}",job="${job}"}
+    ${rawNumber}=  Evaluate  ${resp['data']['result'][0]['value'][1]}
+    ${actualTime}=   Set Variable  ${rawNumber * ${1000}}
+    Should Be True   ${actualTime} <= ${timeLimit}
+
+CheckKafkaTopic
+    [Arguments]    ${topic}    ${expected_status}
+    ${resp}=    Run Process    ${CURDIR}/kafka_consumer.py    ${topic}    60    ${expected_status}    ${KAFKA_IP}
+    Log    ${resp.stdout}
+    Should Contain    ${resp.stdout}    ${expected_status}
+    RETURN    ${resp.stdout}
+
+GetKafkaTopic
+    [Arguments]    ${topic}
+    ${resp}=    Run Process    ${CURDIR}/make_topics.py    ${topic}    ${KAFKA_IP}
+    Log    ${resp.stdout}
+
+ValidatePolicyExecution
+    [Arguments]  ${url}  ${executionTime}
+    [Documentation]  Check that policy execution under X milliseconds
+    ${resp}=  QueryPrometheus  ${url}
+    ${rawNumber}=  Evaluate  ${resp['data']['result'][0]['value'][1]}
+    ${actualTime}=   Set Variable  ${rawNumber * ${1000}}
+    Should Be True   ${actualTime} <= ${executionTime}
diff --git a/csit/resources/tests/data/ACDepriming.json b/csit/resources/tests/data/ACDepriming.json
new file mode 100644 (file)
index 0000000..d2311b9
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "primeOrder": "DEPRIME"
+}
\ No newline at end of file
diff --git a/csit/resources/tests/data/ACPriming.json b/csit/resources/tests/data/ACPriming.json
new file mode 100644 (file)
index 0000000..76fafec
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "primeOrder": "PRIME"
+}
\ No newline at end of file
diff --git a/csit/resources/tests/data/AcDocker.json b/csit/resources/tests/data/AcDocker.json
new file mode 100644 (file)
index 0000000..25f0c71
--- /dev/null
@@ -0,0 +1,1094 @@
+{
+    "name": "DemoInstance0",
+    "version": "1.0.1",
+    "compositionId": "COMPOSITIONIDPLACEHOLDER",
+    "description": "Demo automation composition instance 0",
+    "elements": {
+        "709c62b3-8918-41b9-a747-d21eb79c6c20": {
+            "id": "709c62b3-8918-41b9-a747-d21eb79c6c20",
+            "definition": {
+                "name": "onap.policy.clamp.ac.element.Policy_AutomationCompositionElement",
+                "version": "1.2.3"
+            },
+            "description": "Policy Automation Composition Element for the Demo",
+            "properties": {
+                "tosca_definitions_version": "tosca_simple_yaml_1_3",
+                "name": "NULL",
+                "version": "0.0.0",
+                "data_types": {
+                    "onap.datatypes.native.apex.EngineService": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "name": {
+                                "type": "string",
+                                "description": "Specifies the engine name",
+                                "required": false,
+                                "default": "ApexEngineService"
+                            },
+                            "version": {
+                                "type": "string",
+                                "description": "Specifies the engine version in double dotted format",
+                                "required": false,
+                                "default": "1.0.0"
+                            },
+                            "id": {
+                                "type": "integer",
+                                "description": "Specifies the engine id",
+                                "required": true
+                            },
+                            "instance_count": {
+                                "type": "integer",
+                                "description": "Specifies the number of engine threads that should be run",
+                                "required": true
+                            },
+                            "deployment_port": {
+                                "type": "integer",
+                                "description": "Specifies the port to connect to for engine administration",
+                                "required": false,
+                                "default": 1
+                            },
+                            "policy_model_file_name": {
+                                "type": "string",
+                                "description": "The name of the file from which to read the APEX policy model",
+                                "required": false
+                            },
+                            "policy_type_impl": {
+                                "type": "string",
+                                "description": "The policy type implementation from which to read the APEX policy model",
+                                "required": false
+                            },
+                            "periodic_event_period": {
+                                "type": "string",
+                                "description": "The time interval in milliseconds for the periodic scanning event, 0 means don't scan",
+                                "required": false
+                            },
+                            "engine": {
+                                "type": "onap.datatypes.native.apex.engineservice.Engine",
+                                "description": "The parameters for all engines in the APEX engine service",
+                                "required": true
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.EventHandler": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "name": {
+                                "type": "string",
+                                "description": "Specifies the event handler name, if not specified this is set to the key name",
+                                "required": false
+                            },
+                            "carrier_technology": {
+                                "type": "onap.datatypes.native.apex.CarrierTechnology",
+                                "description": "Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)",
+                                "required": true
+                            },
+                            "event_protocol": {
+                                "type": "onap.datatypes.native.apex.EventProtocol",
+                                "description": "Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)",
+                                "required": true
+                            },
+                            "event_name": {
+                                "type": "string",
+                                "description": "Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent",
+                                "required": false
+                            },
+                            "event_name_filter": {
+                                "type": "string",
+                                "description": "Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through",
+                                "required": false
+                            },
+                            "synchronous_mode": {
+                                "type": "boolean",
+                                "description": "Specifies the event handler is syncronous (receive event and send response)",
+                                "required": false,
+                                "default": false
+                            },
+                            "synchronous_peer": {
+                                "type": "string",
+                                "description": "The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode",
+                                "required": false
+                            },
+                            "synchronous_timeout": {
+                                "type": "integer",
+                                "description": "The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode",
+                                "required": false
+                            },
+                            "requestor_mode": {
+                                "type": "boolean",
+                                "description": "Specifies the event handler is in requestor mode (send event and wait for response mode)",
+                                "required": false,
+                                "default": false
+                            },
+                            "requestor_peer": {
+                                "type": "string",
+                                "description": "The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode",
+                                "required": false
+                            },
+                            "requestor_timeout": {
+                                "type": "integer",
+                                "description": "The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode",
+                                "required": false
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.CarrierTechnology": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "label": {
+                                "type": "string",
+                                "description": "The label (name) of the carrier technology (such as REST, Kafka, WebSocket)",
+                                "required": true
+                            },
+                            "plugin_parameter_class_name": {
+                                "type": "string",
+                                "description": "The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class",
+                                "required": false
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.EventProtocol": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "label": {
+                                "type": "string",
+                                "description": "The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)",
+                                "required": true
+                            },
+                            "event_protocol_plugin_class": {
+                                "type": "string",
+                                "description": "The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class",
+                                "required": false
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.Environment": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "name": {
+                                "type": "string",
+                                "description": "The name of the environment variable",
+                                "required": true
+                            },
+                            "value": {
+                                "type": "string",
+                                "description": "The value of the environment variable",
+                                "required": true
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.engineservice.Engine": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "context": {
+                                "type": "onap.datatypes.native.apex.engineservice.engine.Context",
+                                "description": "The properties for handling context in APEX engines, defaults to using Java maps for context",
+                                "required": false
+                            },
+                            "executors": {
+                                "type": "map",
+                                "description": "The plugins for policy executors used in engines such as javascript, MVEL, Jython",
+                                "required": true,
+                                "entry_schema": {
+                                    "description": "The plugin class path for this policy executor",
+                                    "type": "string"
+                                }
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.engineservice.engine.Context": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "distributor": {
+                                "type": "onap.datatypes.native.apex.Plugin",
+                                "description": "The plugin to be used for distributing context between APEX PDPs at runtime",
+                                "required": false
+                            },
+                            "schemas": {
+                                "type": "map",
+                                "description": "The plugins for context schemas available in APEX PDPs such as Java and Avro",
+                                "required": false,
+                                "entry_schema": {
+                                    "type": "onap.datatypes.native.apex.Plugin"
+                                }
+                            },
+                            "locking": {
+                                "type": "onap.datatypes.native.apex.Plugin",
+                                "description": "The plugin to be used for locking context in and between APEX PDPs at runtime",
+                                "required": false
+                            },
+                            "persistence": {
+                                "type": "onap.datatypes.native.apex.Plugin",
+                                "description": "The plugin to be used for persisting context for APEX PDPs at runtime",
+                                "required": false
+                            }
+                        }
+                    },
+                    "onap.datatypes.native.apex.Plugin": {
+                        "derived_from": "tosca.datatypes.Root",
+                        "properties": {
+                            "name": {
+                                "type": "string",
+                                "description": "The name of the executor such as Javascript, Jython or MVEL",
+                                "required": true
+                            },
+                            "plugin_class_name": {
+                                "type": "string",
+                                "description": "The class path of the plugin class for this executor"
+                            }
+                        }
+                    }
+                },
+                "policy_types": {
+                    "onap.policies.Native": {
+                        "derived_from": "tosca.policies.Root",
+                        "description": "a base policy type for all native PDP policies",
+                        "version": "1.0.0",
+                        "name": "onap.policies.Native"
+                    },
+                    "onap.policies.native.Apex": {
+                        "derived_from": "onap.policies.Native",
+                        "description": "a policy type for native apex policies",
+                        "version": "1.0.0",
+                        "name": "onap.policies.native.Apex",
+                        "properties": {
+                            "engine_service": {
+                                "type": "onap.datatypes.native.apex.EngineService",
+                                "description": "APEX Engine Service Parameters"
+                            },
+                            "inputs": {
+                                "type": "map",
+                                "description": "Inputs for handling events coming into the APEX engine",
+                                "entry_schema": {
+                                    "type": "onap.datatypes.native.apex.EventHandler"
+                                }
+                            },
+                            "outputs": {
+                                "type": "map",
+                                "description": "Outputs for handling events going out of the APEX engine",
+                                "entry_schema": {
+                                    "type": "onap.datatypes.native.apex.EventHandler"
+                                }
+                            },
+                            "environment": {
+                                "type": "list",
+                                "description": "Envioronmental parameters for the APEX engine",
+                                "entry_schema": {
+                                    "type": "onap.datatypes.native.apex.Environment"
+                                }
+                            }
+                        }
+                    }
+                },
+                "topology_template": {
+                    "policies": [
+                        {
+                            "onap.policies.native.apex.ac.element": {
+                                "type": "onap.policies.native.Apex",
+                                "type_version": "1.0.0",
+                                "properties": {
+                                    "engineServiceParameters": {
+                                        "name": "MyApexEngine",
+                                        "version": "0.0.1",
+                                        "id": 45,
+                                        "instanceCount": 2,
+                                        "deploymentPort": 12561,
+                                        "engineParameters": {
+                                            "executorParameters": {
+                                                "JAVASCRIPT": {
+                                                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                                                }
+                                            },
+                                            "contextParameters": {
+                                                "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                                                "schemaParameters": {
+                                                    "Json": {
+                                                        "parameterClassName": "org.onap.policy.apex.plugins.context.schema.json.JsonSchemaHelperParameters"
+                                                    }
+                                                }
+                                            }
+                                        },
+                                        "policy_type_impl": {
+                                            "policies": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_Policies",
+                                                    "version": "0.0.1"
+                                                },
+                                                "policyMap": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "ReceiveEventPolicy",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "policyKey": {
+                                                                    "name": "ReceiveEventPolicy",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "template": "Freestyle",
+                                                                "state": {
+                                                                    "entry": [
+                                                                        {
+                                                                            "key": "DecideForwardingState",
+                                                                            "value": {
+                                                                                "stateKey": {
+                                                                                    "parentKeyName": "ReceiveEventPolicy",
+                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                    "parentLocalName": "NULL",
+                                                                                    "localName": "DecideForwardingState"
+                                                                                },
+                                                                                "trigger": {
+                                                                                    "name": "AcElementEvent",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "stateOutputs": {
+                                                                                    "entry": [
+                                                                                        {
+                                                                                            "key": "CreateForwardPayload",
+                                                                                            "value": {
+                                                                                                "key": {
+                                                                                                    "parentKeyName": "ReceiveEventPolicy",
+                                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                                    "parentLocalName": "DecideForwardingState",
+                                                                                                    "localName": "CreateForwardPayload"
+                                                                                                },
+                                                                                                "outgoingEvent": {
+                                                                                                    "name": "KafkaResponseStatusEvent",
+                                                                                                    "version": "0.0.1"
+                                                                                                },
+                                                                                                "outgoingEventReference": [
+                                                                                                    {
+                                                                                                        "name": "KafkaResponseStatusEvent",
+                                                                                                        "version": "0.0.1"
+                                                                                                    }
+                                                                                                ],
+                                                                                                "nextState": {
+                                                                                                    "parentKeyName": "NULL",
+                                                                                                    "parentKeyVersion": "0.0.0",
+                                                                                                    "parentLocalName": "NULL",
+                                                                                                    "localName": "NULL"
+                                                                                                }
+                                                                                            }
+                                                                                        }
+                                                                                    ]
+                                                                                },
+                                                                                "contextAlbumReference": [],
+                                                                                "taskSelectionLogic": {
+                                                                                    "key": {
+                                                                                        "parentKeyName": "NULL",
+                                                                                        "parentKeyVersion": "0.0.0",
+                                                                                        "parentLocalName": "NULL",
+                                                                                        "localName": "NULL"
+                                                                                    },
+                                                                                    "logicFlavour": "UNDEFINED",
+                                                                                    "logic": ""
+                                                                                },
+                                                                                "stateFinalizerLogicMap": {
+                                                                                    "entry": []
+                                                                                },
+                                                                                "defaultTask": {
+                                                                                    "name": "ForwardPayloadTask",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "taskReferences": {
+                                                                                    "entry": [
+                                                                                        {
+                                                                                            "key": {
+                                                                                                "name": "ForwardPayloadTask",
+                                                                                                "version": "0.0.1"
+                                                                                            },
+                                                                                            "value": {
+                                                                                                "key": {
+                                                                                                    "parentKeyName": "ReceiveEventPolicy",
+                                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                                    "parentLocalName": "DecideForwardingState",
+                                                                                                    "localName": "ReceiveEventPolicy"
+                                                                                                },
+                                                                                                "outputType": "DIRECT",
+                                                                                                "output": {
+                                                                                                    "parentKeyName": "ReceiveEventPolicy",
+                                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                                    "parentLocalName": "DecideForwardingState",
+                                                                                                    "localName": "CreateForwardPayload"
+                                                                                                }
+                                                                                            }
+                                                                                        }
+                                                                                    ]
+                                                                                }
+                                                                            }
+                                                                        }
+                                                                    ]
+                                                                },
+                                                                "firstState": "DecideForwardingState"
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            },
+                                            "tasks": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_Tasks",
+                                                    "version": "0.0.1"
+                                                },
+                                                "taskMap": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "ForwardPayloadTask",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ForwardPayloadTask",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "inputEvent": {
+                                                                    "key": {
+                                                                        "name": "AcElementEvent",
+                                                                        "version": "0.0.1"
+                                                                    },
+                                                                    "nameSpace": "org.onap.policy.apex.ac.element",
+                                                                    "source": "Kafka",
+                                                                    "target": "APEX",
+                                                                    "parameter": {
+                                                                        "entry": [
+                                                                            {
+                                                                                "key": "KafkaResponseEvent",
+                                                                                "value": {
+                                                                                    "key": {
+                                                                                        "parentKeyName": "AcElementEvent",
+                                                                                        "parentKeyVersion": "0.0.1",
+                                                                                        "parentLocalName": "NULL",
+                                                                                        "localName": "KafkaResponseEvent"
+                                                                                    },
+                                                                                    "fieldSchemaKey": {
+                                                                                        "name": "ACEventType",
+                                                                                        "version": "0.0.1"
+                                                                                    },
+                                                                                    "optional": false
+                                                                                }
+                                                                            }
+                                                                        ]
+                                                                    },
+                                                                    "toscaPolicyState": "ENTRY"
+                                                                },
+                                                                "outputEvents": {
+                                                                    "entry": [
+                                                                        {
+                                                                            "key": "KafkaResponseStatusEvent",
+                                                                            "value": {
+                                                                                "key": {
+                                                                                    "name": "KafkaResponseStatusEvent",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                                                                "source": "APEX",
+                                                                                "target": "Kafka",
+                                                                                "parameter": {
+                                                                                    "entry": [
+                                                                                        {
+                                                                                            "key": "KafkaResponseStatusEvent",
+                                                                                            "value": {
+                                                                                                "key": {
+                                                                                                    "parentKeyName": "KafkaResponseStatusEvent",
+                                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                                    "parentLocalName": "NULL",
+                                                                                                    "localName": "KafkaResponseStatusEvent"
+                                                                                                },
+                                                                                                "fieldSchemaKey": {
+                                                                                                    "name": "ACEventType",
+                                                                                                    "version": "0.0.1"
+                                                                                                },
+                                                                                                "optional": false
+                                                                                            }
+                                                                                        }
+                                                                                    ]
+                                                                                },
+                                                                                "toscaPolicyState": ""
+                                                                            }
+                                                                        }
+                                                                    ]
+                                                                },
+                                                                "taskParameters": {
+                                                                    "entry": []
+                                                                },
+                                                                "contextAlbumReference": [
+                                                                    {
+                                                                        "name": "ACElementAlbum",
+                                                                        "version": "0.0.1"
+                                                                    }
+                                                                ],
+                                                                "taskLogic": {
+                                                                    "key": {
+                                                                        "parentKeyName": "ForwardPayloadTask",
+                                                                        "parentKeyVersion": "0.0.1",
+                                                                        "parentLocalName": "NULL",
+                                                                        "localName": "TaskLogic"
+                                                                    },
+                                                                    "logicFlavour": "JAVASCRIPT",
+                                                                    "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2022 Nordix. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar msgResponse = executor.inFields.get('KafkaResponseEvent');\nexecutor.logger.info('Task in progress with mesages: ' + msgResponse);\n\nvar elementId = msgResponse.get('elementId').get('name');\n\nif (msgResponse.get('messageType') == 'STATUS' &&\n    (elementId == 'onap.policy.clamp.ac.startertobridge'\n    || elementId == 'onap.policy.clamp.ac.bridgetosink')) {\n\n    var receiverId = '';\n    if (elementId == 'onap.policy.clamp.ac.startertobridge') {\n        receiverId = 'onap.policy.clamp.ac.bridge';\n    } else {\n        receiverId = 'onap.policy.clamp.ac.sink';\n    }\n\n    var elementIdResponse = new java.util.HashMap();\n    elementIdResponse.put('name', receiverId);\n    elementIdResponse.put('version', msgResponse.get('elementId').get('version'));\n\n    var kafkaResponse = new java.util.HashMap();\n    kafkaResponse.put('elementId', elementIdResponse);\n\n    var message = msgResponse.get('message') + ' trace added from policy';\n    kafkaResponse.put('message', message);\n    kafkaResponse.put('messageType', 'STATUS');\n    kafkaResponse.put('messageId', msgResponse.get('messageId'));\n    kafkaResponse.put('timestamp', msgResponse.get('timestamp'));\n\n    executor.logger.info('Sending forwarding Event to Ac element: ' + kafkaResponse);\n\n    executor.outFields.put('KafkaResponseStatusEvent', kafkaResponse);\n}\n\ntrue;"
+                                                                }
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            },
+                                            "events": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_Events",
+                                                    "version": "0.0.1"
+                                                },
+                                                "eventMap": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "AcElementEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "AcElementEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                                                "source": "Kafka",
+                                                                "target": "APEX",
+                                                                "parameter": {
+                                                                    "entry": [
+                                                                        {
+                                                                            "key": "KafkaResponseEvent",
+                                                                            "value": {
+                                                                                "key": {
+                                                                                    "parentKeyName": "AcElementEvent",
+                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                    "parentLocalName": "NULL",
+                                                                                    "localName": "KafkaResponseEvent"
+                                                                                },
+                                                                                "fieldSchemaKey": {
+                                                                                    "name": "ACEventType",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "optional": false
+                                                                            }
+                                                                        }
+                                                                    ]
+                                                                },
+                                                                "toscaPolicyState": "ENTRY"
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "KafkaResponseStatusEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "KafkaResponseStatusEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                                                "source": "APEX",
+                                                                "target": "Kafka",
+                                                                "parameter": {
+                                                                    "entry": [
+                                                                        {
+                                                                            "key": "KafkaResponseStatusEvent",
+                                                                            "value": {
+                                                                                "key": {
+                                                                                    "parentKeyName": "KafkaResponseStatusEvent",
+                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                    "parentLocalName": "NULL",
+                                                                                    "localName": "KafkaResponseStatusEvent"
+                                                                                },
+                                                                                "fieldSchemaKey": {
+                                                                                    "name": "ACEventType",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "optional": false
+                                                                            }
+                                                                        }
+                                                                    ]
+                                                                },
+                                                                "toscaPolicyState": ""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "LogEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "LogEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                                                "source": "APEX",
+                                                                "target": "file",
+                                                                "parameter": {
+                                                                    "entry": [
+                                                                        {
+                                                                            "key": "final_status",
+                                                                            "value": {
+                                                                                "key": {
+                                                                                    "parentKeyName": "LogEvent",
+                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                    "parentLocalName": "NULL",
+                                                                                    "localName": "final_status"
+                                                                                },
+                                                                                "fieldSchemaKey": {
+                                                                                    "name": "SimpleStringType",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "optional": false
+                                                                            }
+                                                                        },
+                                                                        {
+                                                                            "key": "message",
+                                                                            "value": {
+                                                                                "key": {
+                                                                                    "parentKeyName": "LogEvent",
+                                                                                    "parentKeyVersion": "0.0.1",
+                                                                                    "parentLocalName": "NULL",
+                                                                                    "localName": "message"
+                                                                                },
+                                                                                "fieldSchemaKey": {
+                                                                                    "name": "SimpleStringType",
+                                                                                    "version": "0.0.1"
+                                                                                },
+                                                                                "optional": false
+                                                                            }
+                                                                        }
+                                                                    ]
+                                                                },
+                                                                "toscaPolicyState": ""
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            },
+                                            "albums": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_Albums",
+                                                    "version": "0.0.1"
+                                                },
+                                                "albums": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "ACElementAlbum",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ACElementAlbum",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "scope": "policy",
+                                                                "isWritable": true,
+                                                                "itemSchema": {
+                                                                    "name": "ACEventType",
+                                                                    "version": "0.0.1"
+                                                                }
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            },
+                                            "schemas": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_Schemas",
+                                                    "version": "0.0.1"
+                                                },
+                                                "schemas": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "ACEventType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ACEventType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "schemaFlavour": "Json",
+                                                                "schemaDefinition": "{\n    \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n    \"type\": \"object\",\n    \"properties\": {\n        \"elementId\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"name\": {\n                    \"type\": \"string\"\n                },\n                \"version\": {\n                    \"type\": \"string\"\n                }\n            },\n            \"required\": [\n                \"name\",\n                \"version\"\n            ]\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"messageType\": {\n            \"type\": \"string\"\n        }\n    },\n    \"required\": [\n        \"elementId\",\n        \"message\",\n        \"messageType\"\n    ]\n}"
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "SimpleIntType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "SimpleIntType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "schemaFlavour": "Java",
+                                                                "schemaDefinition": "java.lang.Integer"
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "SimpleStringType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "SimpleStringType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "schemaFlavour": "Java",
+                                                                "schemaDefinition": "java.lang.String"
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "UUIDType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "UUIDType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "schemaFlavour": "Java",
+                                                                "schemaDefinition": "java.util.UUID"
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            },
+                                            "key": {
+                                                "name": "APEXacElementPolicy",
+                                                "version": "0.0.1"
+                                            },
+                                            "keyInformation": {
+                                                "key": {
+                                                    "name": "APEXacElementPolicy_KeyInfo",
+                                                    "version": "0.0.1"
+                                                },
+                                                "keyInfoMap": {
+                                                    "entry": [
+                                                        {
+                                                            "key": {
+                                                                "name": "ACElementAlbum",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ACElementAlbum",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "7cddfab8-6d3f-3f7f-8ac3-e2eb5979c900",
+                                                                "description": "Generated description for concept referred to by key \"ACElementAlbum:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "ACEventType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ACEventType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "dab78794-b666-3929-a75b-70d634b04fe5",
+                                                                "description": "Generated description for concept referred to by key \"ACEventType:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "da478611-7d77-3c46-b4be-be968769ba4e",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_Albums",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_Albums",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "fa8dc15e-8c8d-3de3-a0f8-585b76511175",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Albums:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_Events",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_Events",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "8508cd65-8dd2-342d-a5c6-1570810dbe2b",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Events:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_KeyInfo",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_KeyInfo",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "09e6927d-c5ac-3779-919f-9333994eed22",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_KeyInfo:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_Policies",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_Policies",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "cade3c9a-1600-3642-a6f4-315612187f46",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Policies:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_Schemas",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_Schemas",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "5bb4a8e9-35fa-37db-9a49-48ef036a7ba9",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Schemas:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "APEXacElementPolicy_Tasks",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "APEXacElementPolicy_Tasks",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "2527eeec-0d1f-3094-ad3f-212622b12836",
+                                                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Tasks:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "AcElementEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "AcElementEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "32c013e2-2740-3986-a626-cbdf665b63e9",
+                                                                "description": "Generated description for concept referred to by key \"AcElementEvent:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "KafkaResponseStatusEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "KafkaResponseStatusEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "2715cb6c-2778-3461-8b69-871e79f95935",
+                                                                "description": "Generated description for concept referred to by key \"KafkaResponseStatusEvent:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "ForwardPayloadTask",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ForwardPayloadTask",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "51defa03-1ecf-3314-bf34-2a652bce57fa",
+                                                                "description": "Generated description for concept referred to by key \"ForwardPayloadTask:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "LogEvent",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "LogEvent",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "c540f048-96af-35e3-a36e-e9c29377cba7",
+                                                                "description": "Generated description for concept referred to by key \"LogEvent:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "ReceiveEventPolicy",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "ReceiveEventPolicy",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "568b7345-9de1-36d3-b6a3-9b857e6809a1",
+                                                                "description": "Generated description for concept referred to by key \"ReceiveEventPolicy:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "SimpleIntType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "SimpleIntType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "153791fd-ae0a-36a7-88a5-309a7936415d",
+                                                                "description": "Generated description for concept referred to by key \"SimpleIntType:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "SimpleStringType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "SimpleStringType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
+                                                                "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
+                                                            }
+                                                        },
+                                                        {
+                                                            "key": {
+                                                                "name": "UUIDType",
+                                                                "version": "0.0.1"
+                                                            },
+                                                            "value": {
+                                                                "key": {
+                                                                    "name": "UUIDType",
+                                                                    "version": "0.0.1"
+                                                                },
+                                                                "UUID": "6a8cc68e-dfc8-3403-9c6d-071c886b319c",
+                                                                "description": "Generated description for concept referred to by key \"UUIDType:0.0.1\""
+                                                            }
+                                                        }
+                                                    ]
+                                                }
+                                            }
+                                        }
+                                    },
+                                    "eventInputParameters": {
+                                        "KafkaConsumer": {
+                                            "carrierTechnologyParameters": {
+                                                "carrierTechnology": "KAFKA",
+                                                "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                                                "parameters": {
+                                                    "bootstrapServers": "kafka:9092",
+                                                    "groupId": "apex-group-id",
+                                                    "enableAutoCommit": true,
+                                                    "autoCommitTime": 1000,
+                                                    "sessionTimeout": 30000,
+                                                    "consumerPollTime": 100,
+                                                    "consumerTopicList": [
+                                                        "ac_element_msg"
+                                                    ],
+                                                    "keyDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                                                    "valueDeserializer": "org.apache.kafka.common.serialization.StringDeserializer"
+                                                }
+                                            },
+                                            "eventProtocolParameters": {
+                                                "eventProtocol": "JSON",
+                                                "parameters": {
+                                                    "pojoField": "KafkaResponseEvent"
+                                                }
+                                            },
+                                            "eventName": "AcElementEvent",
+                                            "eventNameFilter": "AcElementEvent"
+                                        }
+                                    },
+                                    "eventOutputParameters": {
+                                        "logOutputter": {
+                                            "carrierTechnologyParameters": {
+                                                "carrierTechnology": "FILE",
+                                                "parameters": {
+                                                    "fileName": "outputevents.log"
+                                                }
+                                            },
+                                            "eventProtocolParameters": {
+                                                "eventProtocol": "JSON"
+                                            }
+                                        },
+                                        "KafkaReplyProducer": {
+                                            "carrierTechnologyParameters": {
+                                                "carrierTechnology": "KAFKA",
+                                                "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                                                "parameters": {
+                                                    "bootstrapServers": "kafka:9092",
+                                                    "acks": "all",
+                                                    "retries": 0,
+                                                    "batchSize": 16384,
+                                                    "lingerTime": 1,
+                                                    "bufferMemory": 33554432,
+                                                    "producerTopic": "policy_update_msg",
+                                                    "keySerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                                                    "valueSerializer": "org.apache.kafka.common.serialization.StringSerializer"
+                                                }
+                                            },
+                                            "eventProtocolParameters": {
+                                                "eventProtocol": "JSON",
+                                                "parameters": {
+                                                    "pojoField": "KafkaResponseStatusEvent"
+                                                }
+                                            },
+                                            "eventNameFilter": "(LogEvent|KafkaResponseStatusEvent)"
+                                        }
+                                    }
+                                },
+                                "name": "onap.policies.native.apex.ac.element",
+                                "version": "1.0.0"
+                            }
+                        }
+                    ]
+                }
+            }
+        }
+    }
+}
diff --git a/csit/resources/tests/data/AcK8s.json b/csit/resources/tests/data/AcK8s.json
new file mode 100644 (file)
index 0000000..c8f1a83
--- /dev/null
@@ -0,0 +1,1283 @@
+{
+  "name": "DemoInstance0",
+  "version": "1.0.1",
+  "compositionId": "COMPOSITIONIDPLACEHOLDER",
+  "description": "Demo automation composition instance 0",
+  "elements": {
+    "709c62b3-8918-41b9-a747-d21eb79c6c20": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c20",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.Policy_AutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Starter Automation Composition Element for the Demo",
+      "properties": {
+        "tosca_definitions_version": "tosca_simple_yaml_1_3",
+        "name": "NULL",
+        "version": "0.0.0",
+        "data_types": {
+          "onap.datatypes.native.apex.EngineService": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "name": {
+                "type": "string",
+                "description": "Specifies the engine name",
+                "required": false,
+                "default": "ApexEngineService"
+              },
+              "version": {
+                "type": "string",
+                "description": "Specifies the engine version in double dotted format",
+                "required": false,
+                "default": "1.0.0"
+              },
+              "id": {
+                "type": "integer",
+                "description": "Specifies the engine id",
+                "required": true
+              },
+              "instance_count": {
+                "type": "integer",
+                "description": "Specifies the number of engine threads that should be run",
+                "required": true
+              },
+              "deployment_port": {
+                "type": "integer",
+                "description": "Specifies the port to connect to for engine administration",
+                "required": false,
+                "default": 1
+              },
+              "policy_model_file_name": {
+                "type": "string",
+                "description": "The name of the file from which to read the APEX policy model",
+                "required": false
+              },
+              "policy_type_impl": {
+                "type": "string",
+                "description": "The policy type implementation from which to read the APEX policy model",
+                "required": false
+              },
+              "periodic_event_period": {
+                "type": "string",
+                "description": "The time interval in milliseconds for the periodic scanning event, 0 means don't scan",
+                "required": false
+              },
+              "engine": {
+                "type": "onap.datatypes.native.apex.engineservice.Engine",
+                "description": "The parameters for all engines in the APEX engine service",
+                "required": true
+              }
+            }
+          },
+          "onap.datatypes.native.apex.EventHandler": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "name": {
+                "type": "string",
+                "description": "Specifies the event handler name, if not specified this is set to the key name",
+                "required": false
+              },
+              "carrier_technology": {
+                "type": "onap.datatypes.native.apex.CarrierTechnology",
+                "description": "Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)",
+                "required": true
+              },
+              "event_protocol": {
+                "type": "onap.datatypes.native.apex.EventProtocol",
+                "description": "Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)",
+                "required": true
+              },
+              "event_name": {
+                "type": "string",
+                "description": "Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent",
+                "required": false
+              },
+              "event_name_filter": {
+                "type": "string",
+                "description": "Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through",
+                "required": false
+              },
+              "synchronous_mode": {
+                "type": "boolean",
+                "description": "Specifies the event handler is syncronous (receive event and send response)",
+                "required": false,
+                "default": false
+              },
+              "synchronous_peer": {
+                "type": "string",
+                "description": "The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode",
+                "required": false
+              },
+              "synchronous_timeout": {
+                "type": "integer",
+                "description": "The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode",
+                "required": false
+              },
+              "requestor_mode": {
+                "type": "boolean",
+                "description": "Specifies the event handler is in requestor mode (send event and wait for response mode)",
+                "required": false,
+                "default": false
+              },
+              "requestor_peer": {
+                "type": "string",
+                "description": "The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode",
+                "required": false
+              },
+              "requestor_timeout": {
+                "type": "integer",
+                "description": "The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode",
+                "required": false
+              }
+            }
+          },
+          "onap.datatypes.native.apex.CarrierTechnology": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "label": {
+                "type": "string",
+                "description": "The label (name) of the carrier technology (such as REST, Kafka, WebSocket)",
+                "required": true
+              },
+              "plugin_parameter_class_name": {
+                "type": "string",
+                "description": "The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class",
+                "required": false
+              }
+            }
+          },
+          "onap.datatypes.native.apex.EventProtocol": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "label": {
+                "type": "string",
+                "description": "The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)",
+                "required": true
+              },
+              "event_protocol_plugin_class": {
+                "type": "string",
+                "description": "The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class",
+                "required": false
+              }
+            }
+          },
+          "onap.datatypes.native.apex.Environment": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "name": {
+                "type": "string",
+                "description": "The name of the environment variable",
+                "required": true
+              },
+              "value": {
+                "type": "string",
+                "description": "The value of the environment variable",
+                "required": true
+              }
+            }
+          },
+          "onap.datatypes.native.apex.engineservice.Engine": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "context": {
+                "type": "onap.datatypes.native.apex.engineservice.engine.Context",
+                "description": "The properties for handling context in APEX engines, defaults to using Java maps for context",
+                "required": false
+              },
+              "executors": {
+                "type": "map",
+                "description": "The plugins for policy executors used in engines such as javascript, MVEL, Jython",
+                "required": true,
+                "entry_schema": {
+                  "description": "The plugin class path for this policy executor",
+                  "type": "string"
+                }
+              }
+            }
+          },
+          "onap.datatypes.native.apex.engineservice.engine.Context": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "distributor": {
+                "type": "onap.datatypes.native.apex.Plugin",
+                "description": "The plugin to be used for distributing context between APEX PDPs at runtime",
+                "required": false
+              },
+              "schemas": {
+                "type": "map",
+                "description": "The plugins for context schemas available in APEX PDPs such as Java and Avro",
+                "required": false,
+                "entry_schema": {
+                  "type": "onap.datatypes.native.apex.Plugin"
+                }
+              },
+              "locking": {
+                "type": "onap.datatypes.native.apex.Plugin",
+                "description": "The plugin to be used for locking context in and between APEX PDPs at runtime",
+                "required": false
+              },
+              "persistence": {
+                "type": "onap.datatypes.native.apex.Plugin",
+                "description": "The plugin to be used for persisting context for APEX PDPs at runtime",
+                "required": false
+              }
+            }
+          },
+          "onap.datatypes.native.apex.Plugin": {
+            "derived_from": "tosca.datatypes.Root",
+            "properties": {
+              "name": {
+                "type": "string",
+                "description": "The name of the executor such as Javascript, Jython or MVEL",
+                "required": true
+              },
+              "plugin_class_name": {
+                "type": "string",
+                "description": "The class path of the plugin class for this executor"
+              }
+            }
+          }
+        },
+        "policy_types": {
+          "onap.policies.Native": {
+            "derived_from": "tosca.policies.Root",
+            "description": "a base policy type for all native PDP policies",
+            "version": "1.0.0",
+            "name": "onap.policies.Native"
+          },
+          "onap.policies.native.Apex": {
+            "derived_from": "onap.policies.Native",
+            "description": "a policy type for native apex policies",
+            "version": "1.0.0",
+            "name": "onap.policies.native.Apex",
+            "properties": {
+              "engine_service": {
+                "type": "onap.datatypes.native.apex.EngineService",
+                "description": "APEX Engine Service Parameters"
+              },
+              "inputs": {
+                "type": "map",
+                "description": "Inputs for handling events coming into the APEX engine",
+                "entry_schema": {
+                  "type": "onap.datatypes.native.apex.EventHandler"
+                }
+              },
+              "outputs": {
+                "type": "map",
+                "description": "Outputs for handling events going out of the APEX engine",
+                "entry_schema": {
+                  "type": "onap.datatypes.native.apex.EventHandler"
+                }
+              },
+              "environment": {
+                "type": "list",
+                "description": "Envioronmental parameters for the APEX engine",
+                "entry_schema": {
+                  "type": "onap.datatypes.native.apex.Environment"
+                }
+              }
+            }
+          }
+        },
+        "topology_template": {
+          "policies": [
+            {
+              "onap.policies.native.apex.ac.element": {
+                "type": "onap.policies.native.Apex",
+                "type_version": "1.0.0",
+                "properties": {
+                  "engineServiceParameters": {
+                    "name": "MyApexEngine",
+                    "version": "0.0.1",
+                    "id": 45,
+                    "instanceCount": 2,
+                    "deploymentPort": 12561,
+                    "engineParameters": {
+                      "executorParameters": {
+                        "JAVASCRIPT": {
+                          "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                        }
+                      },
+                      "contextParameters": {
+                        "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                        "schemaParameters": {
+                          "Json": {
+                            "parameterClassName": "org.onap.policy.apex.plugins.context.schema.json.JsonSchemaHelperParameters"
+                          }
+                        }
+                      }
+                    },
+                    "policy_type_impl": {
+                      "policies": {
+                        "key": {
+                          "name": "APEXacElementPolicy_Policies",
+                          "version": "0.0.1"
+                        },
+                        "policyMap": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "ReceiveEventPolicy",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "policyKey": {
+                                  "name": "ReceiveEventPolicy",
+                                  "version": "0.0.1"
+                                },
+                                "template": "Freestyle",
+                                "state": {
+                                  "entry": [
+                                    {
+                                      "key": "DecideForwardingState",
+                                      "value": {
+                                        "stateKey": {
+                                          "parentKeyName": "ReceiveEventPolicy",
+                                          "parentKeyVersion": "0.0.1",
+                                          "parentLocalName": "NULL",
+                                          "localName": "DecideForwardingState"
+                                        },
+                                        "trigger": {
+                                          "name": "AcElementEvent",
+                                          "version": "0.0.1"
+                                        },
+                                        "stateOutputs": {
+                                          "entry": [
+                                            {
+                                              "key": "CreateForwardPayload",
+                                              "value": {
+                                                "key": {
+                                                  "parentKeyName": "ReceiveEventPolicy",
+                                                  "parentKeyVersion": "0.0.1",
+                                                  "parentLocalName": "DecideForwardingState",
+                                                  "localName": "CreateForwardPayload"
+                                                },
+                                                "outgoingEvent": {
+                                                  "name": "KafkaResponseStatusEvent",
+                                                  "version": "0.0.1"
+                                                },
+                                                "outgoingEventReference": [
+                                                  {
+                                                    "name": "KafkaResponseStatusEvent",
+                                                    "version": "0.0.1"
+                                                  }
+                                                ],
+                                                "nextState": {
+                                                  "parentKeyName": "NULL",
+                                                  "parentKeyVersion": "0.0.0",
+                                                  "parentLocalName": "NULL",
+                                                  "localName": "NULL"
+                                                }
+                                              }
+                                            }
+                                          ]
+                                        },
+                                        "contextAlbumReference": [],
+                                        "taskSelectionLogic": {
+                                          "key": {
+                                            "parentKeyName": "NULL",
+                                            "parentKeyVersion": "0.0.0",
+                                            "parentLocalName": "NULL",
+                                            "localName": "NULL"
+                                          },
+                                          "logicFlavour": "UNDEFINED",
+                                          "logic": ""
+                                        },
+                                        "stateFinalizerLogicMap": {
+                                          "entry": []
+                                        },
+                                        "defaultTask": {
+                                          "name": "ForwardPayloadTask",
+                                          "version": "0.0.1"
+                                        },
+                                        "taskReferences": {
+                                          "entry": [
+                                            {
+                                              "key": {
+                                                "name": "ForwardPayloadTask",
+                                                "version": "0.0.1"
+                                              },
+                                              "value": {
+                                                "key": {
+                                                  "parentKeyName": "ReceiveEventPolicy",
+                                                  "parentKeyVersion": "0.0.1",
+                                                  "parentLocalName": "DecideForwardingState",
+                                                  "localName": "ReceiveEventPolicy"
+                                                },
+                                                "outputType": "DIRECT",
+                                                "output": {
+                                                  "parentKeyName": "ReceiveEventPolicy",
+                                                  "parentKeyVersion": "0.0.1",
+                                                  "parentLocalName": "DecideForwardingState",
+                                                  "localName": "CreateForwardPayload"
+                                                }
+                                              }
+                                            }
+                                          ]
+                                        }
+                                      }
+                                    }
+                                  ]
+                                },
+                                "firstState": "DecideForwardingState"
+                              }
+                            }
+                          ]
+                        }
+                      },
+                      "tasks": {
+                        "key": {
+                          "name": "APEXacElementPolicy_Tasks",
+                          "version": "0.0.1"
+                        },
+                        "taskMap": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "ForwardPayloadTask",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ForwardPayloadTask",
+                                  "version": "0.0.1"
+                                },
+                                "inputEvent": {
+                                  "key": {
+                                    "name": "AcElementEvent",
+                                    "version": "0.0.1"
+                                  },
+                                  "nameSpace": "org.onap.policy.apex.ac.element",
+                                  "source": "Kafka",
+                                  "target": "APEX",
+                                  "parameter": {
+                                    "entry": [
+                                      {
+                                        "key": "KafkaResponseEvent",
+                                        "value": {
+                                          "key": {
+                                            "parentKeyName": "AcElementEvent",
+                                            "parentKeyVersion": "0.0.1",
+                                            "parentLocalName": "NULL",
+                                            "localName": "KafkaResponseEvent"
+                                          },
+                                          "fieldSchemaKey": {
+                                            "name": "ACEventType",
+                                            "version": "0.0.1"
+                                          },
+                                          "optional": false
+                                        }
+                                      }
+                                    ]
+                                  },
+                                  "toscaPolicyState": "ENTRY"
+                                },
+                                "outputEvents": {
+                                  "entry": [
+                                    {
+                                      "key": "KafkaResponseStatusEvent",
+                                      "value": {
+                                        "key": {
+                                          "name": "KafkaResponseStatusEvent",
+                                          "version": "0.0.1"
+                                        },
+                                        "nameSpace": "org.onap.policy.apex.ac.element",
+                                        "source": "APEX",
+                                        "target": "Kafka",
+                                        "parameter": {
+                                          "entry": [
+                                            {
+                                              "key": "KafkaResponseStatusEvent",
+                                              "value": {
+                                                "key": {
+                                                  "parentKeyName": "KafkaResponseStatusEvent",
+                                                  "parentKeyVersion": "0.0.1",
+                                                  "parentLocalName": "NULL",
+                                                  "localName": "KafkaResponseStatusEvent"
+                                                },
+                                                "fieldSchemaKey": {
+                                                  "name": "ACEventType",
+                                                  "version": "0.0.1"
+                                                },
+                                                "optional": false
+                                              }
+                                            }
+                                          ]
+                                        },
+                                        "toscaPolicyState": ""
+                                      }
+                                    }
+                                  ]
+                                },
+                                "taskParameters": {
+                                  "entry": []
+                                },
+                                "contextAlbumReference": [
+                                  {
+                                    "name": "ACElementAlbum",
+                                    "version": "0.0.1"
+                                  }
+                                ],
+                                "taskLogic": {
+                                  "key": {
+                                    "parentKeyName": "ForwardPayloadTask",
+                                    "parentKeyVersion": "0.0.1",
+                                    "parentLocalName": "NULL",
+                                    "localName": "TaskLogic"
+                                  },
+                                  "logicFlavour": "JAVASCRIPT",
+                                  "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2022 Nordix. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an 'AS IS' BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar msgResponse = executor.inFields.get('KafkaResponseEvent');\nexecutor.logger.info('Task in progress with mesages: ' + msgResponse);\n\nvar elementId = msgResponse.get('elementId').get('name');\n\nif (msgResponse.get('messageType') == 'STATUS' &&\n    (elementId == 'onap.policy.clamp.ac.startertobridge'\n    || elementId == 'onap.policy.clamp.ac.bridgetosink')) {\n\n    var receiverId = '';\n    if (elementId == 'onap.policy.clamp.ac.startertobridge') {\n        receiverId = 'onap.policy.clamp.ac.bridge';\n    } else {\n        receiverId = 'onap.policy.clamp.ac.sink';\n    }\n\n    var elementIdResponse = new java.util.HashMap();\n    elementIdResponse.put('name', receiverId);\n    elementIdResponse.put('version', msgResponse.get('elementId').get('version'));\n\n    var kafkaResponse = new java.util.HashMap();\n    kafkaResponse.put('elementId', elementIdResponse);\n\n    var message = msgResponse.get('message') + ' trace added from policy';\n    kafkaResponse.put('message', message);\n    kafkaResponse.put('messageType', 'STATUS');\n    kafkaResponse.put('messageId', msgResponse.get('messageId'));\n    kafkaResponse.put('timestamp', msgResponse.get('timestamp'));\n\n    executor.logger.info('Sending forwarding Event to Ac element: ' + kafkaResponse);\n\n    executor.outFields.put('KafkaResponseStatusEvent', kafkaResponse);\n}\n\ntrue;"
+                                }
+                              }
+                            }
+                          ]
+                        }
+                      },
+                      "events": {
+                        "key": {
+                          "name": "APEXacElementPolicy_Events",
+                          "version": "0.0.1"
+                        },
+                        "eventMap": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "AcElementEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "AcElementEvent",
+                                  "version": "0.0.1"
+                                },
+                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                "source": "Kafka",
+                                "target": "APEX",
+                                "parameter": {
+                                  "entry": [
+                                    {
+                                      "key": "KafkaResponseEvent",
+                                      "value": {
+                                        "key": {
+                                          "parentKeyName": "AcElementEvent",
+                                          "parentKeyVersion": "0.0.1",
+                                          "parentLocalName": "NULL",
+                                          "localName": "KafkaResponseEvent"
+                                        },
+                                        "fieldSchemaKey": {
+                                          "name": "ACEventType",
+                                          "version": "0.0.1"
+                                        },
+                                        "optional": false
+                                      }
+                                    }
+                                  ]
+                                },
+                                "toscaPolicyState": "ENTRY"
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "KafkaResponseStatusEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "KafkaResponseStatusEvent",
+                                  "version": "0.0.1"
+                                },
+                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                "source": "APEX",
+                                "target": "Kafka",
+                                "parameter": {
+                                  "entry": [
+                                    {
+                                      "key": "KafkaResponseStatusEvent",
+                                      "value": {
+                                        "key": {
+                                          "parentKeyName": "KafkaResponseStatusEvent",
+                                          "parentKeyVersion": "0.0.1",
+                                          "parentLocalName": "NULL",
+                                          "localName": "KafkaResponseStatusEvent"
+                                        },
+                                        "fieldSchemaKey": {
+                                          "name": "ACEventType",
+                                          "version": "0.0.1"
+                                        },
+                                        "optional": false
+                                      }
+                                    }
+                                  ]
+                                },
+                                "toscaPolicyState": ""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "LogEvent",
+                                  "version": "0.0.1"
+                                },
+                                "nameSpace": "org.onap.policy.apex.ac.element",
+                                "source": "APEX",
+                                "target": "file",
+                                "parameter": {
+                                  "entry": [
+                                    {
+                                      "key": "final_status",
+                                      "value": {
+                                        "key": {
+                                          "parentKeyName": "LogEvent",
+                                          "parentKeyVersion": "0.0.1",
+                                          "parentLocalName": "NULL",
+                                          "localName": "final_status"
+                                        },
+                                        "fieldSchemaKey": {
+                                          "name": "SimpleStringType",
+                                          "version": "0.0.1"
+                                        },
+                                        "optional": false
+                                      }
+                                    },
+                                    {
+                                      "key": "message",
+                                      "value": {
+                                        "key": {
+                                          "parentKeyName": "LogEvent",
+                                          "parentKeyVersion": "0.0.1",
+                                          "parentLocalName": "NULL",
+                                          "localName": "message"
+                                        },
+                                        "fieldSchemaKey": {
+                                          "name": "SimpleStringType",
+                                          "version": "0.0.1"
+                                        },
+                                        "optional": false
+                                      }
+                                    }
+                                  ]
+                                },
+                                "toscaPolicyState": ""
+                              }
+                            }
+                          ]
+                        }
+                      },
+                      "albums": {
+                        "key": {
+                          "name": "APEXacElementPolicy_Albums",
+                          "version": "0.0.1"
+                        },
+                        "albums": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "ACElementAlbum",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ACElementAlbum",
+                                  "version": "0.0.1"
+                                },
+                                "scope": "policy",
+                                "isWritable": true,
+                                "itemSchema": {
+                                  "name": "ACEventType",
+                                  "version": "0.0.1"
+                                }
+                              }
+                            }
+                          ]
+                        }
+                      },
+                      "schemas": {
+                        "key": {
+                          "name": "APEXacElementPolicy_Schemas",
+                          "version": "0.0.1"
+                        },
+                        "schemas": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "ACEventType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ACEventType",
+                                  "version": "0.0.1"
+                                },
+                                "schemaFlavour": "Json",
+                                "schemaDefinition": "{\n    \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n    \"type\": \"object\",\n    \"properties\": {\n        \"elementId\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"name\": {\n                    \"type\": \"string\"\n                },\n                \"version\": {\n                    \"type\": \"string\"\n                }\n            },\n            \"required\": [\n                \"name\",\n                \"version\"\n            ]\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"messageType\": {\n            \"type\": \"string\"\n        }\n    },\n    \"required\": [\n        \"elementId\",\n        \"message\",\n        \"messageType\"\n    ]\n}"
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "SimpleIntType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "SimpleIntType",
+                                  "version": "0.0.1"
+                                },
+                                "schemaFlavour": "Java",
+                                "schemaDefinition": "java.lang.Integer"
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "schemaFlavour": "Java",
+                                "schemaDefinition": "java.lang.String"
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "UUIDType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "UUIDType",
+                                  "version": "0.0.1"
+                                },
+                                "schemaFlavour": "Java",
+                                "schemaDefinition": "java.util.UUID"
+                              }
+                            }
+                          ]
+                        }
+                      },
+                      "key": {
+                        "name": "APEXacElementPolicy",
+                        "version": "0.0.1"
+                      },
+                      "keyInformation": {
+                        "key": {
+                          "name": "APEXacElementPolicy_KeyInfo",
+                          "version": "0.0.1"
+                        },
+                        "keyInfoMap": {
+                          "entry": [
+                            {
+                              "key": {
+                                "name": "ACElementAlbum",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ACElementAlbum",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "7cddfab8-6d3f-3f7f-8ac3-e2eb5979c900",
+                                "description": "Generated description for concept referred to by key \"ACElementAlbum:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "ACEventType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ACEventType",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "dab78794-b666-3929-a75b-70d634b04fe5",
+                                "description": "Generated description for concept referred to by key \"ACEventType:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "da478611-7d77-3c46-b4be-be968769ba4e",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_Albums",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_Albums",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "fa8dc15e-8c8d-3de3-a0f8-585b76511175",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Albums:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_Events",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_Events",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "8508cd65-8dd2-342d-a5c6-1570810dbe2b",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Events:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_KeyInfo",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_KeyInfo",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "09e6927d-c5ac-3779-919f-9333994eed22",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_KeyInfo:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_Policies",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_Policies",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "cade3c9a-1600-3642-a6f4-315612187f46",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Policies:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_Schemas",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_Schemas",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "5bb4a8e9-35fa-37db-9a49-48ef036a7ba9",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Schemas:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "APEXacElementPolicy_Tasks",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "APEXacElementPolicy_Tasks",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "2527eeec-0d1f-3094-ad3f-212622b12836",
+                                "description": "Generated description for concept referred to by key \"APEXacElementPolicy_Tasks:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "AcElementEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "AcElementEvent",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "32c013e2-2740-3986-a626-cbdf665b63e9",
+                                "description": "Generated description for concept referred to by key \"AcElementEvent:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "KafkaResponseStatusEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "KafkaResponseStatusEvent",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "2715cb6c-2778-3461-8b69-871e79f95935",
+                                "description": "Generated description for concept referred to by key \"KafkaResponseStatusEvent:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "ForwardPayloadTask",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ForwardPayloadTask",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "51defa03-1ecf-3314-bf34-2a652bce57fa",
+                                "description": "Generated description for concept referred to by key \"ForwardPayloadTask:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "LogEvent",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "c540f048-96af-35e3-a36e-e9c29377cba7",
+                                "description": "Generated description for concept referred to by key \"LogEvent:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "ReceiveEventPolicy",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "ReceiveEventPolicy",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "568b7345-9de1-36d3-b6a3-9b857e6809a1",
+                                "description": "Generated description for concept referred to by key \"ReceiveEventPolicy:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "SimpleIntType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "SimpleIntType",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "153791fd-ae0a-36a7-88a5-309a7936415d",
+                                "description": "Generated description for concept referred to by key \"SimpleIntType:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
+                                "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
+                              }
+                            },
+                            {
+                              "key": {
+                                "name": "UUIDType",
+                                "version": "0.0.1"
+                              },
+                              "value": {
+                                "key": {
+                                  "name": "UUIDType",
+                                  "version": "0.0.1"
+                                },
+                                "UUID": "6a8cc68e-dfc8-3403-9c6d-071c886b319c",
+                                "description": "Generated description for concept referred to by key \"UUIDType:0.0.1\""
+                              }
+                            }
+                          ]
+                        }
+                      }
+                    }
+                  },
+                  "eventInputParameters": {
+                    "KafkaConsumer": {
+                      "carrierTechnologyParameters": {
+                        "carrierTechnology": "KAFKA",
+                        "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                        "parameters": {
+                          "bootstrapServers": "kafka:9092",
+                          "groupId": "apex-group-id",
+                          "enableAutoCommit": true,
+                          "autoCommitTime": 1000,
+                          "sessionTimeout": 30000,
+                          "consumerPollTime": 100,
+                          "consumerTopicList": [
+                            "ac_element_msg"
+                          ],
+                          "keyDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                          "valueDeserializer": "org.apache.kafka.common.serialization.StringDeserializer"
+                        }
+                      },
+                      "eventProtocolParameters": {
+                        "eventProtocol": "JSON",
+                        "parameters": {
+                          "pojoField": "KafkaResponseEvent"
+                        }
+                      },
+                      "eventName": "AcElementEvent",
+                      "eventNameFilter": "AcElementEvent"
+                    }
+                  },
+                  "eventOutputParameters": {
+                    "logOutputter": {
+                      "carrierTechnologyParameters": {
+                        "carrierTechnology": "FILE",
+                        "parameters": {
+                          "fileName": "outputevents.log"
+                        }
+                      },
+                      "eventProtocolParameters": {
+                        "eventProtocol": "JSON"
+                      }
+                    },
+                    "KafkaReplyProducer": {
+                      "carrierTechnologyParameters": {
+                        "carrierTechnology": "KAFKA",
+                        "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                        "parameters": {
+                          "bootstrapServers": "kafka:9092",
+                          "acks": "all",
+                          "retries": 0,
+                          "batchSize": 16384,
+                          "lingerTime": 1,
+                          "bufferMemory": 33554432,
+                          "producerTopic": "policy_update_msg",
+                          "keySerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                          "valueSerializer": "org.apache.kafka.common.serialization.StringSerializer"
+                        }
+                      },
+                      "eventProtocolParameters": {
+                        "eventProtocol": "JSON",
+                        "parameters": {
+                          "pojoField": "KafkaResponseStatusEvent"
+                        }
+                      },
+                      "eventNameFilter": "(LogEvent|KafkaResponseStatusEvent)"
+                    }
+                  }
+                },
+                "name": "onap.policies.native.apex.ac.element",
+                "version": "1.0.0"
+              }
+            }
+          ]
+        }
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c21": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c21",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Starter Automation Composition Element for the Demo",
+      "properties": {
+        "chart": {
+          "chartId": {
+            "name": "acelement",
+            "version": "0.1.0"
+          },
+          "namespace": "default",
+          "releaseName": "acm-starter",
+          "podName": "acm-starter",
+          "repository": {
+            "repoName": "policy-chartmuseum",
+            "address": "http://policy-chartmuseum:8080"
+          },
+          "overrideParams": {
+            "acelement.elementId.name": "onap.policy.clamp.ac.starter",
+            "service.nodeport": 30800
+          }
+        }
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c22": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c22",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Bridge Automation Composition Element for the Demo",
+      "properties": {
+        "chart": {
+          "chartId": {
+            "name": "acelement",
+            "version": "0.1.0"
+          },
+          "namespace": "default",
+          "releaseName": "acm-bridge",
+          "podName": "acm-bridge",
+          "repository": {
+            "repoName": "policy-chartmuseum",
+            "address": "http://policy-chartmuseum:8080"
+          },
+          "overrideParams": {
+            "acelement.elementId.name": "onap.policy.clamp.ac.bridge",
+            "service.nodeport": 30801
+          }
+        }
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c23": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Sink Automation Composition Element for the Demo",
+      "properties": {
+        "chart": {
+          "chartId": {
+            "name": "acelement",
+            "version": "0.1.0"
+          },
+          "namespace": "default",
+          "releaseName": "acm-sink",
+          "podName": "acm-sink",
+          "repository": {
+            "repoName": "policy-chartmuseum",
+            "address": "http://policy-chartmuseum:8080"
+          },
+          "overrideParams": {
+            "acelement.elementId.name": "onap.policy.clamp.ac.sink",
+            "service.nodeport": 30802
+          }
+        }
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c24": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c24",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Starter Automation Composition Element for the Demo",
+      "properties": {
+        "baseUrl": "http://acm-starter-ac-element-impl:8084",
+        "httpHeaders": {
+          "Content-Type": "application/json",
+          "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+        },
+        "configurationEntities": [
+          {
+            "configurationEntityId": {
+              "name": "onap.policy.clamp.ac.starter",
+              "version": "1.0.0"
+            },
+            "restSequence": [
+              {
+                "restRequestId": {
+                  "name": "request1",
+                  "version": "1.0.1"
+                },
+                "httpMethod": "POST",
+                "path": "/onap/policy/clamp/acelement/v2/activate",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
+                "expectedResponse": 201
+              }
+            ],
+            "password": "dummyPasswordStringForEncryption"
+          }
+        ]
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c25": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c25",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Bridge Automation Composition Element for the Demo",
+      "properties": {
+        "baseUrl": "http://acm-bridge-ac-element-impl:8084",
+        "httpHeaders": {
+          "Content-Type": "application/json",
+          "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+        },
+        "configurationEntities": [
+          {
+            "configurationEntityId": {
+              "name": "onap.policy.clamp.ac.bridge",
+              "version": "1.0.0"
+            },
+            "restSequence": [
+              {
+                "restRequestId": {
+                  "name": "request2",
+                  "version": "1.0.1"
+                },
+                "httpMethod": "POST",
+                "path": "/onap/policy/clamp/acelement/v2/activate",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
+                "expectedResponse": 201
+              }
+            ],
+            "password": "dummyPasswordStringForEncryption"
+          }
+        ]
+      }
+    },
+    "709c62b3-8918-41b9-a747-d21eb79c6c26": {
+      "id": "709c62b3-8918-41b9-a747-d21eb79c6c26",
+      "definition": {
+        "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
+        "version": "1.2.3"
+      },
+      "description": "Sink Automation Composition Element for the Demo",
+      "properties": {
+        "baseUrl": "http://acm-sink-ac-element-impl:8084",
+        "httpHeaders": {
+          "Content-Type": "application/json",
+          "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+        },
+        "configurationEntities": [
+          {
+            "configurationEntityId": {
+              "name": "onap.policy.clamp.ac.sink",
+              "version": "1.0.0"
+            },
+            "restSequence": [
+              {
+                "restRequestId": {
+                  "name": "request3",
+                  "version": "1.0.1"
+                },
+                "httpMethod": "POST",
+                "path": "/onap/policy/clamp/acelement/v2/activate",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
+                "expectedResponse": 201
+              }
+            ],
+            "password": "dummyPasswordStringForEncryption"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/csit/resources/tests/data/DeployAC.json b/csit/resources/tests/data/DeployAC.json
new file mode 100644 (file)
index 0000000..cf65ba6
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "deployOrder": "DEPLOY"
+}
\ No newline at end of file
diff --git a/csit/resources/tests/data/OutProperties.json b/csit/resources/tests/data/OutProperties.json
new file mode 100644 (file)
index 0000000..1d4144c
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "outProperties": {
+    "test": {
+        "object": "TEXTPLACEHOLDER",
+        "from": "Participant",
+        "to": "Runtime"
+      }
+  },
+  "automationCompositionId": "INSTACEIDPLACEHOLDER",
+  "automationCompositionElementId": "709c62b3-8918-41b9-a747-d21eb79c6c34",
+  "useState": "IDLE",
+  "operationalState": "ENABLED"
+}
diff --git a/csit/resources/tests/data/PrepareAC.json b/csit/resources/tests/data/PrepareAC.json
new file mode 100644 (file)
index 0000000..bc3a3c0
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "subOrder": "PREPARE"
+}
diff --git a/csit/resources/tests/data/ReviewAC.json b/csit/resources/tests/data/ReviewAC.json
new file mode 100644 (file)
index 0000000..e4d7434
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "subOrder": "REVIEW"
+}
diff --git a/csit/resources/tests/data/SettingSimPropertiesDelay.json b/csit/resources/tests/data/SettingSimPropertiesDelay.json
new file mode 100644 (file)
index 0000000..5422099
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "deploySuccess": true,
+  "undeploySuccess": true,
+  "lockSuccess": true,
+  "unlockSuccess": true,
+  "deleteSuccess": true,
+  "updateSuccess": true,
+  "migrateSuccess": true,
+  "migratePrecheck": true,
+  "prepare": true,
+  "review": true,
+  "rollback": true,
+  "primeSuccess": true,
+  "deprimeSuccess": true,
+  "deployTimerMs": 10000,
+  "undeployTimerMs": 10000,
+  "lockTimerMs": 100,
+  "unlockTimerMs": 100,
+  "updateTimerMs": 100,
+  "migrateTimerMs": 100,
+  "migratePrecheckTimerMs": 100,
+  "prepareTimerMs": 100,
+  "reviewTimerMs": 100,
+  "deleteTimerMs": 100,
+  "primeTimerMs": 100,
+  "deprimeTimerMs": 100,
+  "rollbackTimerMs": 100
+}
diff --git a/csit/resources/tests/data/SettingSimPropertiesFail.json b/csit/resources/tests/data/SettingSimPropertiesFail.json
new file mode 100644 (file)
index 0000000..e3a7d2f
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "deploySuccess": false,
+  "undeploySuccess": false,
+  "lockSuccess": false,
+  "unlockSuccess": false,
+  "deleteSuccess": false,
+  "updateSuccess": false,
+  "migrateSuccess": false,
+  "migratePrecheck": false,
+  "prepare": false,
+  "review": false,
+  "rollback": false,
+  "primeSuccess": false,
+  "deprimeSuccess": false,
+  "deployTimerMs": 60,
+  "undeployTimerMs": 60,
+  "lockTimerMs": 60,
+  "unlockTimerMs": 60,
+  "updateTimerMs": 60,
+  "migrateTimerMs": 60,
+  "migratePrecheckTimerMs": 60,
+  "prepareTimerMs": 60,
+  "reviewTimerMs": 60,
+  "deleteTimerMs": 60,
+  "primeTimerMs": 60,
+  "deprimeTimerMs": 60,
+  "rollbackTimerMs": 60
+}
diff --git a/csit/resources/tests/data/SettingSimPropertiesSuccess.json b/csit/resources/tests/data/SettingSimPropertiesSuccess.json
new file mode 100644 (file)
index 0000000..ab2f69e
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "deploySuccess": true,
+  "undeploySuccess": true,
+  "lockSuccess": true,
+  "unlockSuccess": true,
+  "deleteSuccess": true,
+  "updateSuccess": true,
+  "migrateSuccess": true,
+  "migratePrecheck": true,
+  "prepare": true,
+  "review": true,
+  "rollback": true,
+  "primeSuccess": true,
+  "deprimeSuccess": true,
+  "deployTimerMs": 60,
+  "undeployTimerMs": 60,
+  "lockTimerMs": 60,
+  "unlockTimerMs": 60,
+  "updateTimerMs": 60,
+  "migrateTimerMs": 100,
+  "migratePrecheckTimerMs": 60,
+  "prepareTimerMs": 60,
+  "reviewTimerMs": 60,
+  "deleteTimerMs": 60,
+  "primeTimerMs": 60,
+  "deprimeTimerMs": 60,
+  "rollbackTimerMs": 60
+}
diff --git a/csit/resources/tests/data/SettingSimPropertiesTimeout.json b/csit/resources/tests/data/SettingSimPropertiesTimeout.json
new file mode 100644 (file)
index 0000000..2690dd7
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "deploySuccess": true,
+  "undeploySuccess": true,
+  "lockSuccess": true,
+  "unlockSuccess": true,
+  "deleteSuccess": true,
+  "updateSuccess": true,
+  "migrateSuccess": true,
+  "migratePrecheck": true,
+  "prepare": true,
+  "review": true,
+  "rollback": true,
+  "primeSuccess": true,
+  "deprimeSuccess": true,
+  "deployTimerMs": 260000,
+  "undeployTimerMs": 260000,
+  "lockTimerMs": 260000,
+  "unlockTimerMs": 260000,
+  "updateTimerMs": 260000,
+  "migrateTimerMs": 260000,
+  "migratePrecheckTimerMs": 260000,
+  "prepareTimerMs": 260000,
+  "reviewTimerMs": 260000,
+  "deleteTimerMs": 260000,
+  "primeTimerMs": 260000,
+  "deprimeTimerMs": 260000,
+  "rollbackTimerMs": 260000
+}
diff --git a/csit/resources/tests/data/StateChangeRunningAC.json b/csit/resources/tests/data/StateChangeRunningAC.json
new file mode 100644 (file)
index 0000000..494f6fd
--- /dev/null
@@ -0,0 +1,9 @@
+{
+    "orderedState": "RUNNING",
+    "automationCompositionIdentifierList": [
+        {
+            "name": "PMSHInstance0",
+            "version": "1.0.1"
+        }
+    ]
+}
diff --git a/csit/resources/tests/data/UndeployAC.json b/csit/resources/tests/data/UndeployAC.json
new file mode 100644 (file)
index 0000000..148bca1
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "deployOrder": "UNDEPLOY"
+}
\ No newline at end of file
diff --git a/csit/resources/tests/data/VesEventForPnfPolicy.json b/csit/resources/tests/data/VesEventForPnfPolicy.json
new file mode 100644 (file)
index 0000000..9998fc6
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "event" : {
+    "commonEventHeader" : {
+      "startEpochMicrosec" : 1597953057126,
+      "sourceId" : "927b2580-36d9-4f13-8421-3c9d43b7a57e",
+      "eventId" : "8c7935a4-79d8-4ec0-b661-dcca3cd68006",
+      "lastEpochMicrosec" : 1597952499468,
+      "eventName" : "Report hostname & IP",
+      "sourceName" : "demo-pnf",
+      "reportingEntityName" : "DCAE",
+      "vesEventListenerVersion" : "7.1",
+      "internalHeaderFields" : { },
+      "version" : "4.0.1",
+      "priority" : "Normal",
+      "sequence" : 1,
+      "domain" : "other"
+    },
+    "otherFields" : {
+      "hashMap" : {
+        "hostname" : "UNDEFINED",
+        "pnfId": "927b2580-36d9-4f13-8421-3c9d43b7a57e",
+        "pnfName": "demo-pnf",
+        "ip" : "10.101.200.10"
+      },
+      "otherFieldsVersion" : "3.0"
+    }
+  }
+}
diff --git a/csit/resources/tests/data/VesEventForVnfPolicy.json b/csit/resources/tests/data/VesEventForVnfPolicy.json
new file mode 100644 (file)
index 0000000..0fc8481
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "event": {
+    "commonEventHeader": {
+      "domain": "fault",
+      "eventId": "fault0000245",
+      "eventName": "Fault_Vscf:PilotNumberPoolExhaustion",
+      "lastEpochMicrosec": 1413378172000000,
+      "priority": "High",
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sequence": 1,
+      "sourceId": "de305d54-75b4-431b-adb2-eb6b9e5460141",
+      "sourceName": "vfw-cnf-cds-test-1-vnf",
+      "startEpochMicrosec": 1413378172000000,
+      "timeZoneOffset": "UTC-05:30",
+      "version": "4.0.1",
+      "vesEventListenerVersion": "7.0.1"
+    },
+    "faultFields": {
+      "alarmAdditionalInformation": {
+        "PilotNumberPoolSize": "1000"
+      },
+      "alarmCondition": "PilotNumberPoolExhaustion",
+      "eventSeverity": "CRITICAL",
+      "eventSourceType": "other",
+      "faultFieldsVersion": 4,
+      "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
+      "vfStatus": "Active"
+    }
+  }
+}
diff --git a/csit/resources/tests/data/ac-definition-migration-from.yaml b/csit/resources/tests/data/ac-definition-migration-from.yaml
new file mode 100644 (file)
index 0000000..f732f3c
--- /dev/null
@@ -0,0 +1,209 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+name: Migration-From
+metadata:
+  primeTimeoutMs: 200000
+  deprimeTimeoutMs: 100000
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      stage:
+        type: map
+        description: A map of list indicating for each operation the stages in which this automation composition element will be started, the
+          first stage is zero. Automation Composition Elements are started in their stage order.
+          Automation Composition Elements with the same stage are started simultaneously.
+
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The configuration entities the Automation Composition Element is managing and their associated REST requests
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement2:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The configuration entities the Automation Composition Element is managing and their associated REST requests
+
+topology_template:
+
+  node_templates:
+
+    org.onap.policy.clamp.acm.SimParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant Simulator
+      properties:
+        provider: ONAP
+
+    onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Starter microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [1,2]
+          migrate: [1,2]
+
+    onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Bridge microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,1]
+          migrate: [0,1]
+
+    onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,2]
+          migrate: [0,2]
+
+    onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [ 0,3 ]
+          migrate: [ 0,3 ]
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/ac-definition-migration-to.yaml b/csit/resources/tests/data/ac-definition-migration-to.yaml
new file mode 100644 (file)
index 0000000..9d9a5f0
--- /dev/null
@@ -0,0 +1,207 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+name: Migration-To
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      stage:
+        type: map
+        description: A map of list indicating for each operation the stages in which this automation composition element will be started, the
+          first stage is zero. Automation Composition Elements are started in their stage order.
+          Automation Composition Elements with the same stage are started simultaneously.
+
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement3:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The configuration entities the Automation Composition Element is managing and their associated REST requests
+
+
+topology_template:
+
+  node_templates:
+
+    org.onap.policy.clamp.acm.SimParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant Simulator
+      properties:
+        provider: ONAP
+
+    onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement:
+      version: 1.2.4
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Starter microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [1,2]
+          migrate: [1,2]
+
+    onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement:
+      version: 1.2.4
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Bridge microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,1]
+          migrate: [0,1]
+
+    onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement:
+      version: 1.2.4
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,2]
+          migrate: [0,2]
+
+    onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement2:
+      version: 1.2.4
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement3
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [ 1,2 ]
+          migrate: [ 1,2 ]
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.4
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+            version: 1.2.4
+          - name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+            version: 1.2.4
+          - name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement
+            version: 1.2.4
+          - name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement2
+            version: 1.2.4
diff --git a/csit/resources/tests/data/ac-definition-simple.yaml b/csit/resources/tests/data/ac-definition-simple.yaml
new file mode 100644 (file)
index 0000000..b6c0292
--- /dev/null
@@ -0,0 +1,138 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+name: Simple
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      stage:
+        type: map
+        description: A map of list indicating for each operation the stages in which this automation composition element will be started, the
+          first stage is zero. Automation Composition Elements are started in their stage order.
+          Automation Composition Elements with the same stage are started simultaneously.
+
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
+
+topology_template:
+
+  node_templates:
+
+    org.onap.policy.clamp.acm.SimParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant Simulator
+      properties:
+        provider: ONAP
+
+    onap.policy.clamp.ac.element.Sim_AutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element
+      properties:
+        provider: ONAP
+        startPhase: 0
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Sim_AutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/ac-definition-timeout.yaml b/csit/resources/tests/data/ac-definition-timeout.yaml
new file mode 100644 (file)
index 0000000..edfa7b0
--- /dev/null
@@ -0,0 +1,172 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+name: Timeout
+metadata:
+  primeTimeoutMs: 200
+  deprimeTimeoutMs: 10000
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      stage:
+        type: map
+        description: A map of list indicating for each operation the stages in which this automation composition element will be started, the
+          first stage is zero. Automation Composition Elements are started in their stage order.
+          Automation Composition Elements with the same stage are started simultaneously.
+
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+
+  org.onap.policy.clamp.acm.SimAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: map
+        description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
+
+topology_template:
+
+  node_templates:
+
+    org.onap.policy.clamp.acm.SimParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant Simulator
+      properties:
+        provider: ONAP
+
+    onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Starter microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [1,2]
+          migrate: [1,2]
+
+    onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Bridge microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,1]
+          migrate: [0,1]
+
+    onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        startPhase: 0
+        stage:
+          prepare: [0,2]
+          migrate: [0,2]
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/ac-instance-migration-fail.yaml b/csit/resources/tests/data/ac-instance-migration-fail.yaml
new file mode 100644 (file)
index 0000000..4ba7a3d
--- /dev/null
@@ -0,0 +1,124 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Migration-Fail
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+instanceId: INSTACEIDPLACEHOLDER
+compositionTargetId: COMPOSITIONTARGETIDPLACEHOLDER
+description: Demo automation composition instance 0
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.3
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://address:30800
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.starter
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request1
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.3
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://address:30801
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.bridge
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request2
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridgetosink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c36:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c36
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://address:30802
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request3
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c38:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://address:30803
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink2
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request4
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
diff --git a/csit/resources/tests/data/ac-instance-migration-from.yaml b/csit/resources/tests/data/ac-instance-migration-from.yaml
new file mode 100644 (file)
index 0000000..25f8a1c
--- /dev/null
@@ -0,0 +1,142 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Migration-From
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+description: Demo automation composition instance 0
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.3
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://address:30800
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.starter
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request1
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.3
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://address:30801
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.bridge
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request2
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridgetosink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c36:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c36
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://address:30802
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request3
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c38:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://address:30803
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink2
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request4
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
diff --git a/csit/resources/tests/data/ac-instance-migration-restored.yaml b/csit/resources/tests/data/ac-instance-migration-restored.yaml
new file mode 100644 (file)
index 0000000..e37706a
--- /dev/null
@@ -0,0 +1,74 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Test-Instance-Migration-To
+version: 2.0.1
+compositionId: d30b8017-4d64-4693-84d7-de9c4226b9f8
+instanceId: dd36aaa4-580f-4193-a52b-37c3a955b11a
+compositionTargetId: 6c1cf107-a2ca-4485-8129-02f9fae64d64
+description: Demo automation composition instance 0
+elements:
+
+  989c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 989c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.4
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://10.101.0.249:30800
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
+
+  989c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 989c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.4
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://10.101.0.249:30801
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  989c62b3-8918-41b9-a747-d21eb79c6c37:
+    id: 989c62b3-8918-41b9-a747-d21eb79c6c37
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement
+      version: 1.2.4
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
diff --git a/csit/resources/tests/data/ac-instance-migration-to.yaml b/csit/resources/tests/data/ac-instance-migration-to.yaml
new file mode 100644 (file)
index 0000000..f3e6ecb
--- /dev/null
@@ -0,0 +1,90 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Migration-To
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+instanceId: INSTACEIDPLACEHOLDER
+compositionTargetId: COMPOSITIONTARGETIDPLACEHOLDER
+description: Demo automation composition instance 0
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.4
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://10.101.0.249:30800
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.4
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://10.101.0.249:30801
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c37:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c37
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement
+      version: 1.2.4
+    description: New element for an existing participant
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
+
+  709c62b3-8918-41b9-a747-d21eb79c6c40:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c40
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement2
+      version: 1.2.4
+    description: New element with a new participant
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
diff --git a/csit/resources/tests/data/ac-instance-precheck-migration.yaml b/csit/resources/tests/data/ac-instance-precheck-migration.yaml
new file mode 100644 (file)
index 0000000..2300b9e
--- /dev/null
@@ -0,0 +1,76 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Migration-To
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+instanceId: INSTACEIDPLACEHOLDER
+compositionTargetId: COMPOSITIONTARGETIDPLACEHOLDER
+precheck: true
+description: Demo automation composition instance 0
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.4
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://10.101.0.249:30800
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.4
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://10.101.0.249:30801
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c37:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c37
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement
+      version: 1.2.4
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
+
+  709c62b3-8918-41b9-a747-d21eb79c6c40:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c40
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement2
+      version: 1.2.4
+    description: New element with a new participant
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated for migration
diff --git a/csit/resources/tests/data/ac-instance-simple.yaml b/csit/resources/tests/data/ac-instance-simple.yaml
new file mode 100644 (file)
index 0000000..f4bca6b
--- /dev/null
@@ -0,0 +1,52 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Simple
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+description: Demo automation composition instance simple
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb80c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb80c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_AutomationCompositionElement
+      version: 1.2.3
+    description: Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200000
+      undeployTimeoutMs: 150000
+      updateTimeoutMs: 200000
+      migrateTimeoutMs: 200000
+      deleteTimeoutMs: 100000
+      baseUrl: http://address:30800
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.starter
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request1
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
diff --git a/csit/resources/tests/data/ac-instance-timeout.yaml b/csit/resources/tests/data/ac-instance-timeout.yaml
new file mode 100644 (file)
index 0000000..39b461c
--- /dev/null
@@ -0,0 +1,142 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Timeout
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+description: Demo automation composition instance timeout
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.3
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200
+      undeployTimeoutMs: 150
+      updateTimeoutMs: 200
+      migrateTimeoutMs: 200
+      deleteTimeoutMs: 100
+      baseUrl: http://address:30800
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.starter
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request1
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 20000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.3
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200
+      undeployTimeoutMs: 150
+      updateTimeoutMs: 200
+      migrateTimeoutMs: 200
+      deleteTimeoutMs: 100
+      baseUrl: http://address:30801
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.bridge
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request2
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridgetosink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c36:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c36
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200
+      undeployTimeoutMs: 150
+      updateTimeoutMs: 200
+      migrateTimeoutMs: 200
+      deleteTimeoutMs: 100
+      baseUrl: http://address:30802
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request3
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: text
+
+  709c62b3-8918-41b9-a747-d21eb79c6c38:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c38
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_Sink2AutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      deployTimeoutMs: 200
+      undeployTimeoutMs: 150
+      updateTimeoutMs: 200
+      migrateTimeoutMs: 200
+      deleteTimeoutMs: 100
+      baseUrl: http://address:30803
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+            name: onap.policy.clamp.ac.sink2
+            version: 1.0.0
+          restSequence:
+            - restRequestId:
+                name: request4
+                version: 1.0.1
+              httpMethod: POST
+              path: /onap/policy/clamp/acelement/v2/activate
+              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink2", "version": "1.0.0" }, "timerMs": 20000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+              expectedResponse: 201
+          myParameterToUpdate: TEXTPLACEHOLDER
diff --git a/csit/resources/tests/data/ac-instance-update.yaml b/csit/resources/tests/data/ac-instance-update.yaml
new file mode 100644 (file)
index 0000000..2601559
--- /dev/null
@@ -0,0 +1,60 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+name: Instance-Migration-To
+version: 1.0.1
+compositionId: COMPOSITIONIDPLACEHOLDER
+instanceId: INSTACEIDPLACEHOLDER
+description: Demo automation composition instance 0
+elements:
+
+  709c62b3-8918-41b9-a747-d21eb79c6c34:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c34
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement
+      version: 1.2.3
+    description: Starter Automation Composition Element for the Demo
+    properties:
+      baseUrl: http://address:30800
+      httpHeaders:
+        Content-Type: application/json
+        Authorization: Basic YWNtVXNlcjp6YiFYenRHMzQ=
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: TEXTPLACEHOLDER
+
+  709c62b3-8918-41b9-a747-d21eb79c6c35:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c35
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement
+      version: 1.2.3
+    description: Bridge Automation Composition Element for the Demo
+    properties:
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated
+
+  709c62b3-8918-41b9-a747-d21eb79c6c36:
+    id: 709c62b3-8918-41b9-a747-d21eb79c6c36
+    definition:
+      name: onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement
+      version: 1.2.3
+    description: Sink Automation Composition Element for the Demo
+    properties:
+      configurationEntities:
+        - configurationEntityId:
+          myParameterToUpdate: text updated
diff --git a/csit/resources/tests/data/acelement-usecase.yaml b/csit/resources/tests/data/acelement-usecase.yaml
new file mode 100644 (file)
index 0000000..84fd944
--- /dev/null
@@ -0,0 +1,343 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2023 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+  org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest:
+    version: 1.0.0
+    derived_from: tosca.datatypes.Root
+    properties:
+      restRequestId:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        description: The name and version of a REST request to be sent to a REST endpoint
+      httpMethod:
+        type: string
+        required: true
+        constraints:
+          - valid_values:
+              - POST
+              - PUT
+              - GET
+              - DELETE
+        description: The REST method to use
+      path:
+        type: string
+        required: true
+        description: The path of the REST request relative to the base URL
+      body:
+        type: string
+        required: false
+        description: The body of the REST request for PUT and POST requests
+      expectedResponse:
+        type: integer
+        required: true
+        constraints: []
+        description: THe expected HTTP status code for the REST request
+  org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
+    version: 1.0.0
+    derived_from: tosca.datatypes.Root
+    properties:
+      configurationEntityId:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        description: The name and version of a Configuration Entity to be handled
+          by the HTTP Automation Composition Element
+      restSequence:
+        type: list
+        entry_schema:
+          type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
+          type_version: 1.0.0
+        description: A sequence of REST commands to send to the REST endpoint
+      password:
+        type: string
+        metadata:
+          sensitive: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      uninitializedToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from uninitialized to passive
+      passiveToRunningTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to running
+      runningToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from running to passive
+      passiveToUninitializedTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to uninitialized
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+  org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      policy_type_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+      policy_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: false
+  org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      chart:
+        type: string
+        required: true
+      configs:
+        type: list
+        required: false
+      requirements:
+        type: string
+        required: false
+      templates:
+        type: list
+        required: false
+        entry_schema:
+      values:
+        type: string
+        required: true
+  org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+        metadata:
+          sensitive: true
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
+          type_version: 1.0.0
+        description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
+
+topology_template:
+  inputs:
+    acm_element_policy:
+      type: onap.datatypes.ToscaConceptIdentifier
+      description: The ID of the operational policy to use
+      default:
+        name: onap.policies.native.apex.ac.element
+        version: 1.0.0
+  node_templates:
+    org.onap.policy.clamp.acm.PolicyParticipant:
+      version: 2.3.1
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for Policy microservices
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.Policy_AutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the operational policy for Performance Management Subscription Handling
+      properties:
+        provider: Ericsson
+        startPhase: 0
+
+    org.onap.k8s.acm.K8SAutomationCompositionParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for K8S
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement:
+      # Chart from any chart repository configured on helm client.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the K8S microservice for AC Element Starter
+      properties:
+        provider: ONAP
+        startPhase: 0
+        uninitializedToPassiveTimeout: 300
+        podStatusCheckInterval: 30
+    onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement:
+      # Chart from any chart repository configured on helm client.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the K8S microservice for AC Element Bridge
+      properties:
+        provider: ONAP
+        startPhase: 0
+        uninitializedToPassiveTimeout: 300
+        podStatusCheckInterval: 30
+    onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement:
+      # Chart from any chart repository configured on helm client.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the K8S microservice for AC Element Sink
+      properties:
+        provider: ONAP
+        startPhase: 0
+        uninitializedToPassiveTimeout: 300
+        podStatusCheckInterval: 30
+
+    org.onap.policy.clamp.acm.HttpParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for Http requests
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement:
+      # Http config for AC Element Starter.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Starter microservice
+      properties:
+        provider: ONAP
+        uninitializedToPassiveTimeout: 300
+        startPhase: 1
+    onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement:
+      # Http config for AC Element Bridge.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Bridge microservice
+      properties:
+        provider: ONAP
+        uninitializedToPassiveTimeout: 300
+        startPhase: 1
+    onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement:
+      # Http config for AC Element Sink.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        uninitializedToPassiveTimeout: 300
+        startPhase: 1
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Policy_AutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/acelement-usecaseDocker.yaml b/csit/resources/tests/data/acelement-usecaseDocker.yaml
new file mode 100644 (file)
index 0000000..828d0ea
--- /dev/null
@@ -0,0 +1,158 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025  OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      uninitializedToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from uninitialized to passive
+      passiveToRunningTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to running
+      runningToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from running to passive
+      passiveToUninitializedTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to uninitialized
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+  org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      policy_type_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+      policy_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: false
+
+topology_template:
+  inputs:
+    acm_element_policy:
+      type: onap.datatypes.ToscaConceptIdentifier
+      description: The ID of the operational policy to use
+      default:
+        name: onap.policies.native.apex.ac.element
+        version: 1.0.0
+  node_templates:
+    org.onap.policy.clamp.acm.PolicyParticipant:
+      version: 2.3.1
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for Policy microservices
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.Policy_AutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the operational policy for Performance Management Subscription Handling
+      properties:
+        provider: Ericsson
+        startPhase: 0
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Policy_AutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json b/csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json
new file mode 100644 (file)
index 0000000..5d84c29
--- /dev/null
@@ -0,0 +1,184 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "topology_template": {
+    "policies": [
+      {
+        "operational.apex.decisionMaker": {
+          "type": "onap.policies.native.Apex",
+          "type_version": "1.0.0",
+          "name": "operational.apex.decisionMaker",
+          "version": "1.0.0",
+          "metadata": {
+            "metadataSetName": "apexMetadata_decisionMaker",
+            "metadataSetVersion": "1.0.0"
+          },
+          "properties": {
+            "engineServiceParameters": {
+              "name": "MyApexEngine",
+              "version": "0.0.1",
+              "id": 45,
+              "instanceCount": 4,
+              "deploymentPort": 12561,
+              "engineParameters": {
+                "executorParameters": {
+                  "JAVASCRIPT": {
+                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                  }
+                },
+                "contextParameters": {
+                  "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                  "schemaParameters": {
+                    "Avro": {
+                      "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
+                    },
+                    "Java": {
+                      "parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters",
+                      "jsonAdapters": {
+                        "Instant": {
+                          "adaptedClass": "java.time.Instant",
+                          "adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter"
+                        }
+                      }
+                    }
+                  }
+                },
+                "taskParameters": [
+                  {
+                    "key": "ParameterKey1",
+                    "value": "ParameterValue1"
+                  },
+                  {
+                    "taskId": "AAILookupTask:0.0.1",
+                    "key": "SomeKeyForThisTask",
+                    "value": "Value"
+                  }
+                ]
+              }
+            },
+            "eventInputParameters": {
+              "GuardRequestorConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://111.222.333.444:5555/pdp/api/getDecision",
+                    "httpMethod": "POST",
+                    "restRequestTimeout": 2000,
+                    "httpHeader": "Authorization:aaaaaaaaa== ClientAuth:bbbbbbbbb="
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "GuardResponseEvent",
+                "eventNameFilter": "GuardResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "GuardRequestorProducer",
+                "requestorTimeout": 500
+              },
+              "DCAEConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTCLIENT",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/APEX/1?timeout=60000"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON",
+                  "parameters": {
+                    "nameAlias": "closedLoopControlName",
+                    "versionAlias": "version",
+                    "sourceAlias": "from",
+                    "pojoField": "VirtualControlLoopEvent"
+                  }
+                },
+                "eventName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
+              },
+              "APPCConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTCLIENT",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://message-router:3904/events/APPC-LCM-WRITE/APEX/1?timeout=60000"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON",
+                  "parameters": {
+                    "versionAlias": "version",
+                    "pojoField": "APPCLCMResponseEvent"
+                  }
+                },
+                "eventName": "APPCRestartVNFResponseEvent",
+                "eventNameFilter": "APPCRestartVNFResponseEvent"
+              }
+            },
+            "eventOutputParameters": {
+              "logProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "FILE",
+                  "parameters": {
+                    "fileName": "/tmp/VCPEEventsOut.json"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                }
+              },
+              "GuardRequestorProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "GuardRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "GuardRequestorConsumer",
+                "requestorTimeout": 500
+              },
+              "APPCProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTCLIENT",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://message-router:3904/events/APPC-LCM-READ"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON",
+                  "parameters": {
+                    "versionAlias": "version",
+                    "sourceAlias": "from",
+                    "pojoField": "APPCLCMRequestEvent"
+                  }
+                },
+                "eventNameFilter": "APPCRestartVNFRequestEvent"
+              },
+              "PolicyLogProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTCLIENT",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://message-router:3904/events/POLICY-CL-MGT"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON",
+                  "parameters": {
+                    "versionAlias": "version",
+                    "sourceAlias": "from",
+                    "pojoField": "VirtualControlLoopNotification"
+                  }
+                },
+                "eventNameFilter": "ControlLoopLogEvent"
+              }
+            }
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/csit/resources/tests/data/create.group.request.json b/csit/resources/tests/data/create.group.request.json
new file mode 100644 (file)
index 0000000..1e37583
--- /dev/null
@@ -0,0 +1,49 @@
+{
+    "groups": [
+        {
+            "name": "testGroup",
+            "pdpGroupState": "PASSIVE",
+            "properties": {
+                "hello": "world"
+            },
+            "pdpSubgroups": [
+                {
+                    "pdpType": "pdpTypeA",
+                    "desiredInstanceCount": 2,
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.monitoring.tcagen2",
+                            "version": "1.0.0"
+                        }
+                    ],
+                    "policies": []
+                },
+                {
+                    "pdpType": "pdpTypeB",
+                    "desiredInstanceCount": 1,
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.monitoring.tcagen2",
+                            "version": "1.0.0"
+                        }
+                    ],
+                    "policies": []
+                },
+                {
+                    "pdpType": "pdpTypeC",
+                    "desiredInstanceCount": 1,
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.native.Apex",
+                            "version": "1.0.0"
+                        }
+                    ],
+                    "policies": []
+                }
+            ]
+        }
+    ]
+}
diff --git a/csit/resources/tests/data/deploy.group.request.json b/csit/resources/tests/data/deploy.group.request.json
new file mode 100644 (file)
index 0000000..cfd86d1
--- /dev/null
@@ -0,0 +1,29 @@
+{
+    "groups": [
+        {
+            "name": "testGroup",
+            "deploymentSubgroups": [
+                {
+                    "pdpType": "pdpTypeA",
+                    "action": "POST",
+                    "policies": [
+                        {
+                            "name": "onap.restart.tca",
+                            "version": "1.0.0"
+                        }
+                    ]
+                },
+                {
+                    "pdpType": "pdpTypeC",
+                    "action": "POST",
+                    "policies": [
+                        {
+                            "name": "operational.apex.decisionMaker",
+                            "version": "1.0.0"
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
diff --git a/csit/resources/tests/data/event.json b/csit/resources/tests/data/event.json
new file mode 100644 (file)
index 0000000..9dbf279
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "nameSpace": "org.onap.policy.apex.sample.events",
+    "name": "Event0000",
+    "version": "0.0.1",
+    "source": "REST_0",
+    "target": "apex",
+    "TestSlogan": "Test slogan for External Event0",
+    "TestMatchCase": 3,
+    "TestTimestamp": 1536363522018,
+    "TestTemperature": 9080.866
+}
diff --git a/csit/resources/tests/data/http-usecase.yaml b/csit/resources/tests/data/http-usecase.yaml
new file mode 100644 (file)
index 0000000..cea74ab
--- /dev/null
@@ -0,0 +1,312 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2022 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+  org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest:
+    version: 1.0.0
+    derived_from: tosca.datatypes.Root
+    properties:
+      restRequestId:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        description: The name and version of a REST request to be sent to a REST endpoint
+      httpMethod:
+        type: string
+        required: true
+        constraints:
+          - valid_values:
+              - POST
+              - PUT
+              - GET
+              - DELETE
+        description: The REST method to use
+      path:
+        type: string
+        required: true
+        description: The path of the REST request relative to the base URL
+      body:
+        type: string
+        required: false
+        description: The body of the REST request for PUT and POST requests
+      expectedResponse:
+        type: integer
+        required: true
+        constraints: []
+        description: THe expected HTTP status code for the REST request
+  org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity:
+    version: 1.0.0
+    derived_from: tosca.datatypes.Root
+    properties:
+      configurationEntityId:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        description: The name and version of a Configuration Entity to be handled
+          by the HTTP Automation Composition Element
+      restSequence:
+        type: list
+        entry_schema:
+          type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
+          type_version: 1.0.0
+        description: A sequence of REST commands to send to the REST endpoint
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      participant_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        metadata:
+          common: true
+      participantType:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+        metadata:
+          common: true
+        description: The identity of the participant type that hosts this type of Automation Composition Element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      uninitializedToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from uninitialized to passive
+      passiveToRunningTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to running
+      runningToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from running to passive
+      passiveToUninitializedTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to uninitialized
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+  org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
+    version: 1.0.1
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      baseUrl:
+        type: string
+        required: true
+        description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
+      httpHeaders:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+        description: HTTP headers to send on REST requests
+      configurationEntities:
+        type: map
+        required: true
+        entry_schema:
+          type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
+          type_version: 1.0.0
+        description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests
+
+topology_template:
+  node_templates:
+    org.onap.policy.clamp.acm.HttpParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for Http requests
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement:
+      # Http config for AC Element Starter.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.1
+      description: Automation composition element for the http requests of AC Element Starter microservice
+      properties:
+        provider: ONAP
+        participant_id:
+          name: HttpParticipant0
+          version: 1.0.0
+        participantType:
+          name: org.onap.policy.clamp.acm.HttpParticipant
+          version: 2.3.4
+        uninitializedToPassiveTimeout: 180
+        startPhase: 0
+        baseUrl: http://acelement-starter:8084
+        httpHeaders:
+          Content-Type: application/json
+          Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0'
+        configurationEntities:
+          - configurationEntityId:
+              name: onap.policy.clamp.ac.starter
+              version: 1.0.0
+            restSequence:
+              - restRequestId:
+                  name: request1
+                  version: 1.0.1
+                httpMethod: POST
+                path: /activate
+                body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridge", "version": "1.0.0" }, "timerMs": 4000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+                expectedResponse: 201
+    onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement:
+      # Http config for AC Element Bridge.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.1
+      description: Automation composition element for the http requests of AC Element Bridge microservice
+      properties:
+        provider: ONAP
+        participant_id:
+          name: HttpParticipant0
+          version: 1.0.0
+        participantType:
+          name: org.onap.policy.clamp.acm.HttpParticipant
+          version: 2.3.4
+        uninitializedToPassiveTimeout: 180
+        startPhase: 0
+        baseUrl: http://acelement-bridge:8084
+        httpHeaders:
+          Content-Type: application/json
+          Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0'
+        configurationEntities:
+          - configurationEntityId:
+              name: onap.policy.clamp.ac.bridge
+              version: 1.0.0
+            restSequence:
+              - restRequestId:
+                  name: request2
+                  version: 1.0.1
+                httpMethod: POST
+                path: /activate
+                body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+                expectedResponse: 201
+    onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement:
+      # Http config for AC Element Sink.
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+      type_version: 1.0.1
+      description: Automation composition element for the http requests of AC Element Sink microservice
+      properties:
+        provider: ONAP
+        participant_id:
+          name: HttpParticipant0
+          version: 1.0.0
+        participantType:
+          name: org.onap.policy.clamp.acm.HttpParticipant
+          version: 2.3.4
+        uninitializedToPassiveTimeout: 180
+        startPhase: 0
+        baseUrl: http://acelement-sink:8084
+        httpHeaders:
+          Content-Type: application/json
+          Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0'
+        configurationEntities:
+          - configurationEntityId:
+              name: onap.policy.clamp.ac.sink
+              version: 1.0.0
+            restSequence:
+              - restRequestId:
+                  name: request3
+                  version: 1.0.1
+                httpMethod: POST
+                path: /activate
+                body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }'
+                expectedResponse: 201
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demp
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement
+            version: 1.2.3
+          - name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement
+            version: 1.2.3
diff --git a/csit/resources/tests/data/onap.pnf.metadataSet.Test.json b/csit/resources/tests/data/onap.pnf.metadataSet.Test.json
new file mode 100644 (file)
index 0000000..b59efc0
--- /dev/null
@@ -0,0 +1,2755 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "node_types": {
+    "org.onap.nodetypes.policy.MetadataSet": {
+      "derived_from": "tosca.nodetypes.Root",
+      "version": "1.0.0"
+    }
+  },
+
+  "topology_template": {
+    "node_templates": {
+      "apex.metadata.pnf": {
+        "version": "1.0.0",
+        "type": "org.onap.nodetypes.policy.MetadataSet",
+        "type_version": "1.0.0",
+        "description": "Metadata set for apex pnf Policy",
+        "metadata": {
+          "apexPolicyModel": {
+            "key": {
+              "name": "onap.policies.apex.Simplecontrolloop2",
+              "version": "0.0.1"
+            },
+            "keyInformation": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo",
+                "version": "0.0.1"
+              },
+              "keyInfoMap": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleBooleanType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleBooleanType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae",
+                      "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIFailureResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIFailureResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "c8a29e27-0a15-354a-84f9-4c7f207e5c81",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "5e843cee-0180-39b9-8989-180b2ffe11c0",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseHandlerPolicy2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIRequestErrorType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIRequestErrorType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "90291c92-9b27-3cd9-8720-db572419c048",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestErrorType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIRequestEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIRequestEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "7b7e6751-4e0b-389d-98c0-5567bbc0294c",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAISuccessResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAISuccessResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "63d5680c-14ef-3505-8d34-ebb646bba07b",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "a84ca97d-6e94-39a2-91f9-59a6c9aa435e",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseHandlerPolicy2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSActionIdentifiersType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSActionIdentifiersType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "0e2ee622-7fd3-3e49-82e2-539c4f5e9624",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSActionIdentifiersType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "e84f8682-ea33-3ad0-8626-8bc4634581fc",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "a252f835-2479-38ef-9ef4-20af62725752",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "cfc46ea9-b8c1-38dd-ac9c-304c916daf34",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseTask2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "1e7095d6-a455-3f89-acae-486e35d7e311",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "d22ea83b-695d-3da9-b9f5-41f16ca433bf",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestPayloadType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "e9fe2e40-1f0d-30dd-8b9e-885695878693",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyResponsePayloadType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "5e04fa76-0a17-38a9-8524-23b2d1a23fa5",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "15866380-40f5-3f8e-87d9-13747a36d352",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "2c3d76ce-dd42-32ac-a397-ab418534e1cf",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseTask2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "b99c44da-dae7-3c96-b528-58852537d063",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseCommonHeaderType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSFailureResponseStatusType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSFailureResponseStatusType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "1db688e2-3afe-3b03-9795-fdbfa80fa240",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseStatusType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSRequestCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSRequestCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "31022456-e85b-3a9b-9ecb-a09691792d3e",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSRequestCommonHeaderType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "d6075720-622e-3a0d-827a-aa4580a2f5d7",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseCommonHeaderType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSSuccessResponseStatusType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSSuccessResponseStatusType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "948359ff-3308-3ac5-a5ec-6e3c1b9cd4d5",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseStatusType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_EventDetailsAlbum",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_EventDetailsAlbum",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "63a6fd26-2fd6-3a0e-8a27-49a5d2ea4644",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbum:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_EventDetailsAlbumType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_EventDetailsAlbumType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "a0407d0b-5719-38bf-9529-25ad62ace8c4",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbumType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "28e894dc-4ab8-3469-aab7-d81bd05bb4c9",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAIFailureResponseTask2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "073f1433-999e-3506-98ad-ef820d2fa7f0",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAISuccessResponseTask2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleVesEventTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleVesEventTask2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "afc6ed46-6801-3c85-bb4c-0ab5b0dd4a74",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_HandleVesEventTask2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "317be184-a01a-3e2d-9ae4-cafaa405de70",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_LogEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventComponentType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventComponentType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "be7fc79b-9b73-381a-8e23-9dd6e6b1233d",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_LogEventComponentType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventOtherFieldsType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventOtherFieldsType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "1a082851-49e3-3f4c-b023-c05236cc8389",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_LogEventOtherFieldsType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventTargetType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventTargetType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "cab6cd51-ea7b-3241-a173-ea8a24e29737",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_LogEventTargetType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_VesEvent",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "0f57665a-f0a9-314e-ad0a-04c1f5758174",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_VesEvent:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEventHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_VesEventHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "ba5d9a46-8cb4-3fbe-84fd-eabba5b7dd4b",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_VesEventHandlerPolicy2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEventType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_VesEventType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "9fd7a967-57d4-36ef-81e9-c3396f3aa8d1",
+                      "description": "Generated description for concept referred to by key \"SimpleCL_VesEventType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleLongType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleLongType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574",
+                      "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleStringType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleStringType",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
+                      "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "ecc97b87-f30b-344c-a476-d36501bf5cbd",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_Albums",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_Albums",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "1469671a-56dd-3a68-bf6c-77a5cf7a9487",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Albums:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_Events",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_Events",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "23c4eee4-aba5-36f6-96d6-46f40061bfed",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Events:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "ea9e73ff-483c-3827-896c-6eaa9d69bc6e",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_KeyInfo:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_Policies",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_Policies",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "38c068e5-bb9a-3997-9e50-ec77c66825c8",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Policies:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_Schemas",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_Schemas",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "38514b27-8b9b-3d06-844a-3aced27deb0a",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Schemas:0.0.1\""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop2_Tasks",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "onap.policies.apex.Simplecontrolloop2_Tasks",
+                        "version": "0.0.1"
+                      },
+                      "UUID": "0e0387b5-07fa-30e4-8554-eb51d2e18939",
+                      "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Tasks:0.0.1\""
+                    }
+                  }
+                ]
+              }
+            },
+            "policies": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_Policies",
+                "version": "0.0.1"
+              },
+              "policyMap": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "policyKey": {
+                        "name": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "template": "Freestyle",
+                      "state": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_ReceiveAAIFailureResponseState",
+                            "value": {
+                              "stateKey": {
+                                "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                                "parentKeyVersion": "0.0.1",
+                                "parentLocalName": "NULL",
+                                "localName": "SimpleCL_ReceiveAAIFailureResponseState"
+                              },
+                              "trigger": {
+                                "name": "SimpleCL_AAIFailureResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "stateOutputs": {
+                                "entry": [
+                                  {
+                                    "key": "AAIFailureStateOutput",
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                        "localName": "AAIFailureStateOutput"
+                                      },
+                                      "outgoingEvent": {
+                                        "name": "SimpleCL_LogEvent",
+                                        "version": "0.0.1"
+                                      },
+                                      "outgoingEventReference": [
+                                        {
+                                          "name": "SimpleCL_LogEvent",
+                                          "version": "0.0.1"
+                                        }
+                                      ],
+                                      "nextState": {
+                                        "parentKeyName": "NULL",
+                                        "parentKeyVersion": "0.0.0",
+                                        "parentLocalName": "NULL",
+                                        "localName": "NULL"
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              "contextAlbumReference": [],
+                              "taskSelectionLogic": {
+                                "key": "NULL",
+                                "logicFlavour": "UNDEFINED",
+                                "logic": ""
+                              },
+                              "stateFinalizerLogicMap": {
+                                "entry": []
+                              },
+                              "defaultTask": {
+                                "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                                "version": "0.0.1"
+                              },
+                              "taskReferences": {
+                                "entry": [
+                                  {
+                                    "key": {
+                                      "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                                      "version": "0.0.1"
+                                    },
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                        "localName": "SimpleCL_AAIFailureResponseHandlerPolicy2"
+                                      },
+                                      "outputType": "DIRECT",
+                                      "output": {
+                                        "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                        "localName": "AAIFailureStateOutput"
+                                      }
+                                    }
+                                  }
+                                ]
+                              }
+                            }
+                          }
+                        ]
+                      },
+                      "firstState": "SimpleCL_ReceiveAAIFailureResponseState"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "policyKey": {
+                        "name": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "template": "Freestyle",
+                      "state": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_ReceiveAAISuccessResponseState",
+                            "value": {
+                              "stateKey": {
+                                "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                                "parentKeyVersion": "0.0.1",
+                                "parentLocalName": "NULL",
+                                "localName": "SimpleCL_ReceiveAAISuccessResponseState"
+                              },
+                              "trigger": {
+                                "name": "SimpleCL_AAISuccessResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "stateOutputs": {
+                                "entry": [
+                                  {
+                                    "key": "AAISuccessStateOutput",
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                        "localName": "AAISuccessStateOutput"
+                                      },
+                                      "outgoingEvent": {
+                                        "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                        "version": "0.0.1"
+                                      },
+                                      "outgoingEventReference": [
+                                        {
+                                          "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                          "version": "0.0.1"
+                                        },
+                                        {
+                                          "name": "SimpleCL_LogEvent",
+                                          "version": "0.0.1"
+                                        }
+                                      ],
+                                      "nextState": {
+                                        "parentKeyName": "NULL",
+                                        "parentKeyVersion": "0.0.0",
+                                        "parentLocalName": "NULL",
+                                        "localName": "NULL"
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              "contextAlbumReference": [],
+                              "taskSelectionLogic": {
+                                "key": "NULL",
+                                "logicFlavour": "UNDEFINED",
+                                "logic": ""
+                              },
+                              "stateFinalizerLogicMap": {
+                                "entry": []
+                              },
+                              "defaultTask": {
+                                "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                                "version": "0.0.1"
+                              },
+                              "taskReferences": {
+                                "entry": [
+                                  {
+                                    "key": {
+                                      "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                                      "version": "0.0.1"
+                                    },
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                        "localName": "SimpleCL_AAISuccessResponseHandlerPolicy2"
+                                      },
+                                      "outputType": "DIRECT",
+                                      "output": {
+                                        "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                        "localName": "AAISuccessStateOutput"
+                                      }
+                                    }
+                                  }
+                                ]
+                              }
+                            }
+                          }
+                        ]
+                      },
+                      "firstState": "SimpleCL_ReceiveAAISuccessResponseState"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "policyKey": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "template": "Freestyle",
+                      "state": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_CDSConfigModifyFailureResponseState",
+                            "value": {
+                              "stateKey": {
+                                "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                                "parentKeyVersion": "0.0.1",
+                                "parentLocalName": "NULL",
+                                "localName": "SimpleCL_CDSConfigModifyFailureResponseState"
+                              },
+                              "trigger": {
+                                "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "stateOutputs": {
+                                "entry": [
+                                  {
+                                    "key": "ConfigModifyFailureResponseOutput",
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                        "localName": "ConfigModifyFailureResponseOutput"
+                                      },
+                                      "outgoingEvent": {
+                                        "name": "SimpleCL_LogEvent",
+                                        "version": "0.0.1"
+                                      },
+                                      "outgoingEventReference": [
+                                        {
+                                          "name": "SimpleCL_LogEvent",
+                                          "version": "0.0.1"
+                                        }
+                                      ],
+                                      "nextState": {
+                                        "parentKeyName": "NULL",
+                                        "parentKeyVersion": "0.0.0",
+                                        "parentLocalName": "NULL",
+                                        "localName": "NULL"
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              "contextAlbumReference": [],
+                              "taskSelectionLogic": {
+                                "key": "NULL",
+                                "logicFlavour": "UNDEFINED",
+                                "logic": ""
+                              },
+                              "stateFinalizerLogicMap": {
+                                "entry": []
+                              },
+                              "defaultTask": {
+                                "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                                "version": "0.0.1"
+                              },
+                              "taskReferences": {
+                                "entry": [
+                                  {
+                                    "key": {
+                                      "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                                      "version": "0.0.1"
+                                    },
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                        "localName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2"
+                                      },
+                                      "outputType": "DIRECT",
+                                      "output": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                        "localName": "ConfigModifyFailureResponseOutput"
+                                      }
+                                    }
+                                  }
+                                ]
+                              }
+                            }
+                          }
+                        ]
+                      },
+                      "firstState": "SimpleCL_CDSConfigModifyFailureResponseState"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "policyKey": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "template": "Freestyle",
+                      "state": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_CDSConfigModifySuccessResponseState",
+                            "value": {
+                              "stateKey": {
+                                "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                                "parentKeyVersion": "0.0.1",
+                                "parentLocalName": "NULL",
+                                "localName": "SimpleCL_CDSConfigModifySuccessResponseState"
+                              },
+                              "trigger": {
+                                "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "stateOutputs": {
+                                "entry": [
+                                  {
+                                    "key": "ConfigModifySuccessResponseOutput",
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                        "localName": "ConfigModifySuccessResponseOutput"
+                                      },
+                                      "outgoingEvent": {
+                                        "name": "SimpleCL_LogEvent",
+                                        "version": "0.0.1"
+                                      },
+                                      "outgoingEventReference": [
+                                        {
+                                          "name": "SimpleCL_LogEvent",
+                                          "version": "0.0.1"
+                                        }
+                                      ],
+                                      "nextState": {
+                                        "parentKeyName": "NULL",
+                                        "parentKeyVersion": "0.0.0",
+                                        "parentLocalName": "NULL",
+                                        "localName": "NULL"
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              "contextAlbumReference": [],
+                              "taskSelectionLogic": {
+                                "key": "NULL",
+                                "logicFlavour": "UNDEFINED",
+                                "logic": ""
+                              },
+                              "stateFinalizerLogicMap": {
+                                "entry": []
+                              },
+                              "defaultTask": {
+                                "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                                "version": "0.0.1"
+                              },
+                              "taskReferences": {
+                                "entry": [
+                                  {
+                                    "key": {
+                                      "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                                      "version": "0.0.1"
+                                    },
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                        "localName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2"
+                                      },
+                                      "outputType": "DIRECT",
+                                      "output": {
+                                        "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                        "localName": "ConfigModifySuccessResponseOutput"
+                                      }
+                                    }
+                                  }
+                                ]
+                              }
+                            }
+                          }
+                        ]
+                      },
+                      "firstState": "SimpleCL_CDSConfigModifySuccessResponseState"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEventHandlerPolicy2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "policyKey": {
+                        "name": "SimpleCL_VesEventHandlerPolicy2",
+                        "version": "0.0.1"
+                      },
+                      "template": "Freestyle",
+                      "state": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_ReceiveVesState",
+                            "value": {
+                              "stateKey": {
+                                "parentKeyName": "SimpleCL_VesEventHandlerPolicy2",
+                                "parentKeyVersion": "0.0.1",
+                                "parentLocalName": "NULL",
+                                "localName": "SimpleCL_ReceiveVesState"
+                              },
+                              "trigger": {
+                                "name": "SimpleCL_VesEvent",
+                                "version": "0.0.1"
+                              },
+                              "stateOutputs": {
+                                "entry": [
+                                  {
+                                    "key": "VesOutput",
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_VesEventHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveVesState",
+                                        "localName": "VesOutput"
+                                      },
+                                      "outgoingEvent": {
+                                        "name": "SimpleCL_AAIRequestEvent",
+                                        "version": "0.0.1"
+                                      },
+                                      "outgoingEventReference": [
+                                        {
+                                          "name": "SimpleCL_AAIRequestEvent",
+                                          "version": "0.0.1"
+                                        },
+                                        {
+                                          "name": "SimpleCL_LogEvent",
+                                          "version": "0.0.1"
+                                        }
+                                      ],
+                                      "nextState": {
+                                        "parentKeyName": "NULL",
+                                        "parentKeyVersion": "0.0.0",
+                                        "parentLocalName": "NULL",
+                                        "localName": "NULL"
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              "contextAlbumReference": [],
+                              "taskSelectionLogic": {
+                                "key": "NULL",
+                                "logicFlavour": "UNDEFINED",
+                                "logic": ""
+                              },
+                              "stateFinalizerLogicMap": {
+                                "entry": []
+                              },
+                              "defaultTask": {
+                                "name": "SimpleCL_HandleVesEventTask2",
+                                "version": "0.0.1"
+                              },
+                              "taskReferences": {
+                                "entry": [
+                                  {
+                                    "key": {
+                                      "name": "SimpleCL_HandleVesEventTask2",
+                                      "version": "0.0.1"
+                                    },
+                                    "value": {
+                                      "key": {
+                                        "parentKeyName": "SimpleCL_VesEventHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveVesState",
+                                        "localName": "SimpleCL_VesEventHandlerPolicy2"
+                                      },
+                                      "outputType": "DIRECT",
+                                      "output": {
+                                        "parentKeyName": "SimpleCL_VesEventHandlerPolicy2",
+                                        "parentKeyVersion": "0.0.1",
+                                        "parentLocalName": "SimpleCL_ReceiveVesState",
+                                        "localName": "VesOutput"
+                                      }
+                                    }
+                                  }
+                                ]
+                              }
+                            }
+                          }
+                        ]
+                      },
+                      "firstState": "SimpleCL_ReceiveVesState"
+                    }
+                  }
+                ]
+              }
+            },
+            "tasks": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_Tasks",
+                "version": "0.0.1"
+              },
+              "taskMap": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "inputEvent": {
+                        "key": {
+                          "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                          "version": "0.0.1"
+                        },
+                        "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                        "source": "CDS",
+                        "target": "APEX",
+                        "parameter": {
+                          "entry": [
+                            {
+                              "key": "actionIdentifiers",
+                              "value": {
+                                "key": "actionIdentifiers",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSActionIdentifiersType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "commonHeader",
+                              "value": {
+                                "key": "commonHeader",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "payload",
+                              "value": {
+                                "key": "payload",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "status",
+                              "value": {
+                                "key": "status",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSFailureResponseStatusType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            }
+                          ]
+                        },
+                        "toscaPolicyState": "EXIT_FAILURE"
+                      },
+                      "outputEvents": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_LogEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "DCAE",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "component",
+                                    "value": {
+                                      "key": "component",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventComponentType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "id",
+                                    "value": {
+                                      "key": "id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "otherFields",
+                                    "value": {
+                                      "key": "otherFields",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventOtherFieldsType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "target",
+                                    "value": {
+                                      "key": "target",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventTargetType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          }
+                        ]
+                      },
+                      "taskParameters": {
+                        "entry": []
+                      },
+                      "contextAlbumReference": [
+                        {
+                          "name": "SimpleCL_EventDetailsAlbum",
+                          "version": "0.0.1"
+                        }
+                      ],
+                      "taskLogic": {
+                        "key": "TaskLogic",
+                        "logicFlavour": "JAVASCRIPT",
+                        "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                      }
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "inputEvent": {
+                        "key": {
+                          "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                          "version": "0.0.1"
+                        },
+                        "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                        "source": "CDS",
+                        "target": "APEX",
+                        "parameter": {
+                          "entry": [
+                            {
+                              "key": "actionIdentifiers",
+                              "value": {
+                                "key": "actionIdentifiers",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSActionIdentifiersType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "commonHeader",
+                              "value": {
+                                "key": "commonHeader",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "payload",
+                              "value": {
+                                "key": "payload",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "status",
+                              "value": {
+                                "key": "status",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_CDSSuccessResponseStatusType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            }
+                          ]
+                        },
+                        "toscaPolicyState": "EXIT_SUCCESS"
+                      },
+                      "outputEvents": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_LogEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "DCAE",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "component",
+                                    "value": {
+                                      "key": "component",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventComponentType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "id",
+                                    "value": {
+                                      "key": "id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "otherFields",
+                                    "value": {
+                                      "key": "otherFields",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventOtherFieldsType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "target",
+                                    "value": {
+                                      "key": "target",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventTargetType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          }
+                        ]
+                      },
+                      "taskParameters": {
+                        "entry": []
+                      },
+                      "contextAlbumReference": [
+                        {
+                          "name": "SimpleCL_EventDetailsAlbum",
+                          "version": "0.0.1"
+                        }
+                      ],
+                      "taskLogic": {
+                        "key": "TaskLogic",
+                        "logicFlavour": "JAVASCRIPT",
+                        "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\n\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_SUCCESS\", \"Successfully processed the VES event. Hostname is updated.\")\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                      }
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleAAIFailureResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "inputEvent": {
+                        "key": {
+                          "name": "SimpleCL_AAIFailureResponseEvent",
+                          "version": "0.0.1"
+                        },
+                        "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                        "source": "AAI",
+                        "target": "APEX",
+                        "parameter": {
+                          "entry": [
+                            {
+                              "key": "requestError",
+                              "value": {
+                                "key": "requestError",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_AAIRequestErrorType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            }
+                          ]
+                        },
+                        "toscaPolicyState": "EXIT_FAILURE"
+                      },
+                      "outputEvents": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_LogEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "DCAE",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "component",
+                                    "value": {
+                                      "key": "component",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventComponentType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "id",
+                                    "value": {
+                                      "key": "id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "otherFields",
+                                    "value": {
+                                      "key": "otherFields",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventOtherFieldsType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "target",
+                                    "value": {
+                                      "key": "target",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventTargetType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          }
+                        ]
+                      },
+                      "taskParameters": {
+                        "entry": []
+                      },
+                      "contextAlbumReference": [
+                        {
+                          "name": "SimpleCL_EventDetailsAlbum",
+                          "version": "0.0.1"
+                        }
+                      ],
+                      "taskLogic": {
+                        "key": "TaskLogic",
+                        "logicFlavour": "JAVASCRIPT",
+                        "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar aaiErrorMessage = \"AAI operation failed. Error message from AAI - \" + executor.inFields.get(\"requestError\").get(\"serviceException\").get(\"text\");\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + aaiErrorMessage)\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                      }
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleAAISuccessResponseTask2",
+                        "version": "0.0.1"
+                      },
+                      "inputEvent": {
+                        "key": {
+                          "name": "SimpleCL_AAISuccessResponseEvent",
+                          "version": "0.0.1"
+                        },
+                        "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                        "source": "AAI",
+                        "target": "APEX",
+                        "parameter": {
+                          "entry": [
+                            {
+                              "key": "equip-model",
+                              "value": {
+                                "key": "equip-model",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "equip-type",
+                              "value": {
+                                "key": "equip-type",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "equip-vendor",
+                              "value": {
+                                "key": "equip-vendor",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "frame-id",
+                              "value": {
+                                "key": "frame-id",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "in-maint",
+                              "value": {
+                                "key": "in-maint",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleBooleanType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "ipaddress-v4-oam",
+                              "value": {
+                                "key": "ipaddress-v4-oam",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "nf-role",
+                              "value": {
+                                "key": "nf-role",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "pnf-ipv4-address",
+                              "value": {
+                                "key": "pnf-ipv4-address",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "pnf-name",
+                              "value": {
+                                "key": "pnf-name",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            },
+                            {
+                              "key": "resource-version",
+                              "value": {
+                                "key": "resource-version",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleStringType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            }
+                          ]
+                        },
+                        "toscaPolicyState": ""
+                      },
+                      "outputEvents": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_CDSConfigModifyRequestEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "actionIdentifiers",
+                                    "value": {
+                                      "key": "actionIdentifiers",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSActionIdentifiersType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "commonHeader",
+                                    "value": {
+                                      "key": "commonHeader",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSRequestCommonHeaderType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "payload",
+                                    "value": {
+                                      "key": "payload",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          },
+                          {
+                            "key": "SimpleCL_LogEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "DCAE",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "component",
+                                    "value": {
+                                      "key": "component",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventComponentType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "id",
+                                    "value": {
+                                      "key": "id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "otherFields",
+                                    "value": {
+                                      "key": "otherFields",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventOtherFieldsType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "target",
+                                    "value": {
+                                      "key": "target",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventTargetType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          }
+                        ]
+                      },
+                      "taskParameters": {
+                        "entry": []
+                      },
+                      "contextAlbumReference": [
+                        {
+                          "name": "SimpleCL_EventDetailsAlbum",
+                          "version": "0.0.1"
+                        }
+                      ],
+                      "taskLogic": {
+                        "key": "TaskLogic",
+                        "logicFlavour": "JAVASCRIPT",
+                        "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\nexecutor.logger.info(\"HandleAAISuccessResponseTask extracted context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar otherFieldsMap = eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\");\n\nvar targetEntityName = executor.inFields.get(\"pnf-name\")\nvar logMessage = \"\";\nvar existingHostname = executor.inFields.get(\"pnf-name2\");\nvar hostnameInVesEvent = otherFieldsMap.get(\"hostname\");\n\nvar albumSchemaHelper = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper();\nvar target = albumSchemaHelper.createNewSubInstance(\"target\");\ntarget.put(\"targetType\",  \"PNF\")\nvar entityInfo = albumSchemaHelper.createNewSubInstance(\"entityInfo\");\nentityInfo.put(\"name\",targetEntityName);\ntarget.put(\"entityInfo\", entityInfo);\neventDetailsAlbum.put(\"target\", target);\n\nvar returnVal = true;\nif ((String(hostnameInVesEvent) != \"UNDEFINED\") && (String(existingHostname) != String(hostnameInVesEvent))) {\n    logMessage = \"Hostname available in AAI does not match with the hostname received in the VES Event.\";\n    returnVal = false\n    var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + logMessage)\n    executor.addFieldsToOutput(logEventFields);\n} else {\n    logMessage = \"Received response from AAI successfully. Hostname in AAI matches with the one in Ves event. Going to make the update-config request to CDS.\";\n\n    var commonHeader = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"commonHeader\").createNewInstance();\n    commonHeader.put(\"subRequestId\", albumID.toString());\n    commonHeader.put(\"requestId\", commonEventHeader.get(\"eventId\"));\n    commonHeader.put(\"originatorId\", \"POLICY\");\n\n    var blueprintName = \"controlloop-hostname-update\";\n    var blueprintVersion = \"1.0.4\";\n    var newHostname = \"host\" + Math.random().toString(36).substring(7);\n    eventDetailsAlbum.put(\"generatedHostname\", newHostname);\n\n    var actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"actionIdentifiers\").createNewInstance();\n    actionIdentifiers.put(\"mode\", \"sync\");\n    actionIdentifiers.put(\"blueprintName\", blueprintName);\n    actionIdentifiers.put(\"blueprintVersion\", blueprintVersion);\n    actionIdentifiers.put(\"actionName\", \"update-config\");\n\n    var payloadEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewSubInstance(\"CDSConfigModifyRequestPayloadEntry\");\n    payloadEntry.put(\"hostname\",  newHostname)\n    payloadEntry.put(\"IP\", executor.inFields.get(\"ipaddress-v4-oam\"));\n    payloadEntry.put(\"pnfName\", otherFieldsMap.get(\"pnfName\"));\n\n    var payload = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewInstance();\n    payload.put(\"update_DasH_config_DasH_request\", payloadEntry);\n\n    var cdsRequestEventFields = java.util.HashMap();\n    cdsRequestEventFields.put(\"commonHeader\", commonHeader);\n    cdsRequestEventFields.put(\"actionIdentifiers\", actionIdentifiers);\n    cdsRequestEventFields.put(\"payload\", payload);\n    executor.addFieldsToOutput(cdsRequestEventFields);\n\n    var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"SUCCESS\", logMessage)\n    executor.addFieldsToOutput(logEventFields);\n}\nexecutor.logger.info(executor.outFieldsList);\nreturnVal;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                      }
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_HandleVesEventTask2",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_HandleVesEventTask2",
+                        "version": "0.0.1"
+                      },
+                      "inputEvent": {
+                        "key": {
+                          "name": "SimpleCL_VesEvent",
+                          "version": "0.0.1"
+                        },
+                        "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                        "source": "DCAE",
+                        "target": "APEX",
+                        "parameter": {
+                          "entry": [
+                            {
+                              "key": "event",
+                              "value": {
+                                "key": "event",
+                                "fieldSchemaKey": {
+                                  "name": "SimpleCL_VesEventType",
+                                  "version": "0.0.1"
+                                },
+                                "optional": false
+                              }
+                            }
+                          ]
+                        },
+                        "toscaPolicyState": "ENTRY"
+                      },
+                      "outputEvents": {
+                        "entry": [
+                          {
+                            "key": "SimpleCL_AAIRequestEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_AAIRequestEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "AAI",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "aaifield",
+                                    "value": {
+                                      "key": "aaifield",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          },
+                          {
+                            "key": "SimpleCL_LogEvent",
+                            "value": {
+                              "key": {
+                                "name": "SimpleCL_LogEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "APEX",
+                              "target": "DCAE",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "component",
+                                    "value": {
+                                      "key": "component",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventComponentType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "id",
+                                    "value": {
+                                      "key": "id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "otherFields",
+                                    "value": {
+                                      "key": "otherFields",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventOtherFieldsType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "target",
+                                    "value": {
+                                      "key": "target",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_LogEventTargetType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            }
+                          }
+                        ]
+                      },
+                      "taskParameters": {
+                        "entry": []
+                      },
+                      "contextAlbumReference": [
+                        {
+                          "name": "SimpleCL_EventDetailsAlbum",
+                          "version": "0.0.1"
+                        }
+                      ],
+                      "taskLogic": {
+                        "key": "TaskLogic",
+                        "logicFlavour": "JAVASCRIPT",
+                        "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper().createNewInstance();\nvar returnValue = true;\n\nvar event = executor.inFields.get(\"event\");\nexecutor.logger.info(\"HandleVesEventTask processing VES event - \" + event);\n\nvar commonEventHeader = event.get(\"commonEventHeader\");\nvar otherFields = event.get(\"otherFields\");\n// albumID will be used to fetch info from our album later. Storing event data in album by sourceId / AAI pnf-id, the same will be sent to CDS request payload as subRequestId\nvar albumID = commonEventHeader.get(\"sourceId\");\n// save the event processing start time in apex\ncommonEventHeader.put(\"startEpochMicrosec\", longType(new Date().getTime()));\n//save the incoming event details to album\neventDetailsAlbum.put(\"commonEventHeader\", commonEventHeader);\neventDetailsAlbum.put(\"otherFields\", otherFields);\nexecutor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").put(albumID.toString(), eventDetailsAlbum);\nexecutor.logger.info(\"HandleVesEventTask storing context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nexecutor.getExecutionProperties().setProperty(\"albumId\", albumID);\nexecutor.getExecutionProperties().setProperty(\"pnfName\", otherFields.get(\"hashMap\").get(\"pnfName\"));\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), otherFields.get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"ACTIVE\", \"VES event has been received. Going to fetch details from AAI.\")\n\nexecutor.addFieldsToOutput(logEventFields);\n\nexecutor.logger.info(executor.outFieldsList);\nreturnValue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    // populate logEventFields\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                      }
+                    }
+                  }
+                ]
+              }
+            },
+            "events": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_Events",
+                "version": "0.0.1"
+              },
+              "eventMap": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIFailureResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIFailureResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "AAI",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "requestError",
+                            "value": {
+                              "key": "requestError",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_AAIRequestErrorType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      }
+                    },
+                    "toscaPolicyState": "EXIT_FAILURE"
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIRequestEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIRequestEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "APEX",
+                      "target": "AAI",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "aaifield",
+                            "value": {
+                              "key": "aaifield",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": ""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAISuccessResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAISuccessResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "AAI",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "equip-model",
+                            "value": {
+                              "key": "equip-model",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "equip-type",
+                            "value": {
+                              "key": "equip-type",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "equip-vendor",
+                            "value": {
+                              "key": "equip-vendor",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "frame-id",
+                            "value": {
+                              "key": "frame-id",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "in-maint",
+                            "value": {
+                              "key": "in-maint",
+                              "fieldSchemaKey": {
+                                "name": "SimpleBooleanType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "ipaddress-v4-oam",
+                            "value": {
+                              "key": "ipaddress-v4-oam",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "nf-role",
+                            "value": {
+                              "key": "nf-role",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "pnf-ipv4-address",
+                            "value": {
+                              "key": "pnf-ipv4-address",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "pnf-name",
+                            "value": {
+                              "key": "pnf-name",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "resource-version",
+                            "value": {
+                              "key": "resource-version",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": ""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "CDS",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "actionIdentifiers",
+                            "value": {
+                              "key": "actionIdentifiers",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSActionIdentifiersType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "commonHeader",
+                            "value": {
+                              "key": "commonHeader",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "payload",
+                            "value": {
+                              "key": "payload",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "status",
+                            "value": {
+                              "key": "status",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSFailureResponseStatusType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": "EXIT_FAILURE"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "APEX",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "actionIdentifiers",
+                            "value": {
+                              "key": "actionIdentifiers",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSActionIdentifiersType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "commonHeader",
+                            "value": {
+                              "key": "commonHeader",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSRequestCommonHeaderType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "payload",
+                            "value": {
+                              "key": "payload",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": ""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "CDS",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "actionIdentifiers",
+                            "value": {
+                              "key": "actionIdentifiers",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSActionIdentifiersType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "commonHeader",
+                            "value": {
+                              "key": "commonHeader",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "payload",
+                            "value": {
+                              "key": "payload",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "status",
+                            "value": {
+                              "key": "status",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_CDSSuccessResponseStatusType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": "EXIT_SUCCESS"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "APEX",
+                      "target": "DCAE",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "component",
+                            "value": {
+                              "key": "component",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_LogEventComponentType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "id",
+                            "value": {
+                              "key": "id",
+                              "fieldSchemaKey": {
+                                "name": "SimpleStringType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "otherFields",
+                            "value": {
+                              "key": "otherFields",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_LogEventOtherFieldsType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          },
+                          {
+                            "key": "target",
+                            "value": {
+                              "key": "target",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_LogEventTargetType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": ""
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEvent",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_VesEvent",
+                        "version": "0.0.1"
+                      },
+                      "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                      "source": "DCAE",
+                      "target": "APEX",
+                      "parameter": {
+                        "entry": [
+                          {
+                            "key": "event",
+                            "value": {
+                              "key": "event",
+                              "fieldSchemaKey": {
+                                "name": "SimpleCL_VesEventType",
+                                "version": "0.0.1"
+                              },
+                              "optional": false
+                            }
+                          }
+                        ]
+                      },
+                      "toscaPolicyState": "ENTRY"
+                    }
+                  }
+                ]
+              }
+            },
+            "albums": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_Albums",
+                "version": "0.0.1"
+              },
+              "albums": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleCL_EventDetailsAlbum",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_EventDetailsAlbum",
+                        "version": "0.0.1"
+                      },
+                      "scope": "policy",
+                      "isWritable": true,
+                      "itemSchema": {
+                        "name": "SimpleCL_EventDetailsAlbumType",
+                        "version": "0.0.1"
+                      }
+                    }
+                  }
+                ]
+              }
+            },
+            "schemas": {
+              "key": {
+                "name": "onap.policies.apex.Simplecontrolloop2_Schemas",
+                "version": "0.0.1"
+              },
+              "schemas": {
+                "entry": [
+                  {
+                    "key": {
+                      "name": "SimpleBooleanType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleBooleanType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Java",
+                      "schemaDefinition": "java.lang.Boolean"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_AAIRequestErrorType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_AAIRequestErrorType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n  \"name\": \"AAIRequestErrorType\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"serviceException\",\n      \"type\": {\n        \"name\": \"serviceException\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"messageId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"text\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"variables\",\n            \"type\": {\n              \"type\": \"array\",\n              \"items\": \"string\"\n            }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSActionIdentifiersType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSActionIdentifiersType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSActionIdentifiers_Type\",\n    \"fields\": [\n        {\n            \"name\": \"actionName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintVersion\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"mode\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n  \"type\": \"map\",\n  \"values\": {\n    \"type\": \"record\",\n    \"name\": \"CDSConfigModifyRequestPayloadEntry\",\n    \"fields\": [\n      {\n        \"name\": \"hostname\",\n        \"type\": \"string\"\n      },\n      {\n        \"name\": \"IP\",\n        \"type\": \"string\"\n      },\n      {\n        \"name\": \"pnfName\",\n        \"type\": \"string\"\n      }\n    ]\n  }\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n  \"name\": \"CDSConfigResponsePayloadEntry\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"update_DasH_config_DasH_response\",\n      \"type\": {\n        \"name\": \"update_DasH_config_DasH_response\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n              \"name\": \"execute_DasH_command_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          },\n          {\n              \"name\": \"prepare_DasH_environment_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSFailureResponseStatusType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSFailureResponseStatusType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"errorMessage\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSRequestCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSRequestCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSRequestCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_CDSSuccessResponseStatusType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_CDSSuccessResponseStatusType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"eventType\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_EventDetailsAlbumType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_EventDetailsAlbumType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n  \"name\": \"eventDetails\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"commonEventHeader\",\n      \"type\": {\n        \"name\": \"commonEventHeader\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"domain\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"lastEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"priority\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"reportingEntityName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sequence\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"sourceId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sourceName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"startEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"timeZoneOffset\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"version\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"internalHeaderFields\",\n            \"type\": {\n              \"name\": \"internalHeaderFields\",\n              \"type\": \"record\",\n              \"fields\": []\n            }\n          },\n          {\n            \"name\": \"vesEventListenerVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"otherFields\",\n      \"type\": {\n        \"name\": \"otherFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"hashMap\",\n            \"type\": {\n              \"name\": \"hashMap\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"hostname\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"pnfName\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"pnfId\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"ip\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          },\n          {\n            \"name\": \"otherFieldsVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"target\",\n      \"type\": {\n        \"name\": \"target\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"targetType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"entityInfo\",\n            \"type\": {\n              \"name\": \"entityInfo\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"name\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"generatedHostname\",\n      \"type\": \"string\"\n    }\n  ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventComponentType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventComponentType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n        \"name\": \"component\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"name\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"flavour\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"timestamp\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"status\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"message\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"artifacts\",\n            \"type\": {\n              \"name\": \"artifacts\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"policyName\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"policyVersion\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventOtherFieldsType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventOtherFieldsType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n        \"name\": \"otherFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"useCaseName\",\n            \"type\": \"string\"\n          }\n        ]\n      }"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_LogEventTargetType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_LogEventTargetType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n        \"name\": \"target\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"targetType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"entityInfo\",\n            \"type\": {\n              \"name\": \"entityInfo\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"pnf_DasH_name\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleCL_VesEventType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleCL_VesEventType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Avro",
+                      "schemaDefinition": "{\n   \"name\":\"event\",\n   \"type\":\"record\",\n   \"fields\":[\n      {\n         \"name\":\"commonEventHeader\",\n         \"type\":{\n            \"name\":\"commonEventHeader\",\n            \"type\":\"record\",\n            \"fields\":[\n               {\n                  \"name\":\"domain\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"eventId\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"eventName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"lastEpochMicrosec\",\n                  \"type\":\"long\"\n               },\n               {\n                  \"name\":\"priority\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"reportingEntityName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"sequence\",\n                  \"type\":\"int\"\n               },\n               {\n                  \"name\":\"sourceId\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"sourceName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"startEpochMicrosec\",\n                  \"type\":\"long\"\n               },\n               {\n                  \"name\":\"version\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"internalHeaderFields\",\n                  \"type\":{\n                     \"name\":\"internalHeaderFields\",\n                     \"type\":\"record\",\n                     \"fields\":[\n\n                     ]\n                  }\n               },\n               {\n                  \"name\":\"vesEventListenerVersion\",\n                  \"type\":\"string\"\n               }\n            ]\n         }\n      },\n      {\n         \"name\":\"otherFields\",\n         \"type\":{\n            \"name\":\"otherFields\",\n            \"type\":\"record\",\n            \"fields\":[\n               {\n                  \"name\":\"hashMap\",\n                  \"type\":{\n                     \"name\":\"hashMap\",\n                     \"type\":\"record\",\n                     \"fields\":[\n                        {\n                           \"name\":\"hostname\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"pnfName\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"pnfId\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"ip\",\n                           \"type\":\"string\"\n                        }\n                     ]\n                  }\n               },\n               {\n                  \"name\":\"otherFieldsVersion\",\n                  \"type\":\"string\"\n               }\n            ]\n         }\n      }\n   ]\n}"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleLongType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleLongType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Java",
+                      "schemaDefinition": "java.lang.Long"
+                    }
+                  },
+                  {
+                    "key": {
+                      "name": "SimpleStringType",
+                      "version": "0.0.1"
+                    },
+                    "value": {
+                      "key": {
+                        "name": "SimpleStringType",
+                        "version": "0.0.1"
+                      },
+                      "schemaFlavour": "Java",
+                      "schemaDefinition": "java.lang.String"
+                    }
+                  }
+                ]
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/csit/resources/tests/data/onap.policies.apex.pnf.Test.json b/csit/resources/tests/data/onap.policies.apex.pnf.Test.json
new file mode 100644 (file)
index 0000000..fc9b521
--- /dev/null
@@ -0,0 +1,2920 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "topology_template": {
+    "policies": [
+      {
+        "onap.policies.apex.pnf.Test": {
+          "type": "onap.policies.native.Apex",
+          "type_version": "1.0.0",
+          "name": "onap.policies.apex.pnf.Test",
+          "version": "1.0.0",
+          "properties": {
+            "engineServiceParameters": {
+              "name": "NSOApexEngine",
+              "version": "0.0.1",
+              "id": 45,
+              "instanceCount": 4,
+              "deploymentPort": 12561,
+              "engineParameters": {
+                "executorParameters": {
+                  "JAVASCRIPT": {
+                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                  }
+                },
+                "contextParameters": {
+                  "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                  "schemaParameters": {
+                    "Avro": {
+                      "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
+                    }
+                  }
+                },
+                "taskParameters": [
+                  {
+                    "key": "logUrl",
+                    "value": "http://localhost:8082/topics/apex-cl-mgt"
+                  }
+                ]
+              },
+              "policy_type_impl": {
+                "apexPolicyModel": {
+                  "key": {
+                    "name": "onap.policies.apex.Simplecontrolloop",
+                    "version": "0.0.1"
+                  },
+                  "keyInformation": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_KeyInfo",
+                      "version": "0.0.1"
+                    },
+                    "keyInfoMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleBooleanType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleBooleanType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae",
+                            "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c8a29e27-0a15-354a-84f9-4c7f207e5c81",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "5e843cee-0180-39b9-8989-180b2ffe11c0",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIRequestErrorType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIRequestErrorType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "90291c92-9b27-3cd9-8720-db572419c048",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestErrorType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "7b7e6751-4e0b-389d-98c0-5567bbc0294c",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAISuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAISuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "63d5680c-14ef-3505-8d34-ebb646bba07b",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a84ca97d-6e94-39a2-91f9-59a6c9aa435e",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSActionIdentifiersType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSActionIdentifiersType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0e2ee622-7fd3-3e49-82e2-539c4f5e9624",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSActionIdentifiersType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "e84f8682-ea33-3ad0-8626-8bc4634581fc",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a252f835-2479-38ef-9ef4-20af62725752",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "cfc46ea9-b8c1-38dd-ac9c-304c916daf34",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1e7095d6-a455-3f89-acae-486e35d7e311",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "d22ea83b-695d-3da9-b9f5-41f16ca433bf",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestPayloadType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "e9fe2e40-1f0d-30dd-8b9e-885695878693",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyResponsePayloadType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "5e04fa76-0a17-38a9-8524-23b2d1a23fa5",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "15866380-40f5-3f8e-87d9-13747a36d352",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "2c3d76ce-dd42-32ac-a397-ab418534e1cf",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b99c44da-dae7-3c96-b528-58852537d063",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSFailureResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSFailureResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1db688e2-3afe-3b03-9795-fdbfa80fa240",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseStatusType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSRequestCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSRequestCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "31022456-e85b-3a9b-9ecb-a09691792d3e",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSRequestCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "d6075720-622e-3a0d-827a-aa4580a2f5d7",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSSuccessResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSSuccessResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "948359ff-3308-3ac5-a5ec-6e3c1b9cd4d5",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseStatusType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_EventDetailsAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_EventDetailsAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "63a6fd26-2fd6-3a0e-8a27-49a5d2ea4644",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_EventDetailsAlbumType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a0407d0b-5719-38bf-9529-25ad62ace8c4",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbumType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleAAIFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleAAIFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "28e894dc-4ab8-3469-aab7-d81bd05bb4c9",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAIFailureResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleAAISuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleAAISuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "073f1433-999e-3506-98ad-ef820d2fa7f0",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAISuccessResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleVesEventTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleVesEventTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "afc6ed46-6801-3c85-bb4c-0ab5b0dd4a74",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_HandleVesEventTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "317be184-a01a-3e2d-9ae4-cafaa405de70",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_LogEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventComponentType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventComponentType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "be7fc79b-9b73-381a-8e23-9dd6e6b1233d",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_LogEventComponentType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventOtherFieldsType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventOtherFieldsType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1a082851-49e3-3f4c-b023-c05236cc8389",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_LogEventOtherFieldsType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventTargetType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventTargetType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "cab6cd51-ea7b-3241-a173-ea8a24e29737",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_LogEventTargetType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_VesEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0f57665a-f0a9-314e-ad0a-04c1f5758174",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_VesEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEventHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_VesEventHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ba5d9a46-8cb4-3fbe-84fd-eabba5b7dd4b",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_VesEventHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEventType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_VesEventType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "9fd7a967-57d4-36ef-81e9-c3396f3aa8d1",
+                            "description": "Generated description for concept referred to by key \"SimpleCL_VesEventType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleLongType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleLongType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574",
+                            "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleStringType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleStringType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
+                            "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ecc97b87-f30b-344c-a476-d36501bf5cbd",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_Albums",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_Albums",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1469671a-56dd-3a68-bf6c-77a5cf7a9487",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_Albums:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_Events",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_Events",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "23c4eee4-aba5-36f6-96d6-46f40061bfed",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_Events:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_KeyInfo",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_KeyInfo",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ea9e73ff-483c-3827-896c-6eaa9d69bc6e",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_KeyInfo:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_Policies",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_Policies",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "38c068e5-bb9a-3997-9e50-ec77c66825c8",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_Policies:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_Schemas",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_Schemas",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "38514b27-8b9b-3d06-844a-3aced27deb0a",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_Schemas:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Simplecontrolloop_Tasks",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Simplecontrolloop_Tasks",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0e0387b5-07fa-30e4-8554-eb51d2e18939",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop_Tasks:0.0.1\""
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "policies": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_Policies",
+                      "version": "0.0.1"
+                    },
+                    "policyMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_ReceiveAAIFailureResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "SimpleCL_ReceiveAAIFailureResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "SimpleCL_AAIFailureResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "AAIFailureStateOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                              "localName": "AAIFailureStateOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "SimpleCL_LogEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "outgoingEventReference": [
+                                              {
+                                                "name": "SimpleCL_LogEvent",
+                                                "version": "0.0.1"
+                                              }
+                                            ],
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "SimpleCL_HandleAAIFailureResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "SimpleCL_HandleAAIFailureResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                              "localName": "SimpleCL_AAIFailureResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState",
+                                              "localName": "AAIFailureStateOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "SimpleCL_ReceiveAAIFailureResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_ReceiveAAISuccessResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "SimpleCL_ReceiveAAISuccessResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "SimpleCL_AAISuccessResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "AAISuccessStateOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                              "localName": "AAISuccessStateOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "outgoingEventReference": [
+                                              {
+                                                "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                                "version": "0.0.1"
+                                              },
+                                              {
+                                                "name": "SimpleCL_LogEvent",
+                                                "version": "0.0.1"
+                                              }
+                                            ],
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "SimpleCL_HandleAAISuccessResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "SimpleCL_HandleAAISuccessResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                              "localName": "SimpleCL_AAISuccessResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState",
+                                              "localName": "AAISuccessStateOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "SimpleCL_ReceiveAAISuccessResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "SimpleCL_CDSConfigModifyFailureResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ConfigModifyFailureResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                              "localName": "ConfigModifyFailureResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "SimpleCL_LogEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "outgoingEventReference": [
+                                              {
+                                                "name": "SimpleCL_LogEvent",
+                                                "version": "0.0.1"
+                                              }
+                                            ],
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                              "localName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState",
+                                              "localName": "ConfigModifyFailureResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "SimpleCL_CDSConfigModifyFailureResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "SimpleCL_CDSConfigModifySuccessResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ConfigModifySuccessResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                              "localName": "ConfigModifySuccessResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "SimpleCL_LogEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "outgoingEventReference": [
+                                              {
+                                                "name": "SimpleCL_LogEvent",
+                                                "version": "0.0.1"
+                                              }
+                                            ],
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                              "localName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState",
+                                              "localName": "ConfigModifySuccessResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "SimpleCL_CDSConfigModifySuccessResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEventHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "SimpleCL_VesEventHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_ReceiveVesState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "SimpleCL_VesEventHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "SimpleCL_ReceiveVesState"
+                                    },
+                                    "trigger": {
+                                      "name": "SimpleCL_VesEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "VesOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveVesState",
+                                              "localName": "VesOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "SimpleCL_AAIRequestEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "outgoingEventReference": [
+                                              {
+                                                "name": "SimpleCL_AAIRequestEvent",
+                                                "version": "0.0.1"
+                                              },
+                                              {
+                                                "name": "SimpleCL_LogEvent",
+                                                "version": "0.0.1"
+                                              }
+                                            ],
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "SimpleCL_HandleVesEventTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "SimpleCL_HandleVesEventTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "SimpleCL_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveVesState",
+                                              "localName": "SimpleCL_VesEventHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "SimpleCL_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "SimpleCL_ReceiveVesState",
+                                              "localName": "VesOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "SimpleCL_ReceiveVesState"
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "tasks": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_Tasks",
+                      "version": "0.0.1"
+                    },
+                    "taskMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputEvent": {
+                              "key": {
+                                "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "CDS",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "actionIdentifiers",
+                                    "value": {
+                                      "key": "actionIdentifiers",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSActionIdentifiersType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "commonHeader",
+                                    "value": {
+                                      "key": "commonHeader",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "payload",
+                                    "value": {
+                                      "key": "payload",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "status",
+                                    "value": {
+                                      "key": "status",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSFailureResponseStatusType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": "EXIT_FAILURE"
+                            },
+                            "outputEvents": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_LogEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_LogEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "DCAE",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "component",
+                                          "value": {
+                                            "key": "component",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventComponentType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "id",
+                                          "value": {
+                                            "key": "id",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "otherFields",
+                                          "value": {
+                                            "key": "otherFields",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventOtherFieldsType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "target",
+                                          "value": {
+                                            "key": "target",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventTargetType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "SimpleCL_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputEvent": {
+                              "key": {
+                                "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "CDS",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "actionIdentifiers",
+                                    "value": {
+                                      "key": "actionIdentifiers",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSActionIdentifiersType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "commonHeader",
+                                    "value": {
+                                      "key": "commonHeader",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "payload",
+                                    "value": {
+                                      "key": "payload",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "status",
+                                    "value": {
+                                      "key": "status",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_CDSSuccessResponseStatusType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": "EXIT_SUCCESS"
+                            },
+                            "outputEvents": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_LogEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_LogEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "DCAE",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "component",
+                                          "value": {
+                                            "key": "component",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventComponentType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "id",
+                                          "value": {
+                                            "key": "id",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "otherFields",
+                                          "value": {
+                                            "key": "otherFields",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventOtherFieldsType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "target",
+                                          "value": {
+                                            "key": "target",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventTargetType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "SimpleCL_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\n\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_SUCCESS\", \"Successfully processed the VES event. Hostname is updated.\")\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleAAIFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleAAIFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputEvent": {
+                              "key": {
+                                "name": "SimpleCL_AAIFailureResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "AAI",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "requestError",
+                                    "value": {
+                                      "key": "requestError",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_AAIRequestErrorType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": "EXIT_FAILURE"
+                            },
+                            "outputEvents": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_LogEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_LogEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "DCAE",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "component",
+                                          "value": {
+                                            "key": "component",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventComponentType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "id",
+                                          "value": {
+                                            "key": "id",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "otherFields",
+                                          "value": {
+                                            "key": "otherFields",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventOtherFieldsType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "target",
+                                          "value": {
+                                            "key": "target",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventTargetType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "SimpleCL_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar aaiErrorMessage = \"AAI operation failed. Error message from AAI - \" + executor.inFields.get(\"requestError\").get(\"serviceException\").get(\"text\");\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + aaiErrorMessage)\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleAAISuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleAAISuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputEvent": {
+                              "key": {
+                                "name": "SimpleCL_AAISuccessResponseEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "AAI",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "equip-model",
+                                    "value": {
+                                      "key": "equip-model",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "equip-type",
+                                    "value": {
+                                      "key": "equip-type",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "equip-vendor",
+                                    "value": {
+                                      "key": "equip-vendor",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "frame-id",
+                                    "value": {
+                                      "key": "frame-id",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "in-maint",
+                                    "value": {
+                                      "key": "in-maint",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleBooleanType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "ipaddress-v4-oam",
+                                    "value": {
+                                      "key": "ipaddress-v4-oam",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "nf-role",
+                                    "value": {
+                                      "key": "nf-role",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "pnf-ipv4-address",
+                                    "value": {
+                                      "key": "pnf-ipv4-address",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "pnf-name",
+                                    "value": {
+                                      "key": "pnf-name",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  },
+                                  {
+                                    "key": "resource-version",
+                                    "value": {
+                                      "key": "resource-version",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleStringType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": ""
+                            },
+                            "outputEvents": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_CDSConfigModifyRequestEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "APEX",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "actionIdentifiers",
+                                          "value": {
+                                            "key": "actionIdentifiers",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_CDSActionIdentifiersType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "commonHeader",
+                                          "value": {
+                                            "key": "commonHeader",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_CDSRequestCommonHeaderType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "payload",
+                                          "value": {
+                                            "key": "payload",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                },
+                                {
+                                  "key": "SimpleCL_LogEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_LogEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "DCAE",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "component",
+                                          "value": {
+                                            "key": "component",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventComponentType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "id",
+                                          "value": {
+                                            "key": "id",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "otherFields",
+                                          "value": {
+                                            "key": "otherFields",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventOtherFieldsType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "target",
+                                          "value": {
+                                            "key": "target",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventTargetType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "SimpleCL_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\nexecutor.logger.info(\"HandleAAISuccessResponseTask extracted context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar otherFieldsMap = eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\");\n\nvar targetEntityName = executor.inFields.get(\"pnf-name\")\nvar logMessage = \"\";\nvar existingHostname = executor.inFields.get(\"pnf-name2\");\nvar hostnameInVesEvent = otherFieldsMap.get(\"hostname\");\n\nvar albumSchemaHelper = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper();\nvar target = albumSchemaHelper.createNewSubInstance(\"target\");\ntarget.put(\"targetType\",  \"PNF\")\nvar entityInfo = albumSchemaHelper.createNewSubInstance(\"entityInfo\");\nentityInfo.put(\"name\",targetEntityName);\ntarget.put(\"entityInfo\", entityInfo);\neventDetailsAlbum.put(\"target\", target);\n\nvar returnVal = true;\nif ((String(hostnameInVesEvent) != \"UNDEFINED\") && (String(existingHostname) != String(hostnameInVesEvent))) {\n    logMessage = \"Hostname available in AAI does not match with the hostname received in the VES Event.\";\n    returnVal = false\n    var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + logMessage)\n    executor.addFieldsToOutput(logEventFields);\n} else {\n    logMessage = \"Received response from AAI successfully. Hostname in AAI matches with the one in Ves event. Going to make the update-config request to CDS.\";\n\n    var commonHeader = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"commonHeader\").createNewInstance();\n    commonHeader.put(\"subRequestId\", albumID.toString());\n    commonHeader.put(\"requestId\", commonEventHeader.get(\"eventId\"));\n    commonHeader.put(\"originatorId\", \"POLICY\");\n\n    var blueprintName = \"controlloop-hostname-update\";\n    var blueprintVersion = \"1.0.4\";\n    var newHostname = \"host\" + Math.random().toString(36).substring(7);\n    eventDetailsAlbum.put(\"generatedHostname\", newHostname);\n\n    var actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"actionIdentifiers\").createNewInstance();\n    actionIdentifiers.put(\"mode\", \"sync\");\n    actionIdentifiers.put(\"blueprintName\", blueprintName);\n    actionIdentifiers.put(\"blueprintVersion\", blueprintVersion);\n    actionIdentifiers.put(\"actionName\", \"update-config\");\n\n    var payloadEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewSubInstance(\"CDSConfigModifyRequestPayloadEntry\");\n    payloadEntry.put(\"hostname\",  newHostname)\n    payloadEntry.put(\"IP\", executor.inFields.get(\"ipaddress-v4-oam\"));\n    payloadEntry.put(\"pnfName\", otherFieldsMap.get(\"pnfName\"));\n\n    var payload = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewInstance();\n    payload.put(\"update_DasH_config_DasH_request\", payloadEntry);\n\n    var cdsRequestEventFields = java.util.HashMap();\n    cdsRequestEventFields.put(\"commonHeader\", commonHeader);\n    cdsRequestEventFields.put(\"actionIdentifiers\", actionIdentifiers);\n    cdsRequestEventFields.put(\"payload\", payload);\n    executor.addFieldsToOutput(cdsRequestEventFields);\n\n    var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"SUCCESS\", logMessage)\n    executor.addFieldsToOutput(logEventFields);\n}\nexecutor.logger.info(executor.outFieldsList);\nreturnVal;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_HandleVesEventTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_HandleVesEventTask",
+                              "version": "0.0.1"
+                            },
+                            "inputEvent": {
+                              "key": {
+                                "name": "SimpleCL_VesEvent",
+                                "version": "0.0.1"
+                              },
+                              "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                              "source": "DCAE",
+                              "target": "APEX",
+                              "parameter": {
+                                "entry": [
+                                  {
+                                    "key": "event",
+                                    "value": {
+                                      "key": "event",
+                                      "fieldSchemaKey": {
+                                        "name": "SimpleCL_VesEventType",
+                                        "version": "0.0.1"
+                                      },
+                                      "optional": false
+                                    }
+                                  }
+                                ]
+                              },
+                              "toscaPolicyState": "ENTRY"
+                            },
+                            "outputEvents": {
+                              "entry": [
+                                {
+                                  "key": "SimpleCL_AAIRequestEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_AAIRequestEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "AAI",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "aaifield",
+                                          "value": {
+                                            "key": "aaifield",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                },
+                                {
+                                  "key": "SimpleCL_LogEvent",
+                                  "value": {
+                                    "key": {
+                                      "name": "SimpleCL_LogEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                                    "source": "APEX",
+                                    "target": "DCAE",
+                                    "parameter": {
+                                      "entry": [
+                                        {
+                                          "key": "component",
+                                          "value": {
+                                            "key": "component",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventComponentType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "id",
+                                          "value": {
+                                            "key": "id",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleStringType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "otherFields",
+                                          "value": {
+                                            "key": "otherFields",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventOtherFieldsType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        },
+                                        {
+                                          "key": "target",
+                                          "value": {
+                                            "key": "target",
+                                            "fieldSchemaKey": {
+                                              "name": "SimpleCL_LogEventTargetType",
+                                              "version": "0.0.1"
+                                            },
+                                            "optional": false
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "toscaPolicyState": ""
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "SimpleCL_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper().createNewInstance();\nvar returnValue = true;\n\nvar event = executor.inFields.get(\"event\");\nexecutor.logger.info(\"HandleVesEventTask processing VES event - \" + event);\n\nvar commonEventHeader = event.get(\"commonEventHeader\");\nvar otherFields = event.get(\"otherFields\");\n// albumID will be used to fetch info from our album later. Storing event data in album by sourceId / AAI pnf-id, the same will be sent to CDS request payload as subRequestId\nvar albumID = commonEventHeader.get(\"sourceId\");\n// save the event processing start time in apex\ncommonEventHeader.put(\"startEpochMicrosec\", longType(new Date().getTime()));\n//save the incoming event details to album\neventDetailsAlbum.put(\"commonEventHeader\", commonEventHeader);\neventDetailsAlbum.put(\"otherFields\", otherFields);\nexecutor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").put(albumID.toString(), eventDetailsAlbum);\nexecutor.logger.info(\"HandleVesEventTask storing context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nexecutor.getExecutionProperties().setProperty(\"albumId\", albumID);\nexecutor.getExecutionProperties().setProperty(\"pnfName\", otherFields.get(\"hashMap\").get(\"pnfName\"));\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), otherFields.get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"ACTIVE\", \"VES event has been received. Going to fetch details from AAI.\")\n\nexecutor.addFieldsToOutput(logEventFields);\n\nexecutor.logger.info(executor.outFieldsList);\nreturnValue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n    // populate logEventFields\n    var timestamp = longType(new Date().getTime());\n    var logEventFields = java.util.HashMap();\n    logEventFields.put(\"id\", eventId);\n    \n    var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n    entityInfo.put(\"pnf_DasH_name\", pnfName);\n    var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n    target.put(\"entityInfo\", entityInfo);\n    target.put(\"targetType\", targetType)\n    logEventFields.put(\"target\", target);\n    \n    var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n    artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop\");\n    artifacts.put(\"policyVersion\", \"1.0.0\");\n    var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n    component.put(\"artifacts\", artifacts);\n    component.put(\"name\", \"Policy\")\n    component.put(\"flavour\", \"Apex-PDP\")\n    component.put(\"timestamp\", timestamp)\n    component.put(\"status\", status)\n    component.put(\"message\", message)\n    logEventFields.put(\"component\", component);\n    \n    var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n    otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n    logEventFields.put(\"otherFields\", otherFieldsEntry);\n    \n    return logEventFields;\n}"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "events": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_Events",
+                      "version": "0.0.1"
+                    },
+                    "eventMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "AAI",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "requestError",
+                                  "value": {
+                                    "key": "requestError",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_AAIRequestErrorType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          },
+                          "toscaPolicyState": "EXIT_FAILURE"
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "APEX",
+                            "target": "AAI",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "aaifield",
+                                  "value": {
+                                    "key": "aaifield",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAISuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAISuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "AAI",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "equip-model",
+                                  "value": {
+                                    "key": "equip-model",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "equip-type",
+                                  "value": {
+                                    "key": "equip-type",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "equip-vendor",
+                                  "value": {
+                                    "key": "equip-vendor",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "frame-id",
+                                  "value": {
+                                    "key": "frame-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "in-maint",
+                                  "value": {
+                                    "key": "in-maint",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleBooleanType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "ipaddress-v4-oam",
+                                  "value": {
+                                    "key": "ipaddress-v4-oam",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "nf-role",
+                                  "value": {
+                                    "key": "nf-role",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "pnf-ipv4-address",
+                                  "value": {
+                                    "key": "pnf-ipv4-address",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "pnf-name",
+                                  "value": {
+                                    "key": "pnf-name",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "resource-version",
+                                  "value": {
+                                    "key": "resource-version",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSFailureResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_FAILURE"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "APEX",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSRequestCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifySuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_CDSSuccessResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_SUCCESS"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "APEX",
+                            "target": "DCAE",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "component",
+                                  "value": {
+                                    "key": "component",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_LogEventComponentType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "id",
+                                  "value": {
+                                    "key": "id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "otherFields",
+                                  "value": {
+                                    "key": "otherFields",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_LogEventOtherFieldsType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "target",
+                                  "value": {
+                                    "key": "target",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_LogEventTargetType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_VesEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.simplecontrolloop",
+                            "source": "DCAE",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "event",
+                                  "value": {
+                                    "key": "event",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleCL_VesEventType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "ENTRY"
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "albums": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_Albums",
+                      "version": "0.0.1"
+                    },
+                    "albums": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleCL_EventDetailsAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_EventDetailsAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "policy",
+                            "isWritable": true,
+                            "itemSchema": {
+                              "name": "SimpleCL_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "schemas": {
+                    "key": {
+                      "name": "onap.policies.apex.Simplecontrolloop_Schemas",
+                      "version": "0.0.1"
+                    },
+                    "schemas": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "SimpleBooleanType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleBooleanType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Boolean"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_AAIRequestErrorType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_AAIRequestErrorType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"AAIRequestErrorType\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"serviceException\",\n      \"type\": {\n        \"name\": \"serviceException\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"messageId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"text\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"variables\",\n            \"type\": {\n              \"type\": \"array\",\n              \"items\": \"string\"\n            }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSActionIdentifiersType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSActionIdentifiersType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSActionIdentifiers_Type\",\n    \"fields\": [\n        {\n            \"name\": \"actionName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintVersion\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"mode\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyRequestPayloadType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"type\": \"map\",\n  \"values\": {\n    \"type\": \"record\",\n    \"name\": \"CDSConfigModifyRequestPayloadEntry\",\n    \"fields\": [\n      {\n        \"name\": \"hostname\",\n        \"type\": \"string\"\n      },\n      {\n        \"name\": \"IP\",\n        \"type\": \"string\"\n      },\n      {\n        \"name\": \"pnfName\",\n        \"type\": \"string\"\n      }\n    ]\n  }\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSConfigModifyResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"CDSConfigResponsePayloadEntry\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"update_DasH_config_DasH_response\",\n      \"type\": {\n        \"name\": \"update_DasH_config_DasH_response\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n              \"name\": \"execute_DasH_command_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          },\n          {\n              \"name\": \"prepare_DasH_environment_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSFailureResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSFailureResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSFailureResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"errorMessage\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSRequestCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSRequestCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSRequestCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSSuccessResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_CDSSuccessResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_CDSSuccessResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"eventType\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_EventDetailsAlbumType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"eventDetails\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"commonEventHeader\",\n      \"type\": {\n        \"name\": \"commonEventHeader\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"domain\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"lastEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"priority\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"reportingEntityName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sequence\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"sourceId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sourceName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"startEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"timeZoneOffset\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"version\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"internalHeaderFields\",\n            \"type\": {\n              \"name\": \"internalHeaderFields\",\n              \"type\": \"record\",\n              \"fields\": []\n            }\n          },\n          {\n            \"name\": \"vesEventListenerVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"otherFields\",\n      \"type\": {\n        \"name\": \"otherFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"hashMap\",\n            \"type\": {\n              \"name\": \"hashMap\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"hostname\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"pnfName\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"pnfId\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"ip\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          },\n          {\n            \"name\": \"otherFieldsVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"target\",\n      \"type\": {\n        \"name\": \"target\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"targetType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"entityInfo\",\n            \"type\": {\n              \"name\": \"entityInfo\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"name\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"generatedHostname\",\n      \"type\": \"string\"\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventComponentType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventComponentType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n        \"name\": \"component\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"name\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"flavour\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"timestamp\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"status\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"message\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"artifacts\",\n            \"type\": {\n              \"name\": \"artifacts\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"policyName\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"name\": \"policyVersion\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventOtherFieldsType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventOtherFieldsType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n        \"name\": \"otherFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"useCaseName\",\n            \"type\": \"string\"\n          }\n        ]\n      }"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_LogEventTargetType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_LogEventTargetType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n        \"name\": \"target\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"targetType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"entityInfo\",\n            \"type\": {\n              \"name\": \"entityInfo\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"pnf_DasH_name\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleCL_VesEventType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleCL_VesEventType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n   \"name\":\"event\",\n   \"type\":\"record\",\n   \"fields\":[\n      {\n         \"name\":\"commonEventHeader\",\n         \"type\":{\n            \"name\":\"commonEventHeader\",\n            \"type\":\"record\",\n            \"fields\":[\n               {\n                  \"name\":\"domain\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"eventId\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"eventName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"lastEpochMicrosec\",\n                  \"type\":\"long\"\n               },\n               {\n                  \"name\":\"priority\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"reportingEntityName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"sequence\",\n                  \"type\":\"int\"\n               },\n               {\n                  \"name\":\"sourceId\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"sourceName\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"startEpochMicrosec\",\n                  \"type\":\"long\"\n               },\n               {\n                  \"name\":\"version\",\n                  \"type\":\"string\"\n               },\n               {\n                  \"name\":\"internalHeaderFields\",\n                  \"type\":{\n                     \"name\":\"internalHeaderFields\",\n                     \"type\":\"record\",\n                     \"fields\":[\n\n                     ]\n                  }\n               },\n               {\n                  \"name\":\"vesEventListenerVersion\",\n                  \"type\":\"string\"\n               }\n            ]\n         }\n      },\n      {\n         \"name\":\"otherFields\",\n         \"type\":{\n            \"name\":\"otherFields\",\n            \"type\":\"record\",\n            \"fields\":[\n               {\n                  \"name\":\"hashMap\",\n                  \"type\":{\n                     \"name\":\"hashMap\",\n                     \"type\":\"record\",\n                     \"fields\":[\n                        {\n                           \"name\":\"hostname\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"pnfName\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"pnfId\",\n                           \"type\":\"string\"\n                        },\n                        {\n                           \"name\":\"ip\",\n                           \"type\":\"string\"\n                        }\n                     ]\n                  }\n               },\n               {\n                  \"name\":\"otherFieldsVersion\",\n                  \"type\":\"string\"\n               }\n            ]\n         }\n      }\n   ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleLongType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleLongType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Long"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleStringType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleStringType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.String"
+                          }
+                        }
+                      ]
+                    }
+                  }
+                }
+              }
+            },
+            "eventInputParameters": {
+              "SimpleCL_DCAEConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "KAFKA",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                  "parameters": {
+                    "bootstrapServers": "kafka:9092",
+                    "groupId": "apex-grp",
+                    "enableAutoCommit": true,
+                    "autoCommitTime": 1000,
+                    "sessionTimeout": 30000,
+                    "consumerPollTime": 100,
+                    "consumerTopicList": [
+                      "unauthenticated.dcae_cl_output"
+                    ],
+                    "keyDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                    "valueDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                    "kafkaProperties": [
+
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_VesEvent"
+              },
+              "SimpleCL_AAIResponseConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://aai-sim:6666/aai/v16/network/pnfs/pnf/{pnfName}",
+                    "httpMethod": "GET",
+                    "httpCodeFilter": "[2-5][0-1][0-9]",
+                    "httpHeaders": [
+                      [
+                        "Accept",
+                        "application/json"
+                      ],
+                      [
+                        "Content-Type",
+                        "application/json"
+                      ],
+                      [
+                        "X-FromAppId",
+                        "dcae-curl"
+                      ],
+                      [
+                        "x-transactionId",
+                        "9998"
+                      ],
+                      [
+                        "Authorization",
+                        "Basic QUFJOkFBSQ=="
+                      ]
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_AAISuccessResponseEvent|SimpleCL_AAIFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_AAIProducer",
+                "requestorTimeout": 2000
+              },
+              "SimpleCL_CDSConfigModifyResponseConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_CDSConfigModifySuccessResponseEvent|SimpleCL_CDSConfigModifyFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_CDSConfigModifyRequestProducer",
+                "requestorTimeout": 500
+              }
+            },
+            "eventOutputParameters": {
+              "SimpleCL_AAIProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_AAIRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_AAIResponseConsumer",
+                "requestorTimeout": 2000
+              },
+              "SimpleCL_CDSConfigModifyRequestProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
+                  "parameters": {
+                    "host": "grpc-sim",
+                    "port": 6680,
+                    "username": "ccsdkapps",
+                    "password": "ccsdkapps",
+                    "timeout": 60
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_CDSConfigModifyRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_CDSConfigModifyResponseConsumer",
+                "requestorTimeout": 500
+              },
+              "SimpleCL_logOutputter": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "KAFKA",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                  "parameters": {
+                    "bootstrapServers": "kafka:9092",
+                    "acks": "all",
+                    "retries": 0,
+                    "batchSize": 16384,
+                    "lingerTime": 1,
+                    "bufferMemory": 33554432,
+                    "producerTopic": "apex-cl-mgt",
+                    "keySerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                    "valueSerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                    "kafkaProperties": [
+
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_LogEvent"
+              }
+            }
+          }
+        }
+      }
+    ]
+  }
+}
diff --git a/csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json b/csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
new file mode 100644 (file)
index 0000000..d9cd87e
--- /dev/null
@@ -0,0 +1,189 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "topology_template": {
+    "policies": [
+      {
+        "onap.policies.apex.pnf.metadataSet.Test": {
+          "type": "onap.policies.native.Apex",
+          "type_version": "1.0.0",
+          "name": "onap.policies.apex.pnf.metadataSet.Test",
+          "version": "1.0.0",
+          "metadata": {
+            "metadataSetName": "apex.metadata.pnf",
+            "metadataSetVersion": "1.0.0"
+          },
+          "properties": {
+            "engineServiceParameters": {
+              "name": "NSOApexEngine",
+              "version": "0.0.1",
+              "id": 45,
+              "instanceCount": 4,
+              "deploymentPort": 12561,
+              "engineParameters": {
+                "executorParameters": {
+                  "JAVASCRIPT": {
+                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                  }
+                },
+                "contextParameters": {
+                  "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                  "schemaParameters": {
+                    "Avro": {
+                      "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
+                    }
+                  }
+                },
+                "taskParameters": [
+                  {
+                    "key": "logUrl",
+                    "value": "http://kafka:9092/topics/apex-cl-mgt2"
+                  }
+                ]
+              }
+            },
+            "eventInputParameters": {
+              "SimpleCL_DCAEConsumer2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "KAFKA",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                  "parameters": {
+                    "bootstrapServers": "kafka:9092",
+                    "groupId": "apex-grp2",
+                    "enableAutoCommit": true,
+                    "autoCommitTime": 1000,
+                    "sessionTimeout": 30000,
+                    "consumerPollTime": 100,
+                    "consumerTopicList": [
+                      "unauthenticated.dcae_cl_output"
+                    ],
+                    "keyDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                    "valueDeserializer": "org.apache.kafka.common.serialization.StringDeserializer",
+                    "kafkaProperties": [
+
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_VesEvent"
+              },
+              "SimpleCL_AAIResponseConsumer2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://aai-sim:6666/aai/v16/network/pnfs/pnf/{pnfName}",
+                    "httpMethod": "GET",
+                    "httpCodeFilter": "[2-5][0-1][0-9]",
+                    "httpHeaders": [
+                      [
+                        "Accept",
+                        "application/json"
+                      ],
+                      [
+                        "Content-Type",
+                        "application/json"
+                      ],
+                      [
+                        "X-FromAppId",
+                        "dcae-curl"
+                      ],
+                      [
+                        "x-transactionId",
+                        "9998"
+                      ],
+                      [
+                        "Authorization",
+                        "Basic QUFJOkFBSQ=="
+                      ]
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_AAISuccessResponseEvent|SimpleCL_AAIFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_AAIProducer2",
+                "requestorTimeout": 2000
+              },
+              "SimpleCL_CDSConfigModifyResponseConsumer2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "SimpleCL_CDSConfigModifySuccessResponseEvent|SimpleCL_CDSConfigModifyFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_CDSConfigModifyRequestProducer2",
+                "requestorTimeout": 500
+              }
+            },
+            "eventOutputParameters": {
+              "SimpleCL_AAIProducer2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_AAIRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_AAIResponseConsumer2",
+                "requestorTimeout": 2000
+              },
+              "SimpleCL_CDSConfigModifyRequestProducer2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
+                  "parameters": {
+                    "host": "grpc-sim",
+                    "port": 6680,
+                    "username": "ccsdkapps",
+                    "password": "ccsdkapps",
+                    "timeout": 60
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_CDSConfigModifyRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "SimpleCL_CDSConfigModifyResponseConsumer2",
+                "requestorTimeout": 500
+              },
+              "SimpleCL_logOutputter2": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "KAFKA",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters",
+                  "parameters": {
+                    "bootstrapServers": "kafka:9092",
+                    "acks": "all",
+                    "retries": 0,
+                    "batchSize": 16384,
+                    "lingerTime": 1,
+                    "bufferMemory": 33554432,
+                    "producerTopic": "apex-cl-mgt2",
+                    "keySerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                    "valueSerializer": "org.apache.kafka.common.serialization.StringSerializer",
+                    "kafkaProperties": [
+
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "SimpleCL_LogEvent"
+              }
+            }
+          }
+        }
+      }
+    ]
+  }
+}
diff --git a/csit/resources/tests/data/onap.policies.apex.vnf.Test.json b/csit/resources/tests/data/onap.policies.apex.vnf.Test.json
new file mode 100644 (file)
index 0000000..7886f84
--- /dev/null
@@ -0,0 +1,3198 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "topology_template": {
+    "policies": [
+      {
+        "onap.policies.apex.vnf.Test": {
+          "type": "onap.policies.native.Apex",
+          "type_version": "1.0.0",
+          "name": "onap.policies.apex.vnf.Test",
+          "version": "1.0.0",
+          "properties": {
+            "engineServiceParameters": {
+              "name": "NSOApexEngine",
+              "version": "0.0.1",
+              "id": 45,
+              "instanceCount": 5,
+              "deploymentPort": 12561,
+              "engineParameters": {
+                "executorParameters": {
+                  "JAVASCRIPT": {
+                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                  }
+                },
+                "contextParameters": {
+                  "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+                  "schemaParameters": {
+                    "Avro": {
+                      "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
+                    }
+                  }
+                },
+                "taskParameters": [
+                  {
+                    "key": "logUrl",
+                    "value": "http://message-router:3904/events/APEX-CL-MGT"
+                  }
+                ]
+              },
+              "policy_type_impl": {
+                "apexPolicyModel": {
+                  "key": {
+                    "name": "onap.policies.apex.Example",
+                    "version": "0.0.1"
+                  },
+                  "keyInformation": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_KeyInfo",
+                      "version": "0.0.1"
+                    },
+                    "keyInfoMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "fc0c1892-a2ae-3678-818f-b9b23939b241",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAIFailureResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ba931e7e-aee9-3af8-98d8-16b92a909e8a",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAIFailureResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIRequestErrorType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIRequestErrorType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b4dd59c5-0169-3810-800c-1396c2206de4",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAIRequestErrorType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "599c297e-96c8-3b21-ad1c-e643bddeacbf",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAIRequestEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAISuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAISuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b5e3f122-2dcd-3cdf-a0ec-8210b3f80478",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAISuccessResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAISuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAISuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "15504e23-78c5-305e-9fce-cf1f50e75013",
+                            "description": "Generated description for concept referred to by key \"ApexExample_AAISuccessResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSActionIdentifiersType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSActionIdentifiersType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "e2715e7d-835e-32c7-b433-a2e92bcad6ee",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSActionIdentifiersType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b492e841-2c03-36a9-9ec2-dda5852152c3",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ef4e45f4-1181-3121-a3b6-507126df25e7",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "91cb711a-0c73-3f51-83e6-fca9c547c71d",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "dda3c648-dc8b-38e0-855d-9cb72397f957",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyRequestEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "96b306bd-6dee-3d47-981c-eaac316d5ae1",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyResponsePayloadType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1b65abfb-ce35-3765-9b9c-d2ee02bef28b",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "4dac3de7-3817-396f-91d6-ce701d162877",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "92dc9e6b-2082-3d90-ba5e-f2dba18b72b6",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a6801c93-f15b-3158-ba33-7760197d3609",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSFailureResponseCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSFailureResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSFailureResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "e2da0a15-c542-3e77-874d-4512e9b4162e",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSFailureResponseStatusType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRequestCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRequestCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "f54edff0-532f-3142-8e65-a5c9d67888ef",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRequestCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRequestPayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRequestPayloadType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b967dc44-a156-32d3-a796-f03dbf74316c",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRequestPayloadType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "f2aa4552-069d-3db8-8638-2d1f59124e7a",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c2e3b07f-2c09-3195-9527-6b3ab0666d61",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a7c28cc1-9fe5-30b7-9dd8-5a4f7f7d811e",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "d01d1022-48ac-391d-904d-282ccb063f8a",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartRequestEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ad8cbd94-6eb5-3743-8a7d-42cbe49a5320",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartResponsePayloadType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartSuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "bbb06330-9161-392e-a0ca-a6bb5e3376af",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "70c6c6e5-00da-30cb-8ec0-14437d657f39",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartSuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "77f16151-80b5-304c-a448-19d8528feed1",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "2f17aee2-fbdf-3c41-a779-f9c17b5bda5b",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSSuccessResponseCommonHeaderType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSSuccessResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSSuccessResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8c554852-3ed6-3027-a0d3-fccd2db19875",
+                            "description": "Generated description for concept referred to by key \"ApexExample_CDSSuccessResponseStatusType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_EventDetailsAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_EventDetailsAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b402baca-915b-3952-97fc-d9899f9ca81c",
+                            "description": "Generated description for concept referred to by key \"ApexExample_EventDetailsAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_EventDetailsAlbumType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3626f32a-eee6-3254-b3d4-e4829518c381",
+                            "description": "Generated description for concept referred to by key \"ApexExample_EventDetailsAlbumType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleAAIFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleAAIFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "87abb453-a919-3131-8ffb-3e5c910c6049",
+                            "description": "Generated description for concept referred to by key \"ApexExample_HandleAAIFailureResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleAAISuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleAAISuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8881e644-3cca-3aec-8201-312ca6f719e0",
+                            "description": "Generated description for concept referred to by key \"ApexExample_HandleAAISuccessResponseTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleVesEventTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleVesEventTask",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "057f6ddd-d6aa-3ce2-a060-d344de16d7f3",
+                            "description": "Generated description for concept referred to by key \"ApexExample_HandleVesEventTask:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_LogStatusEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_LogStatusEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "4867b1e7-a819-3b9f-be2b-a97fe6019827",
+                            "description": "Generated description for concept referred to by key \"ApexExample_LogStatusEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VesEvent",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "975b3071-b775-3617-a888-f831fe5a31db",
+                            "description": "Generated description for concept referred to by key \"ApexExample_VesEvent:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEventHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VesEventHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ad9efe17-a03e-3b64-8e8a-51e144f57d2c",
+                            "description": "Generated description for concept referred to by key \"ApexExample_VesEventHandlerPolicy:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEventType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VesEventType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0054393c-10df-3214-af86-cb04a23325bf",
+                            "description": "Generated description for concept referred to by key \"ApexExample_VesEventType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VnfRelationShipListType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VnfRelationShipListType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "865a5903-201b-34ff-918b-2bfdde743576",
+                            "description": "Generated description for concept referred to by key \"ApexExample_VnfRelationShipListType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleBooleanType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleBooleanType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae",
+                            "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleLongType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleLongType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574",
+                            "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleStringType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleStringType",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
+                            "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b2501730-8870-3475-b22a-4a4d22792ebb",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_Albums",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_Albums",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "7dc5f49d-c291-38de-bcae-1db30d00581f",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Albums:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_Events",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_Events",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "06b3112b-ae8b-3f37-8aa6-f539c0250550",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Events:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_KeyInfo",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_KeyInfo",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "454848e1-43ac-3ce4-bfdc-b9b6271dc563",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_KeyInfo:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_Policies",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_Policies",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "24c3fca5-b0dd-398c-83ee-66a187296b32",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Policies:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_Schemas",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_Schemas",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c6aff774-f50a-329d-a731-9c23a6e7e02e",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Schemas:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "onap.policies.apex.Example_Tasks",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "onap.policies.apex.Example_Tasks",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "f856a6df-6237-3acc-aa68-f55e64cc0ec9",
+                            "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Tasks:0.0.1\""
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "policies": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_Policies",
+                      "version": "0.0.1"
+                    },
+                    "policyMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_AAIFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_ReceiveAAIFailureResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_ReceiveAAIFailureResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_AAIFailureResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_AAIFailureStateOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState",
+                                              "localName": "ApexExample_AAIFailureStateOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_LogStatusEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_HandleAAIFailureResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_HandleAAIFailureResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState",
+                                              "localName": "ApexExample_AAIFailureResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState",
+                                              "localName": "ApexExample_AAIFailureStateOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_ReceiveAAIFailureResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAISuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_AAISuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_ReceiveAAISuccessResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_ReceiveAAISuccessResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_AAISuccessResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_AAISuccessStateOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState",
+                                              "localName": "ApexExample_AAISuccessStateOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_CDSConfigModifyRequestEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_HandleAAISuccessResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_HandleAAISuccessResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState",
+                                              "localName": "ApexExample_AAISuccessResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState",
+                                              "localName": "ApexExample_AAISuccessStateOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_ReceiveAAISuccessResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_CDSConfigModifyFailureResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_CDSConfigModifyFailureResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_CDSConfigModifyFailureResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_ConfigModifyFailureResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState",
+                                              "localName": "ApexExample_ConfigModifyFailureResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_LogStatusEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState",
+                                              "localName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState",
+                                              "localName": "ApexExample_ConfigModifyFailureResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_CDSConfigModifyFailureResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_CDSConfigModifySuccessResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_CDSConfigModifySuccessResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_CDSConfigModifySuccessResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_ConfigModifySuccessResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState",
+                                              "localName": "ApexExample_ConfigModifySuccessResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_CDSRestartRequestEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState",
+                                              "localName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState",
+                                              "localName": "ApexExample_ConfigModifySuccessResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_CDSConfigModifySuccessResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_CDSRestartFailureResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_CDSRestartFailureResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_CDSRestartFailureResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_RestartFailureResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartFailureResponseState",
+                                              "localName": "ApexExample_RestartFailureResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_LogStatusEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_CDSRestartFailureResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_CDSRestartFailureResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartFailureResponseState",
+                                              "localName": "ApexExample_CDSRestartFailureResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartFailureResponseState",
+                                              "localName": "ApexExample_RestartFailureResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_CDSRestartFailureResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_CDSRestartSuccessResponseState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_CDSRestartSuccessResponseState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_CDSRestartSuccessResponseEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_RestartSuccessResponseOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartSuccessResponseState",
+                                              "localName": "ApexExample_RestartSuccessResponseOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_LogStatusEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_CDSRestartSuccessResponseTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_CDSRestartSuccessResponseTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartSuccessResponseState",
+                                              "localName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_CDSRestartSuccessResponseState",
+                                              "localName": "ApexExample_RestartSuccessResponseOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_CDSRestartSuccessResponseState"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEventHandlerPolicy",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "ApexExample_VesEventHandlerPolicy",
+                              "version": "0.0.1"
+                            },
+                            "template": "Freestyle",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "ApexExample_ReceiveVesState",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "ApexExample_VesEventHandlerPolicy",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "ApexExample_ReceiveVesState"
+                                    },
+                                    "trigger": {
+                                      "name": "ApexExample_VesEvent",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "ApexExample_VesOutput",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveVesState",
+                                              "localName": "ApexExample_VesOutput"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "ApexExample_AAIRequestEvent",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [],
+                                    "taskSelectionLogic": {
+                                      "key": "NULL",
+                                      "logicFlavour": "UNDEFINED",
+                                      "logic": ""
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "ApexExample_HandleVesEventTask",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "ApexExample_HandleVesEventTask",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "ApexExample_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveVesState",
+                                              "localName": "ApexExample_VesEventHandlerPolicy"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "ApexExample_VesEventHandlerPolicy",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "ApexExample_ReceiveVesState",
+                                              "localName": "ApexExample_VesOutput"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "ApexExample_ReceiveVesState"
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "tasks": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_Tasks",
+                      "version": "0.0.1"
+                    },
+                    "taskMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "message",
+                                  "value": {
+                                    "key": "message",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nerrorMessage = errorMessage.replace(/\"/g, '\\\\\\\"')\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime());\nvar faultFields = eventDetailsAlbum.get(\"faultFields\");\nvar vnfDetails = eventDetailsAlbum.get(\"vnfDetails\");\nvar commonHeader = executor.subject.getOutFieldSchemaHelper(\"commonHeader\").createNewInstance();\ncommonHeader.put(\"subRequestId\", commonEventHeader.get(\"eventId\"));\ncommonHeader.put(\"requestId\", uuidType.randomUUID().toString());\ncommonHeader.put(\"originatorId\", \"POLICY\");\n\nvar actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"actionIdentifiers\").createNewInstance();\nactionIdentifiers.put(\"mode\", \"sync\");\nactionIdentifiers.put(\"blueprintName\", \"apex-example-cba\");\nactionIdentifiers.put(\"blueprintVersion\", \"1.0.0\");\nactionIdentifiers.put(\"actionName\", \"restart\");\n\nvar payloadProperties = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_properties_record\");\npayloadProperties.put(\"service_DasH_instance_DoT_service_DasH_instance_DasH_id\",  vnfDetails.get(\"service-id\").toString())\npayloadProperties.put(\"generic_DasH_vnf_DoT_vnf_DasH_id\",  vnfDetails.get(\"vnf-name\").toString())\nvar dataRecord = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_data_record\");\ndataRecord.put(\"active_DasH_streams\",\"7\")\npayloadProperties.put(\"data\", dataRecord)\nvar payloadEntry = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"CDSRequestPayloadEntry\");\npayloadEntry.put(\"update_DasH_properties\", payloadProperties)\npayloadEntry.put(\"vfStatus\", faultFields.get(\"vfStatus\"))\nvar payload = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewInstance();\npayload.put(\"restart_DasH_request\", payloadEntry);\n\nexecutor.outFields.put(\"commonHeader\", commonHeader);\nexecutor.outFields.put(\"actionIdentifiers\", actionIdentifiers);\nexecutor.outFields.put(\"payload\", payload);\n\nexecutor.logger.info(+executor.outFields);\n\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"SUCCESS\", \"ConfigModify request is successful. Sending restart request to CDS.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRestartResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "message",
+                                  "value": {
+                                    "key": "message",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartSuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRestartResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "message",
+                                  "value": {
+                                    "key": "message",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar timestamp = longType(new Date().getTime());\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_SUCCESS\", \"Successfully processed the VES Event. Restart is complete.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleAAIFailureResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleAAIFailureResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "requestError",
+                                  "value": {
+                                    "key": "requestError",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_AAIRequestErrorType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "message",
+                                  "value": {
+                                    "key": "message",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\n\nvar aaiErrorMessage = \"AAI operation failed. Error message from AAI - \" + executor.inFields.get(\"requestError\").get(\"serviceException\").get(\"text\");\nvar timestamp = longType(new Date().getTime());\n\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + aaiErrorMessage)\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleAAISuccessResponseTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleAAISuccessResponseTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "in-maint",
+                                  "value": {
+                                    "key": "in-maint",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleBooleanType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "is-closed-loop-disabled",
+                                  "value": {
+                                    "key": "is-closed-loop-disabled",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleBooleanType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-customization-id",
+                                  "value": {
+                                    "key": "model-customization-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-invariant-id",
+                                  "value": {
+                                    "key": "model-invariant-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-version-id",
+                                  "value": {
+                                    "key": "model-version-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "orchestration-status",
+                                  "value": {
+                                    "key": "orchestration-status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "prov-status",
+                                  "value": {
+                                    "key": "prov-status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "relationship-list",
+                                  "value": {
+                                    "key": "relationship-list",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_VnfRelationShipListType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "resource-version",
+                                  "value": {
+                                    "key": "resource-version",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "service-id",
+                                  "value": {
+                                    "key": "service-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-id",
+                                  "value": {
+                                    "key": "vnf-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-name",
+                                  "value": {
+                                    "key": "vnf-name",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-type",
+                                  "value": {
+                                    "key": "vnf-type",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\n\nvar vnfDetails = executor.inFields;\nexecutor.logger.info(\"ApexExample_HandleAAISuccessResponseTask processing event - \" + vnfDetails);\neventDetailsAlbum.put(\"vnfDetails\", vnfDetails);\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar faultFields = eventDetailsAlbum.get(\"faultFields\");\n\nvar commonHeader = executor.subject.getOutFieldSchemaHelper(\"commonHeader\").createNewInstance();\ncommonHeader.put(\"subRequestId\", commonEventHeader.get(\"eventId\"));\ncommonHeader.put(\"requestId\", uuidType.randomUUID().toString());\ncommonHeader.put(\"originatorId\", \"POLICY\");\n\nvar actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"actionIdentifiers\").createNewInstance();\nactionIdentifiers.put(\"mode\", \"sync\");\nactionIdentifiers.put(\"blueprintName\", \"apex-example-cba\");\nactionIdentifiers.put(\"blueprintVersion\", \"1.0.0\");\nactionIdentifiers.put(\"actionName\", \"modify-config\");\n\nvar payloadProperties = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_properties_record\");\npayloadProperties.put(\"service_DasH_instance_DoT_service_DasH_instance_DasH_id\",  vnfDetails.get(\"service-id\").toString())\npayloadProperties.put(\"generic_DasH_vnf_DoT_vnf_DasH_id\",  vnfDetails.get(\"vnf-id\").toString())\nvar dataRecord = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_data_record\");\ndataRecord.put(\"active_DasH_streams\",\"7\")\npayloadProperties.put(\"data\", dataRecord)\nvar payloadEntry = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"CDSRequestPayloadEntry\");\npayloadEntry.put(\"update_DasH_properties\", payloadProperties)\npayloadEntry.put(\"vfStatus\", faultFields.get(\"vfStatus\"))\nvar payload = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewInstance();\nvar payloadSchemaHelper = executor.subject.getOutFieldSchemaHelper(\"payload\");\npayload.put(\"modify_DasH_config_DasH_request\", payloadEntry);\n\n//always use the executor.stringify2json method instead of JSON.strngify\nexecutor.logger.info(\"CDS modify config request payload - \" + executor.stringify2Json(payload, payloadSchemaHelper));\n\nexecutor.outFields.put(\"commonHeader\", commonHeader);\nexecutor.outFields.put(\"actionIdentifiers\", actionIdentifiers);\nexecutor.outFields.put(\"payload\", payload);\nvar timestamp = longType(new Date().getTime());\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"SUCCESS\", \"VNF details are received from AAI successfully. Sending ConfigModify request to CDS.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_HandleVesEventTask",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_HandleVesEventTask",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "event",
+                                  "value": {
+                                    "key": "event",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_VesEventType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "aaifield",
+                                  "value": {
+                                    "key": "aaifield",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": []
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ApexExample_EventDetailsAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").getSchemaHelper().createNewInstance();\nvar returnValue = true;\n\nvar event = executor.inFields.get(\"event\");\nexecutor.logger.info(\"ApexExample_HandleVesEventTask processing VES event - \" + event);\n\nvar commonEventHeader = event.get(\"commonEventHeader\");\nvar faultFields = event.get(\"faultFields\");\n\n//albumID will be used to fetch info from our album later\nvar albumID = commonEventHeader.get(\"sourceId\");\n\n// save the event processing start time in apex\ncommonEventHeader.put(\"startEpochMicrosec\", longType(new Date().getTime()));\n//save the incoming fault event details to album\neventDetailsAlbum.put(\"commonEventHeader\", commonEventHeader)\neventDetailsAlbum.put(\"faultFields\", faultFields)\nexecutor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").put(albumID.toString(), eventDetailsAlbum);\n\nexecutor.getExecutionProperties().setProperty(\"albumId\", albumID);\nexecutor.getExecutionProperties().setProperty(\"vnf-name\", eventDetailsAlbum.get(\"commonEventHeader\").get(\"sourceName\"));\n\nvar timestamp = longType(new Date().getTime());\nsend(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), \"VNF\", eventDetailsAlbum.get(\"commonEventHeader\").get(\"sourceId\"), timestamp, \"ACTIVE\", \"VES event has been received. Going to fetch VNF details from AAI.\")\n\nexecutor.logger.info(executor.outFields);\nreturnValue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n    var logData = '{'\n       +'\"id\" : \"' + id + '\",'\n       +'\"target\"  : {'\n            +'\"targetType\"  : \"' + targetType + '\",'\n            +'\"entityInfo\"  : {'\n                +'\"id\"  : \"' + targetId + '\"'\n            +'}'\n       +'},'\n       +'\"component\"  : {'\n            +'\"name\"  : \"Policy\",'\n            +'\"flavour\"  : \"Apex-PDP\",'\n            +'\"timestamp\"  : ' + timestamp + ','\n            +'\"status\"  : \"' + status + '\",'\n            +'\"message\"  : \"' + message + '\",'\n            +'\"artifacts\"  : {'\n                +'\"policyName\"  : \"onap.policies.apex.Example\",'\n                +'\"policyVersion\"  : \"1.0.0\"'\n            +'}'\n       +'},'\n       +'\"otherFields\"  : {'\n            +'\"useCaseName\"  : \"apex-pdp-policy-example\"'\n       +'}'\n    +'}';\n\n    executor.logger.info(\"sending the status to log.\");\n    fireLogEvent(logData);\n}\n\n\nfunction fireLogEvent(logEvent){\n    var headers = new HashMapType();\n    executor.logger.info(\"LogEvent:\"+logEvent);\n    var response = new org.onap.policy.rest.RestManager().post(\n            executor.getParameters().get(\"logUrl\"),\n            \"\",\n            \"\",\n            headers,\n            \"application/json\",\n            logEvent\n    );\n    executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n    return response;\n}"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "events": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_Events",
+                      "version": "0.0.1"
+                    },
+                    "eventMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "AAI",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "requestError",
+                                  "value": {
+                                    "key": "requestError",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_AAIRequestErrorType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_FAILURE"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "APEX",
+                            "target": "AAI",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "aaifield",
+                                  "value": {
+                                    "key": "aaifield",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_AAISuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAISuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "AAI",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "in-maint",
+                                  "value": {
+                                    "key": "in-maint",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleBooleanType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "is-closed-loop-disabled",
+                                  "value": {
+                                    "key": "is-closed-loop-disabled",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleBooleanType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-customization-id",
+                                  "value": {
+                                    "key": "model-customization-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-invariant-id",
+                                  "value": {
+                                    "key": "model-invariant-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "model-version-id",
+                                  "value": {
+                                    "key": "model-version-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "orchestration-status",
+                                  "value": {
+                                    "key": "orchestration-status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "prov-status",
+                                  "value": {
+                                    "key": "prov-status",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "relationship-list",
+                                  "value": {
+                                    "key": "relationship-list",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_VnfRelationShipListType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "resource-version",
+                                  "value": {
+                                    "key": "resource-version",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "service-id",
+                                  "value": {
+                                    "key": "service-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-id",
+                                  "value": {
+                                    "key": "vnf-id",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-name",
+                                  "value": {
+                                    "key": "vnf-name",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "vnf-type",
+                                  "value": {
+                                    "key": "vnf-type",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_FAILURE"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "APEX",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifySuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifySuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartFailureResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartFailureResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRestartResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSFailureResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_FAILURE"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartRequestEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartRequestEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "APEX",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRequestPayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartSuccessResponseEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartSuccessResponseEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "CDS",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "actionIdentifiers",
+                                  "value": {
+                                    "key": "actionIdentifiers",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSActionIdentifiersType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "commonHeader",
+                                  "value": {
+                                    "key": "commonHeader",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "payload",
+                                  "value": {
+                                    "key": "payload",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSRestartResponsePayloadType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "status",
+                                  "value": {
+                                    "key": "status",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_CDSSuccessResponseStatusType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "EXIT_SUCCESS"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_LogStatusEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_LogStatusEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "APEX",
+                            "target": "DCAE",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "message",
+                                  "value": {
+                                    "key": "message",
+                                    "fieldSchemaKey": {
+                                      "name": "SimpleStringType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": ""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEvent",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VesEvent",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.example",
+                            "source": "DCAE",
+                            "target": "APEX",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "event",
+                                  "value": {
+                                    "key": "event",
+                                    "fieldSchemaKey": {
+                                      "name": "ApexExample_VesEventType",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "toscaPolicyState": "ENTRY"
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "albums": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_Albums",
+                      "version": "0.0.1"
+                    },
+                    "albums": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_EventDetailsAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_EventDetailsAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "policy",
+                            "isWritable": true,
+                            "itemSchema": {
+                              "name": "ApexExample_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "schemas": {
+                    "key": {
+                      "name": "onap.policies.apex.Example_Schemas",
+                      "version": "0.0.1"
+                    },
+                    "schemas": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ApexExample_AAIRequestErrorType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_AAIRequestErrorType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"AAIRequestErrorType\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"serviceException\",\n      \"type\": {\n        \"name\": \"serviceException\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"messageId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"text\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"variables\",\n            \"type\": {\n              \"type\": \"array\",\n              \"items\": \"string\"\n            }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSActionIdentifiersType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSActionIdentifiersType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSActionIdentifiers_Type\",\n    \"fields\": [\n        {\n            \"name\": \"actionName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"blueprintVersion\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"mode\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSConfigModifyResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"CDSConfigResponsePayloadEntry\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"modify_DasH_config_DasH_response\",\n      \"type\": {\n        \"name\": \"modify_DasH_config_DasH_response\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n              \"name\": \"execute_DasH_command_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          },\n          {\n              \"name\": \"prepare_DasH_environment_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSFailureResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSFailureResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSFailureResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"errorMessage\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRequestCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRequestCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSRequestCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRequestPayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRequestPayloadType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"type\": \"map\",\n  \"values\": {\n    \"type\": \"record\",\n    \"name\": \"CDSRequestPayloadEntry\",\n    \"fields\": [\n      {\n        \"name\": \"vfStatus\",\n        \"type\": \"string\"\n      },\n      {\n        \"name\": \"update_DasH_properties\",\n        \"type\": {\n          \"name\": \"update_DasH_properties_record\",\n          \"type\": \"record\",\n          \"fields\": [\n            {\n              \"name\": \"service_DasH_instance_DoT_service_DasH_instance_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"generic_DasH_vnf_DoT_vnf_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"data\",\n              \"type\": {\n                \"name\": \"update_DasH_data_record\",\n                \"type\": \"record\",\n                \"fields\": [\n                    {\n                        \"name\": \"active_DasH_streams\",\n                        \"type\": \"string\"\n                    }\n                ]\n            }\n            }\n          ]\n        }\n      }\n    ]\n  }\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSRestartResponsePayloadType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSRestartResponsePayloadType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"CDSRestartResponsePayloadEntry\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"restart_DasH_response\",\n      \"type\": {\n        \"name\": \"restart_DasH_response\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n              \"name\": \"execute_DasH_command_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          },\n          {\n              \"name\": \"prepare_DasH_environment_DasH_logs\",\n              \"type\": {\n                \"type\": \"array\",\n                \"items\": \"string\"\n              }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSSuccessResponseCommonHeaderType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseCommonHeader_Type\",\n    \"fields\": [\n        {\n            \"name\": \"originatorId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"subRequestId\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_CDSSuccessResponseStatusType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_CDSSuccessResponseStatusType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"CDSResponseStatus_Type\",\n    \"fields\": [\n        {\n            \"name\": \"code\",\n            \"type\": \"int\"\n        },\n        {\n            \"name\": \"eventType\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"timestamp\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_EventDetailsAlbumType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_EventDetailsAlbumType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"eventDetails\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"commonEventHeader\",\n      \"type\": {\n        \"name\": \"commonEventHeader\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"domain\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"lastEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"priority\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"reportingEntityName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sequence\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"sourceId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sourceName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"startEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"timeZoneOffset\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"version\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"vesEventListenerVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"faultFields\",\n      \"type\": {\n        \"name\": \"faultFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"alarmAdditionalInformation\",\n            \"type\": {\n              \"name\": \"alarmAdditionalInformation\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"PilotNumberPoolSize\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          },\n          {\n            \"name\": \"alarmCondition\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventSeverity\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventSourceType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"faultFieldsVersion\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"specificProblem\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"vfStatus\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"vnfDetails\",\n      \"type\": {\n        \"name\": \"vnfDetails\",\n          \"type\": \"record\",\n          \"fields\": [\n            {\n              \"name\": \"vnf_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"vnf_DasH_name\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"vnf_DasH_type\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"service_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"prov_DasH_status\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"orchestration_DasH_status\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"in_DasH_maint\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"name\": \"is_DasH_closed_DasH_loop_DasH_disabled\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"name\": \"resource_DasH_version\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"model_DasH_invariant_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"model_DasH_version_DasH_id\",\n              \"type\": \"string\"\n            },\n            {\n              \"name\": \"model_DasH_customization_DasH_id\",\n              \"type\": \"string\"\n            }\n          ]\n        }\n    },\n    {\n      \"name\": \"target\",\n      \"type\": {\n        \"name\": \"target\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"targetType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"entityInfo\",\n            \"type\": {\n              \"name\": \"entityInfo\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"name\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VesEventType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VesEventType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"event\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"commonEventHeader\",\n      \"type\": {\n        \"name\": \"commonEventHeader\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"domain\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"lastEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"priority\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"reportingEntityName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sequence\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"sourceId\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"sourceName\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"startEpochMicrosec\",\n            \"type\": \"long\"\n          },\n          {\n            \"name\": \"timeZoneOffset\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"version\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"vesEventListenerVersion\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"faultFields\",\n      \"type\": {\n        \"name\": \"faultFields\",\n        \"type\": \"record\",\n        \"fields\": [\n          {\n            \"name\": \"alarmAdditionalInformation\",\n            \"type\": {\n              \"name\": \"alarmAdditionalInformation\",\n              \"type\": \"record\",\n              \"fields\": [\n                {\n                  \"name\": \"PilotNumberPoolSize\",\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          },\n          {\n            \"name\": \"alarmCondition\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventSeverity\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"eventSourceType\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"faultFieldsVersion\",\n            \"type\": \"int\"\n          },\n          {\n            \"name\": \"specificProblem\",\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"vfStatus\",\n            \"type\": \"string\"\n          }\n        ]\n      }\n    }\n  ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ApexExample_VnfRelationShipListType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ApexExample_VnfRelationShipListType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Avro",
+                            "schemaDefinition": "{\n  \"name\": \"VnfRelationShipListType\",\n    \"type\": \"record\",\n    \"fields\": [\n          {\n            \"name\": \"relationship\",\n            \"type\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"name\": \"relationship_record\",\n                \"type\": \"record\",\n                \"fields\": [\n                  {\n                    \"name\": \"related_DasH_to\",\n                    \"type\": \"string\"\n                  },\n                  {\n                    \"name\": \"relationship_DasH_label\",\n                    \"type\": \"string\"\n                  },\n                  {\n                    \"name\": \"related_DasH_link\",\n                    \"type\": \"string\"\n                  },\n                  {\n                    \"name\": \"relationship_DasH_data\",\n                    \"type\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"name\": \"relationship_DasH_data_record\",\n                        \"type\": \"record\",\n                        \"fields\": [\n                          {\n                            \"name\": \"relationship_DasH_key\",\n                            \"type\": \"string\"\n                          },\n                          {\n                            \"name\": \"relationship_DasH_value\",\n                            \"type\": \"string\"\n                          }\n                        ]\n                      }\n                    }\n                  },\n                  {\n                    \"name\": \"related_DasH_to_DasH_property\",\n                    \"type\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"name\": \"related_DasH_to_DasH_property_record\",\n                        \"type\": \"record\",\n                        \"fields\": [\n                          {\n                            \"name\": \"property_DasH_key\",\n                            \"type\": \"string\"\n                          },\n                          {\n                            \"name\": \"property_DasH_value\",\n                            \"type\": \"string\"\n                          }\n                        ]\n                      }\n                    }\n                  }\n                ]\n              }\n            }\n          }\n        ]\n}"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleBooleanType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleBooleanType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Boolean"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleLongType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleLongType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Long"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SimpleStringType",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SimpleStringType",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.String"
+                          }
+                        }
+                      ]
+                    }
+                  }
+                }
+              }
+            },
+            "eventInputParameters": {
+              "ApexExample_DCAEConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTCLIENT",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://message-router:3904/events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT/ApexExampleCG1/1?timeout=30000"
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "ApexExample_VesEvent"
+              },
+              "ApexExample_AAIResponseConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+                  "parameters": {
+                    "url": "http://aai-sim:6666/aai/v16/network/generic-vnfs/generic-vnf?vnf-name={vnf-name}",
+                    "httpMethod": "GET",
+                    "httpCodeFilter": "[245][0-9][0-9]",
+                    "httpHeaders": [
+                      [
+                        "Accept",
+                        "application/json"
+                      ],
+                      [
+                        "Content-Type",
+                        "application/json"
+                      ],
+                      [
+                        "X-FromAppId",
+                        "dcae-curl"
+                      ],
+                      [
+                        "x-transactionId",
+                        "9998"
+                      ],
+                      [
+                        "Authorization",
+                        "Basic QUFJOkFBSQ=="
+                      ]
+                    ]
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "ApexExample_AAISuccessResponseEvent|ApexExample_AAIFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_AAIProducer",
+                "requestorTimeout": 2000
+              },
+              "ApexExample_CDSConfigModifyResponseConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "ApexExample_CDSConfigModifySuccessResponseEvent|ApexExample_CDSConfigModifyFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_CDSConfigModifyRequestProducer",
+                "requestorTimeout": 500
+              },
+              "ApexExample_CDSRestartResponseConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventName": "ApexExample_CDSRestartSuccessResponseEvent|ApexExample_CDSRestartFailureResponseEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_CDSRestartRequestProducer",
+                "requestorTimeout": 500
+              }
+            },
+            "eventOutputParameters": {
+              "ApexExample_AAIProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTREQUESTOR",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "ApexExample_AAIRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_AAIResponseConsumer",
+                "requestorTimeout": 2000
+              },
+              "ApexExample_CDSConfigModifyRequestProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
+                  "parameters": {
+                    "host": "grpc-sim",
+                    "port": 6680,
+                    "username": "ccsdkapps",
+                    "password": "ccsdkapps",
+                    "timeout": 10
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "ApexExample_CDSConfigModifyRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_CDSConfigModifyResponseConsumer",
+                "requestorTimeout": 500
+              },
+              "ApexExample_CDSRestartRequestProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "GRPC",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
+                  "parameters": {
+                    "host": "grpc-sim",
+                    "port": 6680,
+                    "username": "ccsdkapps",
+                    "password": "ccsdkapps",
+                    "timeout": 10
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "eventNameFilter": "ApexExample_CDSRestartRequestEvent",
+                "requestorMode": true,
+                "requestorPeer": "ApexExample_CDSRestartResponseConsumer",
+                "requestorTimeout": 500
+              }
+            }
+          }
+        }
+      }
+    ]
+  }
+}
diff --git a/csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json b/csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json
new file mode 100644 (file)
index 0000000..d90ae08
--- /dev/null
@@ -0,0 +1,7436 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "topology_template": {
+    "policies": [
+      {
+        "onap.policies.native.apex.Sampledomain": {
+          "type": "onap.policies.native.Apex",
+          "type_version": "1.0.0",
+          "version": "1.0.0",
+          "name": "onap.policies.native.apex.Sampledomain",
+          "properties": {
+            "engineServiceParameters": {
+              "name": "MyApexEngine",
+              "version": "0.0.1",
+              "id": 45,
+              "instanceCount": 4,
+              "deploymentPort": 12561,
+              "policy_type_impl": {
+                "apexPolicyModel": {
+                  "key": {
+                    "name": "SamplePolicyModelJAVASCRIPT",
+                    "version": "0.0.1"
+                  },
+                  "keyInformation": {
+                    "key": {
+                      "name": "KeyInformation",
+                      "version": "0.0.1"
+                    },
+                    "keyInfoMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "Context",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Context",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ca36bfd8-6042-3633-8c85-89c66507c3bf",
+                            "description": "Generated description for concept referred to by key \"Context:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0000",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0000",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "465a81cc-885f-3a4d-bc4e-1508da92b236",
+                            "description": "Generated description for concept referred to by key \"Event0000:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0001",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0001",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "36b2d570-fff7-3a4b-bab2-6bf492f5129a",
+                            "description": "Generated description for concept referred to by key \"Event0001:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0002",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0002",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ff6160a7-fb5e-379c-a6d2-2cd28053eacf",
+                            "description": "Generated description for concept referred to by key \"Event0002:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0003",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0003",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "5899e216-2abf-3781-abc4-2c257b92721e",
+                            "description": "Generated description for concept referred to by key \"Event0003:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0004",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0004",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "7c2692a7-4587-3d09-abf9-d96b339a316f",
+                            "description": "Generated description for concept referred to by key \"Event0004:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0100",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0100",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b696048c-c0b0-34c1-8dbe-32ab6c8bc0c7",
+                            "description": "Generated description for concept referred to by key \"Event0100:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0101",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0101",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "edbfa868-2ab2-30fd-8078-4c7f67ca6122",
+                            "description": "Generated description for concept referred to by key \"Event0101:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0102",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0102",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "6b6ad2ff-ef63-3f7b-aabb-fba44f8de9d4",
+                            "description": "Generated description for concept referred to by key \"Event0102:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0103",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0103",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c2550912-10d9-3000-8826-377288cd6cb1",
+                            "description": "Generated description for concept referred to by key \"Event0103:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0104",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0104",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "f6d75b71-c8a7-3337-a121-88d68c389f5a",
+                            "description": "Generated description for concept referred to by key \"Event0104:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Events",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Events",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0215644c-4531-375c-8335-d558b4de8c03",
+                            "description": "Generated description for concept referred to by key \"Events:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "ExternalContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ExternalContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "976a79e7-5c80-3c03-9503-da3f41fec395",
+                            "description": "Generated description for concept referred to by key \"ExternalContextAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "GlobalContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "GlobalContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c95e9e5f-d2c7-3ac7-a205-ea3574530cb7",
+                            "description": "Generated description for concept referred to by key \"GlobalContextAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "KeyInformation",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "KeyInformation",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "1ff2f905-685c-3caf-95bc-0bbc90345888",
+                            "description": "Generated description for concept referred to by key \"KeyInformation:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policies",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policies",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "f54c3b2b-be76-31c4-adfc-87c494c06808",
+                            "description": "Generated description for concept referred to by key \"Policies:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy0",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3410e939-30ca-32c4-a2d8-c30b6fee6eec",
+                            "description": "Generated description for concept referred to by key \"Policy0:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy0ContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy0ContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "e27564c4-3cbf-3db2-9bf3-83ae80a2f907",
+                            "description": "Generated description for concept referred to by key \"Policy0ContextAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy1",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "d0b2b585-f344-33b8-af9e-250e7f4cfbce",
+                            "description": "Generated description for concept referred to by key \"Policy1:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy1ContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy1ContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "815d74ae-6fc0-3221-87b9-2bb1dfdfa7f0",
+                            "description": "Generated description for concept referred to by key \"Policy1ContextAlbum:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "SamplePolicyModelJAVASCRIPT",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "SamplePolicyModelJAVASCRIPT",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "bc8ee312-81ce-3c4a-92d5-4a73b8077148",
+                            "description": "Generated description for concept referred to by key \"SamplePolicyModelJAVASCRIPT:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act0",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0589ff20-adcc-3ce5-95fe-8d7978ed54ed",
+                            "description": "Generated description for concept referred to by key \"Task_Act0:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act1",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "095b126d-ca8b-32c9-ad52-d744e817a79c",
+                            "description": "Generated description for concept referred to by key \"Task_Act1:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act2",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3d786b4c-d9ee-3367-ab71-c67271a4ea2f",
+                            "description": "Generated description for concept referred to by key \"Task_Act2:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act3",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "9231753e-20c5-3436-982f-9100340cc570",
+                            "description": "Generated description for concept referred to by key \"Task_Act3:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide0",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "502383d3-483f-3a56-a426-2f0406674c8d",
+                            "description": "Generated description for concept referred to by key \"Task_Decide0:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide1",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "16598106-41c8-3b5a-99c6-5fcf6d1a5ddf",
+                            "description": "Generated description for concept referred to by key \"Task_Decide1:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide2",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "ad3a89f5-e369-3c66-b22c-669f7b3653b8",
+                            "description": "Generated description for concept referred to by key \"Task_Decide2:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide3",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "56815939-1164-3867-9ed1-0a27ff8aafb3",
+                            "description": "Generated description for concept referred to by key \"Task_Decide3:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish0",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0db0c566-ecd7-3e27-9865-4b82c893abdb",
+                            "description": "Generated description for concept referred to by key \"Task_Establish0:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish1",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "6944a4c1-6201-317c-8d7e-eaa7f2ee0ea0",
+                            "description": "Generated description for concept referred to by key \"Task_Establish1:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish2",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0f766ea9-11cd-3e7d-a8c8-28c8dee6a85a",
+                            "description": "Generated description for concept referred to by key \"Task_Establish2:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish3",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "c3237a38-cc6d-3418-b1e1-0dc8b4bdcc66",
+                            "description": "Generated description for concept referred to by key \"Task_Establish3:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match0",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "051bcfd5-cf73-3c89-8ee7-ea6e005ec059",
+                            "description": "Generated description for concept referred to by key \"Task_Match0:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match1",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3754fe19-98f2-34a1-9f45-db31052208d8",
+                            "description": "Generated description for concept referred to by key \"Task_Match1:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match2",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8c200709-a180-3c8b-916f-275ff49ce194",
+                            "description": "Generated description for concept referred to by key \"Task_Match2:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match3",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a1a879c6-4510-33b0-bbd0-ad6256189a37",
+                            "description": "Generated description for concept referred to by key \"Task_Match3:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Tasks",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Tasks",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "a7fab96b-ce1c-37ce-bbb2-556b6db524a5",
+                            "description": "Generated description for concept referred to by key \"Tasks:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestCase",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestCase",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0a652886-c88d-3f8c-8994-ae9161e7c963",
+                            "description": "Generated description for concept referred to by key \"TestCase:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem000",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem000",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "8efba9fa-371e-33df-a7d6-88b0284e7fd0",
+                            "description": "Generated description for concept referred to by key \"TestContextItem000:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem001",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem001",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3740077c-a2b3-356b-81dc-5ded2118a951",
+                            "description": "Generated description for concept referred to by key \"TestContextItem001:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem002",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem002",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b5c7df95-9af5-322f-9ea8-eb440a2bf926",
+                            "description": "Generated description for concept referred to by key \"TestContextItem002:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem003",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem003",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "b36f0aa5-0fb9-3e2c-8fa2-fddb7fd05f4b",
+                            "description": "Generated description for concept referred to by key \"TestContextItem003:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem004",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem004",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "093cda11-eaeb-3a46-a5b6-d5e30c00935b",
+                            "description": "Generated description for concept referred to by key \"TestContextItem004:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem005",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem005",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "569a758d-ba40-37c0-aebb-7ad138df25ac",
+                            "description": "Generated description for concept referred to by key \"TestContextItem005:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem006",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem006",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "252818d9-b61f-3962-a905-8865fb00fb04",
+                            "description": "Generated description for concept referred to by key \"TestContextItem006:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem007",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem007",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "fe1a5f7c-c083-377b-a797-752b01fc6c73",
+                            "description": "Generated description for concept referred to by key \"TestContextItem007:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem008",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem008",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "aa87d007-d07e-3f67-8c6d-0ebc3d85479d",
+                            "description": "Generated description for concept referred to by key \"TestContextItem008:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem009",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem009",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "126e7a3a-11b6-3f88-9397-c21d8819f859",
+                            "description": "Generated description for concept referred to by key \"TestContextItem009:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00A",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00A",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "0e0e3dec-e03d-3379-a87b-1ecd4aa3d8cc",
+                            "description": "Generated description for concept referred to by key \"TestContextItem00A:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00B",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00B",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "dbdc98df-3ff4-360c-b8d3-a7a836ac3de6",
+                            "description": "Generated description for concept referred to by key \"TestContextItem00B:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00C",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00C",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "32a2f355-77f3-3b25-ace6-7a9c5763a5ad",
+                            "description": "Generated description for concept referred to by key \"TestContextItem00C:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestDatatypes",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestDatatypes",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "3f95472c-973e-30e2-95f1-bf00cbef909a",
+                            "description": "Generated description for concept referred to by key \"TestDatatypes:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestExternalContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestExternalContextItem",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "610dbbd4-9149-3b3c-9af4-819056f0e169",
+                            "description": "Generated description for concept referred to by key \"TestExternalContextItem:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestGlobalContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestGlobalContextItem",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "07fa8f68-55f1-3fd0-81c1-749a379753a7",
+                            "description": "Generated description for concept referred to by key \"TestGlobalContextItem:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestPolicyContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestPolicyContextItem",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "d9c93cd1-539e-35c5-aaec-bb711ceb1251",
+                            "description": "Generated description for concept referred to by key \"TestPolicyContextItem:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestSlogan",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestSlogan",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "683fe492-7eae-3ac7-9924-bb7850208d05",
+                            "description": "Generated description for concept referred to by key \"TestSlogan:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestTemperature",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestTemperature",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "bba25b6f-e3cd-3060-9022-4ef3a79f8eb0",
+                            "description": "Generated description for concept referred to by key \"TestTemperature:0.0.1\""
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestTimestamp",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestTimestamp",
+                              "version": "0.0.1"
+                            },
+                            "UUID": "97b73937-c344-33c0-924c-4d26b6449564",
+                            "description": "Generated description for concept referred to by key \"TestTimestamp:0.0.1\""
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "policies": {
+                    "key": {
+                      "name": "Policies",
+                      "version": "0.0.1"
+                    },
+                    "policyMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "Policy0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "Policy0",
+                              "version": "0.0.1"
+                            },
+                            "template": "MEDA",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "Act",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Act"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0003",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Act_NULL",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0004",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Act1",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Act0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act0_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act1_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act2_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act3_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Decide",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Decide"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0002",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Decide_Act",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0003",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Act"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "ExternalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy0ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Decide3",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide0_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide1_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide2_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide3_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Establish",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Establish"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0001",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Establish_Decide",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0002",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Decide"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "ExternalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy1ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Establish2",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish0_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish1_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish2_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish3_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Match",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Match"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0000",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Match_Establish",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0001",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Establish"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy0ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Match0",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Match0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match0_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match1_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match2_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match3_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy0",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "Match"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "policyKey": {
+                              "name": "Policy1",
+                              "version": "0.0.1"
+                            },
+                            "template": "MEDA",
+                            "state": {
+                              "entry": [
+                                {
+                                  "key": "Act",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Act"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0103",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Act_NULL",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0104",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "NULL",
+                                              "parentKeyVersion": "0.0.0",
+                                              "parentLocalName": "NULL",
+                                              "localName": "NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Act0",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Act0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act0_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act1_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act2_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Act3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Task_Act3_DIRECT_Act_NULL"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Act",
+                                              "localName": "Act_NULL"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Decide",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Decide"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0102",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Decide_Act",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0103",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Act"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "ExternalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy1ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Decide3",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide0_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide1_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide2_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Decide3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Task_Decide3_DIRECT_Decide_Act"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Decide",
+                                              "localName": "Decide_Act"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Establish",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Establish"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0101",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Establish_Decide",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0102",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Decide"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "ExternalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy1ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Establish1",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish0_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish1_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish2_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Establish3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Task_Establish3_DIRECT_Establish_Decide"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Establish",
+                                              "localName": "Establish_Decide"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                },
+                                {
+                                  "key": "Match",
+                                  "value": {
+                                    "stateKey": {
+                                      "parentKeyName": "Policy1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Match"
+                                    },
+                                    "trigger": {
+                                      "name": "Event0100",
+                                      "version": "0.0.1"
+                                    },
+                                    "stateOutputs": {
+                                      "entry": [
+                                        {
+                                          "key": "Match_Establish",
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            },
+                                            "outgoingEvent": {
+                                              "name": "Event0101",
+                                              "version": "0.0.1"
+                                            },
+                                            "nextState": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "NULL",
+                                              "localName": "Establish"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    },
+                                    "contextAlbumReference": [
+                                      {
+                                        "name": "ExternalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "GlobalContextAlbum",
+                                        "version": "0.0.1"
+                                      },
+                                      {
+                                        "name": "Policy1ContextAlbum",
+                                        "version": "0.0.1"
+                                      }
+                                    ],
+                                    "taskSelectionLogic": {
+                                      "key": "TaskSelectionLigic",
+                                      "logicFlavour": "JAVASCRIPT",
+                                      "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;"
+                                    },
+                                    "stateFinalizerLogicMap": {
+                                      "entry": []
+                                    },
+                                    "defaultTask": {
+                                      "name": "Task_Match3",
+                                      "version": "0.0.1"
+                                    },
+                                    "taskReferences": {
+                                      "entry": [
+                                        {
+                                          "key": {
+                                            "name": "Task_Match0",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match0_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match1",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match1_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match2",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match2_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        },
+                                        {
+                                          "key": {
+                                            "name": "Task_Match3",
+                                            "version": "0.0.1"
+                                          },
+                                          "value": {
+                                            "key": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Task_Match3_DIRECT_Match_Establish"
+                                            },
+                                            "outputType": "DIRECT",
+                                            "output": {
+                                              "parentKeyName": "Policy1",
+                                              "parentKeyVersion": "0.0.1",
+                                              "parentLocalName": "Match",
+                                              "localName": "Match_Establish"
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  }
+                                }
+                              ]
+                            },
+                            "firstState": "Match"
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "tasks": {
+                    "key": {
+                      "name": "Tasks",
+                      "version": "0.0.1"
+                    },
+                    "taskMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "Task_Act0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act0",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter2",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter2"
+                                    },
+                                    "defaultValue": "DefaultValue2"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act1",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act2",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act2",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Act3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Act3",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Act3",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide0",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter2",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter2"
+                                    },
+                                    "defaultValue": "DefaultValue2"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide1",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide2",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide2",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Decide3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Decide3",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Decide3",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish0",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter2",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter2"
+                                    },
+                                    "defaultValue": "DefaultValue2"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish1",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish2",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish2",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Establish3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Establish3",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Establish3",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match0",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match0",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter2",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match0",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter2"
+                                    },
+                                    "defaultValue": "DefaultValue2"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match1",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match1",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                },
+                                {
+                                  "key": "Parameter1",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match1",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter1"
+                                    },
+                                    "defaultValue": "DefaultValue1"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy0ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match2",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match2",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match2",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "Policy1ContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Task_Match3",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Task_Match3",
+                              "version": "0.0.1"
+                            },
+                            "inputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "outputFields": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            },
+                            "taskParameters": {
+                              "entry": [
+                                {
+                                  "key": "Parameter0",
+                                  "value": {
+                                    "key": {
+                                      "parentKeyName": "Task_Match3",
+                                      "parentKeyVersion": "0.0.1",
+                                      "parentLocalName": "NULL",
+                                      "localName": "Parameter0"
+                                    },
+                                    "defaultValue": "DefaultValue0"
+                                  }
+                                }
+                              ]
+                            },
+                            "contextAlbumReference": [
+                              {
+                                "name": "ExternalContextAlbum",
+                                "version": "0.0.1"
+                              },
+                              {
+                                "name": "GlobalContextAlbum",
+                                "version": "0.0.1"
+                              }
+                            ],
+                            "taskLogic": {
+                              "key": "_TaskLogic",
+                              "logicFlavour": "JAVASCRIPT",
+                              "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "events": {
+                    "key": {
+                      "name": "Events",
+                      "version": "0.0.1"
+                    },
+                    "eventMap": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "Event0000",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0000",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Outside",
+                            "target": "Match",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0001",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0001",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Match",
+                            "target": "Establish",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0002",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0002",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Establish",
+                            "target": "Decide",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0003",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0003",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Decide",
+                            "target": "Act",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0004",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0004",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Act",
+                            "target": "Outside",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0100",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0100",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Outside",
+                            "target": "Match",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0101",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0101",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Match",
+                            "target": "Establish",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0102",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0102",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Establish",
+                            "target": "Decide",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0103",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0103",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Decide",
+                            "target": "Act",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Event0104",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Event0104",
+                              "version": "0.0.1"
+                            },
+                            "nameSpace": "org.onap.policy.apex.sample.events",
+                            "source": "Act",
+                            "target": "Outside",
+                            "parameter": {
+                              "entry": [
+                                {
+                                  "key": "TestActCaseSelected",
+                                  "value": {
+                                    "key": "TestActCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestActStateTime",
+                                  "value": {
+                                    "key": "TestActStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideCaseSelected",
+                                  "value": {
+                                    "key": "TestDecideCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestDecideStateTime",
+                                  "value": {
+                                    "key": "TestDecideStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishCaseSelected",
+                                  "value": {
+                                    "key": "TestEstablishCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestEstablishStateTime",
+                                  "value": {
+                                    "key": "TestEstablishStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCase",
+                                  "value": {
+                                    "key": "TestMatchCase",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchCaseSelected",
+                                  "value": {
+                                    "key": "TestMatchCaseSelected",
+                                    "fieldSchemaKey": {
+                                      "name": "TestCase",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestMatchStateTime",
+                                  "value": {
+                                    "key": "TestMatchStateTime",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestSlogan",
+                                  "value": {
+                                    "key": "TestSlogan",
+                                    "fieldSchemaKey": {
+                                      "name": "TestSlogan",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTemperature",
+                                  "value": {
+                                    "key": "TestTemperature",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTemperature",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                },
+                                {
+                                  "key": "TestTimestamp",
+                                  "value": {
+                                    "key": "TestTimestamp",
+                                    "fieldSchemaKey": {
+                                      "name": "TestTimestamp",
+                                      "version": "0.0.1"
+                                    },
+                                    "optional": false
+                                  }
+                                }
+                              ]
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "albums": {
+                    "key": {
+                      "name": "Context",
+                      "version": "0.0.1"
+                    },
+                    "albums": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "ExternalContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "ExternalContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "EXTERNAL",
+                            "isWritable": false,
+                            "itemSchema": {
+                              "name": "TestExternalContextItem",
+                              "version": "0.0.1"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "GlobalContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "GlobalContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "GLOBAL",
+                            "isWritable": true,
+                            "itemSchema": {
+                              "name": "TestGlobalContextItem",
+                              "version": "0.0.1"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy0ContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy0ContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "APPLICATION",
+                            "isWritable": true,
+                            "itemSchema": {
+                              "name": "TestPolicyContextItem",
+                              "version": "0.0.1"
+                            }
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "Policy1ContextAlbum",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "Policy1ContextAlbum",
+                              "version": "0.0.1"
+                            },
+                            "scope": "APPLICATION",
+                            "isWritable": true,
+                            "itemSchema": {
+                              "name": "TestPolicyContextItem",
+                              "version": "0.0.1"
+                            }
+                          }
+                        }
+                      ]
+                    }
+                  },
+                  "schemas": {
+                    "key": {
+                      "name": "TestDatatypes",
+                      "version": "0.0.1"
+                    },
+                    "schemas": {
+                      "entry": [
+                        {
+                          "key": {
+                            "name": "TestCase",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestCase",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Byte"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem000",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem000",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem000"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem001",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem001",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem001"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem002",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem002",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem002"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem003",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem003",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem003"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem004",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem004",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem004"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem005",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem005",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem005"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem006",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem006",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem006"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem007",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem007",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem007"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem008",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem008",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem008"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem009",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem009",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem009"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00A",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00A",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00A"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00B",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00B",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00B"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestContextItem00C",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestContextItem00C",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00C"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestExternalContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestExternalContextItem",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestExternalContextItem"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestGlobalContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestGlobalContextItem",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestGlobalContextItem"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestPolicyContextItem",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestPolicyContextItem",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestPolicyContextItem"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestSlogan",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestSlogan",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.String"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestTemperature",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestTemperature",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Double"
+                          }
+                        },
+                        {
+                          "key": {
+                            "name": "TestTimestamp",
+                            "version": "0.0.1"
+                          },
+                          "value": {
+                            "key": {
+                              "name": "TestTimestamp",
+                              "version": "0.0.1"
+                            },
+                            "schemaFlavour": "Java",
+                            "schemaDefinition": "java.lang.Long"
+                          }
+                        }
+                      ]
+                    }
+                  }
+                }
+              },
+              "engineParameters": {
+                "executorParameters": {
+                  "JAVASCRIPT": {
+                    "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+                  }
+                }
+              }
+            },
+            "eventInputParameters": {
+              "FirstConsumer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTSERVER",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters",
+                  "parameters": {
+                    "standalone": true,
+                    "host": "0.0.0.0",
+                    "port": 23324
+                  }
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "synchronousMode": true,
+                "synchronousPeer": "FirstProducer",
+                "synchronousTimeout": 2000
+              }
+            },
+            "eventOutputParameters": {
+              "FirstProducer": {
+                "carrierTechnologyParameters": {
+                  "carrierTechnology": "RESTSERVER",
+                  "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters"
+                },
+                "eventProtocolParameters": {
+                  "eventProtocol": "JSON"
+                },
+                "synchronousMode": true,
+                "synchronousPeer": "FirstConsumer",
+                "synchronousTimeout": 2000
+              }
+            }
+          }
+        }
+      }
+    ]
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.guard.decision.request.json b/csit/resources/tests/data/onap.policy.guard.decision.request.json
new file mode 100644 (file)
index 0000000..ee90fea
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "ONAPName": "Guard",
+  "ONAPComponent": "Guard-component",
+  "ONAPInstance": "Guard-component-instance",
+  "requestId": "unique-request-guard-1",
+  "action": "guard",
+  "resource": {
+    "guard": {
+      "actor": "APPC",
+      "operation": "ModifyConfig",
+      "target": "f17face5-69cb-4c88-9e0b-7426db7edddd",
+      "requestId": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65",
+      "clname": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a"
+    }
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.monitoring.decision.request.json b/csit/resources/tests/data/onap.policy.monitoring.decision.request.json
new file mode 100644 (file)
index 0000000..053fa36
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "ONAPName": "DCAE",
+  "ONAPComponent": "PolicyHandler",
+  "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
+  "action": "configure",
+  "resource": {
+      "policy-id": "onap.restart.tca"
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json
new file mode 100644 (file)
index 0000000..a2e2ddc
--- /dev/null
@@ -0,0 +1,211 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "policy_types": {
+    "onap.policies.Monitoring": {
+      "derived_from": "tosca.policies.Root",
+      "version": "1.0.0",
+      "description": "a base policy type for all policies that governs monitoring provisioning"
+    },
+    "onap.policies.monitoring.tcagen2": {
+      "derived_from": "onap.policies.Monitoring",
+      "version": "1.0.0",
+      "properties": {
+        "tca.policy": {
+          "type": "onap.datatypes.monitoring.tca_policy",
+          "description": "TCA Policy JSON"
+        }
+      }
+    }
+  },
+  "data_types": {
+    "onap.datatypes.monitoring.metricsPerEventName": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "controlLoopSchemaType": {
+          "type": "string",
+          "required": true,
+          "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+          "constraints": [
+            {
+              "valid_values": [
+                "VM",
+                "VNF"
+              ]
+            }
+          ]
+        },
+        "eventName": {
+          "type": "string",
+          "required": true,
+          "description": "Event name to which thresholds need to be applied"
+        },
+        "policyName": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Name"
+        },
+        "policyScope": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope"
+        },
+        "policyVersion": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Version"
+        },
+        "thresholds": {
+          "type": "list",
+          "required": true,
+          "description": "Thresholds associated with eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.thresholds"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.tca_policy": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "domain": {
+          "type": "string",
+          "required": true,
+          "description": "Domain name to which TCA needs to be applied",
+          "default": "measurementsForVfScaling",
+          "constraints": [
+            {
+              "equal": "measurementsForVfScaling"
+            }
+          ]
+        },
+        "metricsPerEventName": {
+          "type": "list",
+          "required": true,
+          "description": "Contains eventName and threshold details that need to be applied to given eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.metricsPerEventName"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.thresholds": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "closedLoopControlName": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Control Name associated with the threshold"
+        },
+        "closedLoopEventStatus": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Event Status of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "ONSET",
+                "ABATED"
+              ]
+            }
+          ]
+        },
+        "direction": {
+          "type": "string",
+          "required": true,
+          "description": "Direction of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "LESS",
+                "LESS_OR_EQUAL",
+                "GREATER",
+                "GREATER_OR_EQUAL",
+                "EQUAL"
+              ]
+            }
+          ]
+        },
+        "fieldPath": {
+          "type": "string",
+          "required": true,
+          "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
+          "constraints": [
+            {
+              "valid_values": [
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+                "$.event.measurementsForVfScalingFields.meanRequestLatency",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+                "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+              ]
+            }
+          ]
+        },
+        "severity": {
+          "type": "string",
+          "required": true,
+          "description": "Threshold Event Severity",
+          "constraints": [
+            {
+              "valid_values": [
+                "CRITICAL",
+                "MAJOR",
+                "MINOR",
+                "WARNING",
+                "NORMAL"
+              ]
+            }
+          ]
+        },
+        "thresholdValue": {
+          "type": "integer",
+          "required": true,
+          "description": "Threshold value for the field Path inside CEF message"
+        },
+        "version": {
+          "type": "string",
+          "required": true,
+          "description": "Version number associated with the threshold"
+        }
+      }
+    }
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json
new file mode 100644 (file)
index 0000000..d86749e
--- /dev/null
@@ -0,0 +1,206 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "policy_types": {
+    "onap.policies.monitoring.tcagen2": {
+      "derived_from": "onap.policies.Monitoring",
+      "version": "2.0.0",
+      "properties": {
+        "tca.policy": {
+          "type": "onap.datatypes.monitoring.tca_policy",
+          "description": "TCA Policy JSON"
+        }
+      }
+    }
+  },
+  "data_types": {
+    "onap.datatypes.monitoring.metricsPerEventName": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "controlLoopSchemaType": {
+          "type": "string",
+          "required": true,
+          "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+          "constraints": [
+            {
+              "valid_values": [
+                "VM",
+                "VNF"
+              ]
+            }
+          ]
+        },
+        "eventName": {
+          "type": "string",
+          "required": true,
+          "description": "Event name to which thresholds need to be applied"
+        },
+        "policyName": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Name"
+        },
+        "policyScope": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope"
+        },
+        "policyVersion": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Version"
+        },
+        "thresholds": {
+          "type": "list",
+          "required": true,
+          "description": "Thresholds associated with eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.thresholds"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.tca_policy": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "domain": {
+          "type": "string",
+          "required": true,
+          "description": "Domain name to which TCA needs to be applied",
+          "default": "measurementsForVfScaling",
+          "constraints": [
+            {
+              "equal": "measurementsForVfScaling"
+            }
+          ]
+        },
+        "metricsPerEventName": {
+          "type": "list",
+          "required": true,
+          "description": "Contains eventName and threshold details that need to be applied to given eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.metricsPerEventName"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.thresholds": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "closedLoopControlName": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Control Name associated with the threshold"
+        },
+        "closedLoopEventStatus": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Event Status of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "ONSET",
+                "ABATED"
+              ]
+            }
+          ]
+        },
+        "direction": {
+          "type": "string",
+          "required": true,
+          "description": "Direction of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "LESS",
+                "LESS_OR_EQUAL",
+                "GREATER",
+                "GREATER_OR_EQUAL",
+                "EQUAL"
+              ]
+            }
+          ]
+        },
+        "fieldPath": {
+          "type": "string",
+          "required": true,
+          "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
+          "constraints": [
+            {
+              "valid_values": [
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+                "$.event.measurementsForVfScalingFields.meanRequestLatency",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+                "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+              ]
+            }
+          ]
+        },
+        "severity": {
+          "type": "string",
+          "required": true,
+          "description": "Threshold Event Severity",
+          "constraints": [
+            {
+              "valid_values": [
+                "CRITICAL",
+                "MAJOR",
+                "MINOR",
+                "WARNING",
+                "NORMAL"
+              ]
+            }
+          ]
+        },
+        "thresholdValue": {
+          "type": "integer",
+          "required": true,
+          "description": "Threshold value for the field Path inside CEF message"
+        },
+        "version": {
+          "type": "string",
+          "required": true,
+          "description": "Version number associated with the threshold"
+        }
+      }
+    }
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json
new file mode 100644 (file)
index 0000000..1767c50
--- /dev/null
@@ -0,0 +1,206 @@
+{
+  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+  "policy_types": {
+    "onap.policies.monitoring.tcagen2": {
+      "derived_from": "onap.policies.Monitoring",
+      "version": "3.0.0",
+      "properties": {
+        "tca.policy": {
+          "type": "onap.datatypes.monitoring.tca_policy",
+          "description": "TCA Policy JSON"
+        }
+      }
+    }
+  },
+  "data_types": {
+    "onap.datatypes.monitoring.metricsPerEventName": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "controlLoopSchemaType": {
+          "type": "string",
+          "required": true,
+          "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+          "constraints": [
+            {
+              "valid_values": [
+                "VM",
+                "VNF"
+              ]
+            }
+          ]
+        },
+        "eventName": {
+          "type": "string",
+          "required": true,
+          "description": "Event name to which thresholds need to be applied"
+        },
+        "policyName": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Name"
+        },
+        "policyScope": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope"
+        },
+        "policyVersion": {
+          "type": "string",
+          "required": true,
+          "description": "TCA Policy Scope Version"
+        },
+        "thresholds": {
+          "type": "list",
+          "required": true,
+          "description": "Thresholds associated with eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.thresholds"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.tca_policy": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "domain": {
+          "type": "string",
+          "required": true,
+          "description": "Domain name to which TCA needs to be applied",
+          "default": "measurementsForVfScaling",
+          "constraints": [
+            {
+              "equal": "measurementsForVfScaling"
+            }
+          ]
+        },
+        "metricsPerEventName": {
+          "type": "list",
+          "required": true,
+          "description": "Contains eventName and threshold details that need to be applied to given eventName",
+          "entry_schema": {
+            "type": "onap.datatypes.monitoring.metricsPerEventName"
+          }
+        }
+      }
+    },
+    "onap.datatypes.monitoring.thresholds": {
+      "derived_from": "tosca.datatypes.Root",
+      "properties": {
+        "closedLoopControlName": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Control Name associated with the threshold"
+        },
+        "closedLoopEventStatus": {
+          "type": "string",
+          "required": true,
+          "description": "Closed Loop Event Status of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "ONSET",
+                "ABATED"
+              ]
+            }
+          ]
+        },
+        "direction": {
+          "type": "string",
+          "required": true,
+          "description": "Direction of the threshold",
+          "constraints": [
+            {
+              "valid_values": [
+                "LESS",
+                "LESS_OR_EQUAL",
+                "GREATER",
+                "GREATER_OR_EQUAL",
+                "EQUAL"
+              ]
+            }
+          ]
+        },
+        "fieldPath": {
+          "type": "string",
+          "required": true,
+          "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
+          "constraints": [
+            {
+              "valid_values": [
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+                "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+                "$.event.measurementsForVfScalingFields.meanRequestLatency",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+                "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+                "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+              ]
+            }
+          ]
+        },
+        "severity": {
+          "type": "string",
+          "required": true,
+          "description": "Threshold Event Severity",
+          "constraints": [
+            {
+              "valid_values": [
+                "CRITICAL",
+                "MAJOR",
+                "MINOR",
+                "WARNING",
+                "NORMAL"
+              ]
+            }
+          ]
+        },
+        "thresholdValue": {
+          "type": "integer",
+          "required": true,
+          "description": "Threshold value for the field Path inside CEF message"
+        },
+        "version": {
+          "type": "string",
+          "required": true,
+          "description": "Version number associated with the threshold"
+        }
+      }
+    }
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.naming.decision.request.json b/csit/resources/tests/data/onap.policy.naming.decision.request.json
new file mode 100644 (file)
index 0000000..3833a24
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "ONAPName": "SDNC",
+  "ONAPComponent": "SDNC-component",
+  "ONAPInstance": "SDNC-component-instance",
+  "requestId": "unique-request-sdnc-1",
+  "action": "naming",
+  "resource": {
+      "nfRole": [],
+      "naming-type": [],
+      "property-name": [],
+      "policy-type": ["onap.policies.Naming"]
+  }
+}
diff --git a/csit/resources/tests/data/onap.policy.optimization.decision.request.json b/csit/resources/tests/data/onap.policy.optimization.decision.request.json
new file mode 100644 (file)
index 0000000..d997099
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "ONAPName": "OOF",
+  "ONAPComponent": "OOF-component",
+  "ONAPInstance": "OOF-component-instance",
+  "context" : {
+      "subscriberName": []
+  },
+  "action": "optimize",
+  "resource": {
+      "scope": [],
+      "services": [],
+      "resources": [],
+      "geography": []
+  }
+}
diff --git a/csit/resources/tests/data/policy_deploy.json b/csit/resources/tests/data/policy_deploy.json
new file mode 100644 (file)
index 0000000..e13f06a
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "groups": [
+        {
+            "name": "defaultGroup",
+            "deploymentSubgroups": [
+                {
+                    "pdpType": "apex",
+                    "action": "POST",
+                    "policies": [{
+                            "name": "{policyName}",
+                            "version": "1.0.0"
+                        }]
+                }
+            ]
+        }
+    ]
+}
diff --git a/csit/resources/tests/data/query/compositiondefinition-from.sql b/csit/resources/tests/data/query/compositiondefinition-from.sql
new file mode 100644 (file)
index 0000000..7f72f86
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+INSERT INTO automationcompositiondefinition (compositionid, name, servicetemplate, state, statechangeresult, version, lastmsg)
+VALUES ('d30b8017-4d64-4693-84d7-de9c4226b9f8', 'Test-Migration-From', '{"tosca_definitions_version":"tosca_simple_yaml_1_3","data_types":{"onap.datatypes.ToscaConceptIdentifier:0.0.0":{"properties":{"name":{"name":"name","type":"string","type_version":"0.0.0","required":true},"version":{"name":"version","type":"string","type_version":"0.0.0","required":true}},"name":"onap.datatypes.ToscaConceptIdentifier","version":"0.0.0","derived_from":"tosca.datatypes.Root","metadata":{}}},"node_types":{"org.onap.policy.clamp.acm.Participant:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","required":false}},"name":"org.onap.policy.clamp.acm.Participant","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.AutomationCompositionElement:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","description":"Specifies the organization that provides the automation composition element","required":false,"metadata":{"common":"true"}},"startPhase":{"name":"startPhase","type":"integer","type_version":"0.0.0","description":"A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously","required":false,"constraints":[{"greater_or_equal":"0"}],"metadata":{"common":"true"}},"stage":{"name":"stage","type":"map","type_version":"0.0.0","description":"A map of list indicating for each operation the stages in which this automation composition element will be started, the first stage is zero. Automation Composition Elements are started in their stage order. Automation Composition Elements with the same stage are started simultaneously.","required":false}},"name":"org.onap.policy.clamp.acm.AutomationCompositionElement","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.AutomationComposition:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","description":"Specifies the organization that provides the automation composition element","required":false,"metadata":{"common":"true"}},"elements":{"name":"elements","type":"list","type_version":"0.0.0","description":"Specifies a list of automation composition element definitions that make up this automation composition definition","required":true,"entry_schema":{"type":"onap.datatypes.ToscaConceptIdentifier","type_version":"0.0.0"},"metadata":{"common":"true"}}},"name":"org.onap.policy.clamp.acm.AutomationComposition","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.SimAutomationCompositionElement:1.0.0":{"properties":{"baseUrl":{"name":"baseUrl","type":"string","type_version":"0.0.0","description":"The base URL to be prepended to each path, identifies the host for the REST endpoints.","required":true,"metadata":{"sensitive":"true"}},"httpHeaders":{"name":"httpHeaders","type":"map","type_version":"0.0.0","description":"HTTP headers to send on REST requests","required":false,"entry_schema":{"type":"string","type_version":"0.0.0"}},"configurationEntities":{"name":"configurationEntities","type":"map","type_version":"0.0.0","description":"The connfiguration entities the Automation Composition Element is managing and their associated REST requests","required":true,"entry_schema":{"type":"map","type_version":"0.0.0"}}},"name":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","version":"1.0.0","derived_from":"org.onap.policy.clamp.acm.AutomationCompositionElement","metadata":{}}},"topology_template":{"node_templates":{"org.onap.policy.clamp.acm.SimParticipant:2.3.4":{"type":"org.onap.policy.clamp.acm.Participant","type_version":"1.0.1","properties":{"provider":"ONAP"},"name":"org.onap.policy.clamp.acm.SimParticipant","version":"2.3.4","metadata":{},"description":"Participant Simulator"},"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement:1.2.3":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[1,2],"migrate":[1,2]}},"name":"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement","version":"1.2.3","metadata":{},"description":"Automation composition element for the http requests of AC Element Starter microservice"},"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement:1.2.3":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[0,1],"migrate":[0,1]}},"name":"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement","version":"1.2.3","metadata":{},"description":"Automation composition element for the http requests of AC Element Bridge microservice"},"onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement:1.2.3":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[0,2],"migrate":[0,2]}},"name":"onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement","version":"1.2.3","metadata":{},"description":"Automation composition element for the http requests of AC Element Sink microservice"},"onap.policy.clamp.ac.element.AutomationCompositionDefinition:1.2.3":{"type":"org.onap.policy.clamp.acm.AutomationComposition","type_version":"1.0.1","properties":{"provider":"ONAP","elements":[{"name":"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement","version":"1.2.3"},{"name":"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement","version":"1.2.3"},{"name":"onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement","version":"1.2.3"}]},"name":"onap.policy.clamp.ac.element.AutomationCompositionDefinition","version":"1.2.3","metadata":{},"description":"Automation composition for Demo"}},"policies":{}},"name":"Test-Migration-From","version":"1.0.0","metadata":{"primeTimeoutMs":200000,"deprimeTimeoutMs":100000,"compositionId":"d30b8017-4d64-4693-84d7-de9c4226b9f8"}}', 2, 0, '1.0.0', '2025-07-16 09:48:22.255172');
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('27e9302f-245e-46ff-9501-ddc8f0ff515c', 'd30b8017-4d64-4693-84d7-de9c4226b9f8', 'Primed', 'onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement', '1.2.3', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('68b5e9e3-1803-46e8-af0e-c3590efdc0c2', 'd30b8017-4d64-4693-84d7-de9c4226b9f8', 'Primed', 'onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement', '1.2.3', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('5c5f9e51-96c6-4626-88f9-db458cf9ef99', 'd30b8017-4d64-4693-84d7-de9c4226b9f8', 'Primed', 'onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement', '1.2.3', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
diff --git a/csit/resources/tests/data/query/compositiondefinition-to.sql b/csit/resources/tests/data/query/compositiondefinition-to.sql
new file mode 100644 (file)
index 0000000..20b85f8
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+INSERT INTO automationcompositiondefinition (compositionid, name, servicetemplate, state, statechangeresult, version, lastmsg)
+VALUES ('6c1cf107-a2ca-4485-8129-02f9fae64d64', 'Test-Migration-To', '{"tosca_definitions_version":"tosca_simple_yaml_1_3","data_types":{"onap.datatypes.ToscaConceptIdentifier:0.0.0":{"properties":{"name":{"name":"name","type":"string","type_version":"0.0.0","required":true},"version":{"name":"version","type":"string","type_version":"0.0.0","required":true}},"name":"onap.datatypes.ToscaConceptIdentifier","version":"0.0.0","derived_from":"tosca.datatypes.Root","metadata":{}}},"node_types":{"org.onap.policy.clamp.acm.Participant:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","required":false}},"name":"org.onap.policy.clamp.acm.Participant","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.AutomationCompositionElement:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","description":"Specifies the organization that provides the automation composition element","required":false,"metadata":{"common":"true"}},"startPhase":{"name":"startPhase","type":"integer","type_version":"0.0.0","description":"A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously","required":false,"constraints":[{"greater_or_equal":"0"}],"metadata":{"common":"true"}},"stage":{"name":"stage","type":"map","type_version":"0.0.0","description":"A map of list indicating for each operation the stages in which this automation composition element will be started, the first stage is zero. Automation Composition Elements are started in their stage order. Automation Composition Elements with the same stage are started simultaneously.","required":false}},"name":"org.onap.policy.clamp.acm.AutomationCompositionElement","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.AutomationComposition:1.0.1":{"properties":{"provider":{"name":"provider","type":"string","type_version":"0.0.0","description":"Specifies the organization that provides the automation composition element","required":false,"metadata":{"common":"true"}},"elements":{"name":"elements","type":"list","type_version":"0.0.0","description":"Specifies a list of automation composition element definitions that make up this automation composition definition","required":true,"entry_schema":{"type":"onap.datatypes.ToscaConceptIdentifier","type_version":"0.0.0"},"metadata":{"common":"true"}}},"name":"org.onap.policy.clamp.acm.AutomationComposition","version":"1.0.1","derived_from":"tosca.nodetypes.Root","metadata":{}},"org.onap.policy.clamp.acm.SimAutomationCompositionElement:1.0.0":{"properties":{"baseUrl":{"name":"baseUrl","type":"string","type_version":"0.0.0","description":"The base URL to be prepended to each path, identifies the host for the REST endpoints.","required":true,"metadata":{"sensitive":"true"}},"httpHeaders":{"name":"httpHeaders","type":"map","type_version":"0.0.0","description":"HTTP headers to send on REST requests","required":false,"entry_schema":{"type":"string","type_version":"0.0.0"}},"configurationEntities":{"name":"configurationEntities","type":"map","type_version":"0.0.0","description":"The connfiguration entities the Automation Composition Element is managing and their associated REST requests","required":true,"entry_schema":{"type":"map","type_version":"0.0.0"}}},"name":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","version":"1.0.0","derived_from":"org.onap.policy.clamp.acm.AutomationCompositionElement","metadata":{}}},"topology_template":{"node_templates":{"org.onap.policy.clamp.acm.SimParticipant:2.3.4":{"type":"org.onap.policy.clamp.acm.Participant","type_version":"1.0.1","properties":{"provider":"ONAP"},"name":"org.onap.policy.clamp.acm.SimParticipant","version":"2.3.4","metadata":{},"description":"Participant Simulator"},"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement:1.2.4":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[1,2],"migrate":[1,2]}},"name":"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement","version":"1.2.4","metadata":{},"description":"Automation composition element for the http requests of AC Element Starter microservice"},"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement:1.2.4":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[0,1],"migrate":[0,1]}},"name":"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement","version":"1.2.4","metadata":{},"description":"Automation composition element for the http requests of AC Element Bridge microservice"},"onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement:1.2.4":{"type":"org.onap.policy.clamp.acm.SimAutomationCompositionElement","type_version":"1.0.0","properties":{"provider":"ONAP","startPhase":0,"stage":{"prepare":[0,2],"migrate":[0,2]}},"name":"onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement","version":"1.2.4","metadata":{},"description":"Automation composition element for the http requests of AC Element Sink microservice"},"onap.policy.clamp.ac.element.AutomationCompositionDefinition:1.2.4":{"type":"org.onap.policy.clamp.acm.AutomationComposition","type_version":"1.0.1","properties":{"provider":"ONAP","elements":[{"name":"onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement","version":"1.2.4"},{"name":"onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement","version":"1.2.4"},{"name":"onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement","version":"1.2.4"}]},"name":"onap.policy.clamp.ac.element.AutomationCompositionDefinition","version":"1.2.4","metadata":{},"description":"Automation composition for Demo"}},"policies":{}},"name":"Test-Migration-To","version":"1.0.0","metadata":{"compositionId":"6c1cf107-a2ca-4485-8129-02f9fae64d64"}}', 2, 0, '1.0.0', '2025-07-16 09:48:44.215309');
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('799543ff-de85-4835-bf32-2ff5f61d0dfe', '6c1cf107-a2ca-4485-8129-02f9fae64d64', 'Primed', 'onap.policy.clamp.ac.element.Sim_NewAutomationCompositionElement', '1.2.4', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('3d34ca20-1b16-4f2c-971a-6ed52a0dafff', '6c1cf107-a2ca-4485-8129-02f9fae64d64', 'Primed', 'onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement', '1.2.4', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
+
+INSERT INTO nodetemplatestate (nodetemplatestateid, compositionid, message, nodetemplate_name, nodetemplate_version, outproperties, participantid, state)
+VALUES ('d6a4a446-cfcb-45ad-a63e-3c6393471e42', '6c1cf107-a2ca-4485-8129-02f9fae64d64', 'Primed', 'onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement', '1.2.4', '{"InternalState":"PRIMED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90', 2);
diff --git a/csit/resources/tests/data/query/compositiondefinition-update.sql b/csit/resources/tests/data/query/compositiondefinition-update.sql
new file mode 100644 (file)
index 0000000..a76716a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+UPDATE nodetemplatestate
+  SET outproperties = '{"InternalState":"PRIMED","myParameterToUpdate":"MyTextUpdated"}'
+  WHERE nodetemplatestateid = '3d34ca20-1b16-4f2c-971a-6ed52a0dafff';
+
+UPDATE automationcompositiondefinition
+  SET revisionid = 'adc5e211-84a7-448f-8749-78a195f51f64'
+  WHERE compositionid = '6c1cf107-a2ca-4485-8129-02f9fae64d64';
diff --git a/csit/resources/tests/data/query/instance.sql b/csit/resources/tests/data/query/instance.sql
new file mode 100644 (file)
index 0000000..259a564
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+INSERT INTO automationcomposition (instanceid, compositionid, compositiontargetid, deploystate, description, lockstate,
+                                   name, statechangeresult, version, lastmsg, phase, substate, revisionId)
+VALUES ('dd36aaa4-580f-4193-a52b-37c3a955b11a', 'd30b8017-4d64-4693-84d7-de9c4226b9f8', NULL, 0,
+        'Demo automation composition instance 0', 0, 'Test-Instance-Migration-From', 0, '2.0.1',
+        '2025-07-16 09:53:15.512496', NULL, 0, 'e999d17c-5b80-476f-96cc-1acfb38194ee');
+
+INSERT INTO automationcompositionelement (elementid, definition_name, definition_version, deploystate, description,
+                                          instanceid, lockstate, message, operationalstate, outproperties,
+                                          participantid, properties, usestate, substate, stage)
+VALUES ('989c62b3-8918-41b9-a747-d21eb79c6c36', 'onap.policy.clamp.ac.element.Sim_SinkAutomationCompositionElement',
+        '1.2.3', 0, 'Sink Automation Composition Element for the Demo', 'dd36aaa4-580f-4193-a52b-37c3a955b11a', 0,
+        'Deployed', NULL, '{"InternalState":"DEPLOYED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90',
+        '{"deployTimeoutMs":200000,"undeployTimeoutMs":150000,"updateTimeoutMs":200000,"migrateTimeoutMs":200000,"deleteTimeoutMs":100000,"baseUrl":"ENCRYPTED:ZuDP803svc1ThgeVcYeQvA0kL8gpz2Qzg9unk3zm+XSi8RSTlDQ2qgSzROz7QOit","httpHeaders":{"Content-Type":"application/json","Authorization":"Basic YWNtVXNlcjp6YiFYenRHMzQ="},"configurationEntities":[{"configurationEntityId":{"name":"onap.policy.clamp.ac.sink","version":"1.0.0"},"restSequence":[{"restRequestId":{"name":"request3","version":"1.0.1"},"httpMethod":"POST","path":"/onap/policy/clamp/acelement/v2/activate","body":"{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"message-router\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }","expectedResponse":201}],"myParameterToUpdate":"text"}]}',
+        NULL, 0, NULL);
+
+INSERT INTO automationcompositionelement (elementid, definition_name, definition_version, deploystate, description,
+                                          instanceid, lockstate, message, operationalstate, outproperties,
+                                          participantid, properties, usestate, substate, stage)
+VALUES ('989c62b3-8918-41b9-a747-d21eb79c6c34', 'onap.policy.clamp.ac.element.Sim_StarterAutomationCompositionElement',
+        '1.2.3', 0, 'Starter Automation Composition Element for the Demo', 'dd36aaa4-580f-4193-a52b-37c3a955b11a', 0,
+        'Deployed', NULL, '{"InternalState":"DEPLOYED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90',
+        '{"deployTimeoutMs":200000,"undeployTimeoutMs":150000,"updateTimeoutMs":200000,"migrateTimeoutMs":200000,"deleteTimeoutMs":100000,"baseUrl":"ENCRYPTED:1IPD8QRnRhnFlUfrHIoRRuzPYHV0z88DhwXYa+KhZqv6iUh1JiVoN28oAIYFq1i6","httpHeaders":{"Content-Type":"application/json","Authorization":"Basic YWNtVXNlcjp6YiFYenRHMzQ="},"configurationEntities":[{"configurationEntityId":{"name":"onap.policy.clamp.ac.starter","version":"1.0.0"},"restSequence":[{"restRequestId":{"name":"request1","version":"1.0.1"},"httpMethod":"POST","path":"/onap/policy/clamp/acelement/v2/activate","body":"{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }","expectedResponse":201}],"myParameterToUpdate":"text"}]}',
+        NULL, 0, NULL);
+
+INSERT INTO automationcompositionelement (elementid, definition_name, definition_version, deploystate, description,
+                                          instanceid, lockstate, message, operationalstate, outproperties,
+                                          participantid, properties, usestate, substate, stage)
+VALUES ('989c62b3-8918-41b9-a747-d21eb79c6c35', 'onap.policy.clamp.ac.element.Sim_BridgeAutomationCompositionElement',
+        '1.2.3', 0, 'Bridge Automation Composition Element for the Demo', 'dd36aaa4-580f-4193-a52b-37c3a955b11a', 0,
+        'Deployed', NULL, '{"InternalState":"DEPLOYED"}', '101c62b3-8918-41b9-a747-d21eb79c6c90',
+        '{"deployTimeoutMs":200000,"undeployTimeoutMs":150000,"updateTimeoutMs":200000,"migrateTimeoutMs":200000,"deleteTimeoutMs":100000,"baseUrl":"ENCRYPTED:Q4bNY29WKbV4o/vi15DMyWnWla6lTTwbn5ZRfR1nspd5xL9vDvtl8FYBA7Sj6mHI","httpHeaders":{"Content-Type":"application/json","Authorization":"Basic YWNtVXNlcjp6YiFYenRHMzQ="},"configurationEntities":[{"configurationEntityId":{"name":"onap.policy.clamp.ac.bridge","version":"1.0.0"},"restSequence":[{"restRequestId":{"name":"request2","version":"1.0.1"},"httpMethod":"POST","path":"/onap/policy/clamp/acelement/v2/activate","body":"{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }","expectedResponse":201}],"myParameterToUpdate":"text"}]}',
+        NULL, 0, NULL);
diff --git a/csit/resources/tests/data/script/execute-query.sh b/csit/resources/tests/data/script/execute-query.sh
new file mode 100755 (executable)
index 0000000..13b998e
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+export PGPASSWORD=policy_user
+
+scriptPath=$1
+
+PSQL="psql -h postgres -U policy_user -w -d clampacm"
+${PSQL} <"${scriptPath}"
+rc=$?
+if [ ${rc} -ne 0 ]; then
+  return ${rc}
+fi
+
+exit 0
diff --git a/csit/resources/tests/data/script/execute-queryk8.sh b/csit/resources/tests/data/script/execute-queryk8.sh
new file mode 100755 (executable)
index 0000000..3465090
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+scriptPath=$1
+
+PSQL="psql -h ${PG_HOST} -p ${PG_PORT} -U ${PG_USER} -w -d ${PG_SCHEMA}"
+${PSQL} <"${scriptPath}"
+rc=$?
+if [ ${rc} -ne 0 ]; then
+  return ${rc}
+fi
+
+exit 0
diff --git a/csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json b/csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json
new file mode 100644 (file)
index 0000000..7ace047
--- /dev/null
@@ -0,0 +1,5 @@
+{"policies":[
+    {"policy-id":"onap.restart.tca"},
+    {"policy-id":"OSDF_CASABLANCA.Affinity_Default"}
+    ]
+}
diff --git a/csit/resources/tests/kafka_consumer.py b/csit/resources/tests/kafka_consumer.py
new file mode 100755 (executable)
index 0000000..53a2e39
--- /dev/null
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2024 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# Python utility to fetch kafka topic and look for required messages.
+# Accepts the arguments {topic_name} and {list of expected values} and {timeout} to verify the kafka topic.
+
+
+from confluent_kafka import Consumer, KafkaException
+import sys
+import time
+
+
+def consume_kafka_topic(topic, expected_msg, sec_timeout, bootstrap_server):
+    config = {
+        'bootstrap.servers': bootstrap_server,
+        'group.id': 'testgrp',
+        'auto.offset.reset': 'earliest'
+    }
+    consumer = Consumer(config)
+    consumer.subscribe([topic])
+    try:
+        start_time = time.time()
+        while time.time() - start_time < sec_timeout:
+            msg = consumer.poll(1.0)
+            if msg is None:
+                continue
+            if msg.error():
+                raise KafkaException(msg.error())
+            else:
+                # Message received
+                message = msg.value().decode('utf-8')
+                if expected_msg in message:
+                    print(message)
+                    sys.exit(200)
+    finally:
+        consumer.close()
+
+
+if __name__ == '__main__':
+    topic_name = sys.argv[1]
+    timeout = int(sys.argv[2])  # timeout in seconds for verifying the kafka topic
+    expected_values = sys.argv[3]
+    server = sys.argv[4]
+    consume_kafka_topic(topic_name, expected_values, timeout, server)
diff --git a/csit/resources/tests/kafka_producer.py b/csit/resources/tests/kafka_producer.py
new file mode 100755 (executable)
index 0000000..e960b93
--- /dev/null
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2024 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# Python utility to produce a message on a kafka topic
+# Accepts the arguments {topic_name} and {message}
+
+from confluent_kafka import Producer
+import sys
+
+
+def post_to_kafka(topic, message, bootstrap_server):
+    conf = {'bootstrap.servers': bootstrap_server}
+
+    producer = Producer(conf)
+    try:
+        producer.produce(topic, value=message.encode('utf-8'))
+        producer.flush()
+        print('Message posted to Kafka topic: {}'.format(topic))
+    except Exception as e:
+        print('Failed to post message: {}'.format(str(e)))
+    finally:
+        producer.flush()
+
+
+if __name__ == '__main__':
+    post_to_kafka(sys.argv[1], sys.argv[2], sys.argv[3])
diff --git a/csit/resources/tests/make_topics.py b/csit/resources/tests/make_topics.py
new file mode 100755 (executable)
index 0000000..bf6d6e3
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023-2024 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# Python utility to create a new kafka topic
+# Accepts the argument {topic_name}
+
+from confluent_kafka.admin import AdminClient, NewTopic
+import sys
+
+
+def create_topic(bootstrap_servers, topic_name, num_partitions=2, replication_factor=2):
+    admin_client = AdminClient({'bootstrap.servers': bootstrap_servers})
+
+    # Define the topic configuration
+    new_topic = NewTopic(topic_name, num_partitions=num_partitions, replication_factor=replication_factor)
+
+    # Create the topic
+    admin_client.create_topics([new_topic])
+
+
+if __name__ == '__main__':
+    topic = sys.argv[1]
+    servers = sys.argv[2]
+
+    create_topic(servers, topic)
diff --git a/csit/run-acm-regression.sh b/csit/run-acm-regression.sh
new file mode 100755 (executable)
index 0000000..1916002
--- /dev/null
@@ -0,0 +1,143 @@
+#!/bin/bash
+#
+# Copyright 2024 Nordix Foundation.
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Script to run the ACM regression test suite in cucumber.
+# Deploys ACM-R and participants in two different release branch/versions for testing backward compatibility.
+
+function usage() {
+  echo "Usage: $0 --release <acmr-release_branch> <ppnt-release_branch> | --version <acmr-version> <ppnt-version>"
+  exit 1
+}
+
+# Legacy config files for releases up to 'newdelhi'
+function find_release_profile() {
+  if [ $1 == 'master' ] || [[ "$(echo "$1" | cut -c1 )" > 'n' ]]; then
+    echo "default"
+  else
+    echo "default,legacy"
+  fi
+}
+
+# Legacy config files for versions before 8.0.0
+function find_version_profile() {
+  if [[ "$(printf '%s\n' "$1" "8.0.0" | sort -V | head -n 1)" == "8.0.0" ]]; then
+    echo "default"
+  else
+    echo "default,legacy"
+  fi
+}
+
+function validate_version() {
+    local version=$1
+    if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+        echo "Invalid version format: $version. Expected format: x.y.z where x, y, and z are numbers."
+        usage
+    fi
+}
+
+function validate_release() {
+    local release=$1
+    if [[ ! $release =~ ^[a-zA-Z._-]+$ ]]; then
+        echo "Invalid release format: $release. Expected a string release name"
+        usage
+    fi
+}
+
+# Invalid input
+if [ "$#" -ne 0 ] && [ "$#" -ne 3 ]; then
+  usage
+fi
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+export SCRIPTS="${WORKSPACE}/csit/resources/scripts"
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+REGRESSION_FOLDER="${WORKSPACE}"/policy-regression-tests/policy-clamp-regression/
+export PROJECT='clamp'
+DEFAULT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                            "${WORKSPACE}"/.gitreview)
+
+# Run from default branch
+if [ $# -eq 0 ]
+then
+  echo "Usage: $0 --release <acmr-release_branch> <ppnt-release_branch> | --version <acmr-version> <ppnt-version>"
+  echo "*** No release_branch/versions provided. Default branch will be used."
+  echo "Fetching image versions for all components..."
+  source ${COMPOSE_FOLDER}/get-versions-regression.sh $DEFAULT_BRANCH $DEFAULT_BRANCH > /dev/null 2>&1
+  echo "Starting Regression with ACM-R and PPNT from the default release branch $DEFAULT_BRANCH ***"
+  export CLAMP_PROFILE=$(find_release_profile "$DEFAULT_BRANCH")
+  export PPNT_PROFILE="$CLAMP_PROFILE"
+  echo "Using $CLAMP_PROFILE profile for ACM-R and $PPNT_PROFILE profile for PPNTS."
+
+# Run with specific release/version
+elif [ "$#" -gt 0 ]
+then
+  case $1 in
+    --release)
+      validate_release $2
+      validate_release $3
+      echo "Fetching image versions for all components..."
+      source ${COMPOSE_FOLDER}/get-versions-regression.sh $2 $3 > /dev/null 2>&1
+      echo "*** Starting Regression with ACM-R from branch $2 and PPNT from branch $3 ***"
+      export CLAMP_PROFILE=$(find_release_profile $2)
+      export PPNT_PROFILE=$(find_release_profile $3)
+      echo "Using $CLAMP_PROFILE profile for ACM-R and $PPNT_PROFILE profile for PPNTS." 
+      ;;
+    --version)
+      validate_version $2
+      validate_version $3
+      echo "Fetching image versions for all components..."
+      source ${COMPOSE_FOLDER}/get-versions-regression.sh $DEFAULT_BRANCH $DEFAULT_BRANCH > /dev/null 2>&1
+      export POLICY_CLAMP_VERSION=$2
+      export POLICY_CLAMP_PPNT_VERSION=$3
+      echo "*** Starting Regression with ACM-R version $2 and PPNT version $3 ***"
+      export CLAMP_PROFILE=$(find_version_profile "$2")
+      export PPNT_PROFILE=$(find_version_profile "$3")
+      echo "Using $CLAMP_PROFILE profile for ACM-R and $PPNT_PROFILE profile for PPNTS."
+      ;;
+    *)
+      echo "Unknown parameter: $1"
+      usage
+      ;;
+  esac
+fi
+
+echo "*** Configure docker compose and trigger deployment***"
+cd ${COMPOSE_FOLDER}
+docker login -u docker -p docker nexus3.onap.org:10001 > /dev/null 2>&1
+source export-ports.sh > /dev/null 2>&1
+
+export CONTAINER_LOCATION="nexus3.onap.org:10001/"
+
+docker compose up -d "policy-clamp-runtime-acm"
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
+
+cd ${REGRESSION_FOLDER}
+
+# Invoke the regression test cases
+mvn clean test -Dtests.skip=false
+
+cd ${COMPOSE_FOLDER}
+source stop-compose.sh clamp
+mv ${COMPOSE_FOLDER}/*.log ${REGRESSION_FOLDER}
+
+cd ${REGRESSION_FOLDER}
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh
new file mode 100755 (executable)
index 0000000..7eb0f58
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2022-2025 OpenInfra Foundation Europe.
+#  Modifications Copyright © 2024 Deutsche Telekom
+# =============================================================================
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+# This script spins up kubernetes cluster in Microk8s for deploying policy helm charts.
+# Runs CSITs in kubernetes.
+
+WORKSPACE=$(git rev-parse --show-toplevel)
+
+function print_usage() {
+    echo "Usage: $0 [OPTIONS] OPERATION PROJECT"
+    echo ""
+    echo "OPTIONS:"
+    echo "  -c, --cluster-only    Install cluster only, without running robot tests"
+    echo "  -l, --local-image     Use local Docker image"
+    echo "  -h, --help            Display this help message"
+    echo ""
+    echo "OPERATION:"
+    echo "  install               Install the cluster and optionally run robot tests"
+    echo "  uninstall             Uninstall the policy deployment"
+    echo "  clean                 Teardown the cluster"
+    echo ""
+    echo "PROJECT:"
+    echo "  Specify the project name (e.g., clamp, api, pap, etc.)"
+}
+
+CLUSTER_ONLY=false
+LOCAL_IMAGE=false
+
+# Parse command-line options
+while [[ $# -gt 0 ]]; do
+    case $1 in
+        -c|--cluster-only)
+            CLUSTER_ONLY=true
+            shift
+            ;;
+        -l|--local-image)
+            LOCAL_IMAGE=true
+            shift
+            ;;
+        -h|--help)
+            print_usage
+            exit 0
+            ;;
+        *)
+            break
+            ;;
+    esac
+done
+
+# Check for required arguments
+if [ $# -lt 2 ]; then
+    echo "Error: Insufficient arguments"
+    print_usage
+    exit 1
+fi
+
+OPERATION=$1
+PROJECT=$2
+
+# Set local image flag
+if [ "$LOCAL_IMAGE" = true ]; then
+    LOCAL_IMAGE_ARG="true"
+else
+    LOCAL_IMAGE_ARG="false"
+fi
+
+# Execute the appropriate script based on the operation
+case $OPERATION in
+    install)
+        "${WORKSPACE}"/csit/resources/scripts/cluster_setup.sh install "$PROJECT" $LOCAL_IMAGE_ARG
+        if [ "$CLUSTER_ONLY" = false ]; then
+            "${WORKSPACE}"/csit/resources/scripts/robot_setup.sh "$PROJECT"
+        fi
+        ;;
+    uninstall)
+        "${WORKSPACE}"/csit/resources/scripts/cluster_setup.sh uninstall
+        ;;
+    clean)
+        "${WORKSPACE}"/csit/resources/scripts/cluster_setup.sh clean
+        ;;
+    *)
+        echo "Error: Invalid operation"
+        print_usage
+        exit 1
+        ;;
+esac
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
new file mode 100755 (executable)
index 0000000..5ddc195
--- /dev/null
@@ -0,0 +1,397 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Modification Copyright 2019 © Samsung Electronics Co., Ltd.
+# Modification Copyright 2021 © AT&T Intellectual Property.
+# Modification Copyright 2021-2025 OpenInfra Foundation Europe.
+# Modifications Copyright 2024-2025 Deutsche Telekom
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+SKIP_BUILDING_ROBOT_IMG=false
+DO_NOT_TEARDOWN=false
+
+# even with forced finish, clean up docker containers
+function on_exit(){
+    rm -rf "${CSAR_DIR}"/csar_temp.csar
+
+    if [ "${DO_NOT_TEARDOWN}" = false ]; then
+        # teardown of compose containers for acm-replicas doesn't work with normal stop-compose script
+        if [ "${ACM_REPLICA_TEARDOWN}" = true ]; then
+            source "${DOCKER_COMPOSE_DIR}"/start-acm-replica.sh --stop --replicas=2
+        elif [ "${APEX_REPLICA_TEARDOWN}" = true ]; then
+            source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --stop --replicas=2
+        else
+            source "${DOCKER_COMPOSE_DIR}"/stop-compose.sh "${PROJECT}"
+        fi
+
+        mv "${DOCKER_COMPOSE_DIR}"/*.log "${ROBOT_LOG_DIR}"
+    fi
+
+    exit $RC
+}
+
+function docker_stats(){
+    # General memory details
+    if [ "$(uname -s)" == "Darwin" ]
+    then
+        sh -c "top -l1 | head -10"
+        echo
+    else
+        sh -c "top -bn1 | head -3"
+        echo
+
+        sh -c "free -h"
+        echo
+    fi
+
+    # Memory details per Docker
+    docker ps --format "table {{ .Image }}\t{{ .Names }}\t{{ .Status }}"
+    echo
+
+    docker stats --no-stream
+    echo
+}
+
+function apex_healthcheck() {
+    sleep 20
+
+    healthy=false
+
+    while [ $healthy = false ]
+    do
+        msg=$(curl -s -k --user 'policyadmin:zb!XztG34' http://localhost:"${APEX_PORT}"/policy/apex-pdp/v1/healthcheck)
+        echo "${msg}" | grep -q true
+        if [ "${?}" -eq 0 ]
+        then
+            healthy=true
+            break
+        fi
+        sleep 10s
+    done
+
+    if  [ $healthy = false ]; then
+        exit 2
+    fi
+}
+
+function check_rest_endpoint() {
+    bash "${SCRIPTS}"/wait_for_rest.sh localhost "${1}"
+    rc=$?
+    if [ $rc -ne 0 ]; then
+        on_exit
+    fi
+}
+
+function export_clamp_variables() {
+    export ROBOT_FILES="clamp-health-check.robot clamp-db-restore.robot clamp-single-element-test.robot clamp-timeout-test.robot
+    clamp-migrate-rollback.robot clamp-trace-test.robot clamp-slas.robot"
+    export TEST_ENV="docker"
+    export PROJECT="clamp"
+    export SCHEMAS_TO_BE_CREATED="policyadmin"
+}
+
+function setup_clamp() {
+    export_clamp_variables
+    export ACM_REPLICA_TEARDOWN=true
+    source "${DOCKER_COMPOSE_DIR}"/start-acm-replica.sh --start --replicas=2 --grafana
+    echo "Waiting 2 minutes for the replicas to be started..."
+    sleep 120
+    # checking on apex-pdp status because acm-r replicas only start after apex-pdp is running
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+    check_rest_endpoint "${ACM_PORT}"
+}
+
+function setup_clamp_simple() {
+    export_clamp_variables
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-clamp-runtime-acm --grafana
+    echo "Waiting 2 minutes acm-runtime and participants to start..."
+    sleep 120
+    check_rest_endpoint "${ACM_PORT}"
+}
+
+function setup_api() {
+    export ROBOT_FILES="api-test.robot api-slas.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh api --grafana
+    echo "Waiting 1 minute for policy-api to start..."
+    sleep 60
+    check_rest_endpoint "${API_PORT}"
+}
+
+function setup_pap() {
+    export ROBOT_FILES="pap-test.robot pap-slas.robot"
+    export PROJECT="pap"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh apex-pdp --grafana
+    echo "Waiting 1 minute for policy-pap to start..."
+    sleep 60
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+}
+
+function setup_apex() {
+    export ROBOT_FILES="apex-pdp-test.robot apex-slas.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh apex-pdp --grafana
+    echo "Waiting 1 minute for apex-pdp to start..."
+    sleep 60
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+}
+
+function setup_apex_medium() {
+    export ROBOT_FILES="apex-slas-3.robot"
+    export APEX_REPLICA_TEARDOWN=true
+    source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --start --replicas=3
+    echo "Waiting 1 minute for apex-pdp to start..."
+    sleep 60
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+}
+
+function setup_apex_large() {
+    export ROBOT_FILES="apex-slas-10.robot"
+    export APEX_REPLICA_TEARDOWN=true
+    source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --start --replicas=10
+    echo "Waiting 1 minute for apex-pdp to start..."
+    sleep 60
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+}
+
+function setup_drools_apps() {
+    export ROBOT_FILES="drools-applications-test.robot drools-applications-slas.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh drools-applications --grafana
+    echo "Waiting 1 minute for drools-pdp and drools-applications to start..."
+    sleep 80
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${XACML_PORT}"
+    check_rest_endpoint "${DROOLS_APPS_PORT}"
+    check_rest_endpoint "${DROOLS_APPS_TELEMETRY_PORT}"
+}
+
+function setup_xacml_pdp() {
+    export ROBOT_FILES="xacml-pdp-test.robot xacml-pdp-slas.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh xacml-pdp --grafana
+    echo "Waiting 1 minute for xacml-pdp to start..."
+    sleep 60
+    check_rest_endpoint "${XACML_PORT}"
+}
+
+function setup_opa_pdp() {
+    export ROBOT_FILES="opa-pdp-test.robot opa-pdp-slas.robot"
+    export PROJECT="opa-pdp"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh opa-pdp --grafana
+    echo "Waiting 3 minutes for OPA-PDP to start..."
+    sleep 180
+    check_rest_endpoint "${PAP_PORT}"
+    check_rest_endpoint "${OPA_PDP_PORT}"
+}
+
+function setup_drools_pdp() {
+    export ROBOT_FILES="drools-pdp-test.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh drools-pdp --grafana
+    echo "Waiting 1 minute for drools-pdp to start..."
+    sleep 60
+    check_rest_endpoint "${DROOLS_TELEMETRY_PORT}"
+}
+
+function setup_distribution() {
+    zip -F "${CSAR_DIR}"/sample_csar_with_apex_policy.csar --out "${CSAR_DIR}"/csar_temp.csar -q
+
+    # Remake temp directory
+    sudo rm -rf /tmp/distribution
+    mkdir /tmp/distribution
+
+    export ROBOT_FILES="distribution-test.robot"
+    source "${DOCKER_COMPOSE_DIR}"/start-compose.sh distribution --grafana
+    echo "Waiting 1 minute for distribution to start..."
+    sleep 60
+    check_rest_endpoint "${DIST_PORT}"
+    check_rest_endpoint "${APEX_PORT}"
+    apex_healthcheck
+}
+
+function build_robot_image() {
+    bash "${SCRIPTS}"/build-csit-docker-image.sh
+    cd "${WORKSPACE}" || exit
+}
+
+function run_robot() {
+    docker compose -f "${DOCKER_COMPOSE_DIR}"/compose.yaml up csit-tests
+    export RC=$?
+}
+
+function set_project_config() {
+    echo "Setting project configuration for: $PROJECT"
+    case $PROJECT in
+
+    clamp | policy-clamp)
+        setup_clamp
+        ;;
+
+    clamp-simple | policy-simple)
+        setup_clamp_simple
+        ;;
+
+    api | policy-api)
+        setup_api
+        ;;
+
+    pap | policy-pap)
+        setup_pap
+        ;;
+
+    apex-pdp | policy-apex-pdp)
+        setup_apex
+        ;;
+
+    apex-pdp-medium | policy-apex-pdp-medium)
+        setup_apex_medium
+        ;;
+
+    apex-pdp-large | policy-apex-pdp-large)
+        setup_apex_large
+        ;;
+
+    xacml-pdp | policy-xacml-pdp)
+        setup_xacml_pdp
+        ;;
+
+    opa-pdp | policy-opa-pdp)
+        setup_opa_pdp
+        ;;
+
+    drools-pdp | policy-drools-pdp)
+        setup_drools_pdp
+        ;;
+
+    drools-applications | policy-drools-applications | drools-apps | policy-drools-apps)
+        setup_drools_apps
+        ;;
+
+    distribution | policy-distribution)
+        setup_distribution
+        ;;
+
+    *)
+        echo "Unknown project supplied. No test will run."
+        exit 1
+        ;;
+    esac
+}
+
+# ensure that teardown and other finalizing steps are always executed
+trap on_exit EXIT
+
+# start the script
+
+# Parse the command-line arguments
+while [[ $# -gt 0 ]]
+do
+  key="$1"
+
+  case $key in
+    --skip-build-csit)
+      export SKIP_BUILDING_ROBOT_IMG=true
+      shift
+      ;;
+    --local)
+      export USE_LOCAL_IMAGES=true
+      shift
+      ;;
+    --no-exit)
+      export DO_NOT_TEARDOWN=true
+      shift
+      ;;
+    --stop)
+      export TEARDOWN=true
+      shift
+      ;;
+    --no-logs)
+      export DONT_PRINT_LOGS=true
+      shift
+      ;;
+    *)
+      export PROJECT="${1}"
+      shift
+      ;;
+  esac
+done
+
+# setup all directories used for test resources
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+export GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' "${WORKSPACE}"/.gitreview)
+export ROBOT_LOG_DIR="${WORKSPACE}/csit/archives/${PROJECT}"
+export SCRIPTS="${WORKSPACE}/csit/resources/scripts"
+export CSAR_DIR="${WORKSPACE}/csit/resources/tests/data/csar"
+export DOCKER_COMPOSE_DIR="${WORKSPACE}/compose"
+export ROBOT_FILES=""
+export ACM_REPLICA_TEARDOWN=false
+export APEX_REPLICA_TEARDOWN=false
+export SCHEMAS_TO_BE_CREATED="policyadmin operationshistory pooling"
+
+cd "${WORKSPACE}" || exit
+
+# recreate the log folder with test results
+sudo rm -rf "${ROBOT_LOG_DIR}"
+mkdir -p "${ROBOT_LOG_DIR}"
+
+# log into nexus docker
+docker login -u docker -p docker nexus3.onap.org:10001
+
+# based on $PROJECT var, setup robot test files and docker compose execution
+compose_version=$(docker compose version)
+
+if [[ $compose_version == *"Docker Compose version"* ]]; then
+    echo "$compose_version"
+else
+    echo "Docker Compose Plugin not installed. Installing now..."
+    sudo mkdir -p /usr/local/lib/docker/cli-plugins
+    sudo curl -SL https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
+    sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
+fi
+
+if [ "${TEARDOWN}" == "true" ]; then
+    on_exit
+fi
+
+set_project_config
+
+unset http_proxy https_proxy
+
+export ROBOT_FILES
+
+# use a separate script to build a CSIT docker image, to isolate the test run
+if [ "${SKIP_BUILDING_ROBOT_IMG}" == "true" ]; then
+    echo "Skipping build csit robot image"
+else
+    build_robot_image
+fi
+
+docker_stats | tee "${ROBOT_LOG_DIR}/_sysinfo-1-after-setup.txt"
+
+# start the CSIT container and run the tests
+run_robot
+
+docker ps --format "table {{ .Image }}\t{{ .Names }}\t{{ .Status }}"