aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rwxr-xr-xcsit/apex-pdp/plans/setup.sh2
-rwxr-xr-xcsit/api/plans/setup.sh6
-rwxr-xr-xcsit/clamp/plans/setup.sh4
-rw-r--r--csit/common-library.robot5
-rw-r--r--csit/compose-grafana.yml283
-rw-r--r--csit/docker-compose-all.yml38
-rwxr-xr-xcsit/include-raw-integration-install-robotframework.sh37
-rw-r--r--csit/metrics/prometheus.yml4
-rwxr-xr-xcsit/pap/plans/setup.sh4
-rwxr-xr-xcsit/prepare-robot-env.sh (renamed from csit/prepare-csit.sh)24
-rwxr-xr-xcsit/run-k8s-csit.sh120
-rwxr-xr-xcsit/run-project-csit.sh6
-rwxr-xr-xcsit/start-grafana.sh14
-rw-r--r--helm/Dockerfile14
-rwxr-xr-xhelm/policy/components/policy-apex-pdp/values.yaml4
-rw-r--r--helm/policy/components/policy-api/resources/config/apiParameters.yaml5
-rwxr-xr-xhelm/policy/components/policy-api/templates/deployment.yaml19
-rw-r--r--helm/policy/components/policy-api/templates/service.yaml16
-rw-r--r--helm/policy/components/policy-api/values.yaml13
-rw-r--r--helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml2
-rw-r--r--helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml1
-rw-r--r--helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml2
-rw-r--r--helm/policy/components/policy-clamp-runtime-acm/values.yaml2
-rw-r--r--helm/policy/components/policy-pap/resources/config/groups.json28
-rw-r--r--helm/policy/components/policy-pap/resources/config/papParameters.yaml48
-rwxr-xr-xhelm/policy/components/policy-pap/templates/service.yaml10
-rwxr-xr-xhelm/policy/components/policy-pap/values.yaml2
-rwxr-xr-xhelm/policy/values.yaml2
-rw-r--r--helm/robot/Chart.yaml22
-rw-r--r--helm/robot/templates/role-binding.yaml28
-rw-r--r--helm/robot/templates/service-account.yaml20
-rw-r--r--helm/robot/templates/test-job.yaml52
-rw-r--r--helm/robot/values.yaml70
-rwxr-xr-xhelm/run-test.sh43
-rw-r--r--helm/tests/apex-pdp-test.robot146
-rw-r--r--helm/tests/api-test.robot188
-rw-r--r--helm/tests/common-library.robot121
-rw-r--r--helm/tests/data/VesEventForPnfPolicy.json28
-rw-r--r--helm/tests/data/VesEventForVnfPolicy.json30
-rw-r--r--helm/tests/data/apex.policy.decisionmaker.input.tosca.json184
-rw-r--r--helm/tests/data/create.group.request.json49
-rw-r--r--helm/tests/data/deploy.group.request.json29
-rw-r--r--helm/tests/data/event.json11
-rwxr-xr-xhelm/tests/data/make_topic.sh (renamed from csit/stop-grafana.sh)25
-rw-r--r--helm/tests/data/onap.pnf.metadataSet.Test.json2755
-rw-r--r--helm/tests/data/onap.policies.apex.pnf.Test.json2896
-rw-r--r--helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json165
-rw-r--r--helm/tests/data/onap.policies.apex.vnf.Test.json3198
-rw-r--r--helm/tests/data/onap.policies.native.apex.Sampledomain.json7436
-rw-r--r--helm/tests/data/onap.policy.guard.decision.request.json16
-rw-r--r--helm/tests/data/onap.policy.monitoring.decision.request.json9
-rw-r--r--helm/tests/data/onap.policy.monitoring.tcagen2.v1.json211
-rw-r--r--helm/tests/data/onap.policy.monitoring.tcagen2.v2.json206
-rw-r--r--helm/tests/data/onap.policy.monitoring.tcagen2.v3.json206
-rw-r--r--helm/tests/data/onap.policy.naming.decision.request.json13
-rw-r--r--helm/tests/data/onap.policy.optimization.decision.request.json15
-rw-r--r--helm/tests/data/policy_deploy.json17
-rw-r--r--helm/tests/data/vCPE.policy.input.tosca.deploy.json5
-rwxr-xr-xhelm/tests/data/wait_topic.sh61
-rw-r--r--helm/tests/distribution-test.robot57
-rw-r--r--helm/tests/drools-applications-test.robot232
-rw-r--r--helm/tests/pap-test.robot128
-rw-r--r--helm/tests/policy-clamp-test.robot98
-rw-r--r--helm/tests/xacml-pdp-test.robot150
-rwxr-xr-xpolicy-db-migrator/smoke-test/mariadb-tests.sh61
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0120-audit_sequence.sql27
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0130-statistics_sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0120-audit_sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0130-statistics_sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql4
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql3
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql3
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql3
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0120-audit_sequence.sql27
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0130-statistics_sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0120-audit_sequence.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0130-statistics_sequence.sql22
135 files changed, 19557 insertions, 573 deletions
diff --git a/README.md b/README.md
index 7126bf53..7658c6c3 100644
--- a/README.md
+++ b/README.md
@@ -11,4 +11,17 @@ the OS base for policy images.
Helm directory is added to include the helm chart for policy-models-simulators.
To spin the kubernetes pod up:
1. Execute the below commands:
- helm upgrade -i <release_name> policy-models-simulator \ No newline at end of file
+ helm upgrade -i <release_name> policy-models-simulator
+
+
+Running Policy CSIT in kubernetes:
+ To run CSIT in kubernetes, docker/csit/run-k8s-csit.sh script can be invoked with the arguments {install} {project_name}
+ When the project name is not supplied, the script only installs the policy helm charts and doesn't execute any robot tests.
+ To teardown the kubernetes cluster, the same script can be invoked with the argument {uninstall}
+
+Steps involved in running CSIT in kubernetes:
+ 1. The script verifies microk8s based kubernetes cluster is running in the system and deploys kubernetes if required.
+ 2. Deploys policy helm charts under the default namespace.
+ 3. Builds docker image of the robot framework and deploys robot framework helm chart in the default namespace.
+ 4. Invokes the respective robot test file for the project supplied by the user.
+ The test execution results can be viewed from the logs of policy-csit-robot pod. \ No newline at end of file
diff --git a/csit/apex-pdp/plans/setup.sh b/csit/apex-pdp/plans/setup.sh
index 1320b520..f38b9e45 100755
--- a/csit/apex-pdp/plans/setup.sh
+++ b/csit/apex-pdp/plans/setup.sh
@@ -30,7 +30,7 @@ sudo apt-get -y install libxml2-utils
source "${SCRIPTS}"/get-versions.sh
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d apex-pdp
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d apex-pdp grafana
unset http_proxy https_proxy
diff --git a/csit/api/plans/setup.sh b/csit/api/plans/setup.sh
index 8a20d93d..874eb954 100755
--- a/csit/api/plans/setup.sh
+++ b/csit/api/plans/setup.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright 2021-2022 Nordix Foundation.
+# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright 2021-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.
@@ -45,7 +45,7 @@ sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
echo "${POLICY_API_VERSION}"
cd "${SCRIPTS}"
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d api
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d api grafana
sleep 10
unset http_proxy https_proxy
diff --git a/csit/clamp/plans/setup.sh b/csit/clamp/plans/setup.sh
index 4ce48297..02770a86 100755
--- a/csit/clamp/plans/setup.sh
+++ b/csit/clamp/plans/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 Nordix Foundation.
+# Copyright (C) 2021-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.
@@ -27,7 +27,7 @@ sudo apt-get -y install libxml2-utils
source "${SCRIPTS}"/get-versions.sh
# Bringup ACM runtime containers
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-runtime-acm
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-runtime-acm grafana
sleep 10
unset http_proxy https_proxy
diff --git a/csit/common-library.robot b/csit/common-library.robot
index 95831b0d..c19f78cd 100644
--- a/csit/common-library.robot
+++ b/csit/common-library.robot
@@ -119,3 +119,8 @@ GetMetrics
${resp}= GET On Session policy ${context_path}metrics expected_status=200
Log Received response from policy ${resp.text}
[return] ${resp}
+
+QueryPrometheus ${query}
+ ${resp}= GET http://localhost:30259/api/v1/query?query=${query} expected_status=200
+ Log Received response from policy ${resp.text}
+ [return] ${resp}
diff --git a/csit/compose-grafana.yml b/csit/compose-grafana.yml
deleted file mode 100644
index 65106b18..00000000
--- a/csit/compose-grafana.yml
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-# ===========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=====================================================
-#
-version: '2'
-services:
- mariadb:
- image: nexus3.onap.org:10001/mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d:ro
- - ./config/clamp/policy-clamp-create-tables.sql:/tmp/policy-clamp-create-tables.sql
- expose:
- - 3306
- policy-db-migrator:
- image: nexus3.onap.org:10001/onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
- container_name: policy-db-migrator
- hostname: policy-db-migrator
- depends_on:
- - mariadb
- expose:
- - 6824
- env_file: config/db/db.conf
- environment:
- SQL_DB: policyadmin
- SQL_HOST: mariadb
- volumes:
- - ./db_migrator_policy_init.sh:/opt/app/policy/bin/db_migrator_policy_init.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.sh',
- 'mariadb', '3306'
- ]
- simulator:
- image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION}
- container_name: simulator
- hostname: simulator
- networks:
- default:
- aliases:
- - message-router
- - aai-sim
- - grpc-sim
- - sdnc-sim
- - so-sim
- - vfc-sim
- volumes:
- - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro
- expose:
- - 6666
- - 6668
- - 6669
- - 6670
- - 3904
- - 6680
- ports:
- - 30227:3904
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - policy-db-migrator
- hostname: policy-api
- ports:
- - 30440:6969
- volumes:
- - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
- - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
- entrypoint: ./wait_for_port.sh
- command: [
- '-c', './policy-api.sh',
- 'mariadb', '3306',
- 'policy-db-migrator', '6824'
- ]
- pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- - simulator
- - api
- hostname: policy-pap
- ports:
- - 30442:6969
- volumes:
- - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
- - ./config/pap/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
- - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
- entrypoint: ./wait_for_port.sh
- command: [
- '-c', './policy-pap.sh',
- 'mariadb', '3306',
- 'message-router', '3904',
- 'api', '6969'
- ]
- xacml-pdp:
- image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION}
- container_name: policy-xacml-pdp
- depends_on:
- - mariadb
- - simulator
- - pap
- hostname: policy-xacml-pdp
- ports:
- - 30441:6969
- - 30999:3904
- volumes:
- - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
- - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
- entrypoint: ./wait_for_port.sh
- command: [
- '-c', './policy-pdpx.sh',
- 'mariadb', '3306',
- 'message-router', '3904',
- 'pap', '6969'
- ]
- drools:
- image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_PDP_VERSION}
- container_name: drools
- depends_on:
- - mariadb
- - simulator
- - pap
- hostname: drools
- ports:
- - 30217:6969
- - 30216:9696
- volumes:
- - ./config/drools-pdp/custom:/tmp/policy-install/config:ro
- - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
- env_file:
- - config/drools-pdp/env/base.conf
- entrypoint: /opt/app/policy/bin/wait_for_port.sh
- command: [
- '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
- 'mariadb', '3306',
- 'message-router', '3904'
- ]
- drools-apps:
- image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION}
- container_name: drools-apps
- depends_on:
- - mariadb
- - simulator
- - pap
- - xacml-pdp
- hostname: drools-apps
- ports:
- - 30221:6969
- - 30219:9696
- volumes:
- - ./config/drools-applications/custom:/tmp/policy-install/config:ro
- - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
- env_file:
- - config/drools-applications/env/base.conf
- - config/drools-applications/env/feature-healthcheck.conf
- - config/drools-applications/env/feature-pooling-dmaap.conf
- entrypoint: /opt/app/policy/bin/wait_for_port.sh
- command: [
- '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
- 'mariadb', '3306',
- 'message-router', '3904',
- 'pap', '6969',
- 'aai-sim', '6666',
- 'sdnc-sim', '6668',
- 'so-sim', '6669',
- 'vfc-sim', '6670'
- ]
- apex-pdp:
- image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
- container_name: policy-apex-pdp
- depends_on:
- - mariadb
- - simulator
- - pap
- hostname: policy-apex-pdp
- ports:
- - 30237:6969
- expose:
- - 23324
- volumes:
- - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json: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',
- 'mariadb', '3306',
- 'message-router', '3904',
- 'pap', '6969'
- ]
- distribution:
- image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION}
- container_name: policy-distribution
- depends_on:
- - mariadb
- - api
- - pap
- - apex-pdp
- hostname: policy-distribution
- ports:
- - 30238:6969
- volumes:
- - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
- - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/: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', './policy-dist.sh',
- 'mariadb', '3306',
- 'message-router', '3904',
- 'pap', '6969',
- 'apex-pdp', '6969'
- ]
- policy-clamp-runtime-acm:
- image: nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION}
- container_name: policy-clamp-runtime-acm
- depends_on:
- - mariadb
- - simulator
- hostname: policy-clamp-runtime-acm
- ports:
- - 30258:6969
- volumes:
- - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
- - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/AcRuntimeParameters.yaml:ro
- entrypoint: /opt/app/policy/bin/wait_for_port.sh
- command: [
- '-c', './acm-runtime.sh',
- 'message-router', '3904'
- ]
- prometheus:
- image: prom/prometheus:v2.32.1
- container_name: prometheus
- hostname: prometheus
- ports:
- - 30259:9090
- volumes:
- - ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
- grafana:
- image: grafana/grafana-oss:8.3.4
- container_name: grafana
- depends_on:
- - prometheus
- hostname: grafana
- ports:
- - 30269: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
- node-exporter:
- image: prom/node-exporter:latest
- container_name: node-exporter
- restart: unless-stopped
- volumes:
- - /proc:/host/proc:ro
- - /sys:/host/sys:ro
- - /:/rootfs:ro
- command:
- - '--path.procfs=/host/proc'
- - '--path.rootfs=/rootfs'
- - '--path.sysfs=/host/sys'
- - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
- expose:
- - 9100
diff --git a/csit/docker-compose-all.yml b/csit/docker-compose-all.yml
index e64ac8a9..38a5de51 100644
--- a/csit/docker-compose-all.yml
+++ b/csit/docker-compose-all.yml
@@ -2,7 +2,7 @@
# ===========LICENSE_START====================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
-# Modification Copyright 2021-2022 Nordix Foundation.
+# Modification Copyright 2021-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.
@@ -365,3 +365,39 @@ services:
-jar ./policy-clamp-backend.jar
--spring.config.name=ClampBackend
--spring.config.location=/opt/policy/clamp/config/ClampBackend.properties
+ prometheus:
+ image: prom/prometheus:v2.32.1
+ container_name: prometheus
+ hostname: prometheus
+ ports:
+ - 30259:9090
+ volumes:
+ - ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
+ grafana:
+ image: grafana/grafana-oss:8.3.4
+ container_name: grafana
+ depends_on:
+ - prometheus
+ hostname: grafana
+ ports:
+ - 30269: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
+ node-exporter:
+ image: prom/node-exporter:latest
+ container_name: node-exporter
+ restart: unless-stopped
+ volumes:
+ - /proc:/host/proc:ro
+ - /sys:/host/sys:ro
+ - /:/rootfs:ro
+ command:
+ - '--path.procfs=/host/proc'
+ - '--path.rootfs=/rootfs'
+ - '--path.sysfs=/host/sys'
+ - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
+ expose:
+ - 9100
+
diff --git a/csit/include-raw-integration-install-robotframework.sh b/csit/include-raw-integration-install-robotframework.sh
deleted file mode 100755
index 2711d18e..00000000
--- a/csit/include-raw-integration-install-robotframework.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START===================================================
-# Copyright (c) 2016 The Linux Foundation and others.
-# Modification Copyright 2021. Nordix Foundation.
-# Modification Copyright 2021 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=====================================================
-#
-
-ROBOT_VENV=$(mktemp -d)
-echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
-
-echo "Python version is: $(python3 --version)"
-
-python3 -m venv "${ROBOT_VENV}"
-source "${ROBOT_VENV}/bin/activate"
-
-set -exu
-
-# Make sure pip3 itself us up-to-date.
-python3 -m pip install --upgrade pip
-
-echo "Installing Python Requirements"
-python3 -m pip install -r ${SCRIPTS}/pylibs.txt
-python3 -m pip freeze
diff --git a/csit/metrics/prometheus.yml b/csit/metrics/prometheus.yml
index a5e1680a..789cfc2a 100644
--- a/csit/metrics/prometheus.yml
+++ b/csit/metrics/prometheus.yml
@@ -1,6 +1,6 @@
#
# ===========LICENSE_START====================================================
-# Copyright (C) 2022 Nordix Foundation.
+# 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.
@@ -32,6 +32,7 @@ alerting:
scrape_configs:
- job_name: "api-metrics"
+ metrics_path: /policy/api/v1/metrics
static_configs:
- targets: ["policy-api:6969"]
basic_auth:
@@ -39,6 +40,7 @@ scrape_configs:
password: "zb!XztG34"
- job_name: "pap-metrics"
+ metrics_path: /policy/pap/v1/metrics
static_configs:
- targets: ["policy-pap:6969"]
basic_auth:
diff --git a/csit/pap/plans/setup.sh b/csit/pap/plans/setup.sh
index c5b75937..4f48d124 100755
--- a/csit/pap/plans/setup.sh
+++ b/csit/pap/plans/setup.sh
@@ -2,7 +2,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2022 Nordix Foundation.
# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
-# Modifications Copyright (C) 2022 Nordix Foundation.
+# 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.
@@ -32,7 +32,7 @@ bash "${SCRIPTS}"/get-models-examples.sh
echo "${POLICY_PAP_VERSION}"
cd "${SCRIPTS}"
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d pap apex-pdp
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d pap apex-pdp grafana
sleep 10
unset http_proxy https_proxy
diff --git a/csit/prepare-csit.sh b/csit/prepare-robot-env.sh
index b51e0a13..25376cda 100755
--- a/csit/prepare-csit.sh
+++ b/csit/prepare-robot-env.sh
@@ -2,7 +2,7 @@
#
# Copyright 2019 © Samsung Electronics Co., Ltd.
# Modification Copyright 2021 © AT&T Intellectual Property.
-# Modification Copyright 2021-2022 Nordix Foundation.
+# Modification Copyright 2021-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.
@@ -23,18 +23,20 @@ if [ -z "$WORKSPACE" ]; then
export WORKSPACE=$(git rev-parse --show-toplevel)
fi
-# Assume that if ROBOT_VENV is set and virtualenv with system site packages can be activated,
-# include-raw-integration-install-robotframework.sh has already been executed
+ROBOT_VENV=$(mktemp -d)
+echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
-if [ -f "${WORKSPACE}"/env.properties ]; then
- source "${WORKSPACE}"/env.properties
-fi
-if [ -f "${ROBOT_VENV}"/bin/activate ]; then
- source "${ROBOT_VENV}"/bin/activate
-else
- source ${SCRIPTS}/include-raw-integration-install-robotframework.sh
-fi
+echo "Python version is: $(python3 --version)"
+
+python3 -m venv --clear "${ROBOT_VENV}"
+source "${ROBOT_VENV}/bin/activate"
+set -exu
+
+python3 -m pip install --upgrade pip setuptools
+echo "Installing Python Requirements"
+python3 -m pip install -r ${SCRIPTS}/pylibs.txt
+python3 -m pip freeze
# install eteutils
mkdir -p "${ROBOT_VENV}"/src/onap
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh
index 63df5dc2..33cf2f8a 100755
--- a/csit/run-k8s-csit.sh
+++ b/csit/run-k8s-csit.sh
@@ -19,6 +19,24 @@
# ============LICENSE_END======================================================
# This script spins up kubernetes cluster in Microk8s for deploying policy helm charts.
+# Runs CSITs in kubernetes.
+
+CSIT_SCRIPT="run-test.sh"
+ROBOT_DOCKER_IMAGE="policy-csit-robot"
+POLICY_CLAMP_ROBOT="policy-clamp-test.robot"
+POLICY_API_ROBOT="api-test.robot"
+POLICY_PAP_ROBOT="pap-test.robot"
+POLICY_APEX_PDP_ROBOT="apex-pdp-test.robot"
+POLICY_XACML_PDP_ROBOT="xacml-pdp-test.robot"
+POLICY_DROOLS_PDP_ROBOT="drools-pdp-test.robot"
+POLICY_API_CONTAINER="policy-api"
+POLICY_PAP_CONTAINER="policy-pap"
+POLICY_CLAMP_CONTAINER="policy-clamp-runtime-acm"
+POLICY_APEX_CONTAINER="policy-apex-pdp"
+
+export PROJECT=""
+export ROBOT_FILE=""
+export READINESS_CONTAINERS=()
function spin_microk8s_cluster () {
echo "Verify if Microk8s cluster is running.."
@@ -35,37 +53,133 @@ function spin_microk8s_cluster () {
fi
echo "Microk8s cluster installed successfully"
sudo usermod -a -G microk8s $USER
- echo "Enabling DNS and helm3"
+ echo "Enabling DNS and helm3 plugins"
microk8s.enable dns helm3
echo "Creating configuration file for Microk8s"
microk8s kubectl config view --raw > $HOME/.kube/config
chmod 600 $HOME/.kube/config
echo "K8s installation completed"
+ echo "----------------------------------------"
else
echo "K8s cluster is already running"
+ echo "----------------------------------------"
return 0
fi
}
+
function teardown_cluster () {
echo "Removing k8s cluster and k8s configuration file"
sudo snap remove microk8s;rm -rf $HOME/.kube/config
+ sudo rm -rf /dockerdata-nfs/mariadb-galera/
echo "K8s Cluster removed"
}
+function build_robot_image () {
+ echo "Build docker image for robot framework"
+ cd ../helm;
+ clone_models
+ echo "Build robot framework docker image"
+ docker login -u docker -p docker 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 "---------------------------------------------"
+ echo "Importing robot image in to microk8s registry"
+ docker save -o policy-csit-robot.tar ${ROBOT_DOCKER_IMAGE}:latest
+ microk8s ctr image import policy-csit-robot.tar
+ if [ "${?}" -eq 0 ]; then
+ rm -rf policy-csit-robot.tar
+ rm -rf tests/models/
+ echo "---------------------------------------------"
+ echo "Installing Robot framework pod for running CSIT"
+ microk8s helm install csit-robot robot --set robot=$ROBOT_FILE --set "readiness={${READINESS_CONTAINERS[*]}}";
+ echo "Please check the logs of policy-csit-robot pod for the test execution results"
+ fi
+}
+
+function clone_models () {
+ GIT_TOP=$(git rev-parse --show-toplevel)
+ GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+ "${GIT_TOP}"/.gitreview)
+ echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+ # download models examples
+ git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git 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
+}
+
+
+function get_robot_file () {
+ case $PROJECT in
+
+ clamp | policy-clamp)
+ export ROBOT_FILE=$POLICY_CLAMP_ROBOT
+ export READINESS_CONTAINERS=($POLICY_CLAMP_CONTAINER)
+ ;;
+
+ 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_PAP_CONTAINER,$POLICY_API_CONTAINER)
+ ;;
+
+ apex-pdp | policy-apex-pdp)
+ export ROBOT_FILE=$POLICY_APEX_PDP_ROBOT
+ export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER)
+ ;;
+
+ xacml-pdp | policy-xacml-pdp)
+ export ROBOT_FILE=($POLICY_XACML_PDP_ROBOT)
+ ;;
+
+ drools-pdp | policy-drools-pdp)
+ export ROBOT_FILE=($POLICY_DROOLS_PDP_ROBOT)
+ ;;
+
+ *)
+ echo "unknown project supplied"
+ ;;
+esac
+
+}
+
+
if [ $1 == "install" ]; then
spin_microk8s_cluster
if [ "${?}" -eq 0 ]; then
echo "Installing policy helm charts in the default namespace"
- cd ../helm/;helm dependency build policy;microk8s helm install dev-policy policy;
+ cd ../helm/;microk8s helm dependency build policy;microk8s helm install csit-policy policy;
echo "Policy chart installation completed"
+ echo "-------------------------------------------"
+ fi
+
+ if [ "$2" ]; then
+ export PROJECT=$2
+ get_robot_file
+ echo "CSIT will be invoked from $ROBOT_FILE"
+ echo "Readiness containers: ${READINESS_CONTAINERS[*]}"
+ echo "-------------------------------------------"
+ build_robot_image
+ else
+ echo "No project supplied for running CSIT"
fi
elif [ $1 == "uninstall" ]; then
teardown_cluster
else
- echo "Invalid arguments provided. Usage: $0 [option..] {install | uninstall}"
+ echo "Invalid arguments provided. Usage: $0 [option..] {install {project} | uninstall}"
fi
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
index 6a4a9bb3..a3837b03 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -3,7 +3,7 @@
# Copyright 2016-2017 Huawei Technologies Co., Ltd.
# Modification Copyright 2019 © Samsung Electronics Co., Ltd.
# Modification Copyright 2021 © AT&T Intellectual Property.
-# Modification Copyright 2021-2022 Nordix Foundation.
+# Modification Copyright 2021-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.
@@ -178,9 +178,9 @@ rm -rf "${WORKSPACE}/csit/archives/${PROJECT}"
mkdir -p "${WORKSPACE}/csit/archives/${PROJECT}"
# Run installation of prerequired libraries
-source_safely "${SCRIPTS}/prepare-csit.sh"
+source_safely "${SCRIPTS}/prepare-robot-env.sh"
-# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh
+# Activate the virtualenv containing all the required libraries installed by prepare-robot-env.sh
source_safely "${ROBOT_VENV}/bin/activate"
WORKDIR=$(mktemp -d)
diff --git a/csit/start-grafana.sh b/csit/start-grafana.sh
index e081d04c..646b6f6d 100755
--- a/csit/start-grafana.sh
+++ b/csit/start-grafana.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# ============LICENSE_START====================================================
-# Copyright (C) 2022 Nordix Foundation.
+# 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.
@@ -20,6 +20,7 @@
SCRIPTS=$(git rev-parse --show-toplevel)
export SCRIPTS="${SCRIPTS}"/csit
+export CONTAINER_LOCATION="nexus3.onap.org:10001/"
source "${SCRIPTS}"/get-versions.sh
@@ -27,14 +28,11 @@ export PROJECT="${1}"
if [ -z "${PROJECT}" ]; then
echo "Starting all components..."
- docker-compose -f "${SCRIPTS}"/compose-grafana.yml up -d
+ docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d
else
echo "Starting ${PROJECT} application..."
- docker-compose -f "${SCRIPTS}"/compose-grafana.yml up -d "${PROJECT}" grafana
+ docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d "${PROJECT}" grafana
fi
-prometheus=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' prometheus)
-grafana=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' grafana)
-
-echo "Prometheus server: http://${prometheus}:9090"
-echo "Grafana server: http://${grafana}:3000"
+echo "Prometheus server: http://localhost:30259"
+echo "Grafana server: http://localhost:30269"
diff --git a/helm/Dockerfile b/helm/Dockerfile
new file mode 100644
index 00000000..5249e734
--- /dev/null
+++ b/helm/Dockerfile
@@ -0,0 +1,14 @@
+FROM python:3
+ARG CSIT_SCRIPT=${CSIT_SCRIPT}
+ARG ROBOT_FILE=${ROBOT_FILE}
+ENV ROBOT_WORKSPACE /opt/robotworkspace
+ENV ROBOT_FILE $ROBOT_FILE
+RUN python3 -m pip install --upgrade pip
+RUN python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
+RUN python3 -m pip freeze
+RUN mkdir -p ${ROBOT_WORKSPACE}
+COPY ${CSIT_SCRIPT} ${ROBOT_WORKSPACE}
+COPY tests/ ${ROBOT_WORKSPACE}/
+WORKDIR ${ROBOT_WORKSPACE}
+RUN chmod +x run-test.sh
+CMD ["sh", "-c", "./run-test.sh" , "${ROBOT_FILE}"]
diff --git a/helm/policy/components/policy-apex-pdp/values.yaml b/helm/policy/components/policy-apex-pdp/values.yaml
index 0218b937..62c1e477 100755
--- a/helm/policy/components/policy-apex-pdp/values.yaml
+++ b/helm/policy/components/policy-apex-pdp/values.yaml
@@ -29,7 +29,7 @@ global:
# Application configuration defaults.
#################################################################
# application image
-image: nexus3.onap.org:10001/onap/policy-apex-pdp:2.8.1
+image: nexus3.onap.org:10001/onap/policy-apex-pdp:2.9-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
@@ -38,7 +38,7 @@ debugEnabled: false
# application configuration
restServer:
- user: healthcheck
+ user: policyadmin
password: zb!XztG34
diff --git a/helm/policy/components/policy-api/resources/config/apiParameters.yaml b/helm/policy/components/policy-api/resources/config/apiParameters.yaml
index 1e8d3da1..48e1df64 100644
--- a/helm/policy/components/policy-api/resources/config/apiParameters.yaml
+++ b/helm/policy/components/policy-api/resources/config/apiParameters.yaml
@@ -17,9 +17,11 @@
# ============LICENSE_END=========================================================
server:
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.port }}
ssl:
enabled: false
+ servlet:
+ context-path: /policy/api/v1
spring:
security.user:
@@ -99,4 +101,5 @@ management:
base-path: /
exposure:
include: health,metrics,prometheus
+ path-mapping.metrics: plain-metrics
path-mapping.prometheus: metrics
diff --git a/helm/policy/components/policy-api/templates/deployment.yaml b/helm/policy/components/policy-api/templates/deployment.yaml
index f93854ce..ae8b85fb 100755
--- a/helm/policy/components/policy-api/templates/deployment.yaml
+++ b/helm/policy/components/policy-api/templates/deployment.yaml
@@ -23,19 +23,19 @@ kind: Deployment
metadata:
name: {{ .Chart.Name }}
namespace: default
- labels:
- app: {{ .Chart.Name }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- heritage: Helm
spec:
selector:
matchLabels:
- app: {{ .Chart.Name }}
+ app.kubernetes.io/name: {{ .Chart.Name }}
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
- app: {{ .Chart.Name }}
+ app.kubernetes.io/name: {{ .Chart.Name }}
+ helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ app.kubernetes.io/instance: RELEASE
+ app.kubernetes.io/managed-by: Helm
+ name: {{ .Chart.Name }}
spec:
initContainers:
- command:
@@ -93,20 +93,21 @@ spec:
command: ["/opt/app/policy/api/bin/policy-api.sh"]
args: ["/opt/app/policy/api/etc/mounted/apiParameters.yaml"]
ports:
- - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.port }}
+ name: http
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.port }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end -}}
readinessProbe:
httpGet:
path: {{ .Values.readiness.api }}
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.port }}
httpHeaders:
- name: Authorization
value: Basic {{ printf "%s:%s" .Values.restServer.user .Values.restServer.password | b64enc }}
diff --git a/helm/policy/components/policy-api/templates/service.yaml b/helm/policy/components/policy-api/templates/service.yaml
index 7a2e6473..07a3bdc1 100644
--- a/helm/policy/components/policy-api/templates/service.yaml
+++ b/helm/policy/components/policy-api/templates/service.yaml
@@ -24,16 +24,16 @@ metadata:
name: {{ .Chart.Name }}
namespace: default
labels:
- app: {{ .Chart.Name }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: release
- heritage: Helm
+ app.kubernetes.io/name: {{ .Chart.Name }}
+ helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ app.kubernetes.io/managed-by: Helm
spec:
type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.service.port }}
+ nodePort: {{ .Values.service.nodePort }}
+ protocol: TCP
name: {{ .Values.service.portName }}
selector:
- app: {{ .Chart.Name }}
- release: release \ No newline at end of file
+ app.kubernetes.io/name: {{ .Chart.Name }} \ No newline at end of file
diff --git a/helm/policy/components/policy-api/values.yaml b/helm/policy/components/policy-api/values.yaml
index 09418b7d..c1e654c0 100644
--- a/helm/policy/components/policy-api/values.yaml
+++ b/helm/policy/components/policy-api/values.yaml
@@ -20,7 +20,6 @@
# Global configuration defaults.
#################################################################
global:
- nodePortPrefix: 304
persistence: {}
aafEnabled: false
@@ -29,7 +28,7 @@ global:
# Application configuration defaults.
#################################################################
# application image
-image: nexus3.onap.org:10001/onap/policy-api:2.7.1
+image: nexus3.onap.org:10001/onap/policy-api:2.8-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
@@ -61,6 +60,7 @@ liveness:
# necessary to disable liveness probe when setting breakpoints
# in debugger so K8s doesn't restart unresponsive container
enabled: true
+ port: http
readiness:
initialDelaySeconds: 10
@@ -69,14 +69,13 @@ readiness:
successThreshold: 1
failureThreshold: 3
timeout: 60
+ port: http
service:
- type: ClusterIP
- name: policy-api
+ type: NodePort
portName: http
- externalPort: 6969
- internalPort: 6969
- nodePort: 40
+ port: 6969
+ nodePort: 30441
ingress:
enabled: false
diff --git a/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml
index ba7dd7c8..98349d28 100644
--- a/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml
+++ b/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml
@@ -20,7 +20,7 @@
# Application configuration defaults.
#################################################################
# application image
-image: onap/policy-clamp-ac-k8s-ppnt:6.3.1
+image: onap/policy-clamp-ac-k8s-ppnt:6.4.0
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
index 17242c2f..899cced6 100644
--- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
+++ b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
@@ -124,5 +124,6 @@ runtime:
management:
endpoints:
web:
+ base-path: /
exposure:
include: health, metrics, prometheus
diff --git a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
index ba192cb5..14f5bb3d 100644
--- a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
+++ b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
@@ -105,7 +105,7 @@ spec:
command: ["/opt/app/policy/clamp/bin/acm-runtime.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/acRuntimeParameters.yaml"]
ports:
- - containerPort: 6969
+ - containerPort: {{ .Values.service.ports.port }}
name: http-api
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
diff --git a/helm/policy/components/policy-clamp-runtime-acm/values.yaml b/helm/policy/components/policy-clamp-runtime-acm/values.yaml
index 544b1d05..4c606f03 100644
--- a/helm/policy/components/policy-clamp-runtime-acm/values.yaml
+++ b/helm/policy/components/policy-clamp-runtime-acm/values.yaml
@@ -21,7 +21,7 @@
# Application configuration defaults.
#################################################################
# application image
-image: nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:6.3.1
+image: nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:6.4-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/helm/policy/components/policy-pap/resources/config/groups.json b/helm/policy/components/policy-pap/resources/config/groups.json
new file mode 100644
index 00000000..bd5c2868
--- /dev/null
+++ b/helm/policy/components/policy-pap/resources/config/groups.json
@@ -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/helm/policy/components/policy-pap/resources/config/papParameters.yaml b/helm/policy/components/policy-pap/resources/config/papParameters.yaml
index 8dd624a8..411061bf 100644
--- a/helm/policy/components/policy-pap/resources/config/papParameters.yaml
+++ b/helm/policy/components/policy-pap/resources/config/papParameters.yaml
@@ -55,12 +55,18 @@ spring:
server:
port: 6969
+ servlet:
+ context-path: /policy/pap/v1
ssl:
enabled: false
pap:
name: PapGroup
aaf: false
+ topic:
+ pdp-pap.name: POLICY-PDP-PAP
+ notification.name: POLICY-NOTIFICATION
+ heartbeat.name: POLICY-HEARTBEAT
pdpParameters:
heartBeatMs: 120000
updateParameters:
@@ -69,43 +75,34 @@ pap:
stateChangeParameters:
maxRetryCount: 1
maxWaitMs: 30000
- savePdpStatisticsInDb: false
+ savePdpStatisticsInDb: true
topicParameterGroup:
topicSources:
- - topic: POLICY-PDP-PAP
+ - topic: ${pap.topic.pdp-pap.name}
servers:
- message-router
+ topicCommInfrastructure: dmaap
useHttps: false
fetchTimeout: 15000
- topicCommInfrastructure: dmaap
- - topic: POLICY-HEARTBEAT
- effectiveTopic: POLICY-PDP-PAP
+ - topic: ${pap.topic.heartbeat.name}
+ effectiveTopic: ${pap.topic.pdp-pap.name}
consumerGroup: policy-pap
servers:
- message-router
+ topicCommInfrastructure: dmaap
useHttps: false
fetchTimeout: 15000
- topicCommInfrastructure: dmaap
topicSinks:
- - topic: POLICY-PDP-PAP
+ - topic: ${pap.topic.pdp-pap.name}
servers:
- message-router
- useHttps: false
topicCommInfrastructure: dmaap
- - topic: POLICY-NOTIFICATION
+ useHttps: false
+ - topic: ${pap.topic.notification.name}
servers:
- message-router
- useHttps: false
topicCommInfrastructure: dmaap
-# If Strimzi Kafka to be used for communication, replace following configuration for topicSources and topicSinks
-# servers:
-# - {{ .Values.config.kafkaBootstrap }}:9092
-# topicCommInfrastructure: kafka
-# additionalProps:
-# security.protocol: SASL_PLAINTEXT
-# sasl.mechanism: SCRAM-SHA-512
-# sasl.jaas.config: ${JAASLOGIN}
-
+ useHttps: false
healthCheckRestClientParameters:
- clientName: api
hostname: policy-api
@@ -114,18 +111,6 @@ pap:
password: "${API_PASSWORD}"
useHttps: false
basePath: policy/api/v1/healthcheck
- - clientName: distribution
- hostname: policy-distribution
- port: 6969
- userName: "${DISTRIBUTION_USER}"
- password: "${DISTRIBUTION_PASSWORD}"
- useHttps: false
- basePath: healthcheck
- - clientName: dmaap
- hostname: message-router
- port: 3904
- useHttps: false
- basePath: topics
management:
endpoints:
@@ -133,4 +118,5 @@ management:
base-path: /
exposure:
include: health, metrics, prometheus
+ path-mapping.metrics: plain-metrics
path-mapping.prometheus: metrics
diff --git a/helm/policy/components/policy-pap/templates/service.yaml b/helm/policy/components/policy-pap/templates/service.yaml
index 1bee30f1..92336394 100755
--- a/helm/policy/components/policy-pap/templates/service.yaml
+++ b/helm/policy/components/policy-pap/templates/service.yaml
@@ -24,10 +24,9 @@ metadata:
name: {{ .Chart.Name }}
namespace: default
labels:
- name: {{ .Chart.Name }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: RELEASE
- heritage: Helm
+ app.kubernetes.io/name: {{ .Chart.Name }}
+ helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ app.kubernetes.io/managed-by: Helm
spec:
ports:
@@ -38,6 +37,5 @@ spec:
ipFamilyPolicy: PreferDualStack
type: {{ .Values.service.type }}
selector:
- app: {{ .Chart.Name }}
- release: RELEASE
+ app.kubernetes.io/name: {{ .Chart.Name }}
sessionAffinity: None
diff --git a/helm/policy/components/policy-pap/values.yaml b/helm/policy/components/policy-pap/values.yaml
index ae0defb9..85f08c0b 100755
--- a/helm/policy/components/policy-pap/values.yaml
+++ b/helm/policy/components/policy-pap/values.yaml
@@ -28,7 +28,7 @@ global:
# Application configuration defaults.
#################################################################
# application image
-image: nexus3.onap.org:10001/onap/policy-pap:2.7.1
+image: nexus3.onap.org:10001/onap/policy-pap:2.8-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/helm/policy/values.yaml b/helm/policy/values.yaml
index 25e4dbfe..6dfced08 100755
--- a/helm/policy/values.yaml
+++ b/helm/policy/values.yaml
@@ -60,7 +60,7 @@ mariadb:
image: mariadb:10.5.8
dbmigrator:
- image: onap/policy-db-migrator:2.5.1
+ image: onap/policy-db-migrator:2.6-SNAPSHOT-latest
schema: policyadmin
policy_home: "/opt/app/policy"
diff --git a/helm/robot/Chart.yaml b/helm/robot/Chart.yaml
new file mode 100644
index 00000000..37e3ae62
--- /dev/null
+++ b/helm/robot/Chart.yaml
@@ -0,0 +1,22 @@
+# 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.
+
+apiVersion: v2
+name: policy-csit-robot
+description: A CSIT robot framework helm chart for policy
+keywords:
+ - csit
+ - robot
+type: application
+version: 0.1.0
diff --git a/helm/robot/templates/role-binding.yaml b/helm/robot/templates/role-binding.yaml
new file mode 100644
index 00000000..314df64a
--- /dev/null
+++ b/helm/robot/templates/role-binding.yaml
@@ -0,0 +1,28 @@
+{{/*
+# 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.
+*/}}
+
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: {{ .Chart.Name }}-read
+ namespace: default
+subjects:
+ - kind: ServiceAccount
+ name: {{ .Chart.Name }}-read
+roleRef:
+ kind: Role
+ name: read
+ apiGroup: rbac.authorization.k8s.io \ No newline at end of file
diff --git a/helm/robot/templates/service-account.yaml b/helm/robot/templates/service-account.yaml
new file mode 100644
index 00000000..3379b802
--- /dev/null
+++ b/helm/robot/templates/service-account.yaml
@@ -0,0 +1,20 @@
+{{/*
+# 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.
+*/}}
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ .Chart.Name }}-read \ No newline at end of file
diff --git a/helm/robot/templates/test-job.yaml b/helm/robot/templates/test-job.yaml
new file mode 100644
index 00000000..5d8a610f
--- /dev/null
+++ b/helm/robot/templates/test-job.yaml
@@ -0,0 +1,52 @@
+{{/*
+# 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.
+*/}}
+
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: policy-csit-robot-test
+ namespace: default
+ labels:
+ app: policy-csit-robot-test
+spec:
+ template:
+ spec:
+ initContainers:
+ - name: policy-pods-readiness
+ image: {{ .Values.imageCredentials.readinessImage.name }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ command:
+ - /app/ready.py
+ args:
+ {{- range $container := .Values.readiness }}
+ - --container-name
+ - {{ $container}}
+ {{- end }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ containers:
+ - name: {{ .Chart.Name }}-test
+ image: {{ .Values.imageCredentials.csitTestImage.name }}
+ imagePullPolicy: Never
+ env:
+ - name: ROBOT_FILE
+ value: {{ .Values.robot }}
+ command: [ "./run-test.sh", "$(ROBOT_FILE)" ]
+ restartPolicy: Never \ No newline at end of file
diff --git a/helm/robot/values.yaml b/helm/robot/values.yaml
new file mode 100644
index 00000000..95df6fa0
--- /dev/null
+++ b/helm/robot/values.yaml
@@ -0,0 +1,70 @@
+# 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.
+
+# Default values for charts.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+image:
+ pullPolicy: Always
+
+imageCredentials:
+ csitTestImage:
+ name: "policy-csit-robot:latest"
+ busyboxImage:
+ productName: "Busybox image"
+ name: "docker.io/library/busybox:1.34.1"
+ readinessImage:
+ name: "nexus3.onap.org:10001/onap/oom/readiness:3.0.1"
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: true
+ # Annotations to add to the service account
+ annotations: {}
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname template
+ name: ""
+
+podAnnotations: {}
+
+podSecurityContext: {}
+
+securityContext: {}
+
+
+service:
+ type: ClusterIP
+ port: 80
+
+resources: {}
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
+
+robot: ""
+readiness: []
+
diff --git a/helm/run-test.sh b/helm/run-test.sh
new file mode 100755
index 00000000..d516340b
--- /dev/null
+++ b/helm/run-test.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# ============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======================================================
+
+
+ROBOT_FILE=$1
+echo "Invoking the robot tests from: $1"
+
+export DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies
+export NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates
+export POLICY_RUNTIME_ACM_IP=policy-clamp-runtime-acm
+export POLICY_API_IP=policy-api
+export POLICY_PAP_IP=policy-pap
+export APEX_IP=policy-apex-pdp
+export DMAAP_IP=message-router
+
+
+export ROBOT_VARIABLES=
+ROBOT_VARIABLES="-v DATA:$DATA -v NODETEMPLATES:$NODETEMPLATES -v POLICY_RUNTIME_ACM_IP:$POLICY_RUNTIME_ACM_IP -v POLICY_API_IP:$POLICY_API_IP
+-v POLICY_PAP_IP:$POLICY_PAP_IP -v APEX_IP:$APEX_IP -v DMAAP_IP:$DMAAP_IP"
+
+echo "Run Robot test"
+echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
+echo "Starting Robot test suites ..."
+python3 -m robot.run $ROBOT_VARIABLES $1
+RESULT=$?
+echo "RESULT: ${RESULT}"
diff --git a/helm/tests/apex-pdp-test.robot b/helm/tests/apex-pdp-test.robot
new file mode 100644
index 00000000..641b94e7
--- /dev/null
+++ b/helm/tests/apex-pdp-test.robot
@@ -0,0 +1,146 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Library Process
+Resource common-library.robot
+
+
+*** Test Cases ***
+
+Healthcheck
+ [Documentation] Runs Apex PDP Health check
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
+ Should Be Equal As Strings ${resp.json()['code']} 200
+ Set Suite Variable ${pdpName} ${resp.json()['name']}
+
+ExecuteApexSampleDomainPolicy
+ Set Test Variable ${policyName} onap.policies.native.apex.Sampledomain
+ ${postjson}= Get file ./data/${policyName}.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0
+ Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 0 0 0 0
+ DeployPolicy
+ Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
+ Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 1 1 0 0
+ Wait Until Keyword Succeeds 4 min 5 sec RunEventOnApexEngine
+ Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 1 1 1 1
+
+ExecuteApexTestPnfPolicy
+ Set Test Variable ${policyName} onap.policies.apex.pnf.Test
+ ${postjson}= Get file ./data/${policyName}.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0
+ DeployPolicy
+ Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
+ ${result}= Run Process ./data/make_topic.sh APEX-CL-MGT
+ Should Be Equal As Integers ${result.rc} 0
+ Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestPnfPolicy
+
+ExecuteApexTestVnfPolicy
+ Set Test Variable ${policyName} onap.policies.apex.vnf.Test
+ ${postjson}= Get file ./data/${policyName}.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0
+ DeployPolicy
+ Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
+ ${result}= Run Process ./data/make_topic.sh APEX-CL-MGT
+ Should Be Equal As Integers ${result.rc} 0
+ Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestVnfPolicy
+
+ExecuteApexTestPnfPolicyWithMetadataSet
+ Set Test Variable ${policyName} onap.policies.apex.pnf.metadataSet.Test
+ ${postjson}= Get file ./data/${policyName}.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0
+ ${postjson}= Get file ./data/onap.pnf.metadataSet.Test.json
+ CreateNodeTemplate /policy/api/v1/nodetemplates 200 ${postjson} 1
+ DeployPolicy
+ Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
+ ${result}= Run Process ./data/make_topic.sh APEX-CL-MGT2
+ Should Be Equal As Integers ${result.rc} 0
+ Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestPnfPolicy
+
+Metrics
+ [Documentation] Verify policy-apex-pdp is exporting prometheus metrics
+ ${auth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${APEX_IP} /metrics 200 null ${auth}
+ Should Contain ${resp.text} pdpa_policy_deployments_total{operation="deploy",status="TOTAL",} 4.0
+ Should Contain ${resp.text} pdpa_policy_deployments_total{operation="deploy",status="SUCCESS",} 4.0
+ Should Contain ${resp.text} pdpa_policy_executions_total{status="SUCCESS",} 3.0
+ Should Contain ${resp.text} pdpa_policy_executions_total{status="TOTAL",} 3.0
+ Should Match ${resp.text} *pdpa_engine_event_executions{engine_instance_id="NSOApexEngine-*:0.0.1",}*
+ Should Match ${resp.text} *pdpa_engine_event_executions{engine_instance_id="MyApexEngine-*:0.0.1",}*
+ Should Match ${resp.text} *pdpa_engine_state{engine_instance_id=*,} 2.0*
+ Should Contain ${resp.text} pdpa_engine_event_executions
+ Should Contain ${resp.text} pdpa_engine_average_execution_time_seconds
+ Should Contain ${resp.text} pdpa_engine_last_execution_time_bucket
+ Should Contain ${resp.text} pdpa_engine_last_execution_time_count
+ Should Contain ${resp.text} pdpa_engine_last_execution_time_sum
+ Should Match ${resp.text} *pdpa_engine_last_start_timestamp_epoch{engine_instance_id="NSOApexEngine-*:0.0.1",}*E12*
+ Should Match ${resp.text} *pdpa_engine_last_start_timestamp_epoch{engine_instance_id="MyApexEngine-*:0.0.1",}*E12*
+ Should Contain ${resp.text} jvm_threads_current
+
+*** Keywords ***
+
+DeployPolicy
+ [Documentation] Deploy the policy in apex-pdp engine
+ ${postjson}= Get file ./data/policy_deploy.json
+ ${postjson}= evaluate json.loads('''${postjson}''') json
+ set to dictionary ${postjson['groups'][0]['deploymentSubgroups'][0]['policies'][0]} name=${policyName}
+ ${postjson}= evaluate json.dumps(${postjson}) json
+ ${policyadmin}= PolicyAdminAuth
+ PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${policyadmin}
+
+RunEventOnApexEngine
+ [Documentation] Send event to verify policy execution
+ Create Session apexSession http://${APEX_IP}:23324 max_retries=1
+ ${data}= Get Binary File ./data/event.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+TriggerAndVerifyTestPnfPolicy
+ [Documentation] Send TestPnf policy trigger event to DMaaP and read notifications to verify policy execution
+ Create Session apexSession http://${DMAAP_IP}:3904 max_retries=1
+ ${data}= Get Binary File ./data/VesEventForPnfPolicy.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= POST On Session apexSession /events/unauthenticated.DCAE_CL_OUTPUT data=${data} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Run Keyword CheckLogMessage ACTIVE VES event has been received. Going to fetch details from AAI.
+ Run Keyword CheckLogMessage SUCCESS Received response from AAI successfully. Hostname in AAI matches with the one in Ves event. Going to make the update-config request to CDS.
+ Run Keyword CheckLogMessage FINAL_SUCCESS Successfully processed the VES event. Hostname is updated.
+
+TriggerAndVerifyTestVnfPolicy
+ [Documentation] Send TestVnf policy trigger event to DMaaP and read notifications to verify policy execution
+ Create Session apexSession http://${DMAAP_IP}:3904 max_retries=1
+ ${data}= Get Binary File ./data/VesEventForVnfPolicy.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= POST On Session apexSession /events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT data=${data} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Run Keyword CheckLogMessage ACTIVE VES event has been received. Going to fetch VNF details from AAI.
+ Run Keyword CheckLogMessage SUCCESS VNF details are received from AAI successfully. Sending ConfigModify request to CDS.
+ Run Keyword CheckLogMessage SUCCESS ConfigModify request is successful. Sending restart request to CDS.
+ Run Keyword CheckLogMessage FINAL_SUCCESS Successfully processed the VES Event. Restart is complete.
+
+CheckLogMessage
+ [Documentation] Read log messages received and check for expected content.
+ [Arguments] ${status} ${expectedMsg}
+ ${result}= Run Process ./data/wait_topic.sh APEX-CL-MGT ${status}
+ Log Received log event on APEX-CL-MGT topic ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} ${expectedMsg}
+
+VerifyPdpStatistics
+ [Documentation] Verify pdp statistics after policy execution
+ [Arguments] ${deployCount} ${deploySuccessCount} ${executedCount} ${executedSuccessCount}
+ ${policyadmin}= PolicyAdminAuth
+ ${resp}= PerformGetRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName} 200 null ${policyadmin}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']} ${pdpName}
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpGroupName']} defaultGroup
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpSubGroupName']} apex
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeployCount']} ${deployCount}
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeploySuccessCount']} ${deploySuccessCount}
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeployFailCount']} 0
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedCount']} ${executedCount}
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedSuccessCount']} ${executedSuccessCount}
+ Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedFailCount']} 0
diff --git a/helm/tests/api-test.robot b/helm/tests/api-test.robot
new file mode 100644
index 00000000..5970e005
--- /dev/null
+++ b/helm/tests/api-test.robot
@@ -0,0 +1,188 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Resource common-library.robot
+
+*** Test Cases ***
+
+Healthcheck
+ [Documentation] Verify policy api health check
+ ${resp}= GetReq /policy/api/v1/healthcheck
+ Should Be Equal As Strings ${resp.json()['code']} 200
+ Should Be Equal As Strings ${resp.json()['healthy']} True
+ Should Be Equal As Strings ${resp.json()['message']} alive
+
+Statistics
+ [Documentation] Verify policy api statistics
+ ${resp}= GetReq /policy/api/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+RetrievePolicyTypes
+ [Documentation] Retrieve all policy types
+ FetchPolicyTypes /policy/api/v1/policytypes 37
+
+CreateTCAPolicyTypeV1
+ [Documentation] Create an existing policy type with modification and keeping the same version should result in error.
+ CreatePolicyType /policy/api/v1/policytypes 406 onap.policy.monitoring.tcagen2.v1.json null null
+
+CreateTCAPolicyTypeV2
+ [Documentation] Create an existing policy type with modification and keeping the same version should result in error.
+ CreatePolicyType /policy/api/v1/policytypes 406 onap.policy.monitoring.tcagen2.v2.json null null
+
+CreateTCAPolicyTypeV3
+ [Documentation] Create a policy type named 'onap.policies.monitoring.tcagen2' and version '3.0.0'
+ CreatePolicyType /policy/api/v1/policytypes 200 onap.policy.monitoring.tcagen2.v3.json onap.policies.monitoring.tcagen2 3.0.0
+
+RetrieveMonitoringPolicyTypes
+ [Documentation] Retrieve all monitoring related policy types
+ FetchPolicyTypes /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2 2
+
+CreateNewMonitoringPolicyV1
+ [Documentation] Create a policy named 'onap.restart.tca' and version '1.0.0' using specific api
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies 200 ${postjson} onap.restart.tca 1.0.0
+
+CreateNewMonitoringPolicyV1Again
+ [Documentation] Create an existing policy with modification and keeping the same version should result in error.
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json
+ CreatePolicy /policy/api/v1/policies 406 ${postjson} null null
+
+CreateNewMonitoringPolicyV2
+ [Documentation] Create a policy named 'onap.restart.tca' and version '2.0.0' using generic api
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.v2.json
+ CreatePolicy /policy/api/v1/policies 200 ${postjson} onap.restart.tca 2.0.0
+
+
+CreateNodeTemplates
+ [Documentation] Create node templates in database using specific api
+ ${postjson}= Get file ${NODETEMPLATES}/nodetemplates.metadatasets.input.tosca.json
+ CreateNodeTemplate /policy/api/v1/nodetemplates 200 ${postjson} 3
+
+RetrievePoliciesOfType
+ [Documentation] Retrieve all policies belonging to a specific Policy Type
+ FetchPolicies /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies 2
+
+RetrieveAllPolicies
+ [Documentation] Retrieve all policies
+ FetchPolicies /policy/api/v1/policies 3
+
+RetrieveSpecificPolicy
+ [Documentation] Retrieve a policy named 'onap.restart.tca' and version '1.0.0' using generic api
+ FetchPolicy /policy/api/v1/policies/onap.restart.tca/versions/1.0.0 onap.restart.tca
+
+RetrieveAllNodeTemplates
+ [Documentation] Retrieve all node templates
+ FetchNodeTemplates /policy/api/v1/nodetemplates 3
+
+RetrieveSpecificNodeTemplate
+ [Documentation] Retrieve a node template named 'apexMetadata_grpc' and version '1.2.1' using generic api
+ FetchNodeTemplate /policy/api/v1/nodetemplates/apexMetadata_grpc/versions/1.2.1 apexMetadata_grpc
+
+DeleteSpecificNodeTemplate
+ [Documentation] Delete a node template named 'apexMetadata_adaptive' and version '2.3.1' using generic api
+ DeleteReq /policy/api/v1/nodetemplates/apexMetadata_adaptive/versions/2.3.1 200
+ DeleteReq /policy/api/v1/nodetemplates/apexMetadata_adaptive/versions/2.3.1 404
+
+
+DeleteSpecificPolicy
+ [Documentation] Delete a policy named 'onap.restart.tca' and version '1.0.0' using generic api
+ DeleteReq /policy/api/v1/policies/onap.restart.tca/versions/1.0.0 200
+ DeleteReq /policy/api/v1/policies/onap.restart.tca/versions/1.0.0 404
+
+DeleteSpecificPolicyV2
+ [Documentation] Delete a policy named 'onap.restart.tca' and version '2.0.0' using specific api
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0 200
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0 404
+
+DeleteSpecificPolicyTypeV1
+ [Documentation] Delete a policy type named 'onap.policies.monitoring.tcagen2' and version '1.0.0'
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0 200
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0 404
+
+DeleteSpecificPolicyTypeV2
+ [Documentation] Delete a policy type named 'onap.policies.monitoring.tcagen2' and version '2.0.0'
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0 200
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0 404
+
+DeleteSpecificPolicyTypeV3
+ [Documentation] Delete a policy type named 'onap.policies.monitoring.tcagen2' and version '3.0.0'
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/3.0.0 200
+ DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/3.0.0 404
+
+Metrics
+ [Documentation] Verify policy-api is exporting prometheus metrics
+ ${auth}= PolicyAdminAuth
+ ${resp}= GetMetrics ${POLICY_API_IP} ${auth} /policy/api/v1/
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/healthcheck",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/statistics",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}",} 3.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_sum
+ Should Contain ${resp.text} http_server_requests_seconds_max
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_sum
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_max
+ Should Contain ${resp.text} jvm_threads_live_threads
+
+*** Keywords ***
+
+GetReq
+ [Arguments] ${url}
+ ${auth}= PolicyAdminAuth
+ ${resp}= PerformGetRequest ${POLICY_API_IP} ${url} 200 null ${auth}
+ [return] ${resp}
+
+DeleteReq
+ [Arguments] ${url} ${expectedstatus}
+ ${auth}= PolicyAdminAuth
+ ${resp}= PerformDeleteRequest ${POLICY_API_IP} ${url} ${expectedstatus} ${auth}
+ [return] ${resp}
+
+CreatePolicyType
+ [Arguments] ${url} ${expectedstatus} ${jsonfile} ${policytypename} ${policytypeversion}
+ [Documentation] Create the specific policy type
+ ${postjson}= Get file ${CURDIR}/data/${jsonfile}
+ ${auth}= PolicyAdminAuth
+ ${resp}= PerformPostRequest ${POLICY_API_IP} ${url} ${expectedstatus} ${postjson} null ${auth}
+ Run Keyword If ${expectedstatus}==200 List Should Contain Value ${resp.json()['policy_types']} ${policytypename}
+ Run Keyword If ${expectedstatus}==200 Should Be Equal As Strings ${resp.json()['policy_types']['${policytypename}']['version']} ${policytypeversion}
+
+FetchPolicyTypes
+ [Arguments] ${url} ${expectedLength}
+ [Documentation] Fetch all policy types
+ ${resp}= GetReq ${url}
+ Length Should Be ${resp.json()['policy_types']} ${expectedLength}
+
+FetchPolicy
+ [Arguments] ${url} ${keyword}
+ [Documentation] Fetch the specific policy
+ ${resp}= GetReq ${url}
+ Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} ${keyword}
+
+FetchPolicies
+ [Arguments] ${url} ${expectedLength}
+ [Documentation] Fetch all policies
+ ${resp}= GetReq ${url}
+ Length Should Be ${resp.json()['topology_template']['policies']} ${expectedLength}
+
+
+FetchNodeTemplates
+ [Arguments] ${url} ${expectedLength}
+ [Documentation] Fetch all node templates
+ ${resp}= GetReq ${url}
+ Length Should Be ${resp.json()} ${expectedLength}
+
+FetchNodeTemplate
+ [Arguments] ${url} ${keyword}
+ [Documentation] Fetch the specific node template
+ ${resp}= GetReq ${url}
+ Dictionary Should Contain Value ${resp.json()[0]} ${keyword}
diff --git a/helm/tests/common-library.robot b/helm/tests/common-library.robot
new file mode 100644
index 00000000..95831b0d
--- /dev/null
+++ b/helm/tests/common-library.robot
@@ -0,0 +1,121 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Keywords ***
+
+PolicyAdminAuth
+ ${policyadmin}= Create list policyadmin zb!XztG34
+ [return] ${policyadmin}
+
+HealthCheckAuth
+ ${healthcheck}= Create list policyadmin zb!XztG34
+ [return] ${healthcheck}
+
+PerformPostRequest
+ [Arguments] ${hostname} ${url} ${expectedstatus} ${postjson} ${params} ${auth}
+ Log Creating session http://${hostname}:6969
+ ${session}= Create Session policy http://${hostname}:6969 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}
+
+PerformPutRequest
+ [Arguments] ${hostname} ${url} ${expectedstatus} ${params} ${auth}
+ Log Creating session http://${hostname}:6969
+ ${session}= Create Session policy http://${hostname}:6969 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] ${hostname} ${url} ${expectedstatus} ${params} ${auth}
+ Log Creating session http://${hostname}:6969
+ ${session}= Create Session policy http://${hostname}:6969 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] ${hostname} ${url} ${expectedstatus} ${auth}
+ Log Creating session http://${hostname}:6969
+ ${session}= Create Session policy http://${hostname}:6969 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}
+ Run Keyword If ${expectedstatus}==200 Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} ${policyname}
+ Run Keyword If ${expectedstatus}==200 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}==200 Length Should Be ${resp.json()['topology_template']['node_templates']} ${nodeTemplateListLength}
+
+
+QueryPdpGroups
+ [Documentation] Verify pdp group query - supports 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=2 ${policyadmin}
+ Log Received response from queryPolicyAudit ${resp.text}
+ FOR ${responseEntry} IN @{resp.json()}
+ Exit For Loop IF '${responseEntry['policy']['name']}'=='${policyName}'
+ 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['pdpId']} ${pdpName}
+ 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] ${hostname} ${auth} ${context_path}
+ Log Creating session http://${hostname}:6969
+ ${session}= Create Session policy http://${hostname}:6969 auth=${auth}
+ ${resp}= GET On Session policy ${context_path}metrics expected_status=200
+ Log Received response from policy ${resp.text}
+ [return] ${resp}
diff --git a/helm/tests/data/VesEventForPnfPolicy.json b/helm/tests/data/VesEventForPnfPolicy.json
new file mode 100644
index 00000000..9998fc6f
--- /dev/null
+++ b/helm/tests/data/VesEventForPnfPolicy.json
@@ -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/helm/tests/data/VesEventForVnfPolicy.json b/helm/tests/data/VesEventForVnfPolicy.json
new file mode 100644
index 00000000..0fc8481d
--- /dev/null
+++ b/helm/tests/data/VesEventForVnfPolicy.json
@@ -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/helm/tests/data/apex.policy.decisionmaker.input.tosca.json b/helm/tests/data/apex.policy.decisionmaker.input.tosca.json
new file mode 100644
index 00000000..5d84c294
--- /dev/null
+++ b/helm/tests/data/apex.policy.decisionmaker.input.tosca.json
@@ -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/helm/tests/data/create.group.request.json b/helm/tests/data/create.group.request.json
new file mode 100644
index 00000000..1e37583c
--- /dev/null
+++ b/helm/tests/data/create.group.request.json
@@ -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/helm/tests/data/deploy.group.request.json b/helm/tests/data/deploy.group.request.json
new file mode 100644
index 00000000..cfd86d1e
--- /dev/null
+++ b/helm/tests/data/deploy.group.request.json
@@ -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/helm/tests/data/event.json b/helm/tests/data/event.json
new file mode 100644
index 00000000..9dbf2790
--- /dev/null
+++ b/helm/tests/data/event.json
@@ -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/stop-grafana.sh b/helm/tests/data/make_topic.sh
index 901a0341..05383308 100755
--- a/csit/stop-grafana.sh
+++ b/helm/tests/data/make_topic.sh
@@ -1,8 +1,8 @@
#!/bin/bash
#
-# ============LICENSE_START====================================================
-# Copyright (C) 2022 Nordix Foundation.
-# =============================================================================
+# ===========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
@@ -14,13 +14,20 @@
# 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=====================================================
#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-SCRIPTS=$(git rev-parse --show-toplevel)
-export SCRIPTS="${SCRIPTS}"/csit
+#
+# Creates a topic, which happens as a side-effect of polling it.
+#
+
+if [ $# -ne 1 ]
+then
+ echo "arg(s): topic-name" >&2
+ exit 1
+fi
-source "${SCRIPTS}"/get-versions.sh
+topic="${1}"
-docker-compose -f "${SCRIPTS}"/compose-grafana.yml down
+curl -s -k "http://${SIM_IP}:3904/events/${topic}/script/1?limit=1&timeout=0"
+echo
diff --git a/helm/tests/data/onap.pnf.metadataSet.Test.json b/helm/tests/data/onap.pnf.metadataSet.Test.json
new file mode 100644
index 00000000..b59efc0a
--- /dev/null
+++ b/helm/tests/data/onap.pnf.metadataSet.Test.json
@@ -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/helm/tests/data/onap.policies.apex.pnf.Test.json b/helm/tests/data/onap.policies.apex.pnf.Test.json
new file mode 100644
index 00000000..05522936
--- /dev/null
+++ b/helm/tests/data/onap.policies.apex.pnf.Test.json
@@ -0,0 +1,2896 @@
+{
+ "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://message-router:3904/events/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": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/cl/apex?timeout=30000"
+ }
+ },
+ "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": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://message-router:3904/events/APEX-CL-MGT"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "SimpleCL_LogEvent"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json b/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
new file mode 100644
index 00000000..20338fff
--- /dev/null
+++ b/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
@@ -0,0 +1,165 @@
+{
+ "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://message-router:3904/events/APEX-CL-MGT2"
+ }
+ ]
+ }
+ },
+ "eventInputParameters": {
+ "SimpleCL_DCAEConsumer2": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/cl/apex?timeout=30000"
+ }
+ },
+ "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": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://message-router:3904/events/APEX-CL-MGT2"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "SimpleCL_LogEvent"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/helm/tests/data/onap.policies.apex.vnf.Test.json b/helm/tests/data/onap.policies.apex.vnf.Test.json
new file mode 100644
index 00000000..7886f84b
--- /dev/null
+++ b/helm/tests/data/onap.policies.apex.vnf.Test.json
@@ -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/helm/tests/data/onap.policies.native.apex.Sampledomain.json b/helm/tests/data/onap.policies.native.apex.Sampledomain.json
new file mode 100644
index 00000000..d90ae08d
--- /dev/null
+++ b/helm/tests/data/onap.policies.native.apex.Sampledomain.json
@@ -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/helm/tests/data/onap.policy.guard.decision.request.json b/helm/tests/data/onap.policy.guard.decision.request.json
new file mode 100644
index 00000000..ee90feaa
--- /dev/null
+++ b/helm/tests/data/onap.policy.guard.decision.request.json
@@ -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/helm/tests/data/onap.policy.monitoring.decision.request.json b/helm/tests/data/onap.policy.monitoring.decision.request.json
new file mode 100644
index 00000000..053fa36d
--- /dev/null
+++ b/helm/tests/data/onap.policy.monitoring.decision.request.json
@@ -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/helm/tests/data/onap.policy.monitoring.tcagen2.v1.json b/helm/tests/data/onap.policy.monitoring.tcagen2.v1.json
new file mode 100644
index 00000000..a2e2ddc9
--- /dev/null
+++ b/helm/tests/data/onap.policy.monitoring.tcagen2.v1.json
@@ -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/helm/tests/data/onap.policy.monitoring.tcagen2.v2.json b/helm/tests/data/onap.policy.monitoring.tcagen2.v2.json
new file mode 100644
index 00000000..d86749ef
--- /dev/null
+++ b/helm/tests/data/onap.policy.monitoring.tcagen2.v2.json
@@ -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/helm/tests/data/onap.policy.monitoring.tcagen2.v3.json b/helm/tests/data/onap.policy.monitoring.tcagen2.v3.json
new file mode 100644
index 00000000..1767c508
--- /dev/null
+++ b/helm/tests/data/onap.policy.monitoring.tcagen2.v3.json
@@ -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/helm/tests/data/onap.policy.naming.decision.request.json b/helm/tests/data/onap.policy.naming.decision.request.json
new file mode 100644
index 00000000..3833a241
--- /dev/null
+++ b/helm/tests/data/onap.policy.naming.decision.request.json
@@ -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/helm/tests/data/onap.policy.optimization.decision.request.json b/helm/tests/data/onap.policy.optimization.decision.request.json
new file mode 100644
index 00000000..d997099c
--- /dev/null
+++ b/helm/tests/data/onap.policy.optimization.decision.request.json
@@ -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/helm/tests/data/policy_deploy.json b/helm/tests/data/policy_deploy.json
new file mode 100644
index 00000000..e13f06ad
--- /dev/null
+++ b/helm/tests/data/policy_deploy.json
@@ -0,0 +1,17 @@
+{
+ "groups": [
+ {
+ "name": "defaultGroup",
+ "deploymentSubgroups": [
+ {
+ "pdpType": "apex",
+ "action": "POST",
+ "policies": [{
+ "name": "{policyName}",
+ "version": "1.0.0"
+ }]
+ }
+ ]
+ }
+ ]
+}
diff --git a/helm/tests/data/vCPE.policy.input.tosca.deploy.json b/helm/tests/data/vCPE.policy.input.tosca.deploy.json
new file mode 100644
index 00000000..7ace047b
--- /dev/null
+++ b/helm/tests/data/vCPE.policy.input.tosca.deploy.json
@@ -0,0 +1,5 @@
+{"policies":[
+ {"policy-id":"onap.restart.tca"},
+ {"policy-id":"OSDF_CASABLANCA.Affinity_Default"}
+ ]
+}
diff --git a/helm/tests/data/wait_topic.sh b/helm/tests/data/wait_topic.sh
new file mode 100755
index 00000000..792273ef
--- /dev/null
+++ b/helm/tests/data/wait_topic.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# ===========LICENSE_START====================================================
+# Copyright (C) 2023 Nordix Foundation. All rights reserved.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+
+#
+# Polls a topic for a message. Additional text items can be specified,
+# in which case, it discards messages that do not contain all of the
+# specified text items.
+#
+# Exits with a non-zero status if no matching message is received on the
+# topic before the timeout.
+#
+
+if [ $# -lt 1 ]
+then
+ echo "arg(s): topic-name [text-to-match1 [text-to-match2 ...]]" >&2
+ exit 1
+fi
+
+topic="${1}"
+shift
+
+matched=no
+
+while [ ${matched} = "no" ]
+do
+ msg=`curl -s -k "http://${SIM_IP}:3904/events/${topic}/script/1?limit=1"`
+ if [ $? -ne 0 -o "${msg}" = "[]" ]
+ then
+ echo not found >&2
+ exit 2
+ fi
+
+ matched=yes
+ for text in "$@"
+ do
+ echo "${msg}" | grep -q "${text}"
+ if [ $? -ne 0 ]
+ then
+ matched=no
+ break
+ fi
+ done
+done
+
+echo "${msg}"
diff --git a/helm/tests/distribution-test.robot b/helm/tests/distribution-test.robot
new file mode 100644
index 00000000..36503b38
--- /dev/null
+++ b/helm/tests/distribution-test.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Resource common-library.robot
+
+*** Test Cases ***
+
+Healthcheck
+ [Documentation] Verify policy distribution health check
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /healthcheck 200 null ${hcauth}
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Statistics
+ [Documentation] Verify policy distribution statistics
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /statistics 200 null ${hcauth}
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Metrics
+ [Documentation] Verify policy-distribution is exporting prometheus metrics
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /metrics 200 null ${hcauth}
+ Should Contain ${resp.text} total_distribution_received_count_total 0.0
+ Should Contain ${resp.text} distribution_success_count_total 0.0
+ Should Contain ${resp.text} distribution_failure_count_total 0.0
+ Should Contain ${resp.text} total_download_received_count_total 0.0
+ Should Contain ${resp.text} download_success_count_total 0.0
+ Should Contain ${resp.text} download_failure_count_total 0.0
+
+InvokeDistributionAndRunEventOnEngine
+ Wait Until Keyword Succeeds 5 min 30 sec InvokeDistributionUsingFile And RunEventOnApexEngine
+
+MetricsAfterExecution
+ [Documentation] Verify policy-distribution is exporting prometheus metrics after execution
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /metrics 200 null ${hcauth}
+ Should Contain ${resp.text} total_distribution_received_count_total 1.0
+ Should Contain ${resp.text} distribution_success_count_total 1.0
+ Should Contain ${resp.text} distribution_failure_count_total 0.0
+ Should Contain ${resp.text} total_download_received_count_total 1.0
+ Should Contain ${resp.text} download_success_count_total 1.0
+ Should Contain ${resp.text} download_failure_count_total 0.0
+
+*** Keywords ***
+
+InvokeDistributionUsingFile And RunEventOnApexEngine
+ Copy File ${SCRIPT_DIR}/csar/csar_temp.csar ${SCRIPT_DIR}/csar/temp.csar
+ Move File ${SCRIPT_DIR}/csar/temp.csar ${SCRIPT_DIR}/temp/sample_csar_with_apex_policy.csar
+ Sleep 20 seconds "Waiting for the Policy Distribution to call Policy API and PAP"
+ Create Session apexSession http://${APEX_IP}:23324 max_retries=1
+ ${data}= Get Binary File ${CURDIR}${/}data${/}event.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers} expected_status=200
+ Remove Files ${SCRIPT_DIR}/temp/sample_csar_with_apex_policy.csar
diff --git a/helm/tests/drools-applications-test.robot b/helm/tests/drools-applications-test.robot
new file mode 100644
index 00000000..c06631b9
--- /dev/null
+++ b/helm/tests/drools-applications-test.robot
@@ -0,0 +1,232 @@
+*** Settings ***
+Library Collections
+Library String
+Library RequestsLibrary
+Library OperatingSystem
+Library Process
+Library json
+
+*** Test Cases ***
+Alive
+ [Documentation] Runs Policy PDP Alive Check
+ ${resp}= PeformGetRequest /policy/pdp/engine ${DROOLS_IP} 9696 200
+ Should Be Equal As Strings ${resp.json()['alive']} True
+
+Metrics
+ [Documentation] Verify drools-apps is exporting metrics
+ ${resp}= PeformGetRequest /metrics ${DROOLS_IP} 9696 200
+ Should Contain ${resp.text} jvm_threads_current
+
+Healthcheck
+ [Documentation] Runs Policy PDP-D Health check
+ ${resp}= PeformGetRequest /healthcheck ${DROOLS_IP} 6969 200
+ Should Be Equal As Strings ${resp.json()['healthy']} True
+
+Controller
+ [Documentation] Checks controller is up
+ Wait Until Keyword Succeeds 2 min 15 sec VerifyController
+
+MakeTopics
+ [Documentation] Creates the Policy topics
+ ${result}= Run Process ${SCR2}/make_topic.sh POLICY-PDP-PAP
+ Should Be Equal As Integers ${result.rc} 0
+ ${result}= Run Process ${SCR2}/make_topic.sh POLICY-CL-MGT
+ Should Be Equal As Integers ${result.rc} 0
+
+CreateVcpeXacmlPolicy
+ [Documentation] Create VCPE Policy for Xacml
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vCPE.policy.monitoring.input.tosca.yaml ${DATA} yaml 200
+
+CreateVcpeDroolsPolicy
+ [Documentation] Create VCPE Policy for Drools
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vCPE.policy.operational.input.tosca.yaml ${DATA} yaml 200
+
+CreateVdnsXacmlPolicy
+ [Documentation] Create VDNS Policy for Xacml
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vDNS.policy.monitoring.input.tosca.yaml ${DATA} yaml 200
+
+CreateVdnsDroolsPolicy
+ [Documentation] Create VDNS Policy for Drools
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vDNS.policy.operational.input.tosca.json ${DATA} json 200
+
+CreateVfwXacmlPolicy
+ [Documentation] Create VFW Policy for Xacml
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vFirewall.policy.monitoring.input.tosca.yaml ${DATA} yaml 200
+
+CreateVfwDroolsPolicy
+ [Documentation] Create VFW Policy for Drools
+ PerformPostRequest /policy/api/v1/policies null ${API_IP} 6969 vFirewall.policy.operational.input.tosca.json ${DATA} json 200
+
+DeployXacmlPolicies
+ [Documentation] Deploys the Policies to Xacml
+ PerformPostRequest /policy/pap/v1/pdps/deployments/batch null ${PAP_IP} 6969 deploy.xacml.policies.json ${DATA2} json 202
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-PDP-PAP
+ ... responseTo xacml ACTIVE restart
+ Log Received status ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} onap.restart.tca
+ Should Contain ${result.stdout} onap.scaleout.tca
+ Should Contain ${result.stdout} onap.vfirewall.tca
+
+DeployDroolsPolicies
+ [Documentation] Deploys the Policies to Drools
+ PerformPostRequest /policy/pap/v1/pdps/deployments/batch null ${PAP_IP} 6969 deploy.drools.policies.json ${DATA2} json 202
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-PDP-PAP
+ ... responseTo drools ACTIVE
+ Log Received status ${result.stdout}
+ Sleep 3s
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} operational.restart
+ Should Contain ${result.stdout} operational.scaleout
+ Should Contain ${result.stdout} operational.modifyconfig
+
+VcpeExecute
+ [Documentation] Executes VCPE Policy
+ ${result}= Run Process ${SCR2}/onset.sh ${DATA2}/vcpeOnset.json
+ Should Be Equal As Integers ${result.rc} 0
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} ACTIVE
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Sending guard query for APPC Restart
+ Should Be Equal As Integers ${result.rc} 0
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Guard result for APPC Restart is Permit
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} actor=APPC,operation=Restart
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION: SUCCESS
+ Should Contain ${result.stdout} actor=APPC,operation=Restart
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} FINAL: SUCCESS
+ Should Contain ${result.stdout} APPC
+ Should Contain ${result.stdout} Restart
+
+VdnsExecute
+ [Documentation] Executes VDNS Policy
+ ${result}= Run Process ${SCR2}/onset.sh ${DATA2}/vdnsOnset.json
+ Should Be Equal As Integers ${result.rc} 0
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} ACTIVE
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Sending guard query for SO VF Module Create
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Guard result for SO VF Module Create is Permit
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} actor=SO,operation=VF Module Create
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION: SUCCESS
+ Should Contain ${result.stdout} actor=SO,operation=VF Module Create
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} FINAL: SUCCESS
+ Should Contain ${result.stdout} SO
+ Should Contain ${result.stdout} VF Module Create
+
+VfwExecute
+ [Documentation] Executes VFW Policy
+ ${result}= Run Process ${SCR2}/onset.sh ${DATA2}/vfwOnset.json
+ Should Be Equal As Integers ${result.rc} 0
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} ACTIVE
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Sending guard query for APPC ModifyConfig
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} Guard result for APPC ModifyConfig is Permit
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION
+ Should Contain ${result.stdout} actor=APPC,operation=ModifyConfig
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} OPERATION: SUCCESS
+ Should Contain ${result.stdout} actor=APPC,operation=ModifyConfig
+ ${result}= Run Process ${SCR2}/wait_topic.sh POLICY-CL-MGT
+ ... ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
+ Log Received notification ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0
+ Should Contain ${result.stdout} FINAL: SUCCESS
+ Should Contain ${result.stdout} APPC
+ Should Contain ${result.stdout} ModifyConfig
+
+*** Keywords ***
+
+VerifyController
+ ${resp}= PeformGetRequest /policy/pdp/engine/controllers/usecases/drools/facts ${DROOLS_IP} 9696 200
+ Should Be Equal As Strings ${resp.json()['usecases']} 1
+
+PeformGetRequest
+ [Arguments] ${url} ${hostname} ${port} ${expectedstatus}
+ ${auth}= Create List demo@people.osaaf.org demo123456!
+ Log Creating session http://${hostname}:${port}
+ ${session}= Create Session policy http://${hostname}:${port} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus}
+ Log Received response from policy ${resp.text}
+ [return] ${resp}
+
+PerformPostRequest
+ [Arguments] ${url} ${params} ${hostname} ${port} ${jsonfile} ${filepath} ${contenttype} ${expectedstatus}
+ ${auth}= Create List policyadmin zb!XztG34
+ ${postjson}= Get file ${filepath}/${jsonfile}
+ Log Creating session http://${hostname}:${port}
+ ${session}= Create Session policy http://${hostname}:${port} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/${contenttype} Content-Type=application/${contenttype}
+ ${resp}= POST On Session policy ${url} params=${params} data=${postjson} headers=${headers} expected_status=${expectedstatus}
+ Log Received response from policy ${resp.text}
+ [return] ${resp}
diff --git a/helm/tests/pap-test.robot b/helm/tests/pap-test.robot
new file mode 100644
index 00000000..c8c03014
--- /dev/null
+++ b/helm/tests/pap-test.robot
@@ -0,0 +1,128 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Resource common-library.robot
+
+*** Keywords ***
+GetReq
+ [Arguments] ${url}
+ ${auth}= PolicyAdminAuth
+ ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} 200 null ${auth}
+ [return] ${resp}
+
+*** Test Cases ***
+LoadPolicy
+ [Documentation] Create a policy named 'onap.restart.tca' and version '1.0.0' using specific api
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies 200 ${postjson} onap.restart.tca 1.0.0
+
+LoadPolicyWithMetadataSet
+ [Documentation] Create a policy named 'operational.apex.decisionMaker' and version '1.0.0' using specific api
+ ${postjson}= Get file ${CURDIR}/data/apex.policy.decisionmaker.input.tosca.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} operational.apex.decisionMaker 1.0.0
+
+LoadNodeTemplates
+ [Documentation] Create node templates in database using specific api
+ ${postjson}= Get file ${NODETEMPLATES}/nodetemplates.metadatasets.input.tosca.json
+ CreateNodeTemplate /policy/api/v1/nodetemplates 200 ${postjson} 3
+
+Healthcheck
+ [Documentation] Verify policy pap health check
+ ${resp}= GetReq /policy/pap/v1/healthcheck
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Consolidated Healthcheck
+ [Documentation] Verify policy consolidated health check
+ ${resp}= GetReq /policy/pap/v1/components/healthcheck
+ Should Be Equal As Strings ${resp.json()['healthy']} True
+
+Metrics
+ [Documentation] Verify policy pap is exporting prometheus metrics
+ ${auth}= PolicyAdminAuth
+ ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth} /policy/pap/v1/
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/healthcheck",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/components/healthcheck",} 1.0
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",} 1.0
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",} 1.0
+
+Statistics
+ [Documentation] Verify policy pap statistics
+ ${resp}= GetReq /policy/pap/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+AddPdpGroup
+ [Documentation] Add a new PdpGroup named 'testGroup' in the policy database
+ ${postjson}= Get file ${CURDIR}/data/create.group.request.json
+ ${auth}= PolicyAdminAuth
+ PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/batch 200 ${postjson} null ${auth}
+
+QueryPdpGroupsBeforeActivation
+ [Documentation] Verify PdpGroups before activation
+ QueryPdpGroups 2 defaultGroup ACTIVE 0 testGroup PASSIVE 0
+
+ActivatePdpGroup
+ [Documentation] Change the state of PdpGroup named 'testGroup' to ACTIVE
+ ${auth}= PolicyAdminAuth
+ PerformPutRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 state=ACTIVE ${auth}
+
+QueryPdpGroupsAfterActivation
+ [Documentation] Verify PdpGroups after activation
+ QueryPdpGroups 2 defaultGroup ACTIVE 0 testGroup ACTIVE 0
+
+DeployPdpGroups
+ [Documentation] Deploy policies in PdpGroups
+ ${postjson}= Get file ${CURDIR}/data/deploy.group.request.json
+ ${auth}= PolicyAdminAuth
+ PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${auth}
+
+QueryPdpGroupsAfterDeploy
+ [Documentation] Verify PdpGroups after undeploy
+ QueryPdpGroups 2 defaultGroup ACTIVE 0 testGroup ACTIVE 1
+
+QueryPolicyAuditAfterDeploy
+ [Documentation] Verify policy audit record after deploy
+ QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca DEPLOYMENT
+
+QueryPolicyAuditWithMetadataSetAfterDeploy
+ [Documentation] Verify policy audit record after deploy
+ QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeC operational.apex.decisionMaker DEPLOYMENT
+
+UndeployPolicy
+ [Documentation] Undeploy a policy named 'onap.restart.tca' from PdpGroups
+ ${auth}= PolicyAdminAuth
+ PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${auth}
+
+UndeployPolicyWithMetadataSet
+ [Documentation] Undeploy a policy named 'operational.apex.decisionMaker' from PdpGroups
+ ${auth}= PolicyAdminAuth
+ PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/operational.apex.decisionMaker 202 ${auth}
+
+QueryPdpGroupsAfterUndeploy
+ [Documentation] Verify PdpGroups after undeploy
+ QueryPdpGroups 2 defaultGroup ACTIVE 0 testGroup ACTIVE 0
+
+QueryPolicyAuditAfterUnDeploy
+ [Documentation] Verify policy audit record after undeploy
+ Sleep 130 seconds
+ QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca UNDEPLOYMENT
+
+QueryPolicyAuditWithMetadataSetAfterUnDeploy
+ [Documentation] Verify policy audit record after undeploy
+ QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeC operational.apex.decisionMaker UNDEPLOYMENT
+
+DeactivatePdpGroup
+ [Documentation] Change the state of PdpGroup named 'testGroup' to PASSIVE
+ ${auth}= PolicyAdminAuth
+ PerformPutRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 state=PASSIVE ${auth}
+
+DeletePdpGroups
+ [Documentation] Delete the PdpGroup named 'testGroup' from policy database
+ ${auth}= PolicyAdminAuth
+ PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 ${auth}
+
+QueryPdpGroupsAfterDelete
+ [Documentation] Verify PdpGroups after delete
+ QueryPdpGroups 1 defaultGroup ACTIVE 0 null null null
diff --git a/helm/tests/policy-clamp-test.robot b/helm/tests/policy-clamp-test.robot
new file mode 100644
index 00000000..9fefbc0a
--- /dev/null
+++ b/helm/tests/policy-clamp-test.robot
@@ -0,0 +1,98 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library String
+Library json
+Library yaml
+
+*** Test Cases ***
+Healthcheck
+ [Documentation] Healthcheck on Clamp Acm
+ ${auth}= Create List runtimeUser zb!XztG34
+ Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+ ${session}= Create Session ACM http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= GET On Session ACM /onap/policy/clamp/acm/health headers=${headers}
+ Log Received response from ACM healthcheck {resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+#CommissionAutomationCompositionV1
+# [Documentation] Commission automation composition.
+# ${auth}= Create List runtimeUser zb!XztG34
+# Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+# ${postyaml}= Get file ${CURDIR}/data/functional-pmsh-usecase.yaml
+# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/yaml Content-Type=application/yaml
+# ${resp}= POST On Session policy /onap/policy/clamp/acm/v2/compositions data=${postyaml} headers=${headers}
+# Log Received response from runtime acm ${resp.text}
+# ${respyaml}= yaml.Safe Load ${resp.text}
+# set Suite variable ${compositionId} ${respyaml["compositionId"]}
+# Should Be Equal As Strings ${resp.status_code} 201
+#
+#InstantiateAutomationCompositionV1
+# [Documentation] Instantiate automation composition.
+# ${auth}= Create List runtimeUser zb!XztG34
+# Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+# ${postjson}= Get file ${CURDIR}/data/AutomationComposition.json
+# ${updatedpostjson}= Replace String ${postjson} COMPOSITIONIDPLACEHOLDER ${compositionId}
+# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+# ${resp}= POST On Session policy /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances data=${updatedpostjson} headers=${headers}
+# Log Received response from runtime acm ${resp.text}
+# ${respyaml}= yaml.Safe Load ${resp.text}
+# set Suite variable ${instanceId} ${respyaml["instanceId"]}
+# Should Be Equal As Strings ${resp.status_code} 201
+#
+#PassivateAutomationComposition
+# [Documentation] Passivate automation composition.
+# ${auth}= Create List runtimeUser zb!XztG34
+# Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+# ${postjson}= Get file ${CURDIR}/data/PassiveCommand.json
+# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+# ${resp}= PUT On Session policy /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} data=${postjson} headers=${headers}
+# Log Received response from runtime acm ${resp.text}
+# Should Be Equal As Strings ${resp.status_code} 200
+#
+#QueryPolicies
+# [Documentation] Runs Policy Participant Query New Policies
+# ${auth}= Create List policyadmin zb!XztG34
+# Log Creating session http://${POLICY_API_IP}:6969
+# ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+# ${resp}= GET On Session policy /policy/api/v1/policies headers=${headers}
+# Log Received response from policy-api {resp.text}
+# Should Be Equal As Strings ${resp.status_code} 200
+#
+#QueryPolicyTypes
+# [Documentation] Runs Policy Participant Query New Policy Types
+# ${auth}= Create List policyadmin zb!XztG34
+# Log Creating session http://${POLICY_API_IP}:6969
+# ${session}= Create Session policy http://${POLICY_API_IP}:6969 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
+#
+#StateChangeRunningAutomationComposition
+# [Documentation] AutomationComposition State Change to RUNNING.
+# ${auth}= Create List runtimeUser zb!XztG34
+# Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+# ${postjson}= Get file ${CURDIR}/data/RunningCommand.json
+# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+# ${resp}= PUT On Session policy /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} data=${postjson} headers=${headers} expected_status=400
+# Log Received response from runtime acm ${resp.text}
+#
+#QueryInstantiatedACs
+# [Documentation] Get Instantiated AutomationCompositions
+# ${auth}= Create List runtimeUser zb!XztG34
+# Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969
+# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth}
+# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+# ${resp}= GET 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} 200
+# Should Be Equal As Strings ${resp.json()['state']} UNINITIALISED2PASSIVE
+# Should Be Equal As Strings ${resp.json()['orderedState']} PASSIVE
diff --git a/helm/tests/xacml-pdp-test.robot b/helm/tests/xacml-pdp-test.robot
new file mode 100644
index 00000000..2ae52a7e
--- /dev/null
+++ b/helm/tests/xacml-pdp-test.robot
@@ -0,0 +1,150 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library Process
+Library json
+Resource common-library.robot
+
+*** Test Cases ***
+Healthcheck
+ [Documentation] Verify policy xacml-pdp health check
+ ${resp}= PdpxGetReq /policy/pdpx/v1/healthcheck
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Statistics
+ [Documentation] Verify policy xacml-pdp statistics
+ ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Metrics
+ [Documentation] Verify policy-xacml-pdp is exporting prometheus metrics
+ ${resp}= PdpxGetReq /metrics
+ Should Contain ${resp.text} jvm_threads_current
+
+MakeTopics
+ [Documentation] Creates the Policy topics
+ ${result}= Run Process ${SCR_DMAAP}/make_topic.sh POLICY-PDP-PAP
+ Should Be Equal As Integers ${result.rc} 0
+
+ExecuteXacmlPolicy
+ CreateMonitorPolicy
+ CreateOptimizationPolicy
+ Wait Until Keyword Succeeds 1 min 15 sec GetDefaultDecision
+ DeployPolicies
+ Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterDeployed
+ Wait Until Keyword Succeeds 1 min 15 sec GetAbbreviatedDecisionResult
+ Wait Until Keyword Succeeds 1 min 15 sec GetMonitoringDecision
+ Wait Until Keyword Succeeds 1 min 15 sec GetNamingDecision
+ Wait Until Keyword Succeeds 1 min 15 sec GetOptimizationDecision
+ Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterDecision
+ UndeployMonitorPolicy
+ Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterUndeploy
+
+*** Keywords ***
+
+CreateMonitorPolicy
+ [Documentation] Create a Monitoring policy
+ ${postjson}= Get file ${DATA2}/vCPE.policy.monitoring.input.tosca.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies 200 ${postjson} onap.restart.tca 1.0.0
+
+CreateOptimizationPolicy
+ [Documentation] Create an Optimization policy
+ ${postjson}= Get file ${DATA2}/vCPE.policies.optimization.input.tosca.json
+ CreatePolicy /policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/1.0.0/policies 200 ${postjson} OSDF_CASABLANCA.Affinity_Default 1.0.0
+
+GetDefaultDecision
+ [Documentation] Get Default Decision with no policies in Xacml PDP
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.guard.decision.request.json
+ ${resp}= DecisionPostReq ${postjson} abbrev=true
+ ${status}= Get From Dictionary ${resp.json()} status
+ Should Be Equal As Strings ${status} Permit
+
+DeployPolicies
+ [Documentation] Runs Policy PAP to deploy a policy
+ ${postjson}= Get file ${CURDIR}/data/vCPE.policy.input.tosca.deploy.json
+ ${policyadmin}= PolicyAdminAuth
+ PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies 202 ${postjson} null ${policyadmin}
+ ${result}= Run Process ${SCR_DMAAP}/wait_topic.sh POLICY-PDP-PAP
+ ... responseTo xacml ACTIVE onap.restart.tca
+ Should Be Equal As Integers ${result.rc} 0
+
+GetStatisticsAfterDeployed
+ [Documentation] Verify policy xacml-pdp statistics after policy is deployed
+ ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+ Should Be Equal As Strings ${resp.json()['totalPoliciesCount']} 3
+
+GetAbbreviatedDecisionResult
+ [Documentation] Get Decision with abbreviated results from Policy Xacml PDP
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.decision.request.json
+ ${resp}= DecisionPostReq ${postjson} abbrev=true
+ ${policy}= Get From Dictionary ${resp.json()['policies']} onap.restart.tca
+ Dictionary Should Contain Key ${policy} type
+ Dictionary Should Contain Key ${policy} metadata
+ Dictionary Should Not Contain Key ${policy} type_version
+ Dictionary Should Not Contain Key ${policy} properties
+ Dictionary Should Not Contain Key ${policy} name
+ Dictionary Should Not Contain Key ${policy} version
+
+GetMonitoringDecision
+ [Documentation] Get Decision from Monitoring Policy Xacml PDP
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.decision.request.json
+ ${resp}= DecisionPostReq ${postjson} null
+ ${policy}= Get From Dictionary ${resp.json()['policies']} onap.restart.tca
+ Dictionary Should Contain Key ${policy} type
+ Dictionary Should Contain Key ${policy} metadata
+ Dictionary Should Contain Key ${policy} type_version
+ Dictionary Should Contain Key ${policy} properties
+ Dictionary Should Contain Key ${policy} name
+ Dictionary Should Contain Key ${policy} version
+
+GetNamingDecision
+ [Documentation] Get Decision from Naming Policy Xacml PDP
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.naming.decision.request.json
+ ${resp}= DecisionPostReq ${postjson} null
+ ${policy}= Get From Dictionary ${resp.json()['policies']} SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP
+ Dictionary Should Contain Key ${policy} type
+ Dictionary Should Contain Key ${policy} type_version
+ Dictionary Should Contain Key ${policy} properties
+ Dictionary Should Contain Key ${policy} name
+
+GetOptimizationDecision
+ [Documentation] Get Decision from Optimization Policy Xacml PDP
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.optimization.decision.request.json
+ ${resp}= DecisionPostReq ${postjson} null
+ ${policy}= Get From Dictionary ${resp.json()['policies']} OSDF_CASABLANCA.Affinity_Default
+ Dictionary Should Contain Key ${policy} type
+ Dictionary Should Contain Key ${policy} type_version
+ Dictionary Should Contain Key ${policy} properties
+ Dictionary Should Contain Key ${policy} name
+
+GetStatisticsAfterDecision
+ [Documentation] Runs Policy Xacml PDP Statistics after Decision request
+ ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+ Should Be Equal As Strings ${resp.json()['permitDecisionsCount']} 4
+ Should Be Equal As Strings ${resp.json()['notApplicableDecisionsCount']} 1
+
+UndeployMonitorPolicy
+ [Documentation] Runs Policy PAP to undeploy a policy
+ ${policyadmin}= PolicyAdminAuth
+ PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${policyadmin}
+
+GetStatisticsAfterUndeploy
+ [Documentation] Runs Policy Xacml PDP Statistics after policy is undeployed
+ ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
+ Should Be Equal As Strings ${resp.json()['code']} 200
+ Should Be Equal As Strings ${resp.json()['totalPoliciesCount']} 2
+
+PdpxGetReq
+ [Arguments] ${url}
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${POLICY_PDPX_IP} ${url} 200 null ${hcauth}
+ [return] ${resp}
+
+DecisionPostReq
+ [Arguments] ${postjson} ${abbr}
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformPostRequest ${POLICY_PDPX_IP} /policy/pdpx/v1/decision 200 ${postjson} ${abbr} ${hcauth}
+ [return] ${resp}
diff --git a/policy-db-migrator/smoke-test/mariadb-tests.sh b/policy-db-migrator/smoke-test/mariadb-tests.sh
index a5f1e31f..418a4740 100755
--- a/policy-db-migrator/smoke-test/mariadb-tests.sh
+++ b/policy-db-migrator/smoke-test/mariadb-tests.sh
@@ -31,12 +31,30 @@ export SCRIPT_DIRECTORY=sql
# Test variables
TOTAL_COUNT=0
-HONOLULU_UPGRADE_COUNT=$(ls /home/policy/sql/0800/upgrade/*.sql | wc -l)
-HONOLULU_DOWNGRADE_COUNT=$(ls /home/policy/sql/0800/downgrade/*.sql | wc -l)
-ISTANBUL_UPGRADE_COUNT=$(ls /home/policy/sql/0900/upgrade/*.sql | wc -l)
-ISTANBUL_DOWNGRADE_COUNT=$(ls /home/policy/sql/0900/downgrade/*.sql | wc -l)
-JAKARTA_UPGRADE_COUNT=$(ls /home/policy/sql/1000/upgrade/*.sql | wc -l)
-JAKARTA_DOWNGRADE_COUNT=$(ls /home/policy/sql/1000/downgrade/*.sql | wc -l)
+H_UPGRADE_COUNT=$(ls /home/policy/sql/0800/upgrade/*.sql | wc -l)
+H_DOWNGRADE_COUNT=$(ls /home/policy/sql/0800/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$H_UPGRADE_COUNT
+TOTAL_SQLS_DOWNGRADE=$H_DOWNGRADE_COUNT
+
+I_UPGRADE_COUNT=$(ls /home/policy/sql/0900/upgrade/*.sql | wc -l)
+I_DOWNGRADE_COUNT=$(ls /home/policy/sql/0900/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$I_UPGRADE_COUNT))
+TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$I_DOWNGRADE_COUNT))
+
+J_UPGRADE_COUNT=$(ls /home/policy/sql/1000/upgrade/*.sql | wc -l)
+J_DOWNGRADE_COUNT=$(ls /home/policy/sql/1000/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$J_UPGRADE_COUNT))
+TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$J_DOWNGRADE_COUNT))
+
+K_UPGRADE_COUNT=$(ls /home/policy/sql/1100/upgrade/*.sql | wc -l)
+K_DOWNGRADE_COUNT=$(ls /home/policy/sql/1100/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$K_UPGRADE_COUNT))
+TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$K_DOWNGRADE_COUNT))
+
+L_UPGRADE_COUNT=$(ls /home/policy/sql/1200/upgrade/*.sql | wc -l)
+L_DOWNGRADE_COUNT=$(ls /home/policy/sql/1200/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$L_UPGRADE_COUNT))
+TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$L_DOWNGRADE_COUNT))
NEW_SQL_EXECUTIONS=0
START_VERSION=""
@@ -154,7 +172,7 @@ check_results() {
start_test
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -t 0900
end_test
-let TOTAL_COUNT=$HONOLULU_UPGRADE_COUNT+$ISTANBUL_UPGRADE_COUNT
+let TOTAL_COUNT=$H_UPGRADE_COUNT+$I_UPGRADE_COUNT
check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $RECENT_SQL_EXECUTIONS $TOTAL_COUNT
sleep 5
@@ -165,7 +183,7 @@ start_test
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 0900 -t 0800
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_DOWNGRADE_COUNT
+check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT
sleep 5
@@ -175,7 +193,7 @@ start_test
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -f 0800 -t 0900
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_UPGRADE_COUNT
+check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT
sleep 5
@@ -188,7 +206,7 @@ run_sql "root" "${MYSQL_ROOT_PASSWORD}" "${SCHEMA}" "DROP DATABASE IF EXISTS mig
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -t 0900
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS
-check_results $END_STATUS 'upgrade' "0800" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_UPGRADE_COUNT
+check_results $END_STATUS 'upgrade' "0800" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT
sleep 5
@@ -220,7 +238,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${IDX_TSIDX1}"
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
# +1 to run the file again
-let TOTAL_COUNT=$ISTANBUL_DOWNGRADE_COUNT+1
+let TOTAL_COUNT=$I_UPGRADE_COUNT+1
check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT
sleep 5
@@ -251,7 +269,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${PDPSTATISTICS}"
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
# +1 to run the file again
-let TOTAL_COUNT=$ISTANBUL_UPGRADE_COUNT+1
+let TOTAL_COUNT=$I_UPGRADE_COUNT+1
check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT
sleep 5
@@ -272,7 +290,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${SQL4}"
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
# +1 to run the file again
-let TOTAL_COUNT=$ISTANBUL_UPGRADE_COUNT
+let TOTAL_COUNT=$I_UPGRADE_COUNT
check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT
sleep 5
@@ -286,7 +304,7 @@ sleep 1
run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${SQL6}"
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_DOWNGRADE_COUNT
+check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT
sleep 5
@@ -296,7 +314,7 @@ start_test
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 0800
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $HONOLULU_DOWNGRADE_COUNT
+check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $H_DOWNGRADE_COUNT
sleep 5
@@ -306,19 +324,22 @@ start_test
/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-let TOTAL_COUNT=$HONOLULU_UPGRADE_COUNT+$ISTANBUL_UPGRADE_COUNT+$JAKARTA_UPGRADE_COUNT
-check_results $END_STATUS 'upgrade' "0" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT
+check_results $END_STATUS 'upgrade' "0" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_UPGRADE
sleep 5
# Test 13 - Full downgrade
start_test
/opt/app/policy/bin/prepare_downgrade.sh ${SQL_DB}
-/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1000 -t 0
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1200 -t 0
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
-let TOTAL_COUNT=$HONOLULU_DOWNGRADE_COUNT+$ISTANBUL_DOWNGRADE_COUNT+$JAKARTA_DOWNGRADE_COUNT
-check_results $END_STATUS 'downgrade' "${START_VERSION}" "0" $NEW_SQL_EXECUTIONS $TOTAL_COUNT
+check_results $END_STATUS 'downgrade' "${START_VERSION}" "0" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_DOWNGRADE
+
+# Install database
+/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB}
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report
echo
echo "-----------------------------------------------------------------------"
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0120-audit_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0120-audit_sequence.sql
new file mode 100644
index 00000000..3446e33a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0120-audit_sequence.sql
@@ -0,0 +1,27 @@
+/*
+ * ============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=========================================================
+ */
+
+INSERT INTO sequence(SEQ_NAME, SEQ_COUNT)
+VALUES('SEQ_GEN', (SELECT COALESCE(MAX(id), 0) FROM (
+ SELECT MAX(id) as id FROM pdpstatistics
+ UNION
+ SELECT MAX(id) as id FROM jpapolicyaudit
+) AS subquery));
+
+DROP TABLE audit_sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0130-statistics_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0130-statistics_sequence.sql
new file mode 100644
index 00000000..aea12698
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/downgrade/0130-statistics_sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============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=========================================================
+ */
+
+DROP TABLE statistics_sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0120-audit_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0120-audit_sequence.sql
new file mode 100644
index 00000000..e3909a83
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0120-audit_sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============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=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS audit_sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL NULL, CONSTRAINT PK_SEQUENCE PRIMARY KEY (SEQ_NAME));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0130-statistics_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0130-statistics_sequence.sql
new file mode 100644
index 00000000..ea4ed485
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1200/upgrade/0130-statistics_sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 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=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS statistics_sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL NULL, CONSTRAINT PK_SEQUENCE PRIMARY KEY (SEQ_NAME));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql
index e38dba8d..d503999a 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapdpgroup_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES VARCHAR(255) NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpapdpgroup_properties (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PROPERTIES VARCHAR(255) DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql
index 6be5cf60..0adad152 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapdpstatistics_enginestats (AVERAGEEXECUTIONTIME DOUBLE DEFAULT NULL NULL, ENGINEID VARCHAR(255) NULL, ENGINETIMESTAMP BIGINT DEFAULT NULL NULL, ENGINEWORKERSTATE INT DEFAULT NULL NULL, EVENTCOUNT BIGINT DEFAULT NULL NULL, LASTENTERTIME BIGINT DEFAULT NULL NULL, LASTEXECUTIONTIME BIGINT DEFAULT NULL NULL, LASTSTART BIGINT DEFAULT NULL NULL, UPTIME BIGINT DEFAULT NULL NULL, timeStamp datetime DEFAULT NULL NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL);
+CREATE TABLE IF NOT EXISTS jpapdpstatistics_enginestats (AVERAGEEXECUTIONTIME DOUBLE DEFAULT NULL, ENGINEID VARCHAR(255) DEFAULT NULL, ENGINETIMESTAMP BIGINT DEFAULT NULL, ENGINEWORKERSTATE INT DEFAULT NULL, EVENTCOUNT BIGINT DEFAULT NULL, LASTENTERTIME BIGINT DEFAULT NULL, LASTEXECUTIONTIME BIGINT DEFAULT NULL, LASTSTART BIGINT DEFAULT NULL, UPTIME BIGINT DEFAULT NULL, timeStamp datetime DEFAULT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql
index a2159746..8258cc49 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapdpsubgroup_policies (name VARCHAR(120) NULL, version VARCHAR(20) NULL, parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL);
+CREATE TABLE IF NOT EXISTS jpapdpsubgroup_policies (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql
index 84508c9a..2c3f74c3 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapdpsubgroup_properties (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, PROPERTIES VARCHAR(255) NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpapdpsubgroup_properties (parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL, PROPERTIES VARCHAR(255) DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
index 323ee277..40e29421 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapdpsubgroup_supportedpolicytypes (name VARCHAR(120) NULL, version VARCHAR(20) NULL, parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL);
+CREATE TABLE IF NOT EXISTS jpapdpsubgroup_supportedpolicytypes (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql
index a097475f..932c2d01 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_attributes (name VARCHAR(120) NULL, version VARCHAR(20) NULL, ATTRIBUTES LONGTEXT NULL, ATTRIBUTES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_attributes (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, ATTRIBUTES LONGTEXT DEFAULT NULL, ATTRIBUTES_KEY VARCHAR(255) DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql
index c80aed43..b3851a41 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL);
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql
index 861144ae..7ef9dd73 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql
index a4b985bf..77d5049c 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscadatatype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscadatatype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql
index 759906c8..17d71144 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscanodetype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscanodetype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql
index f17763e3..2c6a7f7a 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscapolicytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscapolicytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql
index 272dbb81..660b9bc0 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql
index 9d645483..8677964b 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscarequirement_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL);
+CREATE TABLE IF NOT EXISTS jpatoscarequirement_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql
index 5f0b6a10..d5f6e7cc 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpatoscatopologytemplate_inputs (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, INPUTS LONGBLOB DEFAULT NULL NULL, INPUTS_KEY VARCHAR(255) NULL);
+CREATE TABLE IF NOT EXISTS jpatoscatopologytemplate_inputs (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, INPUTS LONGBLOB DEFAULT NULL, INPUTS_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql
index 48fd2db0..d07479c9 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdpgroup_pdpsubgroup (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPGROUP_PDPSUBGROUP PRIMARY KEY (name, version, parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS pdpgroup_pdpsubgroup (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPGROUP_PDPSUBGROUP (name, version, parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql
index 336c176d..369f9a0d 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdpgroup (`DESCRIPTION` VARCHAR(255) NULL, PDPGROUPSTATE INT DEFAULT NULL NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_PDPGROUP PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS pdpgroup (`DESCRIPTION` VARCHAR(255) NULL, PDPGROUPSTATE INT DEFAULT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_PDPGROUP (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql
index 9faa075b..c6541e97 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdppolicystatus (DEPLOY BIT DEFAULT 0 NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, STATE INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_PDPPOLICYSTATUS PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS pdppolicystatus (DEPLOY BOOLEAN DEFAULT 0, PDPGROUP VARCHAR(255) DEFAULT NULL, PDPTYPE VARCHAR(255) DEFAULT NULL, STATE INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PRIMARY KEY PK_PDPPOLICYSTATUS (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql
index e325bdbc..cb4a2911 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdp (HEALTHY INT DEFAULT NULL NULL, MESSAGE VARCHAR(255) NULL, PDPSTATE INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDP PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS pdp (HEALTHY INT DEFAULT NULL, MESSAGE VARCHAR(255) DEFAULT NULL, PDPSTATE INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDP (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql
index 8f67e6b8..60111fe8 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdpstatistics (PDPGROUPNAME VARCHAR(120) NULL, PDPSUBGROUPNAME VARCHAR(120) NULL, POLICYDEPLOYCOUNT BIGINT DEFAULT NULL NULL, POLICYDEPLOYFAILCOUNT BIGINT DEFAULT NULL NULL, POLICYDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDFAILCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDSUCCESSCOUNT BIGINT DEFAULT NULL NULL, timeStamp datetime NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_PDPSTATISTICS PRIMARY KEY (timeStamp, name, version));
+CREATE TABLE IF NOT EXISTS pdpstatistics (PDPGROUPNAME VARCHAR(120) NULL, PDPSUBGROUPNAME VARCHAR(120) NULL, POLICYDEPLOYCOUNT BIGINT DEFAULT NULL, POLICYDEPLOYFAILCOUNT BIGINT DEFAULT NULL, POLICYDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDFAILCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDSUCCESSCOUNT BIGINT DEFAULT NULL, timeStamp datetime NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_PDPSTATISTICS (timeStamp, name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql
index 852ef77f..f5ee1640 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdpsubgroup_pdp (pdpParentKeyName VARCHAR(120) NOT NULL, pdpParentKeyVersion VARCHAR(15) NOT NULL, pdpParentLocalName VARCHAR(120) NOT NULL, pdpLocalName VARCHAR(120) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPSUBGROUP_PDP PRIMARY KEY (pdpParentKeyName, pdpParentKeyVersion, pdpParentLocalName, pdpLocalName, parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS pdpsubgroup_pdp (pdpParentKeyName VARCHAR(120) NOT NULL, pdpParentKeyVersion VARCHAR(15) NOT NULL, pdpParentLocalName VARCHAR(120) NOT NULL, pdpLocalName VARCHAR(120) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPSUBGROUP_PDP (pdpParentKeyName, pdpParentKeyVersion, pdpParentLocalName, pdpLocalName, parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql
index 381c9e01..a762c86c 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS pdpsubgroup (CURRENTINSTANCECOUNT INT DEFAULT NULL NULL, DESIREDINSTANCECOUNT INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPSUBGROUP PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS pdpsubgroup (CURRENTINSTANCECOUNT INT DEFAULT NULL, DESIREDINSTANCECOUNT INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPSUBGROUP (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql
index b3a308e8..3bc2c2ea 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilityassignment (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENT PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscacapabilityassignment (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENT(name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql
index a1071197..963cbb7c 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilityassignments (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENTS PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscacapabilityassignments (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENTS (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
index 1ab54b8f..c8965d78 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilityassignments_toscacapabilityassignment (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENTS_TOSCACAPABILITYASSIGNMENT PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscacapabilityassignments_toscacapabilityassignment (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENTS_TOSCACAPABILITYASSIGNMENT (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql
index 39a094af..26f7fe42 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilitytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYTYPE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscacapabilitytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql
index 778ec042..be906e8f 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilitytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYTYPES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscacapabilitytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
index 4f7f3787..bef95709 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscacapabilitytypes_toscacapabilitytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCACAPABILITYTYPES_TOSCACAPABILITYTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscacapabilitytypes_toscacapabilitytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPES_TOSCACAPABILITYTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql
index f22c3c69..31237a30 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscadatatype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCADATATYPE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscadatatype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCADATATYPE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql
index df5dc545..b18b5b0a 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscadatatypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCADATATYPES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscadatatypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCADATATYPES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql
index 1cee4eba..b45828e5 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscadatatypes_toscadatatype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCADATATYPES_TOSCADATATYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscadatatypes_toscadatatype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCADATATYPES_TOSCADATATYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql
index 76b68809..6b8d3f5e 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetemplate (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, capabilitiesName VARCHAR(120) NULL, capabilitiesVersion VARCHAR(20) NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, CONSTRAINT PK_TOSCANODETEMPLATE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscanodetemplate (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, capabilitiesName VARCHAR(120) NULL, capabilitiesVersion VARCHAR(20) NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCANODETEMPLATE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql
index 6c82b8da..e813ba8d 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetemplates (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCANODETEMPLATES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscanodetemplates (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCANODETEMPLATES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql
index 5be6b268..6ed201ca 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetemplates_toscanodetemplate (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCANODETEMPLATES_TOSCANODETEMPLATE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscanodetemplates_toscanodetemplate (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCANODETEMPLATES_TOSCANODETEMPLATE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql
index 3bad7c73..6c168704 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, CONSTRAINT PK_TOSCANODETYPE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscanodetype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCANODETYPE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql
index 06a8a189..5aed2a32 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCANODETYPES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscanodetypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCANODETYPES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql
index 70b19a11..4139e179 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscanodetypes_toscanodetype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCANODETYPES_TOSCANODETYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscanodetypes_toscanodetype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCANODETYPES_TOSCANODETYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql
index 77d61f5d..de6380e8 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPARAMETER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPARAMETER (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql
index a64b0779..dcb9bdc9 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicies (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICIES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscapolicies (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICIES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql
index dea2a44c..46ff20e9 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicies_toscapolicy (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPOLICIES_TOSCAPOLICY PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscapolicies_toscapolicy (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPOLICIES_TOSCAPOLICY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql
index a69b0215..ec7dd6e3 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicy (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCAPOLICY PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscapolicy (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCAPOLICY (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql
index ef5c9d56..d54eeb66 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICYTYPE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscapolicytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICYTYPE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql
index 956faa48..e9edf3f6 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICYTYPES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscapolicytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICYTYPES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql
index e1442c74..9a1a6d15 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscapolicytypes_toscapolicytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPOLICYTYPES_TOSCAPOLICYTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscapolicytypes_toscapolicytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPOLICYTYPES_TOSCAPOLICYTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql
index 5d1ef960..9ea23427 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPROPERTY PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) DEFAULT NULL, `DESCRIPTION` VARCHAR(255) DEFAULT NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL, REQUIRED BOOLEAN DEFAULT 0, STATUS INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PRIMARY KEY PK_TOSCAPROPERTY (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql
index b007911d..b70015e4 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarelationshiptype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscarelationshiptype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql
index a07ab0db..37e46fb3 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarelationshiptypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPES PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscarelationshiptypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPES (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
index 883a98ce..174513d8 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarelationshiptypes_toscarelationshiptype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPES_TOSCARELATIONSHIPTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscarelationshiptypes_toscarelationshiptype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPES_TOSCARELATIONSHIPTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql
index d29edfba..e87703b7 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarequirement (CAPABILITY VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, NODE VARCHAR(255) NULL, RELATIONSHIP VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCAREQUIREMENT PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscarequirement (CAPABILITY VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, NODE VARCHAR(255) NULL, RELATIONSHIP VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCAREQUIREMENT (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql
index 6b2ac078..7ad0bda6 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarequirements (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAREQUIREMENTS PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscarequirements (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAREQUIREMENTS (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql
index 884ad903..68a74a96 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscarequirements_toscarequirement (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAREQUIREMENTS_TOSCAREQUIREMENT PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
+CREATE TABLE IF NOT EXISTS toscarequirements_toscarequirement (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAREQUIREMENTS_TOSCAREQUIREMENT (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql
index 396499fd..4eb31d34 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscaservicetemplate (`DESCRIPTION` VARCHAR(255) NULL, TOSCADEFINITIONSVERSION VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, capabilityTypesVersion VARCHAR(20) NULL, capabilityTypesName VARCHAR(120) NULL, dataTypesName VARCHAR(120) NULL, dataTypesVersion VARCHAR(20) NULL, nodeTypesVersion VARCHAR(20) NULL, nodeTypesName VARCHAR(120) NULL, policyTypesName VARCHAR(120) NULL, policyTypesVersion VARCHAR(20) NULL, relationshipTypesVersion VARCHAR(20) NULL, relationshipTypesName VARCHAR(120) NULL, topologyTemplateLocalName VARCHAR(120) NULL, topologyTemplateParentKeyName VARCHAR(120) NULL, topologyTemplateParentKeyVersion VARCHAR(15) NULL, topologyTemplateParentLocalName VARCHAR(120) NULL, CONSTRAINT PK_TOSCASERVICETEMPLATE PRIMARY KEY (name, version));
+CREATE TABLE IF NOT EXISTS toscaservicetemplate (`DESCRIPTION` VARCHAR(255) NULL, TOSCADEFINITIONSVERSION VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, capabilityTypesVersion VARCHAR(20) NULL, capabilityTypesName VARCHAR(120) NULL, dataTypesName VARCHAR(120) NULL, dataTypesVersion VARCHAR(20) NULL, nodeTypesVersion VARCHAR(20) NULL, nodeTypesName VARCHAR(120) NULL, policyTypesName VARCHAR(120) NULL, policyTypesVersion VARCHAR(20) NULL, relationshipTypesVersion VARCHAR(20) NULL, relationshipTypesName VARCHAR(120) NULL, topologyTemplateLocalName VARCHAR(120) NULL, topologyTemplateParentKeyName VARCHAR(120) NULL, topologyTemplateParentKeyVersion VARCHAR(15) NULL, topologyTemplateParentLocalName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCASERVICETEMPLATE (name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql
index 92d51d92..cbb6dbd8 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscatopologytemplate (`description` VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, nodeTemplatessVersion VARCHAR(20) NULL, nodeTemplatesName VARCHAR(120) NULL, policyVersion VARCHAR(20) NULL, policyName VARCHAR(120) NULL, CONSTRAINT PK_TOSCATOPOLOGYTEMPLATE PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscatopologytemplate (`description` VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, nodeTemplatessVersion VARCHAR(20) NULL, nodeTemplatesName VARCHAR(120) NULL, policyVersion VARCHAR(20) NULL, policyName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCATOPOLOGYTEMPLATE (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql
index 45862f8d..279e05dc 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL NULL, toscaConstraint LONGBLOB DEFAULT NULL NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL NULL, SCHEDULE LONGBLOB DEFAULT NULL NULL, TARGETFILTER LONGBLOB DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_TOSCATRIGGER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL, toscaConstraint LONGBLOB DEFAULT NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL, SCHEDULE LONGBLOB DEFAULT NULL, TARGETFILTER LONGBLOB DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_TOSCATRIGGER (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql
index eb8f6a0f..bd66524e 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime(6) DEFAULT NULL NULL AFTER UPTIME;
+ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime(6) DEFAULT NULL AFTER UPTIME;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql
index c4a1123e..51dcd3b1 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL NULL AFTER POLICYEXECUTEDSUCCESSCOUNT, ADD COLUMN POLICYUNDEPLOYFAILCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN POLICYUNDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN ID BIGINT NOT NULL;
+ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL AFTER POLICYEXECUTEDSUCCESSCOUNT, ADD COLUMN POLICYUNDEPLOYFAILCOUNT BIGINT DEFAULT NULL, ADD COLUMN POLICYUNDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL, ADD COLUMN ID BIGINT NOT NULL;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql
index 6e5bfecd..cc3f9a82 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN ID BIGINT DEFAULT NULL NULL AFTER UPTIME;
+ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN ID BIGINT DEFAULT NULL AFTER UPTIME;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql
index a31d2421..ca5137de 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS jpapolicyaudit (ACTION INT DEFAULT NULL NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, TIMESTAMP datetime DEFAULT NULL NULL, USER VARCHAR(255) NULL, ID BIGINT NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_JPAPOLICYAUDIT PRIMARY KEY (ID, name, version));
+CREATE TABLE IF NOT EXISTS jpapolicyaudit (ACTION INT DEFAULT NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, TIMESTAMP datetime DEFAULT NULL, USER VARCHAR(255) NULL, ID BIGINT NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_JPAPOLICYAUDIT (ID, name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql
index 64d6f01b..43dfe42a 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021, 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.
@@ -17,4 +17,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL NULL, CONSTRAINT PK_SEQUENCE PRIMARY KEY (SEQ_NAME));
+CREATE TABLE IF NOT EXISTS sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL, PRIMARY KEY PK_SEQUENCE (SEQ_NAME));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql
index d701bd45..5aa86c03 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2022 Bell Canada. All rights reserved.
+ * Modifications 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.
@@ -17,4 +18,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL NULL, toscaConstraint LONGBLOB DEFAULT NULL NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL NULL, SCHEDULE LONGBLOB DEFAULT NULL NULL, TARGETFILTER LONGBLOB DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_TOSCATRIGGER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL, toscaConstraint LONGBLOB DEFAULT NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL, SCHEDULE LONGBLOB DEFAULT NULL, TARGETFILTER LONGBLOB DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_TOSCATRIGGER (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql
index 51db2ab9..da2e66f7 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2022 Bell Canada. All rights reserved.
+ * Modifications 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.
@@ -17,4 +18,4 @@
* ============LICENSE_END=========================================================
*/
-CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPARAMETER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPARAMETER (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql
index eef07f93..c99ae0e7 100644
--- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2022 Bell Canada. All rights reserved.
+ * Modifications 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.
@@ -19,4 +20,4 @@
CREATE TABLE IF NOT EXISTS jpatoscaproperty_constraints (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, CONSTRAINTS VARCHAR(255) NULL);
CREATE TABLE IF NOT EXISTS jpatoscaproperty_metadata (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
-CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPROPERTY PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName));
+CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPROPERTY (parentLocalName, localName, parentKeyVersion, parentKeyName));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0120-audit_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0120-audit_sequence.sql
new file mode 100644
index 00000000..c1cc38bb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0120-audit_sequence.sql
@@ -0,0 +1,27 @@
+/*
+ * ============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=========================================================
+ */
+
+INSERT INTO sequence(SEQ_NAME, SEQ_COUNT)
+VALUES('SEQ_GEN', (SELECT IFNULL(MAX(id), 0) FROM (
+ SELECT MAX(id) as id FROM pdpstatistics
+ UNION
+ SELECT MAX(id) as id FROM jpapolicyaudit
+) AS subquery));
+
+DROP TABLE audit_sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0130-statistics_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0130-statistics_sequence.sql
new file mode 100644
index 00000000..aea12698
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/downgrade/0130-statistics_sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============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=========================================================
+ */
+
+DROP TABLE statistics_sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0120-audit_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0120-audit_sequence.sql
new file mode 100644
index 00000000..6f7b62a1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0120-audit_sequence.sql
@@ -0,0 +1,22 @@
+/*
+ * ============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=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS audit_sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL, PRIMARY KEY PK_SEQUENCE (SEQ_NAME));
+
+INSERT INTO audit_sequence(SEQ_NAME, SEQ_COUNT) VALUES('SEQ_GEN', (SELECT IFNULL(max(id),0) FROM jpapolicyaudit));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0130-statistics_sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0130-statistics_sequence.sql
new file mode 100644
index 00000000..7215d811
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1200/upgrade/0130-statistics_sequence.sql
@@ -0,0 +1,22 @@
+/*
+ * ============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=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS statistics_sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL, PRIMARY KEY PK_SEQUENCE (SEQ_NAME));
+
+INSERT INTO statistics_sequence(SEQ_NAME, SEQ_COUNT) VALUES('SEQ_GEN', (SELECT IFNULL(max(id),0) FROM pdpstatistics));