From 1f339f886d01c6d6ac5cfd6467850c61fee4f675 Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Fri, 17 Feb 2023 15:14:07 +0000 Subject: Restructure of csit files to be used both by docker and k8s config Issue-ID: POLICY-4125 Change-Id: Id63b3badb1b451b36e3226970dcafaa5a62d860f Signed-off-by: adheli.tavares --- .gitignore | 2 + compose/config/apex-pdp/OnapPfConfig.json | 41 + compose/config/apex-pdp/groups.json | 28 + compose/config/apex-pdp/logback.xml | 122 + compose/config/api/apiParameters.yaml | 86 + compose/config/api/groups.json | 137 + compose/config/api/logback.xml | 207 + .../config/clamp/A1pmsParticipantParameters.yaml | 59 + compose/config/clamp/AcRuntimeParameters.yaml | 71 + compose/config/clamp/ClampBackend.properties | 197 + .../config/clamp/HttpParticipantParameters.yaml | 47 + .../clamp/KubernetesParticipantParameters.yaml | 68 + .../config/clamp/PolicyParticipantParameters.yaml | 65 + compose/config/clamp/groups.json | 137 + compose/config/clamp/logback-backend.xml | 219 + compose/config/clamp/logback.xml | 206 + compose/config/clamp/org.onap.clamp.keyfile | 27 + .../config/clamp/policy-clamp-create-tables.sql | 275 + compose/config/db-migrator/init.sh | 36 + compose/config/db-migrator/init_pg.sh | 36 + compose/config/db-pg/db-pg.conf | 17 + compose/config/db-pg/db-pg.sh | 22 + compose/config/db/db.conf | 17 + compose/config/db/db.sh | 24 + compose/config/distribution/defaultConfig.json | 76 + compose/config/distribution/groups.json | 137 + compose/config/distribution/logback.xml | 136 + .../custom/engine-system.properties | 45 + .../custom/feature-lifecycle.properties | 38 + .../drools-applications/custom/features.pre.sh | 18 + .../custom/standalone-settings.xml | 57 + compose/config/drools-applications/env/base.conf | 146 + .../env/feature-healthcheck.conf | 18 + .../env/feature-pooling-dmaap.conf | 17 + compose/config/drools-applications/groups.json | 137 + .../drools-pdp/custom/engine-system.properties | 45 + compose/config/drools-pdp/custom/noop.pre.sh | 22 + compose/config/drools-pdp/env/base.conf | 144 + compose/config/drools-pdp/groups.json | 137 + compose/config/pap/groups.json | 28 + compose/config/pap/logback.xml | 120 + compose/config/pap/papParameters.yaml | 90 + compose/config/policy-gui/application.yaml | 37 + compose/config/policy-gui/groups.json | 137 + compose/config/policy-gui/logback.xml | 119 + .../aairesponse/vfw-cnf-cds-test-1-vnf.json | 44 + .../apex-example-cba-modify-config.json | 33 + .../cdsresponse/apex-example-cba-restart.json | 33 + .../controlloop-hostname-update-update-config.json | 35 + compose/config/sim-all/logback.xml | 42 + compose/config/sim-all/simParameters.json | 110 + compose/config/xacml-pdp/defaultConfig.json | 39 + compose/config/xacml-pdp/groups.json | 101 + compose/config/xacml-pdp/logback.xml | 116 + compose/docker-compose.gui.yml | 63 + compose/docker-compose.yml | 363 + compose/export-ports.sh | 48 + compose/get-versions.sh | 137 + compose/metrics/dashboard.yaml | 33 + compose/metrics/dashboards/dashboard-apex-pdp.json | 1527 ++++ compose/metrics/dashboards/dashboard-api.json | 1457 ++++ .../metrics/dashboards/dashboard-distribution.json | 927 +++ compose/metrics/dashboards/dashboard-drools-apps | 1068 +++ .../metrics/dashboards/dashboard-drools-pdp.json | 1150 +++ .../dashboards/dashboard-for-springboot.json | 3681 ++++++++++ .../metrics/dashboards/dashboard-jvm-basic.json | 2753 ++++++++ compose/metrics/dashboards/dashboard-pap.json | 1328 ++++ .../metrics/dashboards/dashboard-xacml-pdp.json | 1162 +++ compose/metrics/dashboards/sla-metrics.json | 1778 +++++ compose/metrics/datasource.yaml | 49 + compose/metrics/prometheus.yml | 101 + compose/start-compose.sh | 95 + compose/stop-compose.sh | 36 + compose/wait_for_port.sh | 91 + csit/apex-pdp/plans/setup.sh | 64 - csit/apex-pdp/plans/teardown.sh | 23 - csit/apex-pdp/plans/testplan.txt | 3 - csit/apex-pdp/tests/apex-pdp-test.robot | 146 - csit/apex-pdp/tests/data/VesEventForPnfPolicy.json | 28 - csit/apex-pdp/tests/data/VesEventForVnfPolicy.json | 30 - csit/apex-pdp/tests/data/event.json | 11 - .../tests/data/onap.pnf.metadataSet.Test.json | 2755 -------- .../tests/data/onap.policies.apex.pnf.Test.json | 2896 -------- .../onap.policies.apex.pnf.metadataSet.Test.json | 165 - .../tests/data/onap.policies.apex.vnf.Test.json | 3198 --------- .../onap.policies.native.apex.Sampledomain.json | 7436 -------------------- csit/apex-pdp/tests/data/policy_deploy.json | 17 - csit/api/plans/setup.sh | 67 - csit/api/plans/teardown.sh | 21 - csit/api/plans/testplan.txt | 3 - csit/api/tests/api-test.robot | 187 - .../data/onap.policy.monitoring.tcagen2.v1.json | 211 - .../data/onap.policy.monitoring.tcagen2.v2.json | 206 - .../data/onap.policy.monitoring.tcagen2.v3.json | 206 - csit/clamp/plans/setup.sh | 91 - csit/clamp/plans/teardown.sh | 20 - csit/clamp/plans/testplan.txt | 3 - csit/clamp/tests/data/AutomationComposition.json | 64 - csit/clamp/tests/data/InstantiateAC.json | 51 - csit/clamp/tests/data/PMSHMultipleACTosca.yaml | 932 --- csit/clamp/tests/data/PassivateAC.json | 9 - csit/clamp/tests/data/PassiveCommand.json | 5 - csit/clamp/tests/data/RunningCommand.json | 5 - csit/clamp/tests/data/StateChangeRunningAC.json | 9 - csit/clamp/tests/data/functional-pmsh-usecase.yaml | 3404 --------- csit/clamp/tests/data/http-usecase.yaml | 312 - csit/clamp/tests/policy-clamp-test.robot | 98 - csit/common-library.robot | 137 - csit/compose-postgres.yml | 69 - csit/config/apex-pdp/OnapPfConfig.json | 41 - csit/config/apex-pdp/groups.json | 28 - csit/config/apex-pdp/logback.xml | 122 - csit/config/api/apiParameters.yaml | 86 - csit/config/api/groups.json | 137 - csit/config/api/logback.xml | 207 - csit/config/clamp/A1pmsParticipantParameters.yaml | 59 - csit/config/clamp/AcRuntimeParameters.yaml | 71 - csit/config/clamp/ClampBackend.properties | 197 - csit/config/clamp/HttpParticipantParameters.yaml | 47 - .../clamp/KubernetesParticipantParameters.yaml | 68 - csit/config/clamp/PolicyParticipantParameters.yaml | 65 - csit/config/clamp/groups.json | 137 - csit/config/clamp/logback-backend.xml | 219 - csit/config/clamp/logback.xml | 206 - csit/config/clamp/org.onap.clamp.keyfile | 27 - csit/config/clamp/policy-clamp-create-tables.sql | 275 - csit/config/db-pg/db-pg.conf | 17 - csit/config/db-pg/db-pg.sh | 22 - csit/config/db/db.conf | 17 - csit/config/db/db.sh | 24 - csit/config/distribution/defaultConfig.json | 76 - csit/config/distribution/groups.json | 137 - csit/config/distribution/logback.xml | 136 - .../custom/engine-system.properties | 45 - .../custom/feature-lifecycle.properties | 38 - .../drools-applications/custom/features.pre.sh | 18 - .../custom/standalone-settings.xml | 57 - csit/config/drools-applications/env/base.conf | 146 - .../env/feature-healthcheck.conf | 18 - .../env/feature-pooling-dmaap.conf | 17 - csit/config/drools-applications/groups.json | 137 - .../drools-pdp/custom/engine-system.properties | 45 - csit/config/drools-pdp/custom/noop.pre.sh | 22 - csit/config/drools-pdp/env/base.conf | 144 - csit/config/drools-pdp/groups.json | 137 - csit/config/pap/groups.json | 28 - csit/config/pap/logback.xml | 120 - csit/config/pap/papParameters.yaml | 90 - csit/config/policy-gui/application.yaml | 37 - csit/config/policy-gui/groups.json | 137 - csit/config/policy-gui/logback.xml | 119 - .../aairesponse/vfw-cnf-cds-test-1-vnf.json | 44 - .../apex-example-cba-modify-config.json | 33 - .../cdsresponse/apex-example-cba-restart.json | 33 - .../controlloop-hostname-update-update-config.json | 35 - csit/config/sim-all/logback.xml | 42 - csit/config/sim-all/simParameters.json | 110 - csit/config/xacml-pdp/defaultConfig.json | 39 - csit/config/xacml-pdp/groups.json | 101 - csit/config/xacml-pdp/logback.xml | 116 - csit/db-migrator/plans/setup.sh | 26 - csit/db-migrator/plans/teardown.sh | 20 - csit/db-migrator/plans/testplan.txt | 3 - csit/db-migrator/tests/db-migrator-test.robot | 34 - csit/db_migrator_policy_init.sh | 36 - csit/db_migrator_policy_init_pg.sh | 36 - .../config/csar/sample_csar_with_apex_policy.csar | Bin 96868 -> 0 bytes csit/distribution/plans/setup.sh | 68 - csit/distribution/plans/teardown.sh | 23 - csit/distribution/plans/testplan.txt | 3 - csit/distribution/tests/data/event.json | 11 - csit/distribution/tests/distribution-test.robot | 57 - csit/docker-compose-all.yml | 406 -- csit/drools-applications/plans/setup.sh | 73 - csit/drools-applications/plans/teardown.sh | 21 - csit/drools-applications/plans/testplan.txt | 3 - .../tests/data/deploy.drools.policies.json | 27 - .../tests/data/deploy.xacml.policies.json | 27 - csit/drools-applications/tests/data/vcpeOnset.json | 16 - csit/drools-applications/tests/data/vdnsOnset.json | 16 - csit/drools-applications/tests/data/vfwOnset.json | 17 - .../tests/drools-applications-test.robot | 232 - csit/drools-pdp/plans/setup.sh | 47 - csit/drools-pdp/plans/teardown.sh | 19 - csit/drools-pdp/plans/testplan.txt | 3 - csit/drools-pdp/tests/drools-pdp-test.robot | 26 - csit/get-branch.sh | 25 - csit/get-cluster-info.sh | 112 - csit/get-instance-ip.sh | 18 - csit/get-models-examples.sh | 28 - csit/get-versions.sh | 135 - csit/make_topic.sh | 34 - csit/metrics/dashboard.yaml | 33 - csit/metrics/dashboards/dashboard-apex-pdp.json | 1527 ---- csit/metrics/dashboards/dashboard-api.json | 1457 ---- .../metrics/dashboards/dashboard-distribution.json | 927 --- csit/metrics/dashboards/dashboard-drools-apps | 1068 --- csit/metrics/dashboards/dashboard-drools-pdp.json | 1150 --- .../dashboards/dashboard-for-springboot.json | 3681 ---------- csit/metrics/dashboards/dashboard-jvm-basic.json | 2753 -------- csit/metrics/dashboards/dashboard-pap.json | 1328 ---- csit/metrics/dashboards/dashboard-xacml-pdp.json | 1162 --- csit/metrics/dashboards/sla-metrics.json | 1778 ----- csit/metrics/datasource.yaml | 49 - csit/metrics/prometheus.yml | 101 - csit/onset.sh | 33 - csit/pap/plans/setup.sh | 54 - csit/pap/plans/teardown.sh | 21 - csit/pap/plans/testplan.txt | 4 - .../apex.policy.decisionmaker.input.tosca.json | 184 - csit/pap/tests/data/create.group.request.json | 49 - csit/pap/tests/data/deploy.group.request.json | 29 - csit/pap/tests/pap-slas.robot | 60 - csit/pap/tests/pap-test.robot | 153 - csit/prepare-robot-env.sh | 46 - csit/pylibs.txt | 26 - csit/resources/Dockerfile | 14 + csit/resources/scripts/get-cluster-info.sh | 112 + csit/resources/scripts/node-templates.sh | 49 + csit/resources/scripts/prepare-robot-env.sh | 54 + csit/resources/scripts/pylibs.txt | 26 + csit/resources/scripts/run-test.sh | 45 + csit/resources/scripts/setup-apex-pdp.sh | 33 + csit/resources/scripts/setup-api.sh | 34 + csit/resources/scripts/setup-clamp.sh | 31 + csit/resources/scripts/setup-distribution.sh | 43 + .../resources/scripts/setup-drools-applications.sh | 39 + csit/resources/scripts/setup-drools-pdp.sh | 34 + csit/resources/scripts/setup-pap.sh | 36 + csit/resources/scripts/setup-xacml-pdp.sh | 35 + csit/resources/scripts/wait_for_rest.sh | 77 + csit/resources/tests/apex-pdp-test.robot | 147 + csit/resources/tests/api-test.robot | 187 + csit/resources/tests/common-library.robot | 137 + .../tests/data/AutomationComposition.json | 64 + csit/resources/tests/data/InstantiateAC.json | 51 + csit/resources/tests/data/PMSHMultipleACTosca.yaml | 932 +++ csit/resources/tests/data/PassivateAC.json | 9 + csit/resources/tests/data/PassiveCommand.json | 5 + csit/resources/tests/data/RunningCommand.json | 5 + .../resources/tests/data/StateChangeRunningAC.json | 9 + .../resources/tests/data/VesEventForPnfPolicy.json | 28 + .../resources/tests/data/VesEventForVnfPolicy.json | 30 + .../apex.policy.decisionmaker.input.tosca.json | 184 + .../resources/tests/data/create.group.request.json | 49 + .../data/csar/sample_csar_with_apex_policy.csar | Bin 0 -> 96868 bytes .../tests/data/deploy.drools.policies.json | 27 + .../resources/tests/data/deploy.group.request.json | 29 + .../tests/data/deploy.xacml.policies.json | 27 + csit/resources/tests/data/event.json | 11 + .../tests/data/functional-pmsh-usecase.yaml | 3404 +++++++++ csit/resources/tests/data/http-usecase.yaml | 312 + csit/resources/tests/data/make_topic.sh | 34 + .../tests/data/onap.pnf.metadataSet.Test.json | 2755 ++++++++ .../tests/data/onap.policies.apex.pnf.Test.json | 2896 ++++++++ .../onap.policies.apex.pnf.metadataSet.Test.json | 165 + .../tests/data/onap.policies.apex.vnf.Test.json | 3198 +++++++++ .../onap.policies.native.apex.Sampledomain.json | 7436 ++++++++++++++++++++ .../data/onap.policy.guard.decision.request.json | 16 + .../onap.policy.monitoring.decision.request.json | 9 + .../data/onap.policy.monitoring.tcagen2.v1.json | 211 + .../data/onap.policy.monitoring.tcagen2.v2.json | 206 + .../data/onap.policy.monitoring.tcagen2.v3.json | 206 + .../data/onap.policy.naming.decision.request.json | 13 + .../onap.policy.optimization.decision.request.json | 15 + csit/resources/tests/data/onset.sh | 33 + csit/resources/tests/data/policy_deploy.json | 17 + .../tests/data/vCPE.policy.input.tosca.deploy.json | 5 + csit/resources/tests/data/vcpeOnset.json | 16 + csit/resources/tests/data/vdnsOnset.json | 16 + csit/resources/tests/data/vfwOnset.json | 17 + csit/resources/tests/data/wait_topic.sh | 62 + csit/resources/tests/distribution-test.robot | 58 + .../resources/tests/drools-applications-test.robot | 232 + csit/resources/tests/drools-pdp-test.robot | 26 + csit/resources/tests/pap-slas.robot | 60 + csit/resources/tests/pap-test.robot | 153 + csit/resources/tests/policy-clamp-test.robot | 98 + csit/resources/tests/xacml-pdp-test.robot | 150 + csit/run-project-csit.sh | 50 +- csit/start-all.sh | 25 - csit/start-containter.sh | 47 - csit/start-grafana.sh | 38 - csit/stop-all.sh | 26 - csit/wait_for_port.sh | 91 - csit/wait_for_rest.sh | 77 - csit/wait_topic.sh | 62 - csit/xacml-pdp/plans/setup.sh | 65 - csit/xacml-pdp/plans/teardown.sh | 21 - csit/xacml-pdp/plans/testplan.txt | 3 - .../data/onap.policy.guard.decision.request.json | 16 - .../onap.policy.monitoring.decision.request.json | 9 - .../data/onap.policy.naming.decision.request.json | 13 - .../onap.policy.optimization.decision.request.json | 15 - .../tests/data/vCPE.policy.input.tosca.deploy.json | 5 - csit/xacml-pdp/tests/xacml-pdp-test.robot | 150 - 296 files changed, 46676 insertions(+), 47185 deletions(-) create mode 100644 compose/config/apex-pdp/OnapPfConfig.json create mode 100644 compose/config/apex-pdp/groups.json create mode 100644 compose/config/apex-pdp/logback.xml create mode 100644 compose/config/api/apiParameters.yaml create mode 100644 compose/config/api/groups.json create mode 100644 compose/config/api/logback.xml create mode 100755 compose/config/clamp/A1pmsParticipantParameters.yaml create mode 100644 compose/config/clamp/AcRuntimeParameters.yaml create mode 100644 compose/config/clamp/ClampBackend.properties create mode 100644 compose/config/clamp/HttpParticipantParameters.yaml create mode 100644 compose/config/clamp/KubernetesParticipantParameters.yaml create mode 100644 compose/config/clamp/PolicyParticipantParameters.yaml create mode 100644 compose/config/clamp/groups.json create mode 100644 compose/config/clamp/logback-backend.xml create mode 100644 compose/config/clamp/logback.xml create mode 100644 compose/config/clamp/org.onap.clamp.keyfile create mode 100644 compose/config/clamp/policy-clamp-create-tables.sql create mode 100755 compose/config/db-migrator/init.sh create mode 100755 compose/config/db-migrator/init_pg.sh create mode 100644 compose/config/db-pg/db-pg.conf create mode 100755 compose/config/db-pg/db-pg.sh create mode 100644 compose/config/db/db.conf create mode 100755 compose/config/db/db.sh create mode 100644 compose/config/distribution/defaultConfig.json create mode 100644 compose/config/distribution/groups.json create mode 100644 compose/config/distribution/logback.xml create mode 100644 compose/config/drools-applications/custom/engine-system.properties create mode 100644 compose/config/drools-applications/custom/feature-lifecycle.properties create mode 100755 compose/config/drools-applications/custom/features.pre.sh create mode 100644 compose/config/drools-applications/custom/standalone-settings.xml create mode 100644 compose/config/drools-applications/env/base.conf create mode 100644 compose/config/drools-applications/env/feature-healthcheck.conf create mode 100644 compose/config/drools-applications/env/feature-pooling-dmaap.conf create mode 100644 compose/config/drools-applications/groups.json create mode 100644 compose/config/drools-pdp/custom/engine-system.properties create mode 100755 compose/config/drools-pdp/custom/noop.pre.sh create mode 100644 compose/config/drools-pdp/env/base.conf create mode 100644 compose/config/drools-pdp/groups.json create mode 100644 compose/config/pap/groups.json create mode 100644 compose/config/pap/logback.xml create mode 100644 compose/config/pap/papParameters.yaml create mode 100644 compose/config/policy-gui/application.yaml create mode 100644 compose/config/policy-gui/groups.json create mode 100644 compose/config/policy-gui/logback.xml create mode 100644 compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json create mode 100644 compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json create mode 100644 compose/config/sim-all/cdsresponse/apex-example-cba-restart.json create mode 100644 compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json create mode 100644 compose/config/sim-all/logback.xml create mode 100644 compose/config/sim-all/simParameters.json create mode 100644 compose/config/xacml-pdp/defaultConfig.json create mode 100644 compose/config/xacml-pdp/groups.json create mode 100644 compose/config/xacml-pdp/logback.xml create mode 100644 compose/docker-compose.gui.yml create mode 100644 compose/docker-compose.yml create mode 100755 compose/export-ports.sh create mode 100755 compose/get-versions.sh create mode 100644 compose/metrics/dashboard.yaml create mode 100644 compose/metrics/dashboards/dashboard-apex-pdp.json create mode 100644 compose/metrics/dashboards/dashboard-api.json create mode 100644 compose/metrics/dashboards/dashboard-distribution.json create mode 100644 compose/metrics/dashboards/dashboard-drools-apps create mode 100644 compose/metrics/dashboards/dashboard-drools-pdp.json create mode 100644 compose/metrics/dashboards/dashboard-for-springboot.json create mode 100644 compose/metrics/dashboards/dashboard-jvm-basic.json create mode 100644 compose/metrics/dashboards/dashboard-pap.json create mode 100644 compose/metrics/dashboards/dashboard-xacml-pdp.json create mode 100644 compose/metrics/dashboards/sla-metrics.json create mode 100644 compose/metrics/datasource.yaml create mode 100644 compose/metrics/prometheus.yml create mode 100755 compose/start-compose.sh create mode 100755 compose/stop-compose.sh create mode 100755 compose/wait_for_port.sh delete mode 100755 csit/apex-pdp/plans/setup.sh delete mode 100755 csit/apex-pdp/plans/teardown.sh delete mode 100644 csit/apex-pdp/plans/testplan.txt delete mode 100644 csit/apex-pdp/tests/apex-pdp-test.robot delete mode 100644 csit/apex-pdp/tests/data/VesEventForPnfPolicy.json delete mode 100644 csit/apex-pdp/tests/data/VesEventForVnfPolicy.json delete mode 100644 csit/apex-pdp/tests/data/event.json delete mode 100644 csit/apex-pdp/tests/data/onap.pnf.metadataSet.Test.json delete mode 100644 csit/apex-pdp/tests/data/onap.policies.apex.pnf.Test.json delete mode 100644 csit/apex-pdp/tests/data/onap.policies.apex.pnf.metadataSet.Test.json delete mode 100644 csit/apex-pdp/tests/data/onap.policies.apex.vnf.Test.json delete mode 100644 csit/apex-pdp/tests/data/onap.policies.native.apex.Sampledomain.json delete mode 100644 csit/apex-pdp/tests/data/policy_deploy.json delete mode 100755 csit/api/plans/setup.sh delete mode 100755 csit/api/plans/teardown.sh delete mode 100644 csit/api/plans/testplan.txt delete mode 100644 csit/api/tests/api-test.robot delete mode 100644 csit/api/tests/data/onap.policy.monitoring.tcagen2.v1.json delete mode 100644 csit/api/tests/data/onap.policy.monitoring.tcagen2.v2.json delete mode 100644 csit/api/tests/data/onap.policy.monitoring.tcagen2.v3.json delete mode 100755 csit/clamp/plans/setup.sh delete mode 100755 csit/clamp/plans/teardown.sh delete mode 100644 csit/clamp/plans/testplan.txt delete mode 100644 csit/clamp/tests/data/AutomationComposition.json delete mode 100644 csit/clamp/tests/data/InstantiateAC.json delete mode 100644 csit/clamp/tests/data/PMSHMultipleACTosca.yaml delete mode 100644 csit/clamp/tests/data/PassivateAC.json delete mode 100644 csit/clamp/tests/data/PassiveCommand.json delete mode 100644 csit/clamp/tests/data/RunningCommand.json delete mode 100644 csit/clamp/tests/data/StateChangeRunningAC.json delete mode 100644 csit/clamp/tests/data/functional-pmsh-usecase.yaml delete mode 100644 csit/clamp/tests/data/http-usecase.yaml delete mode 100644 csit/clamp/tests/policy-clamp-test.robot delete mode 100644 csit/common-library.robot delete mode 100644 csit/compose-postgres.yml delete mode 100644 csit/config/apex-pdp/OnapPfConfig.json delete mode 100644 csit/config/apex-pdp/groups.json delete mode 100644 csit/config/apex-pdp/logback.xml delete mode 100644 csit/config/api/apiParameters.yaml delete mode 100644 csit/config/api/groups.json delete mode 100644 csit/config/api/logback.xml delete mode 100755 csit/config/clamp/A1pmsParticipantParameters.yaml delete mode 100644 csit/config/clamp/AcRuntimeParameters.yaml delete mode 100644 csit/config/clamp/ClampBackend.properties delete mode 100644 csit/config/clamp/HttpParticipantParameters.yaml delete mode 100644 csit/config/clamp/KubernetesParticipantParameters.yaml delete mode 100644 csit/config/clamp/PolicyParticipantParameters.yaml delete mode 100644 csit/config/clamp/groups.json delete mode 100644 csit/config/clamp/logback-backend.xml delete mode 100644 csit/config/clamp/logback.xml delete mode 100644 csit/config/clamp/org.onap.clamp.keyfile delete mode 100644 csit/config/clamp/policy-clamp-create-tables.sql delete mode 100644 csit/config/db-pg/db-pg.conf delete mode 100755 csit/config/db-pg/db-pg.sh delete mode 100644 csit/config/db/db.conf delete mode 100755 csit/config/db/db.sh delete mode 100644 csit/config/distribution/defaultConfig.json delete mode 100644 csit/config/distribution/groups.json delete mode 100644 csit/config/distribution/logback.xml delete mode 100644 csit/config/drools-applications/custom/engine-system.properties delete mode 100644 csit/config/drools-applications/custom/feature-lifecycle.properties delete mode 100755 csit/config/drools-applications/custom/features.pre.sh delete mode 100644 csit/config/drools-applications/custom/standalone-settings.xml delete mode 100644 csit/config/drools-applications/env/base.conf delete mode 100644 csit/config/drools-applications/env/feature-healthcheck.conf delete mode 100644 csit/config/drools-applications/env/feature-pooling-dmaap.conf delete mode 100644 csit/config/drools-applications/groups.json delete mode 100644 csit/config/drools-pdp/custom/engine-system.properties delete mode 100755 csit/config/drools-pdp/custom/noop.pre.sh delete mode 100644 csit/config/drools-pdp/env/base.conf delete mode 100644 csit/config/drools-pdp/groups.json delete mode 100644 csit/config/pap/groups.json delete mode 100644 csit/config/pap/logback.xml delete mode 100644 csit/config/pap/papParameters.yaml delete mode 100644 csit/config/policy-gui/application.yaml delete mode 100644 csit/config/policy-gui/groups.json delete mode 100644 csit/config/policy-gui/logback.xml delete mode 100644 csit/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json delete mode 100644 csit/config/sim-all/cdsresponse/apex-example-cba-modify-config.json delete mode 100644 csit/config/sim-all/cdsresponse/apex-example-cba-restart.json delete mode 100644 csit/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json delete mode 100644 csit/config/sim-all/logback.xml delete mode 100644 csit/config/sim-all/simParameters.json delete mode 100644 csit/config/xacml-pdp/defaultConfig.json delete mode 100644 csit/config/xacml-pdp/groups.json delete mode 100644 csit/config/xacml-pdp/logback.xml delete mode 100755 csit/db-migrator/plans/setup.sh delete mode 100755 csit/db-migrator/plans/teardown.sh delete mode 100644 csit/db-migrator/plans/testplan.txt delete mode 100644 csit/db-migrator/tests/db-migrator-test.robot delete mode 100755 csit/db_migrator_policy_init.sh delete mode 100755 csit/db_migrator_policy_init_pg.sh delete mode 100644 csit/distribution/config/csar/sample_csar_with_apex_policy.csar delete mode 100755 csit/distribution/plans/setup.sh delete mode 100755 csit/distribution/plans/teardown.sh delete mode 100644 csit/distribution/plans/testplan.txt delete mode 100644 csit/distribution/tests/data/event.json delete mode 100644 csit/distribution/tests/distribution-test.robot delete mode 100644 csit/docker-compose-all.yml delete mode 100755 csit/drools-applications/plans/setup.sh delete mode 100755 csit/drools-applications/plans/teardown.sh delete mode 100644 csit/drools-applications/plans/testplan.txt delete mode 100644 csit/drools-applications/tests/data/deploy.drools.policies.json delete mode 100644 csit/drools-applications/tests/data/deploy.xacml.policies.json delete mode 100644 csit/drools-applications/tests/data/vcpeOnset.json delete mode 100644 csit/drools-applications/tests/data/vdnsOnset.json delete mode 100644 csit/drools-applications/tests/data/vfwOnset.json delete mode 100644 csit/drools-applications/tests/drools-applications-test.robot delete mode 100755 csit/drools-pdp/plans/setup.sh delete mode 100755 csit/drools-pdp/plans/teardown.sh delete mode 100644 csit/drools-pdp/plans/testplan.txt delete mode 100644 csit/drools-pdp/tests/drools-pdp-test.robot delete mode 100755 csit/get-branch.sh delete mode 100644 csit/get-cluster-info.sh delete mode 100755 csit/get-instance-ip.sh delete mode 100755 csit/get-models-examples.sh delete mode 100755 csit/get-versions.sh delete mode 100755 csit/make_topic.sh delete mode 100644 csit/metrics/dashboard.yaml delete mode 100644 csit/metrics/dashboards/dashboard-apex-pdp.json delete mode 100644 csit/metrics/dashboards/dashboard-api.json delete mode 100644 csit/metrics/dashboards/dashboard-distribution.json delete mode 100644 csit/metrics/dashboards/dashboard-drools-apps delete mode 100644 csit/metrics/dashboards/dashboard-drools-pdp.json delete mode 100644 csit/metrics/dashboards/dashboard-for-springboot.json delete mode 100644 csit/metrics/dashboards/dashboard-jvm-basic.json delete mode 100644 csit/metrics/dashboards/dashboard-pap.json delete mode 100644 csit/metrics/dashboards/dashboard-xacml-pdp.json delete mode 100644 csit/metrics/dashboards/sla-metrics.json delete mode 100644 csit/metrics/datasource.yaml delete mode 100644 csit/metrics/prometheus.yml delete mode 100755 csit/onset.sh delete mode 100755 csit/pap/plans/setup.sh delete mode 100755 csit/pap/plans/teardown.sh delete mode 100644 csit/pap/plans/testplan.txt delete mode 100644 csit/pap/tests/data/apex.policy.decisionmaker.input.tosca.json delete mode 100644 csit/pap/tests/data/create.group.request.json delete mode 100644 csit/pap/tests/data/deploy.group.request.json delete mode 100644 csit/pap/tests/pap-slas.robot delete mode 100644 csit/pap/tests/pap-test.robot delete mode 100755 csit/prepare-robot-env.sh delete mode 100644 csit/pylibs.txt create mode 100644 csit/resources/Dockerfile create mode 100644 csit/resources/scripts/get-cluster-info.sh create mode 100755 csit/resources/scripts/node-templates.sh create mode 100755 csit/resources/scripts/prepare-robot-env.sh create mode 100644 csit/resources/scripts/pylibs.txt create mode 100755 csit/resources/scripts/run-test.sh create mode 100755 csit/resources/scripts/setup-apex-pdp.sh create mode 100755 csit/resources/scripts/setup-api.sh create mode 100755 csit/resources/scripts/setup-clamp.sh create mode 100755 csit/resources/scripts/setup-distribution.sh create mode 100755 csit/resources/scripts/setup-drools-applications.sh create mode 100755 csit/resources/scripts/setup-drools-pdp.sh create mode 100755 csit/resources/scripts/setup-pap.sh create mode 100755 csit/resources/scripts/setup-xacml-pdp.sh create mode 100755 csit/resources/scripts/wait_for_rest.sh create mode 100644 csit/resources/tests/apex-pdp-test.robot create mode 100644 csit/resources/tests/api-test.robot create mode 100644 csit/resources/tests/common-library.robot create mode 100644 csit/resources/tests/data/AutomationComposition.json create mode 100644 csit/resources/tests/data/InstantiateAC.json create mode 100644 csit/resources/tests/data/PMSHMultipleACTosca.yaml create mode 100644 csit/resources/tests/data/PassivateAC.json create mode 100644 csit/resources/tests/data/PassiveCommand.json create mode 100644 csit/resources/tests/data/RunningCommand.json create mode 100644 csit/resources/tests/data/StateChangeRunningAC.json create mode 100644 csit/resources/tests/data/VesEventForPnfPolicy.json create mode 100644 csit/resources/tests/data/VesEventForVnfPolicy.json create mode 100644 csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json create mode 100644 csit/resources/tests/data/create.group.request.json create mode 100644 csit/resources/tests/data/csar/sample_csar_with_apex_policy.csar create mode 100644 csit/resources/tests/data/deploy.drools.policies.json create mode 100644 csit/resources/tests/data/deploy.group.request.json create mode 100644 csit/resources/tests/data/deploy.xacml.policies.json create mode 100644 csit/resources/tests/data/event.json create mode 100644 csit/resources/tests/data/functional-pmsh-usecase.yaml create mode 100644 csit/resources/tests/data/http-usecase.yaml create mode 100755 csit/resources/tests/data/make_topic.sh create mode 100644 csit/resources/tests/data/onap.pnf.metadataSet.Test.json create mode 100644 csit/resources/tests/data/onap.policies.apex.pnf.Test.json create mode 100644 csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json create mode 100644 csit/resources/tests/data/onap.policies.apex.vnf.Test.json create mode 100644 csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json create mode 100644 csit/resources/tests/data/onap.policy.guard.decision.request.json create mode 100644 csit/resources/tests/data/onap.policy.monitoring.decision.request.json create mode 100644 csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json create mode 100644 csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json create mode 100644 csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json create mode 100644 csit/resources/tests/data/onap.policy.naming.decision.request.json create mode 100644 csit/resources/tests/data/onap.policy.optimization.decision.request.json create mode 100755 csit/resources/tests/data/onset.sh create mode 100644 csit/resources/tests/data/policy_deploy.json create mode 100644 csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json create mode 100644 csit/resources/tests/data/vcpeOnset.json create mode 100644 csit/resources/tests/data/vdnsOnset.json create mode 100644 csit/resources/tests/data/vfwOnset.json create mode 100755 csit/resources/tests/data/wait_topic.sh create mode 100644 csit/resources/tests/distribution-test.robot create mode 100644 csit/resources/tests/drools-applications-test.robot create mode 100644 csit/resources/tests/drools-pdp-test.robot create mode 100644 csit/resources/tests/pap-slas.robot create mode 100644 csit/resources/tests/pap-test.robot create mode 100644 csit/resources/tests/policy-clamp-test.robot create mode 100644 csit/resources/tests/xacml-pdp-test.robot delete mode 100755 csit/start-all.sh delete mode 100755 csit/start-containter.sh delete mode 100755 csit/start-grafana.sh delete mode 100755 csit/stop-all.sh delete mode 100755 csit/wait_for_port.sh delete mode 100755 csit/wait_for_rest.sh delete mode 100755 csit/wait_topic.sh delete mode 100755 csit/xacml-pdp/plans/setup.sh delete mode 100755 csit/xacml-pdp/plans/teardown.sh delete mode 100644 csit/xacml-pdp/plans/testplan.txt delete mode 100644 csit/xacml-pdp/tests/data/onap.policy.guard.decision.request.json delete mode 100644 csit/xacml-pdp/tests/data/onap.policy.monitoring.decision.request.json delete mode 100644 csit/xacml-pdp/tests/data/onap.policy.naming.decision.request.json delete mode 100644 csit/xacml-pdp/tests/data/onap.policy.optimization.decision.request.json delete mode 100644 csit/xacml-pdp/tests/data/vCPE.policy.input.tosca.deploy.json delete mode 100644 csit/xacml-pdp/tests/xacml-pdp-test.robot diff --git a/.gitignore b/.gitignore index fee07ae7..e1fd2d4e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ env.properties models .vscode/ **/*.log +**/*/Chart.lock +**/*/charts/ diff --git a/compose/config/apex-pdp/OnapPfConfig.json b/compose/config/apex-pdp/OnapPfConfig.json new file mode 100644 index 00000000..57ca7200 --- /dev/null +++ b/compose/config/apex-pdp/OnapPfConfig.json @@ -0,0 +1,41 @@ +{ + "name":"OnapPfParameterGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "policyadmin", + "password": "zb!XztG34", + "https": false, + "prometheus": true + }, + "pdpStatusParameters":{ + "pdpGroup": "defaultGroup", + "timeIntervalMs": 120000, + "pdpType":"apex", + "description":"Pdp Heartbeat", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ] + }, + "topicParameterGroup": { + "topicSources" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "message-router" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false + }], + "topicSinks" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "message-router" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false + }] + } +} diff --git a/compose/config/apex-pdp/groups.json b/compose/config/apex-pdp/groups.json new file mode 100644 index 00000000..bd5c2868 --- /dev/null +++ b/compose/config/apex-pdp/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/compose/config/apex-pdp/logback.xml b/compose/config/apex-pdp/logback.xml new file mode 100644 index 00000000..eb5613c0 --- /dev/null +++ b/compose/config/apex-pdp/logback.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/api/apiParameters.yaml b/compose/config/api/apiParameters.yaml new file mode 100644 index 00000000..36d53915 --- /dev/null +++ b/compose/config/api/apiParameters.yaml @@ -0,0 +1,86 @@ +server: + port: 6969 + ssl: + enabled: false + servlet: + context-path: /policy/api/v1 + +spring: + security.user: + name: policyadmin + password: zb!XztG34 + mvc.converters.preferred-json-mapper: gson + + datasource: + url: jdbc:mariadb://mariadb:3306/policyadmin + driverClassName: org.mariadb.jdbc.Driver + username: policy_user + password: policy_user + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.MariaDB103Dialect + hibernate: + ddl-auto: none + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + +policy-api: + name: ApiGroup + aaf: false + +database: + name: PolicyProviderParameterGroup + implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl + driver: org.mariadb.jdbc.Driver + url: jdbc:mariadb://mariadb:3306/policyadmin + user: policy_user + password: policy_user + persistenceUnit: PolicyDb + +policy-preload: + policyTypes: + - policytypes/onap.policies.monitoring.tcagen2.yaml + - policytypes/onap.policies.monitoring.tcagen2.v2.yaml + - policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml + - policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml + - policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml + - policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml + - policytypes/onap.policies.Optimization.yaml + - policytypes/onap.policies.optimization.Resource.yaml + - policytypes/onap.policies.optimization.Service.yaml + - policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml + - policytypes/onap.policies.optimization.resource.DistancePolicy.yaml + - policytypes/onap.policies.optimization.resource.HpaPolicy.yaml + - policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml + - policytypes/onap.policies.optimization.resource.PciPolicy.yaml + - policytypes/onap.policies.optimization.service.QueryPolicy.yaml + - policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml + - policytypes/onap.policies.optimization.resource.Vim_fit.yaml + - policytypes/onap.policies.optimization.resource.VnfPolicy.yaml + - policytypes/onap.policies.controlloop.guard.Common.yaml + - policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml + - policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml + - policytypes/onap.policies.controlloop.guard.common.MinMax.yaml + - policytypes/onap.policies.controlloop.guard.common.Filter.yaml + - policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml + - policytypes/onap.policies.Naming.yaml + - policytypes/onap.policies.Match.yaml + - policytypes/onap.policies.native.Drools.yaml + - policytypes/onap.policies.native.Xacml.yaml + - policytypes/onap.policies.native.Apex.yaml + - policytypes/onap.policies.controlloop.operational.Common.yaml + - policytypes/onap.policies.controlloop.operational.common.Apex.yaml + - policytypes/onap.policies.controlloop.operational.common.Drools.yaml + policies: + - policies/sdnc.policy.naming.input.tosca.yaml + +management: + endpoints: + web: + base-path: / + exposure: + include: health,metrics,prometheus + path-mapping.metrics: plain-metrics + path-mapping.prometheus: metrics diff --git a/compose/config/api/groups.json b/compose/config/api/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/api/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/api/logback.xml b/compose/config/api/logback.xml new file mode 100644 index 00000000..83a70993 --- /dev/null +++ b/compose/config/api/logback.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + ${logDir}/${metricLog}.log + + ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${metricPattern} + + + + + + + + + ${logDir}/${transactionLog}.log + + ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${transactionPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/clamp/A1pmsParticipantParameters.yaml b/compose/config/clamp/A1pmsParticipantParameters.yaml new file mode 100755 index 00000000..c9b5a8ad --- /dev/null +++ b/compose/config/clamp/A1pmsParticipantParameters.yaml @@ -0,0 +1,59 @@ +spring: + security: + user: + name: participantUser + password: zb!XztG34 + autoconfigure: + exclude: + - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration + - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration + - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration +security: + enable-csrf: false + +a1pms: + baseUrl: http://a1policymanagement.onap:8081 + headers: + content-type: application/json + endpoints: + health: /a1-policy/v2/rics + services: /a1-policy/v2/services + service: /a1-policy/v2/services/{service_id} + +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + description: Participant Description + participantId: + name: A1PMSParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.A1PMSParticipant + version: 2.3.4 + clampAutomationCompositionTopics: + topicSources: + - topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + fetchTimeout: 15000 + topicSinks: + - topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + + +management: + endpoints: + web: + base-path: / + exposure: + include: health, metrics, prometheus +server: + port: 6969 + ssl: + enabled: false + servlet: + context-path: /onap/policy/clamp/acm/a1pmsparticipant \ No newline at end of file diff --git a/compose/config/clamp/AcRuntimeParameters.yaml b/compose/config/clamp/AcRuntimeParameters.yaml new file mode 100644 index 00000000..dc7b6b92 --- /dev/null +++ b/compose/config/clamp/AcRuntimeParameters.yaml @@ -0,0 +1,71 @@ +spring: + security: + user: + name: runtimeUser + password: zb!XztG34 + mvc: + converters: + preferred-json-mapper: gson + datasource: + url: jdbc:mariadb://${mariadb.host:mariadb}:${mariadb.port:3306}/clampacm + driverClassName: org.mariadb.jdbc.Driver + username: policy_user + password: policy_user + hikari: + connectionTimeout: 30000 + idleTimeout: 600000 + maxLifetime: 1800000 + maximumPoolSize: 10 + jpa: + hibernate: + ddl-auto: update + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + properties: + hibernate: + dialect: org.hibernate.dialect.MariaDB103Dialect + format_sql: true + +security: + enable-csrf: false + +server: + servlet: + context-path: /onap/policy/clamp/acm + port: 6969 + ssl: + enabled: false + error: + path: /error + +runtime: + participantParameters: + heartBeatMs: 20000 + maxStatusWaitMs: 100000 + updateParameters: + maxRetryCount: 3 + maxWaitMs: 20000 + topicParameterGroup: + topicSources: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + useHttps: false + +management: + endpoints: + web: + base-path: / + exposure: + include: health, metrics, prometheus diff --git a/compose/config/clamp/ClampBackend.properties b/compose/config/clamp/ClampBackend.properties new file mode 100644 index 00000000..b9776d04 --- /dev/null +++ b/compose/config/clamp/ClampBackend.properties @@ -0,0 +1,197 @@ +### +# ============LICENSE_START======================================================= +# ONAP POLICY-DOCKER +# ================================================================================ +# Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END============================================ +# =================================================================== +# +### + +### Set the port for HTTP or HTTPS protocol (Controlled by Spring framework, only one at a time). +### (See below for the parameter 'server.http.port' if you want to have both enabled) +### To have only HTTP, keep the lines server.ssl.* commented +### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location +### server.port=8080 +### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port') +#server.ssl.key-store=file:/tmp/mykey.jks +#server.ssl.key-store-password=pass +#server.ssl.key-password=pass + +### In order to be user friendly when HTTPS is enabled, +### you can add another HTTP port that will be automatically redirected to HTTPS +### by enabling this parameter (server.http.port) and set it to another port (80 or 8080, 8090, etc ...) +#server.http-to-https-redirection.port=8090 + +### HTTP Example: +###-------------- +### server.port=8080 + +### HTTPS Example: +### -------------- +### server.port=8443 +#server.ssl.key-store=file:/opt/policy/clamp/policy-keystore +#server.ssl.key-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd +#server.ssl.key-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd +#server.ssl.key-store-type=jks +server.port=8445 +## Config part for Server certificates +# Can be a classpath parameter instead of file:/ +#server.ssl.key-store=classpath:/clds/aaf/org.onap.clamp.p12 +#server.ssl.key-store-password=enc:YZs7M6IftyPjHniTa6J7G2416hssb8qI-Av8D1b8pPS +#server.ssl.key-password=enc:YZs7M6IftyPjHniTa6J7G2416hssb8qI-Av8D1b8pPS + +## Config part for Client certificates +#server.ssl.client-auth=want +#server.ssl.trust-store=classpath:/clds/aaf/truststoreONAPall.jks +#server.ssl.trust-store-password=enc:iDnPBBLq_EMidXlMa1FEuBR8TZzYxrCg66vq_XfLHdJ +#server.ssl.trust-store=file:/opt/policy/clamp/policy-truststore +#server.ssl.trust-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd + +# The key file used to decode the key store and trust store password +# If not defined, the key store and trust store password will not be decrypted +#clamp.config.keyFile=classpath:/clds/aaf/org.onap.clamp.keyfile +#clamp.config.keyFile=file:/opt/policy/clamp/clamp-be-keyfile + +server.http-to-https-redirection.port=8080 + +server.servlet.context-path=/ +#Modified engine-rest applicationpath +spring.profiles.active=clamp-default,clamp-default-user,clamp-policy-controller,default-dictionary-elements +spring.http.converters.preferred-json-mapper=gson + +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. + +camel.springboot.consumer-template-cache-size=1000 +camel.springboot.producer-template-cache-size=1000 +camel.springboot.jmx-enabled=true +camel.defaultthreadpool.poolsize=10 +camel.defaultthreadpool.maxpoolsize=20 +camel.defaultthreadpool.maxqueuesize=1000 +camel.defaultthreadpool.keepaliveTime=60 +camel.defaultthreadpool.rejectpolicy=CallerRuns +camel.springboot.xml-routes=classpath:/clds/camel/routes/*.xml +camel.springboot.xml-rests=classpath:/clds/camel/rest/*.xml +camel.springboot.backlog-tracing=true +camel.springboot.tracing=true + +#clds datasource connection details +spring.datasource.driverClassName=org.mariadb.jdbc.Driver +spring.datasource.url=jdbc:mariadb:sequential://${MARIADB_HOST}:3306/policyclamp?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3 +spring.datasource.username=policy_user +spring.datasource.password=policy_user +spring.datasource.validationQuery=SELECT 1 +spring.datasource.validationQueryTimeout=20000 +spring.datasource.validationInterval=30000 +spring.datasource.testWhileIdle = true +spring.datasource.minIdle = 0 +spring.datasource.initialSize=0 +# Automatically test whether a connection provided is good or not +spring.datasource.testOnBorrow=true +spring.datasource.ignoreExceptionOnPreLoad=true +# control the sql db initialization (from schema.sql and data.sql) +spring.datasource..initialize=false + +spring.jpa.properties.javax.persistence.schema-generation.database.action=none +s#pring.jpa.properties.javax.persistence.schema-generation.create-source=metadata +#spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create +#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql +# disable Hibernate DDL generation because the schema will be generated from a sql script +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect +spring.jpa.properties.hibernate.ddl-auto=validate +spring.jpa.properties.hibernate.hbm2ddl.delimiter=; +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.use-new-id-generator-mappings=true + +# Whether to enable logging of SQL statements. +#spring.jpa.show-sql=true + +#Async Executor default Parameters +async.core.pool.size=10 +async.max.pool.size=20 +async.queue.capacity=500 + +#For logback file +clamp.config.logback.path=/opt/policy/clamp/config +clamp.config.logback.filename=logback.xml +#The log folder that will be used in logback.xml file +clamp.config.log.path=/var/log/onap/policy/clamp +clamp.config.files.systemProperties=classpath:/system.properties +clamp.config.files.cldsUsers=classpath:/clds/clds-users.json +clamp.config.files.globalProperties=classpath:/clds/templates/globalProperties.json +clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json + +clamp.config.httpclient.socketTimeout=60000 +clamp.config.httpclient.connectTimeout=10000 + +# +# Configuration Settings for Policy Engine Components +clamp.config.policy.api.url=http://${POLICY_API_HOST}:6969 +clamp.config.policy.api.userName=policyadmin +clamp.config.policy.api.password=zb!XztG34 +clamp.config.policy.pap.url=http://${POLICY_PAP_HOST}:6969 +clamp.config.policy.pap.userName=policyadmin +clamp.config.policy.pap.password=zb!XztG34 + +# +# Sdc service properties +clamp.config.sdc.csarFolder = /tmp/sdc-controllers + +#DCAE Inventory Url Properties +clamp.config.dcae.inventory.url=http://localhost:8085 +clamp.config.dcae.intentory.retry.interval=10000 +clamp.config.dcae.intentory.retry.limit=5 + +#DCAE Deployment Url Properties +clamp.config.dcae.deployment.url=http://localhost:8085 +clamp.config.dcae.deployment.userName=test +clamp.config.dcae.deployment.password=test + +#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case ! +clamp.config.security.permission.type.cl=org.onap.clamp.clds.cl +clamp.config.security.permission.type.cl.manage=org.onap.clamp.clds.cl.manage +clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event +clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf +clamp.config.security.permission.type.template=org.onap.clamp.clds.template +clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca +clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies +#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties +clamp.config.security.permission.instance=dev +clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal + +## Tosca converter +clamp.config.tosca.converter.json.schema.templates=classpath:/clds/tosca-converter/templates.json +clamp.config.tosca.converter.default.datatypes=classpath:/clds/tosca-converter/default-tosca-types.yaml +clamp.config.tosca.converter.dictionary.support.enabled=true + +# Configuration settings for CDS +clamp.config.cds.url=http://cds-blueprints-processor-http:8080 +clamp.config.cds.userName=ccsdkapps +clamp.config.cds.password=ccsdkapps + +# Configuration settings for ControlLoop Runtime Rest API +clamp.config.acm.runtime.url=http://${RUNTIME_HOST}:6969 +clamp.config.acm.runtime.userName=runtimeUser +clamp.config.acm.runtime.password=zb!XztG34 diff --git a/compose/config/clamp/HttpParticipantParameters.yaml b/compose/config/clamp/HttpParticipantParameters.yaml new file mode 100644 index 00000000..038e97af --- /dev/null +++ b/compose/config/clamp/HttpParticipantParameters.yaml @@ -0,0 +1,47 @@ +spring: + security: + user: + name: participantUser + password: zb!XztG34 + autoconfigure: + exclude: > + org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, + org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, + org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration +security: + enable-csrf: false +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + description: Participant Description + participantId: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + clampAutomationCompositionTopics: + topicSources: + - topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + fetchTimeout: 15000 + useHttps: false + topicSinks: + - topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + useHttps: false +management: + endpoints: + web: + exposure: + include: health, metrics, prometheus +server: + port: 6969 + ssl: + enabled: false + servlet: + context-path: /onap/policy/clamp/acm/httpparticipant diff --git a/compose/config/clamp/KubernetesParticipantParameters.yaml b/compose/config/clamp/KubernetesParticipantParameters.yaml new file mode 100644 index 00000000..d9c3326f --- /dev/null +++ b/compose/config/clamp/KubernetesParticipantParameters.yaml @@ -0,0 +1,68 @@ +spring: + security: + user: + name: participantUser + password: zb!XztG34 + autoconfigure: + exclude: > + org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, + org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, + org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration +security: + enable-csrf: false + +participant: + localChartDirectory: /home/policy/local-charts + infoFileName: CHART_INFO.json + intermediaryParameters: + reportingTimeIntervalMs: 120000 + description: Participant Description + participantId: + name: K8sParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.KubernetesParticipant + version: 2.3.4 + clampAutomationCompositionTopics: + topicSources: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + useHttps: false + +management: + endpoints: + web: + exposure: + include: health, metrics, prometheus +server: + port: 6969 + ssl: + enabled: false + servlet: + context-path: /onap/policy/clamp/acm/k8sparticipant + +logging: + # Configuration of logging + level: + ROOT: ERROR + org.springframework: ERROR + org.springframework.data: ERROR + org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR + org.onap.policy.clamp.acm.participant.kubernetes: INFO + file: + name: /var/log/onap/policy/clamp/application.log + +chart: + api: + enabled: false diff --git a/compose/config/clamp/PolicyParticipantParameters.yaml b/compose/config/clamp/PolicyParticipantParameters.yaml new file mode 100644 index 00000000..8db98a78 --- /dev/null +++ b/compose/config/clamp/PolicyParticipantParameters.yaml @@ -0,0 +1,65 @@ +spring: + security: + user: + name: participantUser + password: zb!XztG34 + autoconfigure: + exclude: > + org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, + org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, + org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration +participant: + pdpGroup: defaultGroup + pdpType: apex + policyApiParameters: + clientName: api + hostname: policy-api + port: 6969 + userName: policyadmin + password: zb!XztG34 + useHttps: false + allowSelfSignedCerts: true + policyPapParameters: + clientName: pap + hostname: policy-pap + port: 6969 + userName: policyadmin + password: zb!XztG34 + useHttps: false + allowSelfSignedCerts: true + intermediaryParameters: + reportingTimeIntervalMs: 120000 + description: Participant Description + participantId: + name: org.onap.PM_Policy + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.PolicyParticipant + version: 2.3.1 + clampAutomationCompositionTopics: + topicSources: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: POLICY-ACRUNTIME-PARTICIPANT + servers: + - ${topicServer:message-router} + topicCommInfrastructure: dmaap + useHttps: false +management: + endpoints: + web: + exposure: + include: health, metrics, prometheus +server: + port: 6969 + ssl: + enabled: false + servlet: + context-path: /onap/policy/clamp/acm/policyparticipant diff --git a/compose/config/clamp/groups.json b/compose/config/clamp/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/clamp/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/clamp/logback-backend.xml b/compose/config/clamp/logback-backend.xml new file mode 100644 index 00000000..cfa280c4 --- /dev/null +++ b/compose/config/clamp/logback-backend.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + INFO + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + + + ERROR + ACCEPT + DENY + + ${logDirectory}/error.log + true + + ${errorPattern} + + + ${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + ${logDirectory}/debug.log + true + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + ${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + + ${logDirectory}/audit.log + + ${auditPattern} + + + ${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + + ${logDirectory}/metric.log + + ${metricPattern} + + + ${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + + + ${logDirectory}/security.log + + %X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n + + + + ${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + + + + ${logDirectory}/Audits.log + + ${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + ${logDirectory}/Perform.log + + ${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/clamp/logback.xml b/compose/config/clamp/logback.xml new file mode 100644 index 00000000..c316e179 --- /dev/null +++ b/compose/config/clamp/logback.xml @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + ${logDir}/${metricLog}.log + + ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${metricPattern} + + + + + + + + + ${logDir}/${transactionLog}.log + + ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${transactionPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/clamp/org.onap.clamp.keyfile b/compose/config/clamp/org.onap.clamp.keyfile new file mode 100644 index 00000000..c2521fc8 --- /dev/null +++ b/compose/config/clamp/org.onap.clamp.keyfile @@ -0,0 +1,27 @@ +kzJMxgphAoBxJz1_vYjxx-V87fahDQdYUqBIyWhZp8ojXdNpmB-96T9CvgJScJynbLcqw2Cj2CYx +wd97vFOYhlyz5zK3tSyIuydOkVGJsJ1S4PviTtjhiJvNourJNDHgtas1Y1y2fQ5_8aVxj-s4W72N +MNYhkeTinaQx_d_5hkBPABJlgCxKLnmxHo2jAJktnZYa5t5h48m7KiUx_RVEkQVtEvux-7vgXaC4 +ymTXj6zI9XoMTVxM0OAl4y7kBiUoOUaxS4tVKV34RJYNNqBjiUTQa_ag-KeUacRABk1ozfwzpvE5 +Sjz8WCy0L-LtCQnapkhKLt04ndCZtw8LDJ-Zz0ZgR2PVIPpTgs9VnVuOi5jf4LzTrtUatvOWkKB9 +drXKzp6cNXnZ0jkD3vV1BzqzhynKnZR2o_ilZv5CTTdpGUt906N_DwZuX6LfcV_7yvjX42bTfeIR +ycPtodFPXlqqn9VUyh5nOauJlnOHAQmSDzjMEgjy17nQX3Ad7s4BfvujzUl-d0MqB_HCKbaW32UT +xcY-0JfI1Y-2IdYfIkUdhVmxop6sSg0jAobWzgCRoRQkP3a2iIlKdfMyskshoWKIDVtlr-3fkDEb +x_b_o1rRoUfzUzxEdphaUAq80Sc0i77ZLT3KF9vJOhyU_pBnApYFxVk7Hkk3VRxJKS7jyL4H7k1x +2m5-2G8fB9XbYZT82xmAquNx4oBdpwj3_ncGF9YRF94K6NZgqemT5iWhpXMoelSU1blASgT3qlTm +B6YgbD5owExNHwRVd8KeRsYrOnBWUiktsIhXFhNZmDUNWMFGQ2KxEcOt1tJwsQDehJFgY_l1JQ0d +643wJ7rTJkGkYX309cydRQUX4Z0ckSQS9LhMd9stxF5XOHlvHdbW0pXNS7SaLbzKCVldUgncvI6z +KWkwrWbftrZK2RT1UZKNngQDMGOk9OhbHAs7YzhFNFARZoRNobIv5tZVDomy-YgJb9-mD1UTkRBL +WXOyoryDlgKrgFsgHclGDI1UFO5N-JfebPKxbP505f4924hxF2r8bspvVW8ZtHQo_SJmhauOX8n_ +eN_LK43LB9k53WAHZ_utvs0s6wGf7I73oj_N7DIFaHTDSm_MhDsFDLVG_wUzCpZ5FP2uL3nnqMkF +Ob-l1fywfmfOmrz1BY6g4sRPPeWXuclYTnRnDRu5VQyc7_aBEVkyt3zw0JEex0vJNFUJl3pYjS55 +GplAB6p7VbS9ceZEtc5Z3qFIVHEzKWZxT190E23t_LlMuEoQ1zaqdHynNaMs61-q_A2aHRiTqlRm +7FahVB3RX4AVLl23mu4u3A9ZDXc40nzjs9mwOVsuKlPvQ2rteDUG1njr2R1_V_MyQuoJjdfbIkPG +4eF0QzlSMdbkeprdQxSfV5YT-yPpkBxSsCMMM43sKm4Hy7_CUdvp4Iayrp3vtK3oYMuCGi6qTadz +KzxfTf8meKan3eMZW4RLByyniH5nQnX_KGfBly05AmFyVH_j0fyOg-48kDhtEKeqmDnP4C01jOID +Ip_AKaB6e0GwsHzVTLZOklHwu_qzsaTzchBOG_dJJju7bxY7qv78Pa92wZIP311gSCVbc-gxxbsR +qI555twmYEoasFm4xz10OYDOkvM1E1Rtxu3ymRLZpe6AoyFBVzEW7Dncdw7O98dKcgrp8ZlQ_8Wg +5zZH0Cic7xnIZ0bNZyQXw56CSUiXVWuwVY3e0djXP3F-FO5gP8VTxbpW4C0t6McXAOlvSEfFKxN7 +u6OBeOKwjrtHaJk2ghF8MUcpDXanhbAgHez9larGlscCkgvoRLNaRH9GIdSVgY3HtNhJRaJIq01S +OGeBjC5J4o-nTrqRFkwyDAYcPL373eYX1dBFFVHR-4q50H9m_zMxZHXETafxzV4DT3Qi8Sxh3uaS +ZX7mRaNaOE0uC1n87_IZ9WhrwIQaZng2lnd9yZ-4rx8fB8WA8KQzifzvHAcMb_HV10JWGaz5A2Rm +EXDsfexQC6CqYg5rdzzlNWDPNlHy5ubyz7fRXZ99uIwBY9aJcvCXCiEXJkC6utj3NcXQrJmk \ No newline at end of file diff --git a/compose/config/clamp/policy-clamp-create-tables.sql b/compose/config/clamp/policy-clamp-create-tables.sql new file mode 100644 index 00000000..5d655ad5 --- /dev/null +++ b/compose/config/clamp/policy-clamp-create-tables.sql @@ -0,0 +1,275 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2022 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +create table if not exists dictionary ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + dictionary_second_level integer, + dictionary_type varchar(255), + primary key (name) + ) engine=InnoDB; + +create table if not exists dictionary_elements ( + short_name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + description varchar(255) not null, + name varchar(255) not null, + subdictionary_name varchar(255), + type varchar(255) not null, + primary key (short_name) + ) engine=InnoDB; + +create table if not exists dictionary_to_dictionaryelements ( + dictionary_name varchar(255) not null, + dictionary_element_short_name varchar(255) not null, + primary key (dictionary_name, dictionary_element_short_name) + ) engine=InnoDB; + +create table if not exists hibernate_sequence ( + next_val bigint +) engine=InnoDB; + +insert into hibernate_sequence values ( 1 ); + +create table if not exists loop_element_models ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + blueprint_yaml MEDIUMTEXT, + dcae_blueprint_id varchar(255), + loop_element_type varchar(255) not null, + short_name varchar(255), + primary key (name) + ) engine=InnoDB; + +create table if not exists loop_logs ( + id bigint not null, + log_component varchar(255) not null, + log_instant datetime(6) not null, + log_type varchar(255) not null, + message MEDIUMTEXT not null, + loop_id varchar(255) not null, + primary key (id) + ) engine=InnoDB; + +create table if not exists loop_templates ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + allowed_loop_type varchar(255), + blueprint_yaml MEDIUMTEXT, + dcae_blueprint_id varchar(255), + maximum_instances_allowed integer, + svg_representation MEDIUMTEXT, + unique_blueprint boolean default false, + service_uuid varchar(255), + primary key (name) + ) engine=InnoDB; + +create table if not exists loopelementmodels_to_policymodels ( + loop_element_name varchar(255) not null, + policy_model_type varchar(255) not null, + policy_model_version varchar(255) not null, + primary key (loop_element_name, policy_model_type, policy_model_version) + ) engine=InnoDB; + +create table if not exists loops ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + dcae_deployment_id varchar(255), + dcae_deployment_status_url varchar(255), + global_properties_json json, + last_computed_state varchar(255) not null, + svg_representation MEDIUMTEXT, + loop_template_name varchar(255) not null, + service_uuid varchar(255), + primary key (name) + ) engine=InnoDB; + +create table if not exists loops_to_microservicepolicies ( + loop_name varchar(255) not null, + microservicepolicy_name varchar(255) not null, + primary key (loop_name, microservicepolicy_name) + ) engine=InnoDB; + +create table if not exists looptemplates_to_loopelementmodels ( + loop_element_model_name varchar(255) not null, + loop_template_name varchar(255) not null, + flow_order integer not null, + primary key (loop_element_model_name, loop_template_name) + ) engine=InnoDB; + +create table if not exists micro_service_policies ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + configurations_json json, + json_representation json not null, + pdp_group varchar(255), + pdp_sub_group varchar(255), + context varchar(255), + dcae_blueprint_id varchar(255), + dcae_deployment_id varchar(255), + dcae_deployment_status_url varchar(255), + device_type_scope varchar(255), + shared bit not null, + loop_element_model_id varchar(255), + policy_model_type varchar(255), + policy_model_version varchar(255), + primary key (name) + ) engine=InnoDB; + +create table if not exists operational_policies ( + name varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + configurations_json json, + json_representation json not null, + pdp_group varchar(255), + pdp_sub_group varchar(255), + loop_element_model_id varchar(255), + policy_model_type varchar(255), + policy_model_version varchar(255), + loop_id varchar(255) not null, + primary key (name) + ) engine=InnoDB; + +create table if not exists policy_models ( + policy_model_type varchar(255) not null, + version varchar(255) not null, + created_by varchar(255), + created_timestamp datetime(6) not null, + updated_by varchar(255), + updated_timestamp datetime(6) not null, + policy_acronym varchar(255), + policy_tosca MEDIUMTEXT, + policy_pdp_group json, + primary key (policy_model_type, version) + ) engine=InnoDB; + +create table if not exists services ( + service_uuid varchar(255) not null, + name varchar(255) not null, + resource_details json, + service_details json, + version varchar(255), + primary key (service_uuid) + ) engine=InnoDB; + +alter table dictionary_to_dictionaryelements + add constraint FK68hjjinnm8nte2owstd0xwp23 + foreign key (dictionary_element_short_name) + references dictionary_elements (short_name); + +alter table dictionary_to_dictionaryelements + add constraint FKtqfxg46gsxwlm2gkl6ne3cxfe + foreign key (dictionary_name) + references dictionary (name); + +alter table loop_logs + add constraint FK1j0cda46aickcaoxqoo34khg2 + foreign key (loop_id) + references loops (name); + +alter table loop_templates + add constraint FKn692dk6281wvp1o95074uacn6 + foreign key (service_uuid) + references services (service_uuid); + +alter table loopelementmodels_to_policymodels + add constraint FK23j2q74v6kaexefy0tdabsnda + foreign key (policy_model_type, policy_model_version) + references policy_models (policy_model_type, version); + +alter table loopelementmodels_to_policymodels + add constraint FKjag1iu0olojfwryfkvb5o0rk5 + foreign key (loop_element_name) + references loop_element_models (name); + +alter table loops + add constraint FK844uwy82wt0l66jljkjqembpj + foreign key (loop_template_name) + references loop_templates (name); + +alter table loops + add constraint FK4b9wnqopxogwek014i1shqw7w + foreign key (service_uuid) + references services (service_uuid); + +alter table loops_to_microservicepolicies + add constraint FKle255jmi7b065fwbvmwbiehtb + foreign key (microservicepolicy_name) + references micro_service_policies (name); + +alter table loops_to_microservicepolicies + add constraint FK8avfqaf7xl71l7sn7a5eri68d + foreign key (loop_name) + references loops (name); + +alter table looptemplates_to_loopelementmodels + add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9 + foreign key (loop_element_model_name) + references loop_element_models (name); + +alter table looptemplates_to_loopelementmodels + add constraint FKj29yxyw0x7ue6mwgi6d3qg748 + foreign key (loop_template_name) + references loop_templates (name); + +alter table micro_service_policies + add constraint FKqvvdypacbww07fuv8xvlvdjgl + foreign key (loop_element_model_id) + references loop_element_models (name); + +alter table micro_service_policies + add constraint FKn17j9ufmyhqicb6cvr1dbjvkt + foreign key (policy_model_type, policy_model_version) + references policy_models (policy_model_type, version); + +alter table operational_policies + add constraint FKi9kh7my40737xeuaye9xwbnko + foreign key (loop_element_model_id) + references loop_element_models (name); + +alter table operational_policies + add constraint FKlsyhfkoqvkwj78ofepxhoctip + foreign key (policy_model_type, policy_model_version) + references policy_models (policy_model_type, version); + +alter table operational_policies + add constraint FK1ddoggk9ni2bnqighv6ecmuwu + foreign key (loop_id) + references loops (name); diff --git a/compose/config/db-migrator/init.sh b/compose/config/db-migrator/init.sh new file mode 100755 index 00000000..047d947e --- /dev/null +++ b/compose/config/db-migrator/init.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# ============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====================================================== + +export POLICY_HOME=/opt/app/policy +export SQL_USER=${MYSQL_USER} +export SQL_PASSWORD=${MYSQL_PASSWORD} +export SCRIPT_DIRECTORY=sql + +/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB} + +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report + +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade +rc=$? + +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report + +nc -l -p 6824 + +exit $rc diff --git a/compose/config/db-migrator/init_pg.sh b/compose/config/db-migrator/init_pg.sh new file mode 100755 index 00000000..9b5f38e1 --- /dev/null +++ b/compose/config/db-migrator/init_pg.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# ============LICENSE_START==================================================== +# Copyright (C) 2022 Nordix Foundation. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END====================================================== + +export POLICY_HOME=/opt/app/policy +export SQL_USER=${MYSQL_USER} +export SQL_PASSWORD=${MYSQL_PASSWORD} +export SCRIPT_DIRECTORY=postgres + +/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB} + +/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report + +/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o upgrade +rc=$? + +/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report + +nc -l -p 6824 + +exit $rc diff --git a/compose/config/db-pg/db-pg.conf b/compose/config/db-pg/db-pg.conf new file mode 100644 index 00000000..d4d58cec --- /dev/null +++ b/compose/config/db-pg/db-pg.conf @@ -0,0 +1,17 @@ +# Copyright 2022 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. +MYSQL_ROOT_PASSWORD=secret +MYSQL_USER=policy_user +MYSQL_PASSWORD=policy_user +PGPASSWORD=policy_user \ No newline at end of file diff --git a/compose/config/db-pg/db-pg.sh b/compose/config/db-pg/db-pg.sh new file mode 100755 index 00000000..14816f08 --- /dev/null +++ b/compose/config/db-pg/db-pg.sh @@ -0,0 +1,22 @@ +#!/bin/bash -xv +# Copyright 2022 Nordix Foundation. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +psql -U postgres -d postgres --command "CREATE USER ${MYSQL_USER} WITH PASSWORD '${MYSQL_PASSWORD}';" + +for db in migration pooling policyadmin policyclamp operationshistory clampacm +do + psql -U postgres -d postgres --command "CREATE DATABASE ${db};" + psql -U postgres -d postgres --command "GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${MYSQL_USER} ;" +done \ No newline at end of file diff --git a/compose/config/db/db.conf b/compose/config/db/db.conf new file mode 100644 index 00000000..29638c86 --- /dev/null +++ b/compose/config/db/db.conf @@ -0,0 +1,17 @@ +# Copyright 2019,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. +MYSQL_ROOT_PASSWORD=secret +MYSQL_USER=policy_user +MYSQL_PASSWORD=policy_user +MYSQL_CMD=mysql diff --git a/compose/config/db/db.sh b/compose/config/db/db.sh new file mode 100755 index 00000000..0363ed8a --- /dev/null +++ b/compose/config/db/db.sh @@ -0,0 +1,24 @@ +#!/bin/bash -xv +# Copyright 2019,2021 AT&T Intellectual Property. All rights reserved +# Modifications 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. + +for db in migration pooling policyadmin operationshistory clampacm policyclamp +do + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" +done + +mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" +mysql -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -f policyclamp < /tmp/policy-clamp-create-tables.sql diff --git a/compose/config/distribution/defaultConfig.json b/compose/config/distribution/defaultConfig.json new file mode 100644 index 00000000..c8451eba --- /dev/null +++ b/compose/config/distribution/defaultConfig.json @@ -0,0 +1,76 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"policyadmin", + "password":"zb!XztG34", + "https": false, + "prometheus": true + }, + "receptionHandlerParameters":{ + "FileReceptionHandler":{ + "receptionHandlerType":"File", + "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler", + "receptionHandlerConfigurationName":"fileConfiguration", + "pluginHandlerParameters":{ + "policyDecoders":{ + "ApexDecoder":{ + "decoderType":"ApexDecoder", + "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", + "decoderConfigurationName": "apexDecoderConfiguration" + } + }, + "policyForwarders":{ + "LifeCycleApiForwarder":{ + "forwarderType":"LifeCycleAPI", + "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder", + "forwarderConfigurationName": "lifecycleApiConfiguration" + } + } + } + } + }, + "receptionHandlerConfigurationParameters":{ + "fileConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup", + "parameters":{ + "watchPath": "/opt/app/policy/distribution/etc/temp/", + "maxThread": 1 + } + } + }, + "policyDecoderConfigurationParameters":{ + "apexDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", + "parameters":{ + "policyFileName": "apex_policy.json", + "policyTypeFileName": "apex_policy_type.json" + } + } + }, + "policyForwarderConfigurationParameters":{ + "lifecycleApiConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters", + "parameters":{ + "apiParameters": { + "clientName": "policy-api", + "hostname": "policy-api", + "port": 6969, + "userName": "policyadmin", + "password": "zb!XztG34", + "useHttps": false + }, + "papParameters": { + "clientName": "policy-pap", + "hostname": "policy-pap", + "port": 6969, + "userName": "policyadmin", + "password": "zb!XztG34", + "useHttps": false + }, + "deployPolicies": true + } + } + } +} diff --git a/compose/config/distribution/groups.json b/compose/config/distribution/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/distribution/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/distribution/logback.xml b/compose/config/distribution/logback.xml new file mode 100644 index 00000000..fdd850f9 --- /dev/null +++ b/compose/config/distribution/logback.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/drools-applications/custom/engine-system.properties b/compose/config/drools-applications/custom/engine-system.properties new file mode 100644 index 00000000..19e03b51 --- /dev/null +++ b/compose/config/drools-applications/custom/engine-system.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 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========================================================= +# + +# system properties set within the application + +java.net.preferIPv4Stack=true + +# jmx + +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false + +# certs + +javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} +javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} + +javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} +javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} + +# kie + +kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} + +# symmetric key for sensitive configuration data + +engine.symm.key=${envd:SYMM_KEY} diff --git a/compose/config/drools-applications/custom/feature-lifecycle.properties b/compose/config/drools-applications/custom/feature-lifecycle.properties new file mode 100644 index 00000000..3e862970 --- /dev/null +++ b/compose/config/drools-applications/custom/feature-lifecycle.properties @@ -0,0 +1,38 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 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========================================================= + +lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup} +lifecycle.pdp.type=${envd:POLICY_PDP_PAP_TYPE:drools} + +# Mandatory policy types that this PDP-D must support at a minimum +lifecycle.pdp.policytypes=${envd:POLICY_PDP_PAP_POLICYTYPES} + +dmaap.source.topics=POLICY-PDP-PAP +dmaap.sink.topics=POLICY-PDP-PAP + +dmaap.source.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} +dmaap.source.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} +dmaap.source.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} +dmaap.source.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} +dmaap.source.topics.POLICY-PDP-PAP.https=${envd:DMAAP_HTTPS:false} + +dmaap.sink.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} +dmaap.sink.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} +dmaap.sink.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} +dmaap.sink.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} +dmaap.sink.topics.POLICY-PDP-PAP.https=${envd:DMAAP_HTTPS:false} diff --git a/compose/config/drools-applications/custom/features.pre.sh b/compose/config/drools-applications/custom/features.pre.sh new file mode 100755 index 00000000..fd7b5b91 --- /dev/null +++ b/compose/config/drools-applications/custom/features.pre.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# ============LICENSE_START=================================================== +# Copyright (C) 2020 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===================================================== + +sh -c "features disable distributed-locking" diff --git a/compose/config/drools-applications/custom/standalone-settings.xml b/compose/config/drools-applications/custom/standalone-settings.xml new file mode 100644 index 00000000..ebd6dd2a --- /dev/null +++ b/compose/config/drools-applications/custom/standalone-settings.xml @@ -0,0 +1,57 @@ + + + + + + + true + + + + + policy-local + + + + file-repository + file:${user.home}/.m2/file-repository + + true + always + + + true + always + + + + + + + + + + policy-local + + + diff --git a/compose/config/drools-applications/env/base.conf b/compose/config/drools-applications/env/base.conf new file mode 100644 index 00000000..ca944dbb --- /dev/null +++ b/compose/config/drools-applications/env/base.conf @@ -0,0 +1,146 @@ +# ============LICENSE_START================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# =========================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END==================================================== + +# JVM options + +JVM_OPTIONS=-server -Xms512m -Xmx512m + +# SYSTEM software configuration + +DEBUG=y +POLICY_HOME=/opt/app/policy +POLICY_LOGS=/var/log/onap/policy/pdpd +KEYSTORE_PASSWD=Pol1cy_0nap +TRUSTSTORE_PASSWD=Pol1cy_0nap + +# Telemetry credentials + +TELEMETRY_PORT=9696 +TELEMETRY_HOST=0.0.0.0 +TELEMETRY_USER=demo@people.osaaf.org +TELEMETRY_PASSWORD=demo123456! + +# nexus repository + +SNAPSHOT_REPOSITORY_ID= +SNAPSHOT_REPOSITORY_URL= +RELEASE_REPOSITORY_ID= +RELEASE_REPOSITORY_URL= +REPOSITORY_USERNAME= +REPOSITORY_PASSWORD= +REPOSITORY_OFFLINE=true + +# Relational (SQL) DB access + +SQL_HOST=mariadb +SQL_USER=policy_user +SQL_PASSWORD=policy_user +SQL_PORT=3306 +JDBC_URL=jdbc:mariadb://mariadb:3306/ +JDBC_OPTS= +MYSQL_CMD= + +# AAF + +AAF=false +AAF_NAMESPACE=org.onap.policy +AAF_HOST=aaf.api.simpledemo.onap.org + +# HTTP Servers + +HTTP_SERVER_HTTPS=false +PROMETHEUS=true + +# LIVENESS Checks + +LIVENESS_CONTROLLERS=* + +# PDP-D DMaaP configuration channel + +PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION +PDPD_CONFIGURATION_API_KEY= +PDPD_CONFIGURATION_API_SECRET= +PDPD_CONFIGURATION_CONSUMER_GROUP= +PDPD_CONFIGURATION_CONSUMER_INSTANCE= +PDPD_CONFIGURATION_PARTITION_KEY= + +# PAP-PDP configuration channel + +POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP +POLICY_PDP_PAP_API_KEY= +POLICY_PDP_PAP_API_SECRET= + +# PAP + +PAP_HOST=policy-pap +PAP_USERNAME=policyadmin +PAP_PASSWORD=zb!XztG34 + +# PDP-X + +GUARD_DISABLED=false +PDP_HOST=policy-xacml-pdp +PDP_PORT=6969 +PDP_CONTEXT_URI=policy/pdpx/v1/ +PDP_USERNAME=policyadmin +PDP_PASSWORD=zb!XztG34 +PDP_HTTPS=false + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT +DCAE_SERVERS=message-router +DCAE_CONSUMER_GROUP=dcae.policy.shared + +# Open DMaaP + +DMAAP_SERVERS=message-router +DMAAP_HTTPS=false + +# AAI + +AAI_HOST=aai-sim +AAI_PORT=6666 +AAI_CONTEXT_URI= +AAI_USERNAME=policy@policy.onap.org +AAI_PASSWORD=demo123456! +AAI_HTTPS=false + +# MSO + +SO_HOST=so-sim +SO_PORT=6669 +SO_CONTEXT_URI= +SO_URL=http://message-router:6669/ +SO_USERNAME=InfraPortalClient +SO_PASSWORD='password1$' + +# VFC + +VFC_HOST=vfc-sim +VFC_PORT=6670 +VFC_CONTEXT_URI= +VFC_USERNAME= +VFC_PASSWORD= + +# SDNC + +SDNC_HOST=sdnc-sim +SDNC_PORT=6668 +SDNC_CONTEXT_URI= +SDNC_USERNAME= +SDNC_PASSWORD= diff --git a/compose/config/drools-applications/env/feature-healthcheck.conf b/compose/config/drools-applications/env/feature-healthcheck.conf new file mode 100644 index 00000000..1c710547 --- /dev/null +++ b/compose/config/drools-applications/env/feature-healthcheck.conf @@ -0,0 +1,18 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +HEALTHCHECK_USER=demo@people.osaaf.org +HEALTHCHECK_PASSWORD=demo123456! diff --git a/compose/config/drools-applications/env/feature-pooling-dmaap.conf b/compose/config/drools-applications/env/feature-pooling-dmaap.conf new file mode 100644 index 00000000..3808e3d9 --- /dev/null +++ b/compose/config/drools-applications/env/feature-pooling-dmaap.conf @@ -0,0 +1,17 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +POOLING_TOPIC=POOLING diff --git a/compose/config/drools-applications/groups.json b/compose/config/drools-applications/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/drools-applications/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/drools-pdp/custom/engine-system.properties b/compose/config/drools-pdp/custom/engine-system.properties new file mode 100644 index 00000000..19e03b51 --- /dev/null +++ b/compose/config/drools-pdp/custom/engine-system.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 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========================================================= +# + +# system properties set within the application + +java.net.preferIPv4Stack=true + +# jmx + +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false + +# certs + +javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} +javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} + +javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} +javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} + +# kie + +kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} + +# symmetric key for sensitive configuration data + +engine.symm.key=${envd:SYMM_KEY} diff --git a/compose/config/drools-pdp/custom/noop.pre.sh b/compose/config/drools-pdp/custom/noop.pre.sh new file mode 100755 index 00000000..63bdc4cf --- /dev/null +++ b/compose/config/drools-pdp/custom/noop.pre.sh @@ -0,0 +1,22 @@ +#!/bin/bash -x +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +sed -i "s/^dmaap/noop/g" \ + ${POLICY_HOME}/config/engine.properties \ + ${POLICY_HOME}/config/feature-lifecycle.properties + +chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties diff --git a/compose/config/drools-pdp/env/base.conf b/compose/config/drools-pdp/env/base.conf new file mode 100644 index 00000000..98cc10f8 --- /dev/null +++ b/compose/config/drools-pdp/env/base.conf @@ -0,0 +1,144 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + +# JVM options + +JVM_OPTIONS=-server -Xms512m -Xmx512m + +# SYSTEM software configuration + +DEBUG=y +POLICY_HOME=/opt/app/policy +POLICY_LOGS=/var/log/onap/policy/pdpd +KEYSTORE_PASSWD=Pol1cy_0nap +TRUSTSTORE_PASSWD=Pol1cy_0nap + +# Telemetry credentials + +TELEMETRY_PORT=9696 +TELEMETRY_HOST=0.0.0.0 +TELEMETRY_USER=demo@people.osaaf.org +TELEMETRY_PASSWORD=demo123456! + +# nexus repository + +SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots +SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/ +RELEASE_REPOSITORY_ID=policy-nexus-releases +RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/ +REPOSITORY_USERNAME=admin +REPOSITORY_PASSWORD=admin123 +REPOSITORY_OFFLINE=false + +# Relational (SQL) DB access + +SQL_HOST=mariadb +SQL_USER=policy_user +SQL_PASSWORD=policy_user +SQL_PORT=3306 +JDBC_URL=jdbc:mariadb://mariadb:3306/ +JDBC_OPTS= +MYSQL_CMD= + + +# AAF + +AAF=false +AAF_NAMESPACE=org.onap.policy +AAF_HOST=aaf.api.simpledemo.onap.org + +# HTTP Servers + +HTTP_SERVER_HTTPS=false +PROMETHEUS=true + +# PDP-D DMaaP configuration channel + +PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION +PDPD_CONFIGURATION_API_KEY= +PDPD_CONFIGURATION_API_SECRET= +PDPD_CONFIGURATION_CONSUMER_GROUP= +PDPD_CONFIGURATION_CONSUMER_INSTANCE= +PDPD_CONFIGURATION_PARTITION_KEY= + +# PAP-PDP configuration channel + +POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP +POLICY_PDP_PAP_API_KEY= +POLICY_PDP_PAP_API_SECRET= + +# PAP + +PAP_HOST= +PAP_USERNAME= +PAP_PASSWORD= + +# PDP-X + +PDP_HOST= +PDP_PORT= +PDP_CONTEXT_URI=policy/pdpx/v1/ +PDP_USERNAME= +PDP_PASSWORD= +PDP_CLIENT_USERNAME= +PDP_CLIENT_PASSWORD= +PDP_ENVIRONMENT= +GUARD_DISABLED=false + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT +DCAE_SERVERS= +DCAE_CONSUMER_GROUP=dcae.policy.shared + +# Open DMaaP + +DMAAP_SERVERS=mr.api.simpledemo.onap.org +DMAAP_HTTPS=false + +# AAI + +AAI_HOST=aai.api.simpledemo.onap.org +AAI_PORT=8443 +AAI_CONTEXT_URI= +AAI_USERNAME=policy@policy.onap.org +AAI_PASSWORD=demo123456! + +# MSO + +SO_HOST=vm1.mso.simpledemo.onap.org +SO_PORT=8080 +SO_CONTEXT_URI=onap/so/infra/ +SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra +SO_USERNAME=InfraPortalClient +SO_PASSWORD='password1$' + +# VFC + +VFC_HOST= +VFC_PORT= +VFC_CONTEXT_URI=api/nslcm/v1/ +VFC_USERNAME= +VFC_PASSWORD= + +# SDNC + +SDNC_HOST= +SDNC_PORT= +SDNC_CONTEXT_URI=restconf/operations/ +SDNC_USERNAME= +SDNC_PASSWORD= diff --git a/compose/config/drools-pdp/groups.json b/compose/config/drools-pdp/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/drools-pdp/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/pap/groups.json b/compose/config/pap/groups.json new file mode 100644 index 00000000..bd5c2868 --- /dev/null +++ b/compose/config/pap/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/compose/config/pap/logback.xml b/compose/config/pap/logback.xml new file mode 100644 index 00000000..a88f60a7 --- /dev/null +++ b/compose/config/pap/logback.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/config/pap/papParameters.yaml b/compose/config/pap/papParameters.yaml new file mode 100644 index 00000000..cc59dda5 --- /dev/null +++ b/compose/config/pap/papParameters.yaml @@ -0,0 +1,90 @@ +spring: + security: + user: + name: policyadmin + password: zb!XztG34 + http: + converters: + preferred-json-mapper: gson + datasource: + url: jdbc:mariadb://mariadb:3306/policyadmin + driverClassName: org.mariadb.jdbc.Driver + username: policy_user + password: policy_user + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.MariaDB103Dialect + hibernate: + ddl-auto: none + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + +server: + port: 6969 + servlet: + context-path: /policy/pap/v1 + ssl: + enabled: false + +pap: + name: PapGroup + aaf: false + topic: + pdp-pap.name: POLICY-PDP-PAP + notification.name: POLICY-NOTIFICATION + heartbeat.name: POLICY-HEARTBEAT + pdpParameters: + heartBeatMs: 120000 + updateParameters: + maxRetryCount: 1 + maxWaitMs: 30000 + stateChangeParameters: + maxRetryCount: 1 + maxWaitMs: 30000 + savePdpStatisticsInDb: true + topicParameterGroup: + topicSources: + - topic: ${pap.topic.pdp-pap.name} + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + fetchTimeout: 15000 + - topic: ${pap.topic.heartbeat.name} + effectiveTopic: ${pap.topic.pdp-pap.name} + consumerGroup: policy-pap + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + fetchTimeout: 15000 + topicSinks: + - topic: ${pap.topic.pdp-pap.name} + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + - topic: ${pap.topic.notification.name} + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + healthCheckRestClientParameters: + - clientName: api + hostname: policy-api + port: 6969 + userName: policyadmin + password: zb!XztG34 + useHttps: false + basePath: policy/api/v1/healthcheck + +management: + endpoints: + web: + base-path: / + exposure: + include: health, metrics, prometheus + path-mapping.metrics: plain-metrics + path-mapping.prometheus: metrics diff --git a/compose/config/policy-gui/application.yaml b/compose/config/policy-gui/application.yaml new file mode 100644 index 00000000..30de64bf --- /dev/null +++ b/compose/config/policy-gui/application.yaml @@ -0,0 +1,37 @@ +# +# ===========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===================================================== +# +server: + port: 2445 + ssl: + enabled: false + +clamp: + url: http://policy-clamp-be:8445 + disable-ssl-validation: true + disable-ssl-hostname-check: true + +apex-editor: + upload-url: + upload-userid: + +management: + endpoints: + web: + exposure: + include: health, metrics, prometheus + diff --git a/compose/config/policy-gui/groups.json b/compose/config/policy-gui/groups.json new file mode 100644 index 00000000..6ee30e1c --- /dev/null +++ b/compose/config/policy-gui/groups.json @@ -0,0 +1,137 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + }, + { + "pdpType": "drools", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Drools", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Controller", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.drools.Artifact", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + }, + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/compose/config/policy-gui/logback.xml b/compose/config/policy-gui/logback.xml new file mode 100644 index 00000000..04bc5671 --- /dev/null +++ b/compose/config/policy-gui/logback.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json b/compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json new file mode 100644 index 00000000..2e2105f8 --- /dev/null +++ b/compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json @@ -0,0 +1,44 @@ +{ + "vnf-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", + "vnf-name": "vfw-cnf-cds-test-1-vnf", + "vnf-type": "vfw_cnf_cds/null", + "service-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", + "prov-status": "ACTIVE", + "orchestration-status": "Assigned", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1607506390862", + "model-invariant-id": "vTEST_XYZ", + "model-version-id": "vTEST", + "model-customization-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "related-link": "/aai/v14/business/customers/customer/DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf/service-subscriptions/service-subscription/vFWDT/service-instances/service-instance/55322ada-145a-492e-b196-0d171539a4b2", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFWDT" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "55322ada-145a-492e-b196-0d171539a4b2" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "Service_Ete_Namea337dd5b-4620-4ea6-bc3f-6edf1124d659" + } + ] + } + ] + } +} + diff --git a/compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json b/compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json new file mode 100644 index 00000000..4f03bbfa --- /dev/null +++ b/compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json @@ -0,0 +1,33 @@ +{ + "correlationUUID": null, + "commonHeader": { + "timestamp": "2020-12-16T10:29:00.450Z", + "originatorId": "POLICY", + "requestId": "f392e439-c176-411b-b972-8acadac0f8df", + "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006", + "flags": null + }, + "actionIdentifiers": { + "blueprintName": "apex-example-cba", + "blueprintVersion": "1.0.0", + "actionName": "modify-config", + "mode": "sync" + }, + "status": { + "code": 200, + "eventType": "EVENT_COMPONENT_EXECUTED", + "timestamp": "2020-12-16T10:29:01.737Z", + "errorMessage": null, + "message": "success" + }, + "payload": { + "modify-config-response": { + "execute-command-logs": [ + "INFO:root:Arguments : Active,," + ], + "prepare-environment-logs": [ + "Installed pip packages:\n requirements.txt\n\n" + ] + } + } +} diff --git a/compose/config/sim-all/cdsresponse/apex-example-cba-restart.json b/compose/config/sim-all/cdsresponse/apex-example-cba-restart.json new file mode 100644 index 00000000..694bc6df --- /dev/null +++ b/compose/config/sim-all/cdsresponse/apex-example-cba-restart.json @@ -0,0 +1,33 @@ +{ + "correlationUUID": null, + "commonHeader": { + "timestamp": "2020-12-16T10:30:46.213Z", + "originatorId": "POLICY", + "requestId": "f392e439-c176-411b-b972-8acadac0f8df", + "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006", + "flags": null + }, + "actionIdentifiers": { + "blueprintName": "apex-example-cba", + "blueprintVersion": "1.0.0", + "actionName": "restart", + "mode": "sync" + }, + "status": { + "code": 200, + "eventType": "EVENT_COMPONENT_EXECUTED", + "timestamp": "2020-12-16T10:30:46.828Z", + "errorMessage": null, + "message": "success" + }, + "payload": { + "restart-response": { + "execute-command-logs": [ + "INFO:root:Arguments : Active,," + ], + "prepare-environment-logs": [ + "Installed pip packages:\n requirements.txt\n\n" + ] + } + } +} diff --git a/compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json b/compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json new file mode 100644 index 00000000..7009a358 --- /dev/null +++ b/compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json @@ -0,0 +1,35 @@ +{ + "commonHeader": { + "timestamp": "2020-08-24T14:45:07.491Z", + "originatorId": "CDS", + "requestId": "123456", + "subRequestId": "123-123", + "flags": null + }, + "actionIdentifiers": { + "blueprintName": "controlloop-hostname-update", + "blueprintVersion": "1.0.4", + "actionName": "update-config", + "mode": "sync" + }, + "status": { + "code": 200, + "eventType": "EVENT_COMPONENT_EXECUTED", + "timestamp": "2020-08-24T14:45:12.863Z", + "errorMessage": null, + "message": "success" + }, + "payload": { + "update-config-response": { + "execute-command-logs": [ + "INFO:root:", + "INFO:root:configuring Device....", + "INFO:root:Done Device Configuration Successfully", + "INFO:root:Device Configuration After modification", + "INFO:root:http://10.101.200.10:32777/restconf/config/network-topology:network-topology/topology/topology-netconf/node/927b2580-36d9-4f13-8421-3c9d43b7a57e/yang-ext:mount", + "INFO:root:testhost-1212332324343" + ], + "prepare-environment-logs": ["Installed pip packages:\n requirements.txt\n\n"] + } + } +} diff --git a/compose/config/sim-all/logback.xml b/compose/config/sim-all/logback.xml new file mode 100644 index 00000000..131b0fe3 --- /dev/null +++ b/compose/config/sim-all/logback.xml @@ -0,0 +1,42 @@ + + + + + + + + + %d %level %msg%n + + + + + + + + diff --git a/compose/config/sim-all/simParameters.json b/compose/config/sim-all/simParameters.json new file mode 100644 index 00000000..41fc9057 --- /dev/null +++ b/compose/config/sim-all/simParameters.json @@ -0,0 +1,110 @@ +{ + "dmaapProvider": { + "name": "DMaaP simulator", + "topicSweepSec": 300 + }, + "restServers": [ + { + "name": "DMaaP simulator", + "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", + "host": "0.0.0.0", + "port": 3904, + "https": false + }, + { + "name": "A&AI simulator", + "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6666, + "https": false, + "userName": "policy@policy.onap.org", + "password": "demo123456!", + "resourceLocation": "/opt/app/policy/simulators/etc/mounted/aairesponse/" + }, + { + "name": "SDNC simulator", + "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6668, + "https": false + }, + { + "name": "SO simulator", + "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6669, + "https": false, + "userName": "InfraPortalClient", + "password": "password1$" + }, + { + "name": "VFC simulator", + "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6670, + "https": false + } + ], + "topicSinks": [ + { + "topic": "APPC-CL", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + }, + { + "topic": "APPC-LCM-WRITE", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + } + ], + "topicSources": [ + { + "topic": "APPC-CL", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + }, + { + "topic": "APPC-LCM-READ", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + } + ], + "topicServers": [ + { + "name": "APPC Legacy simulator", + "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer", + "sink": "APPC-CL", + "source": "APPC-CL" + }, + { + "name": "APPC-LCM simulator", + "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer", + "sink": "APPC-LCM-WRITE", + "source": "APPC-LCM-READ" + } + ], + "grpcServer": { + "name": "CDS simulator", + "providerClass": "org.onap.policy.simulators.CdsSimulator", + "host": "0.0.0.0", + "port": 6680, + "timeout": 30, + "username": "ccsdkapps", + "password": "ccsdkapps", + "resourceLocation": "/opt/app/policy/simulators/etc/mounted/cdsresponse/", + "successRepeatCount": 0, + "requestedResponseDelayMs": 0 + } +} diff --git a/compose/config/xacml-pdp/defaultConfig.json b/compose/config/xacml-pdp/defaultConfig.json new file mode 100644 index 00000000..d6f3bd99 --- /dev/null +++ b/compose/config/xacml-pdp/defaultConfig.json @@ -0,0 +1,39 @@ +{ + "name": "XacmlPdpParameters", + "pdpGroup": "defaultGroup", + "pdpType": "xacml", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "policyadmin", + "password": "zb!XztG34", + "https": false, + "aaf": false, + "prometheus": true + }, + "policyApiParameters": { + "hostname": "policy-api", + "port": 6969, + "userName": "policyadmin", + "password": "zb!XztG34", + "useHttps": false, + "aaf": false + }, + "applicationParameters": { + "applicationPath": "/opt/app/policy/pdpx/apps" + }, + "topicParameterGroup": { + "topicSources" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "message-router" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false + }], + "topicSinks" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "message-router" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false + }] + } +} diff --git a/compose/config/xacml-pdp/groups.json b/compose/config/xacml-pdp/groups.json new file mode 100644 index 00000000..0a7e5fe3 --- /dev/null +++ b/compose/config/xacml-pdp/groups.json @@ -0,0 +1,101 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "xacml", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.MinMax", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Blacklist", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.common.Filter", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", + "version": "1.0.0" + }, + { + "name": "onap.policies.monitoring.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.*", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.OptimizationPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.PciPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.Vim_fit", + "version": "1.0.0" + }, + { + "name": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Xacml", + "version": "1.0.0" + }, + { + "name": "onap.policies.Naming", + "version": "1.0.0" + }, + { + "name": "onap.policies.match.*", + "version": "1.0.0" + } + ], + "currentInstanceCount": 0, + "desiredInstanceCount": 1, + "policies": [ + { + "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", + "version": "1.0.0" + } + ] + } + ] + } + ] +} diff --git a/compose/config/xacml-pdp/logback.xml b/compose/config/xacml-pdp/logback.xml new file mode 100644 index 00000000..e075f905 --- /dev/null +++ b/compose/config/xacml-pdp/logback.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + ${logDir}/${errorLog}.log + + ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + WARN + + + ${errorPattern} + + + + + + + + + ${logDir}/${debugLog}.log + + ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${debugPattern} + + + + + + + + + ${logDir}/${networkLog}.log + + ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 30 + 10GB + + + ${networkPattern} + + + + + + + + + + [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compose/docker-compose.gui.yml b/compose/docker-compose.gui.yml new file mode 100644 index 00000000..3d711afb --- /dev/null +++ b/compose/docker-compose.gui.yml @@ -0,0 +1,63 @@ +# +# ===========LICENSE_START==================================================== +# Copyright 2023 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# +version: '2' +services: + policy-gui: + image: ${CONTAINER_LOCATION}onap/policy-gui:latest + container_name: policy-gui + depends_on: + - policy-clamp-backend + hostname: policy-gui + environment: + CLAMP_URL: http://policy-clamp-backend:8445 + CLAMP_DISABLE_SSL_VALIDATION: "true" + ports: + - 2445:2445 + volumes: + - ./config/policy-gui/application.yaml:/opt/app/policy/gui/etc/application.yml + - ./config/policy-gui/logback.xml:/opt/app/policy/gui/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/gui/bin/wait_for_port.sh:ro + entrypoint: ./policy-gui.sh + working_dir: /opt/app/policy/gui/bin + command: ./policy-gui.sh + policy-clamp-backend: + image: ${CONTAINER_LOCATION}onap/policy-clamp-backend:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-backend + depends_on: + - policy-clamp-runtime-acm + - distribution + hostname: policy-clamp-backend + environment: + POLICY_API_HOST: api + POLICY_PAP_HOST: pap + MARIADB_HOST: mariadb + RUNTIME_HOST: policy-clamp-runtime-acm + ports: + - 8445:8445 + volumes: + - ./config/clamp/ClampBackend.properties:/opt/policy/clamp/config/ClampBackend.properties:ro + - ./config/clamp/logback-backend.xml:/opt/policy/clamp/config/logback.xml:ro + working_dir: /opt/policy/clamp + command: java + -Djava.security.egd=file:/dev/./urandom + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=75 + -jar ./policy-clamp-backend.jar + --spring.config.name=ClampBackend + --spring.config.location=/opt/policy/clamp/config/ClampBackend.properties + \ No newline at end of file diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml new file mode 100644 index 00000000..712b6522 --- /dev/null +++ b/compose/docker-compose.yml @@ -0,0 +1,363 @@ +# +# ===========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-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. +# ============LICENSE_END===================================================== +# +version: '2' +services: + mariadb: + image: ${CONTAINER_LOCATION}mariadb:${POLICY_MARIADB_VER} + container_name: mariadb + hostname: mariadb + command: ['--lower-case-table-names=1', '--wait_timeout=28800', '--default-authentication-plugin=mysql_native_password'] + 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 + ports: + - 3306:3306 + policy-db-migrator: + image: ${CONTAINER_LOCATION}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: + - ./config/db-migrator/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: ${CONTAINER_LOCATION}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 + - ./config/sim-all/logback.xml:/opt/app/policy/simulators/etc/mounted/logback.xml:ro + expose: + - 6666 + - 6668 + - 6669 + - 6670 + - 3904 + - 6680 + ports: + - ${DMAAP_PORT}:3904 + api: + image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION} + container_name: policy-api + depends_on: + - policy-db-migrator + hostname: policy-api + ports: + - ${API_PORT}:6969 + volumes: + - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro + - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro + entrypoint: ./wait_for_port.sh + command: [ + '-c', './policy-api.sh', + 'mariadb', '3306', + 'policy-db-migrator', '6824' + ] + pap: + image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION} + container_name: policy-pap + depends_on: + - mariadb + - simulator + - api + hostname: policy-pap + ports: + - ${PAP_PORT}:6969 + volumes: + - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro + - ./config/${PROJECT}/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro + - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro + entrypoint: ./wait_for_port.sh + command: [ + '-c', './policy-pap.sh', + 'mariadb', '3306', + 'message-router', '3904', + 'api', '6969' + ] + xacml-pdp: + image: ${CONTAINER_LOCATION}onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION} + container_name: policy-xacml-pdp + depends_on: + - mariadb + - simulator + - pap + hostname: policy-xacml-pdp + ports: + - ${XACML_PORT}:6969 + - 30999:3904 + volumes: + - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro + - ./config/xacml-pdp/logback.xml:/opt/app/policy/pdpx/etc/logback.xml: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: ${CONTAINER_LOCATION}onap/policy-drools:${POLICY_DROOLS_PDP_VERSION} + container_name: drools + depends_on: + - mariadb + - simulator + - pap + hostname: drools + ports: + - ${DROOLS_PORT}:6969 + - ${DROOLS_TELEMETRY_PORT}: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: ${CONTAINER_LOCATION}onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION} + container_name: drools-apps + depends_on: + - mariadb + - simulator + - pap + - xacml-pdp + hostname: drools-apps + ports: + - ${DROOLS_APPS_PORT}:6969 + - ${DROOLS_APPS_TELEMETRY_PORT}: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: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION} + container_name: policy-apex-pdp + depends_on: + - mariadb + - simulator + - pap + hostname: policy-apex-pdp + ports: + - ${APEX_PORT}:6969 + - ${APEX_EVENTS_PORT}:23324 + volumes: + - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro + - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', + 'mariadb', '3306', + 'message-router', '3904', + 'pap', '6969' + ] + distribution: + image: ${CONTAINER_LOCATION}onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION} + container_name: policy-distribution + depends_on: + - mariadb + - api + - pap + - apex-pdp + hostname: policy-distribution + ports: + - ${DIST_PORT}:6969 + volumes: + - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro + - /tmp/distribution/:/opt/app/policy/distribution/etc/temp/:ro + - ./config/distribution/logback.xml:/opt/app/policy/distribution/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './policy-dist.sh', + 'mariadb', '3306', + 'message-router', '3904', + 'pap', '6969', + 'apex-pdp', '6969' + ] + policy-clamp-runtime-acm: + image: ${CONTAINER_LOCATION}onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-runtime-acm + depends_on: + - mariadb + - simulator + hostname: policy-clamp-runtime-acm + ports: + - ${ACM_PORT}:6969 + volumes: + - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/AcRuntimeParameters.yaml + - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './acm-runtime.sh', + 'mariadb', '3306', + 'message-router', '3904' + ] + policy-clamp-ac-http-ppnt: + image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-ac-http-ppnt + depends_on: + - simulator + hostname: policy-clamp-ac-http-ppnt + ports: + - 30290:6969 + volumes: + - ./config/clamp/HttpParticipantParameters.yaml:/opt/app/policy/clamp/etc/HttpParticipantParameters.yaml + - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './http-participant.sh', + 'message-router', '3904' + ] + policy-clamp-ac-k8s-ppnt: + image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-ac-k8s-ppnt + depends_on: + - simulator + hostname: policy-clamp-ac-k8s-ppnt + ports: + - 30295:6969 + volumes: + - ./config/clamp/KubernetesParticipantParameters.yaml:/opt/app/policy/clamp/etc/KubernetesParticipantParameters.yaml + - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './kubernetes-participant.sh', + 'message-router', '3904' + ] + policy-clamp-ac-pf-ppnt: + image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-ac-pf-ppnt + depends_on: + - simulator + - api + hostname: policy-clamp-ac-pf-ppnt + ports: + - ${POLICY_PARTICIPANT_PORT}:6969 + volumes: + - ./config/clamp/PolicyParticipantParameters.yaml:/opt/app/policy/clamp/etc/PolicyParticipantParameters.yaml:ro + - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './policy-participant.sh', + 'message-router', '3904', + 'api', '6969' + ] + policy-clamp-ac-a1pms-ppnt: + image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_VERSION} + container_name: policy-clamp-ac-a1pms-ppnt + depends_on: + - simulator + hostname: policy-clamp-ac-a1pms-ppnt + ports: + - 30296:6969 + volumes: + - ./config/clamp/A1pmsParticipantParameters.yaml:/opt/app/policy/clamp/etc/A1pmsParticipantParameters.yaml:ro + - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './a1pms-participant.sh', + 'message-router', '3904' + ] + prometheus: + image: prom/prometheus:v2.32.1 + container_name: prometheus + hostname: prometheus + ports: + - ${PROMETHEUS_PORT}: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: + - ${GRAFANA_PORT}:3000 + volumes: + - ./metrics/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml + - ./metrics/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml + - ./metrics/dashboards:/var/lib/grafana/dashboards + 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/compose/export-ports.sh b/compose/export-ports.sh new file mode 100755 index 00000000..d859b1a0 --- /dev/null +++ b/compose/export-ports.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright 2023 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +if $(docker images | grep -q "onap\/policy-api") +then + CONTAINER_LOCATION=$( + docker images | + grep onap/policy-api | + head -1 | + sed 's/onap\/policy-api.*$//' + ) + export CONTAINER_LOCATION +else + export CONTAINER_LOCATION="nexus3.onap.org:10001/" +fi + +# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES +export APEX_PORT=30001 +export APEX_EVENTS_PORT=23324 +export API_PORT=30002 +export PAP_PORT=30003 +export XACML_PORT=30004 +export DROOLS_PORT=30005 +export DROOLS_TELEMETRY_PORT=30216 +export DIST_PORT=30006 +export ACM_PORT=30007 +export POLICY_PARTICIPANT_PORT=30008 +export DROOLS_APPS_PORT=30009 +export DROOLS_APPS_TELEMETRY_PORT=30219 +export DMAAP_PORT=30904 +export PROMETHEUS_PORT=30259 +export GRAFANA_PORT=30269 diff --git a/compose/get-versions.sh b/compose/get-versions.sh new file mode 100755 index 00000000..600d8c99 --- /dev/null +++ b/compose/get-versions.sh @@ -0,0 +1,137 @@ +#! /bin/bash + +# ============LICENSE_START==================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modification Copyright 2021-2022 Nordix Foundation. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END====================================================== + +if [ -z "${WORKSPACE}" ]; then + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE +fi + +GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \ + "${WORKSPACE}"/.gitreview) + +echo GERRIT_BRANCH="${GERRIT_BRANCH}" + +export POLICY_MARIADB_VER=10.10.2 +echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER} + +export POLICY_POSTGRES_VER=11.1 +echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER} + +function getDockerVersion +{ + REPO=${1} + DEFAULT_DOCKER_IMAGE_NAME=${2:-} + DEFAULT_DOCKER_IMAGE_VERSION=${3:-} + + REPO_RELEASE_DATA=$( + curl -qL --silent \ + "https://github.com/onap/policy-parent/raw/$GERRIT_BRANCH/integration/src/main/resources/release/pf_release_data.csv" | + grep "^policy/$REPO" + ) + + # shellcheck disable=SC2034 + read -r repo \ + latest_released_tag \ + latest_snapshot_tag \ + changed_files \ + docker_images \ + <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )" + + if [[ -z "$docker_images" ]] + then + if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]] + then + echo "repo $REPO does not produce a docker image, execution terminated" + exit 1 + else + docker_images="$DEFAULT_DOCKER_IMAGE_NAME" + fi + fi + + docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}') + docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//") + + if \ + curl -qL --silent \ + "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" | + grep -q "$docker_image_version" + then + echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" + return + fi + + docker_image_version="$latest_released_tag" + if \ + curl -qL --silent \ + "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" | + grep -q "$docker_image_version" + then + echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" + return + fi + + docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION" + if \ + curl -qL --silent \ + "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" | + grep -q "$docker_image_version" + then + echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" + return + else + echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\"" + exit 1 + fi +} + +getDockerVersion docker +export POLICY_DOCKER_VERSION="$docker_image_version" + +getDockerVersion models "'policy-models-simulator'" 2.6.4 +export POLICY_MODELS_VERSION="$docker_image_version" + +getDockerVersion api +export POLICY_API_VERSION="$docker_image_version" + +getDockerVersion pap +export POLICY_PAP_VERSION="$docker_image_version" + +getDockerVersion apex-pdp +export POLICY_APEX_PDP_VERSION="$docker_image_version" + +getDockerVersion drools-pdp +export POLICY_DROOLS_PDP_VERSION="$docker_image_version" + +getDockerVersion xacml-pdp +export POLICY_XACML_PDP_VERSION="$docker_image_version" + +getDockerVersion distribution +export POLICY_DISTRIBUTION_VERSION="$docker_image_version" + +getDockerVersion clamp +export POLICY_CLAMP_VERSION="$docker_image_version" + +getDockerVersion gui +export POLICY_GUI_VERSION="$docker_image_version" + +getDockerVersion drools-applications +export POLICY_DROOLS_APPS_VERSION="$docker_image_version" diff --git a/compose/metrics/dashboard.yaml b/compose/metrics/dashboard.yaml new file mode 100644 index 00000000..b6e31e44 --- /dev/null +++ b/compose/metrics/dashboard.yaml @@ -0,0 +1,33 @@ +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2022 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# + +apiVersion: 1 + +providers: + - name: 'Policy Framework' + orgId: 1 + folder: 'Policy Framework' + folderUid: '' + type: file + disableDeletion: false + updateIntervalSeconds: 60 + allowUiUpdates: true + editable: true + options: + path: /var/lib/grafana/dashboards + foldersFromFilesStructure: true diff --git a/compose/metrics/dashboards/dashboard-apex-pdp.json b/compose/metrics/dashboards/dashboard-apex-pdp.json new file mode 100644 index 00000000..e0199a47 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-apex-pdp.json @@ -0,0 +1,1527 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy APEX-PDP", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 7, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime per pod for Policy APEX-PDP application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "(time() - process_start_time_seconds{job=\"apex-pdp-metrics\"}) / 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "process_uptime: {{ pod }}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy APEX-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 7, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"apex-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy APEX-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"apex-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"apex-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy APEX-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"apex-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy APEX-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"apex-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"apex-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy APEX-PDP JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"apex-pdp-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"apex-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon{job=\"apex-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_count{job=\"apex-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "{{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_sum{job=\"apex-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"apex-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "avg {{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 21, + "panels": [], + "title": "Requests", + "type": "row" + }, + { + "description": "Policy Deployments Total for APEX-PDP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 12, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", + "interval": "", + "legendFormat": "Deploy - Success", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"FAIL\"})", + "hide": false, + "interval": "", + "legendFormat": "Deploy - Failure", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"TOTAL\"})", + "hide": false, + "interval": "", + "legendFormat": "Deploy - Total", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Success", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"FAIL\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Failure", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"TOTAL\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Total", + "refId": "F" + } + ], + "title": "Policy Deployments Total", + "type": "bargauge" + }, + { + "description": "Policy Executions Total for APEX-PDP per instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 30, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"SUCCESS\"}", + "interval": "", + "legendFormat": "Executions - SUCCESS : {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"FAIL\"}", + "hide": false, + "interval": "", + "legendFormat": "Executions - FAILURE : {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"TOTAL\"}", + "hide": false, + "interval": "", + "legendFormat": "Executions - TOTAL : {{ pod }}", + "refId": "C" + } + ], + "title": "Policy Executions Total", + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 34, + "panels": [], + "title": "Engine Stats", + "type": "row" + }, + { + "description": "Policy Engine States for APEX-PDP per engine per instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [ + { + "options": { + "0": { + "color": "text", + "index": 0, + "text": "UNDEFINED" + }, + "1": { + "color": "dark-red", + "index": 1, + "text": "STOPPED" + }, + "2": { + "color": "dark-green", + "index": 2, + "text": "READY" + }, + "3": { + "color": "dark-yellow", + "index": 3, + "text": "EXECUTING" + }, + "4": { + "color": "dark-red", + "index": 4, + "text": "STOPPING" + } + }, + "type": "value" + } + ], + "max": 4, + "min": 0 + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 51 + }, + "id": 31, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "values": [ + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_engine_state{job=\"apex-pdp-metrics\"}", + "interval": "", + "legendFormat": "{{ engine_instance_id }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Engine States", + "type": "piechart" + }, + { + "description": "Uptime per engine for Policy APEX-PDP application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 51 + }, + "id": 32, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(engine_instance_id)((time() - pdpa_engine_last_start_timestamp_epoch{job=\"apex-pdp-metrics\"}/1000)/86400)", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Engine Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Number of APEX event execution counter per engine thread", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 59 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by (engine_instance_id)(rate(pdpa_engine_event_executions{job=\"apex-pdp-metrics\"}[5m]))", + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Engine Executions", + "type": "timeseries" + }, + { + "description": "Average time taken to execute an APEX policy in seconds per engine instance per pod", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 59 + }, + "id": 36, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_engine_average_execution_time_seconds{job=\"apex-pdp-metrics\"}", + "interval": "", + "legendFormat": "{{ engine_instance_id }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Engine Average Latency", + "type": "timeseries" + }, + { + "cards": {}, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "description": "Time taken to execute the last APEX policy in seconds expressed as a histogram over time", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 67 + }, + "heatmap": {}, + "hideZeroBuckets": true, + "highlightCards": true, + "id": 38, + "legend": { + "show": true + }, + "maxDataPoints": 100, + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum by(le)(increase(pdpa_engine_last_execution_time_bucket{job=\"apex-pdp-metrics\"}[$__interval]))", + "format": "heatmap", + "interval": "", + "legendFormat": "{{ le }}", + "refId": "A" + } + ], + "title": "Engine Latency distribution", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 0, + "transparent": true, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "s", + "logBase": 1, + "show": true + }, + "yBucketBound": "upper" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy APEX-PDP Jakarta", + "uid": "DM56uTogk", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-api.json b/compose/metrics/dashboards/dashboard-api.json new file mode 100644 index 00000000..8a31de80 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-api.json @@ -0,0 +1,1457 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy API", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime per pod for Policy API application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": false, + "expr": "process_uptime_seconds{job=\"api-metrics\"} * 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "process_uptime:{{pod}}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy API CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 9, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "system_cpu_usage{job=\"api-metrics\"} * 100", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy API Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 17, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum by(job)(jvm_memory_used_bytes{area=\"heap\", job=\"api-metrics\"}) / sum by(job)(jvm_memory_max_bytes{area=\"heap\", job=\"api-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum by(job)(jvm_memory_used_bytes{area=\"nonheap\", job=\"api-metrics\"}) / sum by(job)(jvm_memory_max_bytes{area=\"nonheap\", job=\"api-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Non Heap : {{pod}}", + "refId": "B" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy API CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "system_cpu_usage{job=\"api-metrics\"} * 100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_cpu_usage{job=\"api-metrics\"} * 100", + "hide": false, + "interval": "", + "legendFormat": "process: {{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_usage{job=\"api-metrics\"}[1h]) * 100", + "hide": false, + "interval": "", + "legendFormat": "process_1h: {{pod}}", + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy API Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum(jvm_memory_used_bytes{area=\"heap\", job=\"api-metrics\"}) / sum(jvm_memory_max_bytes{area=\"heap\", job=\"api-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum(jvm_memory_used_bytes{area=\"nonheap\", job=\"api-metrics\"}) / sum(jvm_memory_max_bytes{area=\"nonheap\", job=\"api-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Non Heap", + "refId": "B" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy API JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_live_threads{job=\"api-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak_threads{job=\"api-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon_threads{job=\"api-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 36 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_pause_seconds_count{job=\"api-metrics\"}[1h])", + "interval": "", + "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_pause_seconds_sum{job=\"api-metrics\"}[1h])/rate(jvm_gc_pause_seconds_count{job=\"api-metrics\"}[1h])", + "interval": "", + "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 21, + "panels": [], + "title": "Requests", + "type": "row" + }, + { + "description": "HTTP API requests rate filtered by URI and REST method", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(method, uri) (rate(http_server_requests_seconds_count{job=\"api-metrics\"}[5m]))", + "interval": "", + "legendFormat": "{{ method }} - {{ uri }}", + "refId": "A" + } + ], + "title": "HTTP Request Rate", + "type": "timeseries" + }, + { + "description": "Time taken for an API request filtered by REST method and URI", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum by (method, uri)(http_server_requests_seconds_sum{job=\"api-metrics\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"api-metrics\"})", + "interval": "", + "legendFormat": "{{ method }} - {{ uri }}", + "refId": "A" + } + ], + "title": "Latency", + "type": "timeseries" + }, + { + "description": "Stats for Policy API Operations", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 53 + }, + "id": 24, + "options": { + "displayMode": "gradient", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false, + "text": { + "titleSize": 12 + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy - Total", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy - Successful", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy - Failed", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", uri=~\"/metrics\"})", + "interval": "", + "legendFormat": "Delete Policy - Total", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Delete Policy - Successful", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Delete Policy - Failed", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy - Total", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy - Successful", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy - Failed", + "refId": "I" + } + ], + "title": "Policy API Requests", + "transparent": true, + "type": "bargauge" + }, + { + "description": "Stats for Policy Types API operations", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 53 + }, + "id": 28, + "options": { + "displayMode": "gradient", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false, + "text": { + "titleSize": 12 + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy Type - Total", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy Type - Successful", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Create Policy Type - Failed", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", uri=~\"/metrics\"})", + "interval": "", + "legendFormat": "Delete Policy Type - Total", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Delete Policy Type - Successful", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Delete Policy Type - Failed", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy Type - Total", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy Type - Successful", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Get Policy Type - Failed", + "refId": "I" + } + ], + "title": "Policy Types API Requests", + "transparent": true, + "type": "bargauge" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy API Jakarta", + "uid": "DM56uKltt", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-distribution.json b/compose/metrics/dashboards/dashboard-distribution.json new file mode 100644 index 00000000..1a53fcbc --- /dev/null +++ b/compose/metrics/dashboards/dashboard-distribution.json @@ -0,0 +1,927 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy Distribution", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 5, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime for Policy Distribution application", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": false, + "expr": "time()-process_start_time_seconds{job=\"distribution-metrics\"}", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Process Uptime", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy Distribution CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 9, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_cpu_seconds_total{job=\"distribution-metrics\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy Distribution Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 17, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum by(job)(jvm_memory_bytes_used{area=\"heap\", job=\"distribution-metrics\"}) / sum by(job)(jvm_memory_bytes_max{area=\"heap\", job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{pod}}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy Distribution CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[1m]) * 100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[5m]) * 100", + "hide": false, + "interval": "", + "legendFormat": "process: {{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[1h]) * 100", + "hide": false, + "interval": "", + "legendFormat": "process_1h: {{pod}}", + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy Distribution Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum(jvm_memory_bytes_used{area=\"heap\", job=\"distribution-metrics\"}) / sum(jvm_memory_bytes_max{area=\"heap\", job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy Distribution JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"distribution-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"distribution-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_state{job=\"distribution-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "State Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 36 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_count{job=\"distribution-metrics\"}[1h])", + "interval": "", + "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_sum{job=\"distribution-metrics\"}[1h])/rate(jvm_gc_collection_seconds_count{job=\"distribution-metrics\"}[1h])", + "interval": "", + "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 21, + "panels": [], + "title": "Statistics", + "type": "row" + }, + { + "description": "Stats for Distribution Statistics Count", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 32, + "options": { + "displayMode": "gradient", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false, + "text": { + "titleSize": 12 + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(total_distribution_received_count{job=\"distribution-metrics\"})", + "interval": "", + "legendFormat": "Total Count", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(distribution_success_count{job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Success Count", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(distribution_failure_count{job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Failure Count", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(total_download_received_count{job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Total Download Count", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(download_success_count{job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Download Success Count", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(download_failure_count{job=\"distribution-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Download Failure Count", + "refId": "F" + } + ], + "title": "Distribution Statistics", + "transparent": true, + "type": "bargauge" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy Distribution", + "uid": "5HkCopg4z", + "version": 5, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-drools-apps b/compose/metrics/dashboards/dashboard-drools-apps new file mode 100644 index 00000000..a8049274 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-drools-apps @@ -0,0 +1,1068 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy Drools-APPS", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 10, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [ + { + "description": "Uptime per pod for Policy Drools-APPS application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "(time() - process_start_time_seconds{job=\"drools-apps-metrics\"}) / 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{ pod }}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy Drools-APPS CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 7, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"drools-apps-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy Drools-APPS Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-apps-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-apps-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + } + ], + "title": "Quick Info", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 17, + "panels": [ + { + "description": "Policy Drools-APPS CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"drools-apps-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy Drools-APPS Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-apps-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-apps-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy Drools-APPS JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"drools-apps-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"drools-apps-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon{job=\"drools-apps-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + } + ], + "title": "System", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 15, + "panels": [ + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 3 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_count{job=\"drools-apps-metrics\"}[5m])", + "interval": "", + "legendFormat": "{{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 3 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_sum{job=\"drools-apps-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"drools-apps-metrics\"}[5m])", + "interval": "", + "legendFormat": "avg {{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + } + ], + "title": "Garbage Collection", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 21, + "panels": [ + { + "description": "Policy Deployments Total for Drools-APPS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 12, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", + "interval": "", + "legendFormat": "Deploy - Success", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"deploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Deploy - Failure", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Success", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Failure", + "refId": "E" + } + ], + "title": "Policy Deployments Total", + "type": "bargauge" + }, + { + "description": "Policy Executions Total for Drools-APPS per instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 30, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpd_policy_executions_latency_seconds_count{job=\"drools-apps-metrics\", status=\"SUCCESS\"}", + "interval": "", + "legendFormat": "Executions - Count", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpd_policy_executions_latency_seconds_sum{job=\"drools-apps-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Executions - Sum", + "refId": "B" + } + ], + "title": "Policy Executions", + "type": "bargauge" + } + ], + "title": "Requests", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy Drools-APPS", + "uid": "i9l6oyz4z", + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-drools-pdp.json b/compose/metrics/dashboards/dashboard-drools-pdp.json new file mode 100644 index 00000000..683d7686 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-drools-pdp.json @@ -0,0 +1,1150 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy Drools-PDP", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 9, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime per pod for Policy Drools-PDP application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "(time() - process_start_time_seconds{job=\"drools-pdp-metrics\"}) / 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "process_uptime: {{ pod }}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy Drools-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 7, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"drools-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy Drools-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy Drools-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"drools-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy Drools-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy Drools-PDP JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"drools-pdp-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"drools-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon{job=\"policy-drools-pdp\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_count{job=\"drools-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "{{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_sum{job=\"drools-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"drools-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "avg {{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 21, + "panels": [], + "title": "Requests", + "type": "row" + }, + { + "description": "Policy Deployments Total for Drools-PDP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 12, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", + "interval": "", + "legendFormat": "Deploy - Success", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"deploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Deploy - Failure", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Success", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeploy - Failure", + "refId": "E" + } + ], + "title": "Policy Deployments Total", + "type": "bargauge" + }, + { + "description": "Policy Executions Total for Drools-PDP per instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 30, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpd_policy_executions_latency_seconds_count{job=\"drools-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Executions - Count", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpd_policy_executions_latency_seconds_sum{job=\"drools-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Executions - Sum", + "refId": "C" + } + ], + "title": "Policy Executions", + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 34, + "panels": [], + "title": "Logging", + "type": "row" + }, + { + "description": "Policy number of log entries for Drool-PDP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 51 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "logback_appender_total{job=\"drools-pdp-metrics\"}", + "interval": "", + "legendFormat": "Level", + "refId": "A" + } + ], + "title": "Logback Total", + "type": "stat" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy Drools-PDP", + "uid": "ro24hskVz", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-for-springboot.json b/compose/metrics/dashboards/dashboard-for-springboot.json new file mode 100644 index 00000000..b91aa04b --- /dev/null +++ b/compose/metrics/dashboards/dashboard-for-springboot.json @@ -0,0 +1,3681 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Dashboard for Spring Boot Statistics(by micrometer-prometheus)", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 14430, + "graphTooltip": 0, + "id": 1, + "iteration": 1645635034981, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 54, + "panels": [], + "title": "Basic Statistics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 52, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "process_uptime_seconds{application=\"$application\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dateTimeAsIso" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 56, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "process_start_time_seconds{application=\"$application\", instance=\"$instance\"}*1000", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Start time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 58, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\", area=\"heap\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Heap Used", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + }, + { + "options": { + "from": -1e+32, + "result": { + "text": "N/A" + }, + "to": 0 + }, + "type": "range" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 60, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\", area=\"nonheap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Non-Heap Used", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 95, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "system_cpu_usage{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "System CPU Usage", + "refId": "A" + }, + { + "expr": "process_cpu_usage{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Process CPU Usage", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "id": 96, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "system_load_average_1m{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Load Average [1m]", + "refId": "A" + }, + { + "expr": "system_cpu_count{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "CPU Core Size", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Load Average", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 66, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{uri}}", + "refId": "A" + } + ], + "title": "HTTP Server Requests Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 14 + }, + "id": 110, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "http_server_requests_seconds_sum{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{uri}}", + "refId": "A" + } + ], + "title": "HTTP Server Requests Sum", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 14 + }, + "id": 111, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "http_server_requests_seconds_max{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{uri}}", + "refId": "A" + } + ], + "title": "HTTP Server Requests Max", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 48, + "panels": [], + "title": "JVM Statistics - Memory", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 0, + "y": 21 + }, + "id": 85, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "repeat": "memory_pool_heap", + "repeatDirection": "h", + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used", + "refId": "C" + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Commited", + "refId": "A" + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Max", + "refId": "B" + } + ], + "title": "$memory_pool_heap (heap)", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 6, + "x": 0, + "y": 31 + }, + "id": 88, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "repeat": "memory_pool_nonheap", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Used", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Commited", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Max", + "refId": "B" + } + ], + "title": "$memory_pool_nonheap (non-heap)", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 80, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(jvm_classes_unloaded_classes_total{instance=\"$instance\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Classes Unloaded", + "refId": "A" + } + ], + "title": "Classes Unloaded", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 83, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", id=\"mapped\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Used Bytes", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", id=\"mapped\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Capacity Bytes", + "refId": "B" + } + ], + "title": "Mapped Buffers", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 51 + }, + "id": 50, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_classes_loaded_classes{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Classes Loaded", + "refId": "A" + } + ], + "title": "Classes Loaded", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 56 + }, + "id": 78, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(jvm_gc_memory_allocated_bytes_total{instance=\"$instance\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "allocated", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(jvm_gc_memory_promoted_bytes_total{instance=\"$instance\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "promoted", + "refId": "B" + } + ], + "title": "Memory Allocate/Promote", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 59 + }, + "id": 82, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", application=\"$application\", id=\"direct\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used Bytes", + "refId": "A" + }, + { + "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", application=\"$application\", id=\"direct\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Capacity Bytes", + "refId": "B" + } + ], + "title": "Direct Buffers", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 66 + }, + "id": 68, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon_threads{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Daemon", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_live_threads{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Live", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak_threads{instance=\"$instance\", application=\"$application\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Peak", + "refId": "C" + } + ], + "title": "Threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 72, + "panels": [], + "title": "JVM Statistics - GC", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 75 + }, + "id": 74, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(jvm_gc_pause_seconds_count{instance=\"$instance\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{action}} [{{cause}}]", + "refId": "A" + } + ], + "title": "GC Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 75 + }, + "id": 76, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "irate(jvm_gc_pause_seconds_sum{instance=\"$instance\", application=\"$application\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{action}} [{{cause}}]", + "refId": "A" + } + ], + "title": "GC Stop the World Duration", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 34, + "panels": [], + "title": "HikariCP Statistics", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 86 + }, + "id": 44, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^hikaricp_connections{app=\"orders\", app_kubernetes_io_instance=\"mushop\", app_kubernetes_io_name=\"orders\", instance=\"10.1.0.72:80\", job=\"kubernetes-pods\", kubernetes_namespace=\"mushop\", kubernetes_pod_name=\"mushop-orders-67bb8f45c8-5cr5p\", mockmode=\"false\", pod_template_hash=\"67bb8f45c8\", pool=\"HikariPool-1\", version=\"local\"}$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "hikaricp_connections{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Connections Size", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 20, + "x": 4, + "y": 86 + }, + "id": 36, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "hikaricp_connections_active{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Active", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "hikaricp_connections_idle{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Idle", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "expr": "hikaricp_connections_pending{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Pending", + "refId": "C" + } + ], + "title": "Connections", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 90 + }, + "id": 46, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^hikaricp_connections_timeout_total{app=\"orders\", app_kubernetes_io_instance=\"mushop\", app_kubernetes_io_name=\"orders\", instance=\"10.1.0.72:80\", job=\"kubernetes-pods\", kubernetes_namespace=\"mushop\", kubernetes_pod_name=\"mushop-orders-67bb8f45c8-5cr5p\", mockmode=\"false\", pod_template_hash=\"67bb8f45c8\", pool=\"HikariPool-1\", version=\"local\"}$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "hikaricp_connections_timeout_total{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Connection Timeout Count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 94 + }, + "id": 38, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "hikaricp_connections_creation_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_creation_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Creation Time", + "refId": "A" + } + ], + "title": "Connection Creation Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 94 + }, + "id": 42, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "hikaricp_connections_usage_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_usage_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Usage Time", + "refId": "A" + } + ], + "title": "Connection Usage Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 94 + }, + "id": 40, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "hikaricp_connections_acquire_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_acquire_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Acquire Time", + "refId": "A" + } + ], + "title": "Connection Acquire Time", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 100 + }, + "id": 101, + "panels": [], + "title": "Database Stats", + "type": "row" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 101 + }, + "id": 102, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jdbc_connections_active{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Active Connections", + "type": "stat" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 101 + }, + "id": 106, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jdbc_connections_idle{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Idle Connections", + "type": "stat" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 101 + }, + "id": 108, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "lastNotNull" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(spring_data_repository_invocations_seconds_count{instance=\"$instance\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Total query executions", + "type": "stat" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 104 + }, + "id": 107, + "links": [], + "maxDataPoints": 100, + "options": { + "legend": { + "calcs": [ + "mean", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(rate(spring_data_repository_invocations_seconds_max{instance=\"$instance\"}[5m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "rate", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Response Time", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 112 + }, + "id": 18, + "panels": [], + "title": "HTTP Statistics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 113 + }, + "id": 4, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "irate(http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\", uri!~\".*actuator.*\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{uri}}", + "refId": "A" + } + ], + "title": "Request Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 120 + }, + "id": 2, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "irate(http_server_requests_seconds_sum{instance=\"$instance\", application=\"$application\", exception=\"None\", uri!~\".*actuator.*\"}[5m]) / irate(http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\", exception=\"None\", uri!~\".*actuator.*\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{uri}}", + "refId": "A" + } + ], + "title": "Response Time", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 127 + }, + "id": 8, + "panels": [], + "title": "Logback Statistics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 128 + }, + "id": 6, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "alias": "", + "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"info\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "info", + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A" + } + ], + "title": "INFO logs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 128 + }, + "id": 10, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "alias": "", + "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"error\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "error", + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A" + } + ], + "title": "ERROR logs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 135 + }, + "id": 14, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "alias": "", + "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"warn\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "warn", + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A" + } + ], + "title": "WARN logs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 135 + }, + "id": 16, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "alias": "", + "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"debug\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "debug", + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A" + } + ], + "title": "DEBUG logs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 135 + }, + "id": 20, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "alias": "", + "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"trace\"}[5m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "trace", + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A" + } + ], + "title": "TRACE logs", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "policy-api:6969", + "value": "policy-api:6969" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "label_values(jvm_classes_loaded_classes, instance)", + "hide": 0, + "includeAll": false, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(jvm_classes_loaded_classes, instance)", + "refId": "Prometheus-instance-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "", + "hide": 0, + "includeAll": false, + "label": "Application", + "multi": false, + "name": "application", + "options": [], + "query": { + "query": "label_values(jvm_classes_loaded{instance=\"$instance\"}, application)", + "refId": "Prometheus-application-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "", + "hide": 0, + "includeAll": false, + "label": "HikariCP-Pool", + "multi": false, + "name": "hikaricp", + "options": [], + "query": { + "query": "label_values(hikaricp_connections{instance=\"$instance\", application=\"$application\"}, pool)", + "refId": "Prometheus-hikaricp-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Memory Pool (heap)", + "multi": false, + "name": "memory_pool_heap", + "options": [], + "query": { + "query": "label_values(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"heap\"},id)", + "refId": "Prometheus-memory_pool_heap-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Memory Pool (nonheap)", + "multi": false, + "name": "memory_pool_nonheap", + "options": [], + "query": { + "query": "label_values(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"nonheap\"},id)", + "refId": "Prometheus-memory_pool_nonheap-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Spring Boot Statistics & Endpoint Metrics", + "uid": "OS7-NUiGz", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-jvm-basic.json b/compose/metrics/dashboards/dashboard-jvm-basic.json new file mode 100644 index 00000000..dce01fc8 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-jvm-basic.json @@ -0,0 +1,2753 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "showIn": 0, + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + }, + { + "datasource": "dkSf71fnz", + "enable": true, + "expr": "resets(process_uptime_seconds{job=\"$job\"}[1m]) > 0", + "iconColor": "rgba(255, 96, 96, 1)", + "name": "Restart Detection", + "showIn": 0, + "step": "1m", + "tagKeys": "restart-tag", + "textFormat": "uptime reset", + "titleFormat": "Restart" + } + ] + }, + "description": "Dashboard for JVM Basic Metrics", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 4701, + "graphTooltip": 1, + "id": 4, + "iteration": 1645634994099, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 125, + "panels": [], + "title": "Quick Facts", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 63, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "time()-process_start_time_seconds{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dateTimeAsIso" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 9, + "x": 3, + "y": 1 + }, + "id": 92, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "expr": "process_start_time_seconds{job=\"$job\"}*1000", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Start time", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 65, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Heap used", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + }, + { + "options": { + "from": -1e+32, + "result": { + "text": "N/A" + }, + "to": 0 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 75, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Non-Heap used", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 127, + "panels": [], + "title": "JVM Memory", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 5 + }, + "id": 24, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_committed{job=\"$job\", area=\"heap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "title": "JVM Heap", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 5 + }, + "id": 25, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_commited{job=\"$job\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "title": "JVM Non-Heap", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 5 + }, + "id": 26, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_used{job=\"$job\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_committed{job=\"$job\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_bytes_max{job=\"$job\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "title": "JVM Total", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 86, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_virtual_memory_bytes{job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "vss", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_resident_memory_bytes{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "rss", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_resident_memory_bytes{job=\"$job\"} + process_virtual_memory_bytes{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "total", + "refId": "D" + } + ], + "title": "JVM Process Memory", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 128, + "panels": [], + "title": "JVM Misc", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 1, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 13 + }, + "id": 106, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(process_cpu_seconds_total{job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "system + process", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_usage{job=\"$job\"}[1h])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "process-1h", + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 13 + }, + "id": 61, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_open_fds{job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "open", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_max_fds{job=\"$job\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "B", + "step": 2400 + } + ], + "title": "File Descriptors", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 13 + }, + "id": 32, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_state{state=\"RUNNABLE\", job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "live", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "daemon", + "metric": "", + "refId": "B", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "peak", + "refId": "C", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "process", + "refId": "D", + "step": 2400 + } + ], + "title": "Threads", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "blocked" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "new" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#fce2de", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "runnable" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7eb26d", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "terminated" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#511749", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "timed-waiting" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#c15c17", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "waiting" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#eab839", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 13 + }, + "id": 124, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_state{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{state}}", + "refId": "A" + } + ], + "title": "Thread States", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 129, + "panels": [], + "repeat": "persistence_counts", + "title": "JVM Memory Pools (Heap)", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 21 + }, + "id": 3, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "repeat": "jvm_memory_pool_heap", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_commited{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "commited", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "title": "JVM Memory Pool heap", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 130, + "panels": [], + "title": "JVM Memory Pools (Non-Heap)", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 29 + }, + "id": 78, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "repeat": "jvm_memory_pool_nonheap", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_committed{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "commited", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "title": "JVM Memory Pool nonheap", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 131, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 37 + }, + "id": 98, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "rate", + "refId": "A" + } + ], + "title": "Collections", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 37 + }, + "id": 101, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(rate(jvm_gc_collection_seconds_sum{job=\"$job\"}[5m]))/sum(rate(jvm_gc_collection_seconds_count{job=\"$job\"}[5m]))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "expr": "jvm_gc_pause_seconds_max{job=\"$job\"}", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "max {{action}} ({{cause}})", + "refId": "B" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 37 + }, + "id": 99, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(rate(jvm_memory_pool_allocated_bytes_total{job=\"$job\"}[5m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "allocated", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(rate(jvm_memory_pool_allocated_bytes_created{job=\"$job\"}[5m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "created", + "refId": "B" + } + ], + "title": "Allocated/Created", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 132, + "panels": [], + "title": "Classloading", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 37, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_classes_loaded{job=\"$job\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "loaded", + "metric": "", + "refId": "A", + "step": 1200 + } + ], + "title": "Classes loaded", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 38, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "delta(jvm_classes_loaded{job=\"$job\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "delta-1m", + "metric": "", + "refId": "A", + "step": 1200 + } + ], + "title": "Class delta", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 133, + "panels": [], + "title": "Buffer Pools", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 53 + }, + "id": 33, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"direct\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"direct\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "capacity", + "metric": "", + "refId": "B", + "step": 2400 + } + ], + "title": "Direct Buffers", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 53 + }, + "id": 83, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"direct\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "count", + "metric": "", + "refId": "A", + "step": 2400 + } + ], + "title": "Direct Buffers", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 53 + }, + "id": 85, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"mapped\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"mapped\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "capacity", + "metric": "", + "refId": "B", + "step": 2400 + } + ], + "title": "Mapped Buffers", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 53 + }, + "id": 84, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"mapped\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "count", + "metric": "", + "refId": "A", + "step": 2400 + } + ], + "title": "Mapped Buffers", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "apex-pdp-metrics", + "value": "apex-pdp-metrics" + }, + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "definition": "label_values(job)", + "hide": 0, + "includeAll": false, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(job)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "JVM Basic Metrics", + "uid": "SLdKRfB7z", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-pap.json b/compose/metrics/dashboards/dashboard-pap.json new file mode 100644 index 00000000..93f54256 --- /dev/null +++ b/compose/metrics/dashboards/dashboard-pap.json @@ -0,0 +1,1328 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy PAP", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 4, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime per pod for Policy PAP application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_uptime_seconds{job=\"pap-metrics\"} / 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "process_uptime: {{ pod }}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy PAP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 6, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "system_cpu_usage{job=\"pap-metrics\"} * 100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy PAP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 15, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum by(pod)(jvm_memory_used_bytes{area=\"heap\", job=\"pap-metrics\"}) / sum by(pod)(jvm_memory_max_bytes{area=\"heap\", job=\"pap-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum by(pod)(jvm_memory_used_bytes{area=\"nonheap\", job=\"pap-metrics\"}) / sum by(pod)(jvm_memory_max_bytes{area=\"nonheap\", job=\"pap-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Non Heap : {{ pod }}", + "refId": "B" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy PAP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "system_cpu_usage{job=\"pap-metrics\"} * 100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_cpu_usage{job=\"pap-metrics\"} * 100", + "hide": false, + "interval": "", + "legendFormat": "process: {{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg_over_time(process_cpu_usage{job=\"pap-metrics\"}[1h]) * 100", + "hide": false, + "interval": "", + "legendFormat": "process_1h: {{pod}}", + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy PAP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum(jvm_memory_used_bytes{area=\"heap\", job=\"pap-metrics\"}) / sum(jvm_memory_max_bytes{area=\"heap\", job=\"pap-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Heap", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * sum(jvm_memory_used_bytes{area=\"nonheap\", job=\"pap-metrics\"}) / sum(jvm_memory_max_bytes{area=\"nonheap\", job=\"pap-metrics\"})", + "hide": false, + "interval": "", + "legendFormat": "Non Heap", + "refId": "B" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy PAP JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_live_threads{job=\"pap-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak_threads{job=\"pap-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon_threads{job=\"pap-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_pause_seconds_count{job=\"pap-metrics\"}[1h])", + "interval": "", + "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_pause_seconds_sum{job=\"pap-metrics\"}[1h])/rate(jvm_gc_pause_seconds_count{job=\"pap-metrics\"}[1h])", + "interval": "", + "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 21, + "panels": [], + "title": "Requests", + "type": "row" + }, + { + "description": "Total number of PAP requests per second filtered by URI and REST method", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(method, uri) (rate(http_server_requests_seconds_count{job=\"pap-metrics\"}[5m]))", + "interval": "", + "legendFormat": "{{ method }} - {{ uri }}", + "refId": "A" + } + ], + "title": "HTTP Request Rate", + "type": "timeseries" + }, + { + "description": "Time taken for PAP request filtered by REST method and URI", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum by (method, uri)(http_server_requests_seconds_sum{job=\"pap-metrics\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\"})", + "interval": "", + "legendFormat": "{{ method }} - {{ uri }}", + "refId": "A" + } + ], + "title": "Latency", + "type": "timeseries" + }, + { + "description": "Percentage of PAP calls that passed filtered by method and URI", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 50 + }, + "id": 29, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": { + "titleSize": 12 + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum by (method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\", outcome=\"SUCCESS\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\"})*100", + "interval": "", + "legendFormat": "{{ method }} - {{ uri }}", + "refId": "A" + } + ], + "title": "HTTP API Success %age", + "type": "gauge" + }, + { + "description": "Stats for Policy PAP Deployment/Undeployment Operations", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 50 + }, + "id": 24, + "options": { + "displayMode": "gradient", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": false, + "text": { + "titleSize": 12 + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"deploy\"})", + "hide": false, + "interval": "", + "legendFormat": "Deployment - Total", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"deploy\",status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "Deployment - Success", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"deploy\",status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Deployment - Failure", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeployment - Total", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\",status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeployment - Success", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\",status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "Undeployment - Failure", + "refId": "F" + } + ], + "title": "Policy Deployment/Undeployment Stats", + "transparent": true, + "type": "bargauge" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy PAP Jakarta", + "uid": "DM56uKldd", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/dashboard-xacml-pdp.json b/compose/metrics/dashboards/dashboard-xacml-pdp.json new file mode 100644 index 00000000..a1c10c5b --- /dev/null +++ b/compose/metrics/dashboards/dashboard-xacml-pdp.json @@ -0,0 +1,1162 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Grafana Dashboard for Policy XACML-PDP", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 5, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 19, + "panels": [], + "title": "Quick Info", + "type": "row" + }, + { + "description": "Uptime per pod for Policy XACML-PDP application calculated in days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "(time() - process_start_time_seconds{job=\"xacml-pdp-metrics\"}) / 86400", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "process_uptime: {{pod}}", + "refId": "A" + } + ], + "title": "Process Uptime (days)", + "transformations": [], + "transparent": true, + "type": "stat" + }, + { + "description": "Policy XACML-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 7, + "y": 1 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"xacml-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "description": "Policy XACML-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"xacml-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 17, + "panels": [], + "title": "System", + "type": "row" + }, + { + "description": "Policy XACML-PDP CPU Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(process_cpu_seconds_total{job=\"xacml-pdp-metrics\"}[5m])*100", + "interval": "", + "legendFormat": "system: {{pod}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "description": "Policy XACML-PDP Memory Usage Monitoring", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"xacml-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Heap : {{ pod }}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "description": "Policy XACML-PDP JVM Threads", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "max", + "last", + "mean" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_current{job=\"xacml-pdp-metrics\"}", + "interval": "", + "legendFormat": "Live Threads: {{ pod }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_peak{job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Peak Threads: {{ pod }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "jvm_threads_daemon{job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Daemon Threads: {{ pod }}", + "refId": "C" + } + ], + "title": "JVM threads", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 15, + "panels": [], + "title": "Garbage Collection", + "type": "row" + }, + { + "description": "GC operations per second", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "{{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Collection", + "type": "timeseries" + }, + { + "description": "Average GC Time", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(jvm_gc_collection_seconds_sum{job=\"xacml-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m])", + "interval": "", + "legendFormat": "avg {{ gc }} : {{ pod }}", + "refId": "A" + } + ], + "title": "Pause Durations", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 21, + "panels": [], + "title": "Requests", + "type": "row" + }, + { + "description": "Policy Deployments Total for XACML-PDP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 12, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", + "interval": "", + "legendFormat": "{{ deploy }}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"deploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "{{ deploy }}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", + "hide": false, + "interval": "", + "legendFormat": "{{ undeploy }}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", + "hide": false, + "interval": "", + "legendFormat": "{{ undeploy }}", + "refId": "E" + } + ], + "title": "Policy Deployments Total", + "type": "bargauge" + }, + { + "description": "Policy Decisions Total for XACML-PDP per instance", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 30, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Deny", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Indeterminant", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", + "hide": false, + "interval": "", + "legendFormat": "Not Applicable", + "refId": "A" + } + ], + "title": "Policy Decisions", + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 34, + "panels": [], + "title": "Logging", + "type": "row" + }, + { + "description": "Policy number of log entries for XACML-PDP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 51 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "logback_appender_total{job=\"xacml-pdp-metrics\"}", + "interval": "", + "legendFormat": "Level", + "refId": "A" + } + ], + "title": "Logback Total", + "type": "stat" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Policy XACML-PDP", + "uid": "Fk_2HkmVk", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/dashboards/sla-metrics.json b/compose/metrics/dashboards/sla-metrics.json new file mode 100644 index 00000000..e94d91dc --- /dev/null +++ b/compose/metrics/dashboards/sla-metrics.json @@ -0,0 +1,1778 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Dashboard for Service Level Agreeements", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 14430, + "graphTooltip": 0, + "id": 3, + "iteration": 1673599566103, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 54, + "panels": [], + "title": "Basic Statistics", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 52, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_uptime_seconds", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dateTimeAsIso" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 56, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "process_start_time_seconds{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"}*1000", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Start time", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 7 + }, + "id": 58, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Heap Used", + "type": "gauge" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + }, + { + "options": { + "from": -1e+32, + "result": { + "text": "N/A" + }, + "to": 0 + }, + "type": "range" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 7 + }, + "id": 60, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "title": "Non-Heap Used", + "type": "gauge" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 96, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg(system_load_average_1m{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Load Average [1m] ", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg(system_cpu_count{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "CPU Core Size", + "refId": "B" + } + ], + "title": "Load Average", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 95, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg(system_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "System CPU Usage", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg(process_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Process CPU Usage", + "refId": "B" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 113, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "avg by (id) (jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", + "interval": "", + "legendFormat": "{{id}}", + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 18, + "panels": [], + "title": "HTTP Statistics", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 23, + "x": 0, + "y": 37 + }, + "id": 4, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "sum" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(http_server_requests_seconds_count{uri!~\".*metrics.*|.*prometheus.*\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", + "refId": "A" + } + ], + "title": "Request Count", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 23, + "x": 0, + "y": 47 + }, + "id": 2, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(http_server_requests_seconds_sum{job=~\"api-metrics|acm-metrics|pap-metrics\", exception=\"None\", uri!~\".*metrics.*|.*prometheus.*\"}[5m]) / irate(http_server_requests_seconds_count{job=~\"api-metrics|acm-metrics|pap-metrics\", exception=\"None\", uri!~\".*metrics.*|.*prometheus.*\"}[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", + "refId": "A" + } + ], + "title": "Response Time", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 22, + "x": 0, + "y": 57 + }, + "id": 111, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "http_server_requests_seconds_max{job=~\"api-metrics|acm-metrics|pap-metrics\", uri!~\".*metrics.*|.*prometheus.*\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", + "refId": "A" + } + ], + "title": "HTTP Server Requests Max", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 67 + }, + "id": 115, + "panels": [], + "title": "Deployment statistics", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 68 + }, + "id": 117, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pap_policy_deployments_total{operation=\"deploy\", status=\"SUCCESS\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Successful deployments", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 3, + "y": 68 + }, + "id": 118, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pap_policy_deployments_total{operation=\"undeploy\", status=\"SUCCESS\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Successful undeployments", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 6, + "y": 68 + }, + "id": 119, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pap_policy_deployments_total{operation=\"deploy\", status=\"FAILURE\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Failed deployments", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 9, + "y": 68 + }, + "id": 120, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pap_policy_deployments_total{operation=\"undeploy\", status=\"FAILURE\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Failed undeployments", + "type": "stat" + }, + { + "description": "Policy Executions Total for APEX-PDP", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 74 + }, + "id": 128, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"SUCCESS\"}", + "interval": "", + "legendFormat": "Successful", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"FAIL\"}", + "hide": false, + "interval": "", + "legendFormat": "Failed", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"TOTAL\"}", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "C" + } + ], + "title": "Policy Executions", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 400 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 82 + }, + "id": 122, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "irate(pap_policy_deployments_seconds_sum[5m])/irate(pap_policy_deployments_seconds_count[5m])", + "interval": "", + "legendFormat": "{{operation}} - {{status}}", + "refId": "A" + } + ], + "title": "Deployment timing", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 90 + }, + "id": 124, + "panels": [], + "title": "Apex-PDP", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 0, + "text": "Undefined" + }, + "1": { + "color": "#ffffff", + "index": 1, + "text": "Stopped" + }, + "2": { + "color": "blue", + "index": 2, + "text": "Ready" + }, + "3": { + "color": "green", + "index": 3, + "text": "Running" + }, + "4": { + "color": "yellow", + "index": 4, + "text": "Stopping" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 91 + }, + "id": 126, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 20, + "valueSize": 20 + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_engine_state{job=\"apex-pdp-metrics\"}", + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Engines Stats", + "type": "stat" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 5, + "y": 91 + }, + "id": 130, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 25, + "valueSize": 25 + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": false, + "expr": "(time() * 1000) - (pdpa_engine_last_start_timestamp_epoch{job=\"apex-pdp-metrics\"})", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Engine Uptime (since last start)", + "transformations": [], + "type": "stat" + }, + { + "description": "Number of APEX event execution counter per engine thread", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 99 + }, + "id": 132, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "rate(pdpa_engine_average_execution_time_seconds{job=\"apex-pdp-metrics\"}[5m])", + "format": "time_series", + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Avg Engine Execution Time", + "type": "timeseries" + }, + { + "description": "Number of APEX event execution counter per engine thread", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 107 + }, + "id": 133, + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "dkSf71fnz" + }, + "exemplar": true, + "expr": "pdpa_engine_event_executions{job=\"apex-pdp-metrics\"}", + "format": "time_series", + "interval": "", + "legendFormat": "{{ engine_instance_id }}", + "refId": "A" + } + ], + "title": "Engine Executions Count", + "type": "piechart" + } + ], + "refresh": "10s", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "SLA's Metrics", + "uid": "ySoel0jnk", + "version": 6, + "weekStart": "" +} \ No newline at end of file diff --git a/compose/metrics/datasource.yaml b/compose/metrics/datasource.yaml new file mode 100644 index 00000000..b8220d0e --- /dev/null +++ b/compose/metrics/datasource.yaml @@ -0,0 +1,49 @@ +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2022 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# + +# config file version +apiVersion: 1 + +# list of datasources to insert/update depending +# what's available in the database +deleteDatasources: + - name: PolicyPrometheus + orgId: 1 + +datasources: + # name of the datasource. Required + - name: PolicyPrometheus + type: prometheus + access: proxy + orgId: 1 + uid: "dkSf71fnz" + url: http://prometheus:9090/ + password: '' + user: '' + database: '' + basicAuth: false + basicAuthUser: '' + basicAuthPassword: '' + withCredentials: false + isDefault: true + jsonData: + httpMethod: GET + tlsSkipVerify: true + secureJsonFields: {} + version: 2 + readOnly: false diff --git a/compose/metrics/prometheus.yml b/compose/metrics/prometheus.yml new file mode 100644 index 00000000..789cfc2a --- /dev/null +++ b/compose/metrics/prometheus.yml @@ -0,0 +1,101 @@ +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# + +# global config +global: + scrape_interval: 60s + evaluation_interval: 60s + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: + # - alertmanager:9093 + +# scrape config +scrape_configs: + + - job_name: "api-metrics" + metrics_path: /policy/api/v1/metrics + static_configs: + - targets: ["policy-api:6969"] + basic_auth: + username: "policyadmin" + password: "zb!XztG34" + + - job_name: "pap-metrics" + metrics_path: /policy/pap/v1/metrics + static_configs: + - targets: ["policy-pap:6969"] + basic_auth: + username: "policyadmin" + password: "zb!XztG34" + + - job_name: "apex-pdp-metrics" + static_configs: + - targets: + - "policy-apex-pdp:6969" + basic_auth: + username: "policyadmin" + password: "zb!XztG34" + + - job_name: "drools-apps-metrics" + static_configs: + - targets: + - "drools-apps:9696" + basic_auth: + username: "demo@people.osaaf.org" + password: "demo123456!" + + - job_name: "drools-pdp-metrics" + static_configs: + - targets: + - "drools:9696" + basic_auth: + username: "demo@people.osaaf.org" + password: "demo123456!" + + - job_name: "distribution-metrics" + static_configs: + - targets: + - "policy-distribution:6969" + basic_auth: + username: "policyadmin" + password: "zb!XztG34" + + - job_name: "xacml-pdp-metrics" + static_configs: + - targets: + - "policy-xacml-pdp:6969" + basic_auth: + username: "policyadmin" + password: "zb!XztG34" + + - job_name: "acm-metrics" + metrics_path: "/onap/policy/clamp/acm/prometheus" + static_configs: + - targets: + - "policy-clamp-runtime-acm:6969" + basic_auth: + username: "runtimeUser" + password: "zb!XztG34" + + - job_name: "node" + static_configs: + - targets: ["node-exporter:9100"] diff --git a/compose/start-compose.sh b/compose/start-compose.sh new file mode 100755 index 00000000..57b55316 --- /dev/null +++ b/compose/start-compose.sh @@ -0,0 +1,95 @@ +#!/bin/bash +# +# ============LICENSE_START==================================================== +# Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END====================================================== + +#Usage: $0 [policy-component] [OPTIONS]" +#" OPTIONS:" +#" --grafana start the docker compose with grafana" +#" --gui start the docker compose with gui" +#" no policy-component will start all components" + +if [ -z "${WORKSPACE}" ]; then + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE +fi +COMPOSE_FOLDER="${WORKSPACE}"/compose + +# Set default values for the options +grafana=false +gui=false + +# Parse the command-line arguments +while [[ $# -gt 0 ]] +do + key="$1" + + case $key in + --grafana) + grafana=true + shift + ;; + --gui) + gui=true + shift 2 + break; + ;; + *) + echo "$1" + component="$1" + shift + ;; + esac +done + +echo "Configuring docker compose..." +source "${COMPOSE_FOLDER}"/export-ports.sh > /dev/null 2>&1 +source "${COMPOSE_FOLDER}"/get-versions.sh > /dev/null 2>&1 + +# in case of csit running for PAP (groups should be for pap) but starts apex-pdp for dependencies. +if [ -z "$PROJECT" ]; then + PROJECT=$component +fi + +if [ -n "$component" ]; then + if [ "$grafana" = true ]; then + echo "Starting ${component} application with Grafana" + docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}" grafana + echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}" + echo "Grafana server: http://localhost:${GRAFANA_PORT}" + elif [ "$gui" = true ]; then + echo "Starting application with gui..." + docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \ + -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d "${component}" policy-gui + echo "Clamp GUI: https://localhost:2445/clamp" + else + echo "Starting ${component} application" + docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}" + fi +else + PROJECT=pap + if [ "$gui" = true ]; then + echo "Starting application with gui..." + docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \ + -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d + echo "Clamp GUI: https://localhost:2445/clamp" + else + echo "Starting all components..." + docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d + fi +fi diff --git a/compose/stop-compose.sh b/compose/stop-compose.sh new file mode 100755 index 00000000..810c9fe0 --- /dev/null +++ b/compose/stop-compose.sh @@ -0,0 +1,36 @@ +#!/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====================================================== + +echo "Shut down started!" +if [ -z "${WORKSPACE}" ]; then + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE +fi +COMPOSE_FOLDER="${WORKSPACE}"/compose + +source "${COMPOSE_FOLDER}"/export-ports.sh > /dev/null 2>&1 +source "${COMPOSE_FOLDER}"/get-versions.sh > /dev/null 2>&1 + +echo "Collecting logs from docker compose containers..." +docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml logs > docker_compose.log +cat docker_compose.log + +echo "Tearing down containers..." +docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml down -v diff --git a/compose/wait_for_port.sh b/compose/wait_for_port.sh new file mode 100755 index 00000000..6dcb3cab --- /dev/null +++ b/compose/wait_for_port.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# ============LICENSE_START==================================================== +# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END====================================================== + +usage() { + echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2 + exit 1 +} + +tmout=300 +cmd= +while getopts c:t: opt +do + case "$opt" in + c) + cmd="$OPTARG" + ;; + + t) + tmout="$OPTARG" + ;; + + *) + usage + ;; + esac +done + +nargs=$((OPTIND-1)) +shift "$nargs" + +even_args=$(($#%2)) +if [ $# -lt 2 ] || [ "$even_args" -ne 0 ] +then + usage +fi + +while [ $# -ge 2 ] +do + export host="$1" + export port="$2" + shift + shift + + echo "Waiting for $host port $port..." + + while [ "$tmout" -gt 0 ] + do + if command -v docker > /dev/null 2>&1 + then + docker ps --format "table {{ .Names }}\t{{ .Status }}" + fi + + nc -vz "$host" "$port" + rc=$? + + if [ $rc -eq 0 ] + then + break + else + tmout=$((tmout-1)) + sleep 1 + fi + done + + if [ $rc -ne 0 ] + then + echo "$host port $port cannot be reached" + exit $rc + fi +done + +$cmd + +exit 0 diff --git a/csit/apex-pdp/plans/setup.sh b/csit/apex-pdp/plans/setup.sh deleted file mode 100755 index 9241041a..00000000 --- a/csit/apex-pdp/plans/setup.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2018 Ericsson. All rights reserved. -# -# Modifications Copyright (c) 2019-2023 Nordix Foundation. -# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. -# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d apex-pdp grafana - -unset http_proxy https_proxy - -POLICY_API_IP=$(get-instance-ip.sh policy-api) -POLICY_API_PORT=30440 -POLICY_PAP_IP=$(get-instance-ip.sh policy-pap) -POLICY_PAP_PORT=30442 -MARIADB_IP=$(get-instance-ip.sh mariadb) -APEX_IP=$(get-instance-ip.sh policy-apex-pdp) -APEX_PORT=30237 -SIM_IP=$(get-instance-ip.sh simulator) -export SIM_IP - -echo PAP IP IS "${POLICY_PAP_IP}" -echo MARIADB IP IS "${MARIADB_IP}" -echo API IP IS "${POLICY_API_IP}" -echo APEX IP IS "${APEX_IP}" -echo DMAAP_IP IS "${SIM_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "${APEX_PORT}" - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPTS:${SCRIPTS}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_PORT:${APEX_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DMAAP_IP:${SIM_IP}" diff --git a/csit/apex-pdp/plans/teardown.sh b/csit/apex-pdp/plans/teardown.sh deleted file mode 100755 index 9bfdfe88..00000000 --- a/csit/apex-pdp/plans/teardown.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2018 Ericsson. All rights reserved. -# -# Modifications copyright (c) 2019-2022 Nordix Foundation. -# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/apex-pdp/plans/testplan.txt b/csit/apex-pdp/plans/testplan.txt deleted file mode 100644 index 3d3525d1..00000000 --- a/csit/apex-pdp/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -apex-pdp-test.robot diff --git a/csit/apex-pdp/tests/apex-pdp-test.robot b/csit/apex-pdp/tests/apex-pdp-test.robot deleted file mode 100644 index 3de53a96..00000000 --- a/csit/apex-pdp/tests/apex-pdp-test.robot +++ /dev/null @@ -1,146 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library Process -Resource ${CURDIR}/../../common-library.robot - - -*** Test Cases *** - -Healthcheck - [Documentation] Runs Apex PDP Health check - ${hcauth}= HealthCheckAuth - ${resp}= PerformGetRequest ${APEX_PORT} /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 ${CURDIR}/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 ${CURDIR}/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 ${SCRIPTS}/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 ${CURDIR}/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 ${SCRIPTS}/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 ${CURDIR}/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 ${CURDIR}/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 ${SCRIPTS}/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_PORT} /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 ${CURDIR}/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_PORT} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${policyadmin} - -RunEventOnApexEngine - [Documentation] Send event to verify policy execution - Create Session apexSession http://localhost: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} - 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://localhost:30227 max_retries=1 - ${data}= Get Binary File ${CURDIR}/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://localhost:30227 max_retries=1 - ${data}= Get Binary File ${CURDIR}/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 ${SCRIPTS}/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_PORT} /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/csit/apex-pdp/tests/data/VesEventForPnfPolicy.json b/csit/apex-pdp/tests/data/VesEventForPnfPolicy.json deleted file mode 100644 index 9998fc6f..00000000 --- a/csit/apex-pdp/tests/data/VesEventForPnfPolicy.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "event" : { - "commonEventHeader" : { - "startEpochMicrosec" : 1597953057126, - "sourceId" : "927b2580-36d9-4f13-8421-3c9d43b7a57e", - "eventId" : "8c7935a4-79d8-4ec0-b661-dcca3cd68006", - "lastEpochMicrosec" : 1597952499468, - "eventName" : "Report hostname & IP", - "sourceName" : "demo-pnf", - "reportingEntityName" : "DCAE", - "vesEventListenerVersion" : "7.1", - "internalHeaderFields" : { }, - "version" : "4.0.1", - "priority" : "Normal", - "sequence" : 1, - "domain" : "other" - }, - "otherFields" : { - "hashMap" : { - "hostname" : "UNDEFINED", - "pnfId": "927b2580-36d9-4f13-8421-3c9d43b7a57e", - "pnfName": "demo-pnf", - "ip" : "10.101.200.10" - }, - "otherFieldsVersion" : "3.0" - } - } -} diff --git a/csit/apex-pdp/tests/data/VesEventForVnfPolicy.json b/csit/apex-pdp/tests/data/VesEventForVnfPolicy.json deleted file mode 100644 index 0fc8481d..00000000 --- a/csit/apex-pdp/tests/data/VesEventForVnfPolicy.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "event": { - "commonEventHeader": { - "domain": "fault", - "eventId": "fault0000245", - "eventName": "Fault_Vscf:PilotNumberPoolExhaustion", - "lastEpochMicrosec": 1413378172000000, - "priority": "High", - "reportingEntityName": "ibcx0001vm002oam001", - "sequence": 1, - "sourceId": "de305d54-75b4-431b-adb2-eb6b9e5460141", - "sourceName": "vfw-cnf-cds-test-1-vnf", - "startEpochMicrosec": 1413378172000000, - "timeZoneOffset": "UTC-05:30", - "version": "4.0.1", - "vesEventListenerVersion": "7.0.1" - }, - "faultFields": { - "alarmAdditionalInformation": { - "PilotNumberPoolSize": "1000" - }, - "alarmCondition": "PilotNumberPoolExhaustion", - "eventSeverity": "CRITICAL", - "eventSourceType": "other", - "faultFieldsVersion": 4, - "specificProblem": "Calls cannot complete - pilot numbers are unavailable", - "vfStatus": "Active" - } - } -} diff --git a/csit/apex-pdp/tests/data/event.json b/csit/apex-pdp/tests/data/event.json deleted file mode 100644 index 9dbf2790..00000000 --- a/csit/apex-pdp/tests/data/event.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "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/apex-pdp/tests/data/onap.pnf.metadataSet.Test.json b/csit/apex-pdp/tests/data/onap.pnf.metadataSet.Test.json deleted file mode 100644 index b59efc0a..00000000 --- a/csit/apex-pdp/tests/data/onap.pnf.metadataSet.Test.json +++ /dev/null @@ -1,2755 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "node_types": { - "org.onap.nodetypes.policy.MetadataSet": { - "derived_from": "tosca.nodetypes.Root", - "version": "1.0.0" - } - }, - - "topology_template": { - "node_templates": { - "apex.metadata.pnf": { - "version": "1.0.0", - "type": "org.onap.nodetypes.policy.MetadataSet", - "type_version": "1.0.0", - "description": "Metadata set for apex pnf Policy", - "metadata": { - "apexPolicyModel": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2", - "version": "0.0.1" - }, - "keyInformation": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo", - "version": "0.0.1" - }, - "keyInfoMap": { - "entry": [ - { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae", - "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "UUID": "c8a29e27-0a15-354a-84f9-4c7f207e5c81", - "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "UUID": "5e843cee-0180-39b9-8989-180b2ffe11c0", - "description": "Generated description for concept referred to by key \"SimpleCL_AAIFailureResponseHandlerPolicy2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "UUID": "90291c92-9b27-3cd9-8720-db572419c048", - "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestErrorType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "UUID": "7b7e6751-4e0b-389d-98c0-5567bbc0294c", - "description": "Generated description for concept referred to by key \"SimpleCL_AAIRequestEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "UUID": "63d5680c-14ef-3505-8d34-ebb646bba07b", - "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "UUID": "a84ca97d-6e94-39a2-91f9-59a6c9aa435e", - "description": "Generated description for concept referred to by key \"SimpleCL_AAISuccessResponseHandlerPolicy2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "UUID": "0e2ee622-7fd3-3e49-82e2-539c4f5e9624", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSActionIdentifiersType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "UUID": "e84f8682-ea33-3ad0-8626-8bc4634581fc", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "UUID": "a252f835-2479-38ef-9ef4-20af62725752", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "UUID": "cfc46ea9-b8c1-38dd-ac9c-304c916daf34", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyFailureResponseTask2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "UUID": "1e7095d6-a455-3f89-acae-486e35d7e311", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "UUID": "d22ea83b-695d-3da9-b9f5-41f16ca433bf", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyRequestPayloadType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "UUID": "e9fe2e40-1f0d-30dd-8b9e-885695878693", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifyResponsePayloadType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "UUID": "5e04fa76-0a17-38a9-8524-23b2d1a23fa5", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "UUID": "15866380-40f5-3f8e-87d9-13747a36d352", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "UUID": "2c3d76ce-dd42-32ac-a397-ab418534e1cf", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSConfigModifySuccessResponseTask2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "b99c44da-dae7-3c96-b528-58852537d063", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "UUID": "1db688e2-3afe-3b03-9795-fdbfa80fa240", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSFailureResponseStatusType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "31022456-e85b-3a9b-9ecb-a09691792d3e", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSRequestCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "d6075720-622e-3a0d-827a-aa4580a2f5d7", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "UUID": "948359ff-3308-3ac5-a5ec-6e3c1b9cd4d5", - "description": "Generated description for concept referred to by key \"SimpleCL_CDSSuccessResponseStatusType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - }, - "UUID": "63a6fd26-2fd6-3a0e-8a27-49a5d2ea4644", - "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_EventDetailsAlbumType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_EventDetailsAlbumType", - "version": "0.0.1" - }, - "UUID": "a0407d0b-5719-38bf-9529-25ad62ace8c4", - "description": "Generated description for concept referred to by key \"SimpleCL_EventDetailsAlbumType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "UUID": "28e894dc-4ab8-3469-aab7-d81bd05bb4c9", - "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAIFailureResponseTask2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "UUID": "073f1433-999e-3506-98ad-ef820d2fa7f0", - "description": "Generated description for concept referred to by key \"SimpleCL_HandleAAISuccessResponseTask2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "UUID": "afc6ed46-6801-3c85-bb4c-0ab5b0dd4a74", - "description": "Generated description for concept referred to by key \"SimpleCL_HandleVesEventTask2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "UUID": "317be184-a01a-3e2d-9ae4-cafaa405de70", - "description": "Generated description for concept referred to by key \"SimpleCL_LogEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "UUID": "be7fc79b-9b73-381a-8e23-9dd6e6b1233d", - "description": "Generated description for concept referred to by key \"SimpleCL_LogEventComponentType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "UUID": "1a082851-49e3-3f4c-b023-c05236cc8389", - "description": "Generated description for concept referred to by key \"SimpleCL_LogEventOtherFieldsType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "UUID": "cab6cd51-ea7b-3241-a173-ea8a24e29737", - "description": "Generated description for concept referred to by key \"SimpleCL_LogEventTargetType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "UUID": "0f57665a-f0a9-314e-ad0a-04c1f5758174", - "description": "Generated description for concept referred to by key \"SimpleCL_VesEvent:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_VesEventHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_VesEventHandlerPolicy2", - "version": "0.0.1" - }, - "UUID": "ba5d9a46-8cb4-3fbe-84fd-eabba5b7dd4b", - "description": "Generated description for concept referred to by key \"SimpleCL_VesEventHandlerPolicy2:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "UUID": "9fd7a967-57d4-36ef-81e9-c3396f3aa8d1", - "description": "Generated description for concept referred to by key \"SimpleCL_VesEventType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574", - "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af", - "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2", - "version": "0.0.1" - }, - "UUID": "ecc97b87-f30b-344c-a476-d36501bf5cbd", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Albums", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Albums", - "version": "0.0.1" - }, - "UUID": "1469671a-56dd-3a68-bf6c-77a5cf7a9487", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Albums:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Events", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Events", - "version": "0.0.1" - }, - "UUID": "23c4eee4-aba5-36f6-96d6-46f40061bfed", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Events:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_KeyInfo", - "version": "0.0.1" - }, - "UUID": "ea9e73ff-483c-3827-896c-6eaa9d69bc6e", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_KeyInfo:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Policies", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Policies", - "version": "0.0.1" - }, - "UUID": "38c068e5-bb9a-3997-9e50-ec77c66825c8", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Policies:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Schemas", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Schemas", - "version": "0.0.1" - }, - "UUID": "38514b27-8b9b-3d06-844a-3aced27deb0a", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Schemas:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Tasks", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Tasks", - "version": "0.0.1" - }, - "UUID": "0e0387b5-07fa-30e4-8554-eb51d2e18939", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Simplecontrolloop2_Tasks:0.0.1\"" - } - } - ] - } - }, - "policies": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Policies", - "version": "0.0.1" - }, - "policyMap": { - "entry": [ - { - "key": { - "name": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "SimpleCL_ReceiveAAIFailureResponseState", - "value": { - "stateKey": { - "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "SimpleCL_ReceiveAAIFailureResponseState" - }, - "trigger": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "AAIFailureStateOutput", - "value": { - "key": { - "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState", - "localName": "AAIFailureStateOutput" - }, - "outgoingEvent": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "outgoingEventReference": [ - { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - } - ], - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState", - "localName": "SimpleCL_AAIFailureResponseHandlerPolicy2" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "SimpleCL_AAIFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAIFailureResponseState", - "localName": "AAIFailureStateOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "SimpleCL_ReceiveAAIFailureResponseState" - } - }, - { - "key": { - "name": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "SimpleCL_ReceiveAAISuccessResponseState", - "value": { - "stateKey": { - "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "SimpleCL_ReceiveAAISuccessResponseState" - }, - "trigger": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "AAISuccessStateOutput", - "value": { - "key": { - "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState", - "localName": "AAISuccessStateOutput" - }, - "outgoingEvent": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "outgoingEventReference": [ - { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - } - ], - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState", - "localName": "SimpleCL_AAISuccessResponseHandlerPolicy2" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "SimpleCL_AAISuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveAAISuccessResponseState", - "localName": "AAISuccessStateOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "SimpleCL_ReceiveAAISuccessResponseState" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "SimpleCL_CDSConfigModifyFailureResponseState", - "value": { - "stateKey": { - "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "SimpleCL_CDSConfigModifyFailureResponseState" - }, - "trigger": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ConfigModifyFailureResponseOutput", - "value": { - "key": { - "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState", - "localName": "ConfigModifyFailureResponseOutput" - }, - "outgoingEvent": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "outgoingEventReference": [ - { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - } - ], - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState", - "localName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "SimpleCL_CDSConfigModifyFailureResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifyFailureResponseState", - "localName": "ConfigModifyFailureResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "SimpleCL_CDSConfigModifyFailureResponseState" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "SimpleCL_CDSConfigModifySuccessResponseState", - "value": { - "stateKey": { - "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "SimpleCL_CDSConfigModifySuccessResponseState" - }, - "trigger": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ConfigModifySuccessResponseOutput", - "value": { - "key": { - "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState", - "localName": "ConfigModifySuccessResponseOutput" - }, - "outgoingEvent": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "outgoingEventReference": [ - { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - } - ], - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState", - "localName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "SimpleCL_CDSConfigModifySuccessResponseHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_CDSConfigModifySuccessResponseState", - "localName": "ConfigModifySuccessResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "SimpleCL_CDSConfigModifySuccessResponseState" - } - }, - { - "key": { - "name": "SimpleCL_VesEventHandlerPolicy2", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "SimpleCL_VesEventHandlerPolicy2", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "SimpleCL_ReceiveVesState", - "value": { - "stateKey": { - "parentKeyName": "SimpleCL_VesEventHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "SimpleCL_ReceiveVesState" - }, - "trigger": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "VesOutput", - "value": { - "key": { - "parentKeyName": "SimpleCL_VesEventHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveVesState", - "localName": "VesOutput" - }, - "outgoingEvent": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "outgoingEventReference": [ - { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - } - ], - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "SimpleCL_VesEventHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveVesState", - "localName": "SimpleCL_VesEventHandlerPolicy2" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "SimpleCL_VesEventHandlerPolicy2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "SimpleCL_ReceiveVesState", - "localName": "VesOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "SimpleCL_ReceiveVesState" - } - } - ] - } - }, - "tasks": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Tasks", - "version": "0.0.1" - }, - "taskMap": { - "entry": [ - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseTask2", - "version": "0.0.1" - }, - "inputEvent": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - }, - "outputEvents": { - "entry": [ - { - "key": "SimpleCL_LogEvent", - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n var timestamp = longType(new Date().getTime());\n var logEventFields = java.util.HashMap();\n logEventFields.put(\"id\", eventId);\n \n var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n entityInfo.put(\"pnf_DasH_name\", pnfName);\n var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n target.put(\"entityInfo\", entityInfo);\n target.put(\"targetType\", targetType)\n logEventFields.put(\"target\", target);\n \n var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n artifacts.put(\"policyVersion\", \"1.0.0\");\n var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n component.put(\"artifacts\", artifacts);\n component.put(\"name\", \"Policy\")\n component.put(\"flavour\", \"Apex-PDP\")\n component.put(\"timestamp\", timestamp)\n component.put(\"status\", status)\n component.put(\"message\", message)\n logEventFields.put(\"component\", component);\n \n var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n logEventFields.put(\"otherFields\", otherFieldsEntry);\n \n return logEventFields;\n}" - } - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseTask2", - "version": "0.0.1" - }, - "inputEvent": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_SUCCESS" - }, - "outputEvents": { - "entry": [ - { - "key": "SimpleCL_LogEvent", - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\n\nvar logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_SUCCESS\", \"Successfully processed the VES event. Hostname is updated.\")\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n var timestamp = longType(new Date().getTime());\n var logEventFields = java.util.HashMap();\n logEventFields.put(\"id\", eventId);\n \n var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n entityInfo.put(\"pnf_DasH_name\", pnfName);\n var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n target.put(\"entityInfo\", entityInfo);\n target.put(\"targetType\", targetType)\n logEventFields.put(\"target\", target);\n \n var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n artifacts.put(\"policyVersion\", \"1.0.0\");\n var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n component.put(\"artifacts\", artifacts);\n component.put(\"name\", \"Policy\")\n component.put(\"flavour\", \"Apex-PDP\")\n component.put(\"timestamp\", timestamp)\n component.put(\"status\", status)\n component.put(\"message\", message)\n logEventFields.put(\"component\", component);\n \n var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n logEventFields.put(\"otherFields\", otherFieldsEntry);\n \n return logEventFields;\n}" - } - } - }, - { - "key": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleAAIFailureResponseTask2", - "version": "0.0.1" - }, - "inputEvent": { - "key": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "requestError", - "value": { - "key": "requestError", - "fieldSchemaKey": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - }, - "outputEvents": { - "entry": [ - { - "key": "SimpleCL_LogEvent", - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\n\nvar aaiErrorMessage = \"AAI operation failed. Error message from AAI - \" + executor.inFields.get(\"requestError\").get(\"serviceException\").get(\"text\");\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + aaiErrorMessage)\nexecutor.addFieldsToOutput(logEventFields);\nexecutor.logger.info(executor.outFieldsList);\ntrue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n var timestamp = longType(new Date().getTime());\n var logEventFields = java.util.HashMap();\n logEventFields.put(\"id\", eventId);\n \n var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n entityInfo.put(\"pnf_DasH_name\", pnfName);\n var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n target.put(\"entityInfo\", entityInfo);\n target.put(\"targetType\", targetType)\n logEventFields.put(\"target\", target);\n \n var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n artifacts.put(\"policyVersion\", \"1.0.0\");\n var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n component.put(\"artifacts\", artifacts);\n component.put(\"name\", \"Policy\")\n component.put(\"flavour\", \"Apex-PDP\")\n component.put(\"timestamp\", timestamp)\n component.put(\"status\", status)\n component.put(\"message\", message)\n logEventFields.put(\"component\", component);\n \n var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n logEventFields.put(\"otherFields\", otherFieldsEntry);\n \n return logEventFields;\n}" - } - } - }, - { - "key": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleAAISuccessResponseTask2", - "version": "0.0.1" - }, - "inputEvent": { - "key": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "equip-model", - "value": { - "key": "equip-model", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "equip-type", - "value": { - "key": "equip-type", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "equip-vendor", - "value": { - "key": "equip-vendor", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "frame-id", - "value": { - "key": "frame-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "in-maint", - "value": { - "key": "in-maint", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "ipaddress-v4-oam", - "value": { - "key": "ipaddress-v4-oam", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "nf-role", - "value": { - "key": "nf-role", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "pnf-ipv4-address", - "value": { - "key": "pnf-ipv4-address", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "pnf-name", - "value": { - "key": "pnf-name", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "resource-version", - "value": { - "key": "resource-version", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - }, - "outputEvents": { - "entry": [ - { - "key": "SimpleCL_CDSConfigModifyRequestEvent", - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": "SimpleCL_LogEvent", - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").get(albumID.toString());\nexecutor.logger.info(\"HandleAAISuccessResponseTask extracted context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar otherFieldsMap = eventDetailsAlbum.get(\"otherFields\").get(\"hashMap\");\n\nvar targetEntityName = executor.inFields.get(\"pnf-name\")\nvar logMessage = \"\";\nvar existingHostname = executor.inFields.get(\"pnf-name2\");\nvar hostnameInVesEvent = otherFieldsMap.get(\"hostname\");\n\nvar albumSchemaHelper = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper();\nvar target = albumSchemaHelper.createNewSubInstance(\"target\");\ntarget.put(\"targetType\", \"PNF\")\nvar entityInfo = albumSchemaHelper.createNewSubInstance(\"entityInfo\");\nentityInfo.put(\"name\",targetEntityName);\ntarget.put(\"entityInfo\", entityInfo);\neventDetailsAlbum.put(\"target\", target);\n\nvar returnVal = true;\nif ((String(hostnameInVesEvent) != \"UNDEFINED\") && (String(existingHostname) != String(hostnameInVesEvent))) {\n logMessage = \"Hostname available in AAI does not match with the hostname received in the VES Event.\";\n returnVal = false\n var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + logMessage)\n executor.addFieldsToOutput(logEventFields);\n} else {\n logMessage = \"Received response from AAI successfully. Hostname in AAI matches with the one in Ves event. Going to make the update-config request to CDS.\";\n\n var commonHeader = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"commonHeader\").createNewInstance();\n commonHeader.put(\"subRequestId\", albumID.toString());\n commonHeader.put(\"requestId\", commonEventHeader.get(\"eventId\"));\n commonHeader.put(\"originatorId\", \"POLICY\");\n\n var blueprintName = \"controlloop-hostname-update\";\n var blueprintVersion = \"1.0.4\";\n var newHostname = \"host\" + Math.random().toString(36).substring(7);\n eventDetailsAlbum.put(\"generatedHostname\", newHostname);\n\n var actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"actionIdentifiers\").createNewInstance();\n actionIdentifiers.put(\"mode\", \"sync\");\n actionIdentifiers.put(\"blueprintName\", blueprintName);\n actionIdentifiers.put(\"blueprintVersion\", blueprintVersion);\n actionIdentifiers.put(\"actionName\", \"update-config\");\n\n var payloadEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewSubInstance(\"CDSConfigModifyRequestPayloadEntry\");\n payloadEntry.put(\"hostname\", newHostname)\n payloadEntry.put(\"IP\", executor.inFields.get(\"ipaddress-v4-oam\"));\n payloadEntry.put(\"pnfName\", otherFieldsMap.get(\"pnfName\"));\n\n var payload = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_CDSConfigModifyRequestEvent\", \"payload\").createNewInstance();\n payload.put(\"update_DasH_config_DasH_request\", payloadEntry);\n\n var cdsRequestEventFields = java.util.HashMap();\n cdsRequestEventFields.put(\"commonHeader\", commonHeader);\n cdsRequestEventFields.put(\"actionIdentifiers\", actionIdentifiers);\n cdsRequestEventFields.put(\"payload\", payload);\n executor.addFieldsToOutput(cdsRequestEventFields);\n\n var logEventFields = populateLogEventFields(commonEventHeader.get(\"eventId\"), otherFieldsMap.get(\"pnfName\"), \"PNF\", \"SUCCESS\", logMessage)\n executor.addFieldsToOutput(logEventFields);\n}\nexecutor.logger.info(executor.outFieldsList);\nreturnVal;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n var timestamp = longType(new Date().getTime());\n var logEventFields = java.util.HashMap();\n logEventFields.put(\"id\", eventId);\n \n var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n entityInfo.put(\"pnf_DasH_name\", pnfName);\n var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n target.put(\"entityInfo\", entityInfo);\n target.put(\"targetType\", targetType)\n logEventFields.put(\"target\", target);\n \n var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n artifacts.put(\"policyVersion\", \"1.0.0\");\n var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n component.put(\"artifacts\", artifacts);\n component.put(\"name\", \"Policy\")\n component.put(\"flavour\", \"Apex-PDP\")\n component.put(\"timestamp\", timestamp)\n component.put(\"status\", status)\n component.put(\"message\", message)\n logEventFields.put(\"component\", component);\n \n var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n logEventFields.put(\"otherFields\", otherFieldsEntry);\n \n return logEventFields;\n}" - } - } - }, - { - "key": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_HandleVesEventTask2", - "version": "0.0.1" - }, - "inputEvent": { - "key": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "DCAE", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "event", - "value": { - "key": "event", - "fieldSchemaKey": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "ENTRY" - }, - "outputEvents": { - "entry": [ - { - "key": "SimpleCL_AAIRequestEvent", - "value": { - "key": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "AAI", - "parameter": { - "entry": [ - { - "key": "aaifield", - "value": { - "key": "aaifield", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": "SimpleCL_LogEvent", - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").getSchemaHelper().createNewInstance();\nvar returnValue = true;\n\nvar event = executor.inFields.get(\"event\");\nexecutor.logger.info(\"HandleVesEventTask processing VES event - \" + event);\n\nvar commonEventHeader = event.get(\"commonEventHeader\");\nvar otherFields = event.get(\"otherFields\");\n// albumID will be used to fetch info from our album later. Storing event data in album by sourceId / AAI pnf-id, the same will be sent to CDS request payload as subRequestId\nvar albumID = commonEventHeader.get(\"sourceId\");\n// save the event processing start time in apex\ncommonEventHeader.put(\"startEpochMicrosec\", longType(new Date().getTime()));\n//save the incoming event details to album\neventDetailsAlbum.put(\"commonEventHeader\", commonEventHeader);\neventDetailsAlbum.put(\"otherFields\", otherFields);\nexecutor.getContextAlbum(\"SimpleCL_EventDetailsAlbum\").put(albumID.toString(), eventDetailsAlbum);\nexecutor.logger.info(\"HandleVesEventTask storing context album - \" + albumID.toString() + \"::\" + eventDetailsAlbum);\n\nexecutor.getExecutionProperties().setProperty(\"albumId\", albumID);\nexecutor.getExecutionProperties().setProperty(\"pnfName\", otherFields.get(\"hashMap\").get(\"pnfName\"));\n\nvar logEventFields = populateLogEventFields(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), otherFields.get(\"hashMap\").get(\"pnfName\"), \"PNF\", \"ACTIVE\", \"VES event has been received. Going to fetch details from AAI.\")\n\nexecutor.addFieldsToOutput(logEventFields);\n\nexecutor.logger.info(executor.outFieldsList);\nreturnValue;\n\nfunction populateLogEventFields(eventId, pnfName, targetType, status, message) {\n // populate logEventFields\n var timestamp = longType(new Date().getTime());\n var logEventFields = java.util.HashMap();\n logEventFields.put(\"id\", eventId);\n \n var entityInfo = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewSubInstance(\"entityInfo\");\n entityInfo.put(\"pnf_DasH_name\", pnfName);\n var target = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"target\").createNewInstance();\n target.put(\"entityInfo\", entityInfo);\n target.put(\"targetType\", targetType)\n logEventFields.put(\"target\", target);\n \n var artifacts = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewSubInstance(\"artifacts\");\n artifacts.put(\"policyName\", \"onap.policies.apex.Simplecontrolloop2\");\n artifacts.put(\"policyVersion\", \"1.0.0\");\n var component = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"component\").createNewInstance();\n component.put(\"artifacts\", artifacts);\n component.put(\"name\", \"Policy\")\n component.put(\"flavour\", \"Apex-PDP\")\n component.put(\"timestamp\", timestamp)\n component.put(\"status\", status)\n component.put(\"message\", message)\n logEventFields.put(\"component\", component);\n \n var otherFieldsEntry = executor.subject.getOutFieldSchemaHelper(\"SimpleCL_LogEvent\", \"otherFields\").createNewInstance();\n otherFieldsEntry.put(\"useCaseName\", \"simple-controlloop-usecase\");\n logEventFields.put(\"otherFields\", otherFieldsEntry);\n \n return logEventFields;\n}" - } - } - } - ] - } - }, - "events": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Events", - "version": "0.0.1" - }, - "eventMap": { - "entry": [ - { - "key": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "requestError", - "value": { - "key": "requestError", - "fieldSchemaKey": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - }, - "toscaPolicyState": "EXIT_FAILURE" - }, - { - "key": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "AAI", - "parameter": { - "entry": [ - { - "key": "aaifield", - "value": { - "key": "aaifield", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "equip-model", - "value": { - "key": "equip-model", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "equip-type", - "value": { - "key": "equip-type", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "equip-vendor", - "value": { - "key": "equip-vendor", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "frame-id", - "value": { - "key": "frame-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "in-maint", - "value": { - "key": "in-maint", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "ipaddress-v4-oam", - "value": { - "key": "ipaddress-v4-oam", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "nf-role", - "value": { - "key": "nf-role", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "pnf-ipv4-address", - "value": { - "key": "pnf-ipv4-address", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "pnf-name", - "value": { - "key": "pnf-name", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "resource-version", - "value": { - "key": "resource-version", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_SUCCESS" - } - }, - { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "component", - "value": { - "key": "component", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "id", - "value": { - "key": "id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "otherFields", - "value": { - "key": "otherFields", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "target", - "value": { - "key": "target", - "fieldSchemaKey": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_VesEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.simplecontrolloop", - "source": "DCAE", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "event", - "value": { - "key": "event", - "fieldSchemaKey": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "ENTRY" - } - } - ] - } - }, - "albums": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Albums", - "version": "0.0.1" - }, - "albums": { - "entry": [ - { - "key": { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_EventDetailsAlbum", - "version": "0.0.1" - }, - "scope": "policy", - "isWritable": true, - "itemSchema": { - "name": "SimpleCL_EventDetailsAlbumType", - "version": "0.0.1" - } - } - } - ] - } - }, - "schemas": { - "key": { - "name": "onap.policies.apex.Simplecontrolloop2_Schemas", - "version": "0.0.1" - }, - "schemas": { - "entry": [ - { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Boolean" - } - }, - { - "key": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_AAIRequestErrorType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"AAIRequestErrorType\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"serviceException\",\n \"type\": {\n \"name\": \"serviceException\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"messageId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n },\n {\n \"name\": \"variables\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSActionIdentifiers_Type\",\n \"fields\": [\n {\n \"name\": \"actionName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blueprintName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blueprintVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyRequestPayloadType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"map\",\n \"values\": {\n \"type\": \"record\",\n \"name\": \"CDSConfigModifyRequestPayloadEntry\",\n \"fields\": [\n {\n \"name\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"IP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pnfName\",\n \"type\": \"string\"\n }\n ]\n }\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"CDSConfigResponsePayloadEntry\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"update_DasH_config_DasH_response\",\n \"type\": {\n \"name\": \"update_DasH_config_DasH_response\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"execute_DasH_command_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n },\n {\n \"name\": \"prepare_DasH_environment_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseStatus_Type\",\n \"fields\": [\n {\n \"name\": \"code\",\n \"type\": \"int\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"errorMessage\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSRequestCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseStatus_Type\",\n \"fields\": [\n {\n \"name\": \"code\",\n \"type\": \"int\"\n },\n {\n \"name\": \"eventType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_EventDetailsAlbumType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_EventDetailsAlbumType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"eventDetails\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"commonEventHeader\",\n \"type\": {\n \"name\": \"commonEventHeader\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"domain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"priority\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingEntityName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sequence\",\n \"type\": \"int\"\n },\n {\n \"name\": \"sourceId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sourceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"timeZoneOffset\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"internalHeaderFields\",\n \"type\": {\n \"name\": \"internalHeaderFields\",\n \"type\": \"record\",\n \"fields\": []\n }\n },\n {\n \"name\": \"vesEventListenerVersion\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"otherFields\",\n \"type\": {\n \"name\": \"otherFields\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"hashMap\",\n \"type\": {\n \"name\": \"hashMap\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pnfName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pnfId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ip\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"otherFieldsVersion\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"target\",\n \"type\": {\n \"name\": \"target\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"targetType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"entityInfo\",\n \"type\": {\n \"name\": \"entityInfo\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n }\n },\n {\n \"name\": \"generatedHostname\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventComponentType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"component\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"flavour\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"long\"\n },\n {\n \"name\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"artifacts\",\n \"type\": {\n \"name\": \"artifacts\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"policyName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"policyVersion\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n }" - } - }, - { - "key": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventOtherFieldsType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"otherFields\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"useCaseName\",\n \"type\": \"string\"\n }\n ]\n }" - } - }, - { - "key": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_LogEventTargetType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"target\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"targetType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"entityInfo\",\n \"type\": {\n \"name\": \"entityInfo\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"pnf_DasH_name\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n }" - } - }, - { - "key": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleCL_VesEventType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\":\"event\",\n \"type\":\"record\",\n \"fields\":[\n {\n \"name\":\"commonEventHeader\",\n \"type\":{\n \"name\":\"commonEventHeader\",\n \"type\":\"record\",\n \"fields\":[\n {\n \"name\":\"domain\",\n \"type\":\"string\"\n },\n {\n \"name\":\"eventId\",\n \"type\":\"string\"\n },\n {\n \"name\":\"eventName\",\n \"type\":\"string\"\n },\n {\n \"name\":\"lastEpochMicrosec\",\n \"type\":\"long\"\n },\n {\n \"name\":\"priority\",\n \"type\":\"string\"\n },\n {\n \"name\":\"reportingEntityName\",\n \"type\":\"string\"\n },\n {\n \"name\":\"sequence\",\n \"type\":\"int\"\n },\n {\n \"name\":\"sourceId\",\n \"type\":\"string\"\n },\n {\n \"name\":\"sourceName\",\n \"type\":\"string\"\n },\n {\n \"name\":\"startEpochMicrosec\",\n \"type\":\"long\"\n },\n {\n \"name\":\"version\",\n \"type\":\"string\"\n },\n {\n \"name\":\"internalHeaderFields\",\n \"type\":{\n \"name\":\"internalHeaderFields\",\n \"type\":\"record\",\n \"fields\":[\n\n ]\n }\n },\n {\n \"name\":\"vesEventListenerVersion\",\n \"type\":\"string\"\n }\n ]\n }\n },\n {\n \"name\":\"otherFields\",\n \"type\":{\n \"name\":\"otherFields\",\n \"type\":\"record\",\n \"fields\":[\n {\n \"name\":\"hashMap\",\n \"type\":{\n \"name\":\"hashMap\",\n \"type\":\"record\",\n \"fields\":[\n {\n \"name\":\"hostname\",\n \"type\":\"string\"\n },\n {\n \"name\":\"pnfName\",\n \"type\":\"string\"\n },\n {\n \"name\":\"pnfId\",\n \"type\":\"string\"\n },\n {\n \"name\":\"ip\",\n \"type\":\"string\"\n }\n ]\n }\n },\n {\n \"name\":\"otherFieldsVersion\",\n \"type\":\"string\"\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Long" - } - }, - { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.String" - } - } - ] - } - } - } - } - } - } - } -} diff --git a/csit/apex-pdp/tests/data/onap.policies.apex.pnf.Test.json b/csit/apex-pdp/tests/data/onap.policies.apex.pnf.Test.json deleted file mode 100644 index 05522936..00000000 --- a/csit/apex-pdp/tests/data/onap.policies.apex.pnf.Test.json +++ /dev/null @@ -1,2896 +0,0 @@ -{ - "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/csit/apex-pdp/tests/data/onap.policies.apex.pnf.metadataSet.Test.json b/csit/apex-pdp/tests/data/onap.policies.apex.pnf.metadataSet.Test.json deleted file mode 100644 index 20338fff..00000000 --- a/csit/apex-pdp/tests/data/onap.policies.apex.pnf.metadataSet.Test.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "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/csit/apex-pdp/tests/data/onap.policies.apex.vnf.Test.json b/csit/apex-pdp/tests/data/onap.policies.apex.vnf.Test.json deleted file mode 100644 index 7886f84b..00000000 --- a/csit/apex-pdp/tests/data/onap.policies.apex.vnf.Test.json +++ /dev/null @@ -1,3198 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "topology_template": { - "policies": [ - { - "onap.policies.apex.vnf.Test": { - "type": "onap.policies.native.Apex", - "type_version": "1.0.0", - "name": "onap.policies.apex.vnf.Test", - "version": "1.0.0", - "properties": { - "engineServiceParameters": { - "name": "NSOApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 5, - "deploymentPort": 12561, - "engineParameters": { - "executorParameters": { - "JAVASCRIPT": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" - } - }, - "contextParameters": { - "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", - "schemaParameters": { - "Avro": { - "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters" - } - } - }, - "taskParameters": [ - { - "key": "logUrl", - "value": "http://message-router:3904/events/APEX-CL-MGT" - } - ] - }, - "policy_type_impl": { - "apexPolicyModel": { - "key": { - "name": "onap.policies.apex.Example", - "version": "0.0.1" - }, - "keyInformation": { - "key": { - "name": "onap.policies.apex.Example_KeyInfo", - "version": "0.0.1" - }, - "keyInfoMap": { - "entry": [ - { - "key": { - "name": "ApexExample_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "UUID": "fc0c1892-a2ae-3678-818f-b9b23939b241", - "description": "Generated description for concept referred to by key \"ApexExample_AAIFailureResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_AAIFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "ba931e7e-aee9-3af8-98d8-16b92a909e8a", - "description": "Generated description for concept referred to by key \"ApexExample_AAIFailureResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "UUID": "b4dd59c5-0169-3810-800c-1396c2206de4", - "description": "Generated description for concept referred to by key \"ApexExample_AAIRequestErrorType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_AAIRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIRequestEvent", - "version": "0.0.1" - }, - "UUID": "599c297e-96c8-3b21-ad1c-e643bddeacbf", - "description": "Generated description for concept referred to by key \"ApexExample_AAIRequestEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "UUID": "b5e3f122-2dcd-3cdf-a0ec-8210b3f80478", - "description": "Generated description for concept referred to by key \"ApexExample_AAISuccessResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_AAISuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAISuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "15504e23-78c5-305e-9fce-cf1f50e75013", - "description": "Generated description for concept referred to by key \"ApexExample_AAISuccessResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "UUID": "e2715e7d-835e-32c7-b433-a2e92bcad6ee", - "description": "Generated description for concept referred to by key \"ApexExample_CDSActionIdentifiersType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "UUID": "b492e841-2c03-36a9-9ec2-dda5852152c3", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "ef4e45f4-1181-3121-a3b6-507126df25e7", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "UUID": "91cb711a-0c73-3f51-83e6-fca9c547c71d", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyFailureResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "UUID": "dda3c648-dc8b-38e0-855d-9cb72397f957", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyRequestEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "UUID": "96b306bd-6dee-3d47-981c-eaac316d5ae1", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifyResponsePayloadType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "UUID": "1b65abfb-ce35-3765-9b9c-d2ee02bef28b", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "4dac3de7-3817-396f-91d6-ce701d162877", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "UUID": "92dc9e6b-2082-3d90-ba5e-f2dba18b72b6", - "description": "Generated description for concept referred to by key \"ApexExample_CDSConfigModifySuccessResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "a6801c93-f15b-3158-ba33-7760197d3609", - "description": "Generated description for concept referred to by key \"ApexExample_CDSFailureResponseCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "UUID": "e2da0a15-c542-3e77-874d-4512e9b4162e", - "description": "Generated description for concept referred to by key \"ApexExample_CDSFailureResponseStatusType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "f54edff0-532f-3142-8e65-a5c9d67888ef", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRequestCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "UUID": "b967dc44-a156-32d3-a796-f03dbf74316c", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRequestPayloadType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartFailureResponseEvent", - "version": "0.0.1" - }, - "UUID": "f2aa4552-069d-3db8-8638-2d1f59124e7a", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "c2e3b07f-2c09-3195-9527-6b3ab0666d61", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "UUID": "a7c28cc1-9fe5-30b7-9dd8-5a4f7f7d811e", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartFailureResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartRequestEvent", - "version": "0.0.1" - }, - "UUID": "d01d1022-48ac-391d-904d-282ccb063f8a", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartRequestEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "UUID": "ad8cbd94-6eb5-3743-8a7d-42cbe49a5320", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartResponsePayloadType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseEvent", - "version": "0.0.1" - }, - "UUID": "bbb06330-9161-392e-a0ca-a6bb5e3376af", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "70c6c6e5-00da-30cb-8ec0-14437d657f39", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "UUID": "77f16151-80b5-304c-a448-19d8528feed1", - "description": "Generated description for concept referred to by key \"ApexExample_CDSRestartSuccessResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "UUID": "2f17aee2-fbdf-3c41-a779-f9c17b5bda5b", - "description": "Generated description for concept referred to by key \"ApexExample_CDSSuccessResponseCommonHeaderType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "UUID": "8c554852-3ed6-3027-a0d3-fccd2db19875", - "description": "Generated description for concept referred to by key \"ApexExample_CDSSuccessResponseStatusType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - }, - "UUID": "b402baca-915b-3952-97fc-d9899f9ca81c", - "description": "Generated description for concept referred to by key \"ApexExample_EventDetailsAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_EventDetailsAlbumType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_EventDetailsAlbumType", - "version": "0.0.1" - }, - "UUID": "3626f32a-eee6-3254-b3d4-e4829518c381", - "description": "Generated description for concept referred to by key \"ApexExample_EventDetailsAlbumType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "UUID": "87abb453-a919-3131-8ffb-3e5c910c6049", - "description": "Generated description for concept referred to by key \"ApexExample_HandleAAIFailureResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "UUID": "8881e644-3cca-3aec-8201-312ca6f719e0", - "description": "Generated description for concept referred to by key \"ApexExample_HandleAAISuccessResponseTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "UUID": "057f6ddd-d6aa-3ce2-a060-d344de16d7f3", - "description": "Generated description for concept referred to by key \"ApexExample_HandleVesEventTask:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "UUID": "4867b1e7-a819-3b9f-be2b-a97fe6019827", - "description": "Generated description for concept referred to by key \"ApexExample_LogStatusEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_VesEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VesEvent", - "version": "0.0.1" - }, - "UUID": "975b3071-b775-3617-a888-f831fe5a31db", - "description": "Generated description for concept referred to by key \"ApexExample_VesEvent:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_VesEventHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VesEventHandlerPolicy", - "version": "0.0.1" - }, - "UUID": "ad9efe17-a03e-3b64-8e8a-51e144f57d2c", - "description": "Generated description for concept referred to by key \"ApexExample_VesEventHandlerPolicy:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "UUID": "0054393c-10df-3214-af86-cb04a23325bf", - "description": "Generated description for concept referred to by key \"ApexExample_VesEventType:0.0.1\"" - } - }, - { - "key": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "UUID": "865a5903-201b-34ff-918b-2bfdde743576", - "description": "Generated description for concept referred to by key \"ApexExample_VnfRelationShipListType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae", - "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574", - "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\"" - } - }, - { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af", - "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example", - "version": "0.0.1" - }, - "UUID": "b2501730-8870-3475-b22a-4a4d22792ebb", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_Albums", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_Albums", - "version": "0.0.1" - }, - "UUID": "7dc5f49d-c291-38de-bcae-1db30d00581f", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Albums:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_Events", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_Events", - "version": "0.0.1" - }, - "UUID": "06b3112b-ae8b-3f37-8aa6-f539c0250550", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Events:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_KeyInfo", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_KeyInfo", - "version": "0.0.1" - }, - "UUID": "454848e1-43ac-3ce4-bfdc-b9b6271dc563", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_KeyInfo:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_Policies", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_Policies", - "version": "0.0.1" - }, - "UUID": "24c3fca5-b0dd-398c-83ee-66a187296b32", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Policies:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_Schemas", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_Schemas", - "version": "0.0.1" - }, - "UUID": "c6aff774-f50a-329d-a731-9c23a6e7e02e", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Schemas:0.0.1\"" - } - }, - { - "key": { - "name": "onap.policies.apex.Example_Tasks", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "onap.policies.apex.Example_Tasks", - "version": "0.0.1" - }, - "UUID": "f856a6df-6237-3acc-aa68-f55e64cc0ec9", - "description": "Generated description for concept referred to by key \"onap.policies.apex.Example_Tasks:0.0.1\"" - } - } - ] - } - }, - "policies": { - "key": { - "name": "onap.policies.apex.Example_Policies", - "version": "0.0.1" - }, - "policyMap": { - "entry": [ - { - "key": { - "name": "ApexExample_AAIFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_AAIFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_ReceiveAAIFailureResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_ReceiveAAIFailureResponseState" - }, - "trigger": { - "name": "ApexExample_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_AAIFailureStateOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState", - "localName": "ApexExample_AAIFailureStateOutput" - }, - "outgoingEvent": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState", - "localName": "ApexExample_AAIFailureResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_AAIFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAIFailureResponseState", - "localName": "ApexExample_AAIFailureStateOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_ReceiveAAIFailureResponseState" - } - }, - { - "key": { - "name": "ApexExample_AAISuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_AAISuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_ReceiveAAISuccessResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_ReceiveAAISuccessResponseState" - }, - "trigger": { - "name": "ApexExample_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_AAISuccessStateOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState", - "localName": "ApexExample_AAISuccessStateOutput" - }, - "outgoingEvent": { - "name": "ApexExample_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState", - "localName": "ApexExample_AAISuccessResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_AAISuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveAAISuccessResponseState", - "localName": "ApexExample_AAISuccessStateOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_ReceiveAAISuccessResponseState" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_CDSConfigModifyFailureResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_CDSConfigModifyFailureResponseState" - }, - "trigger": { - "name": "ApexExample_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_ConfigModifyFailureResponseOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState", - "localName": "ApexExample_ConfigModifyFailureResponseOutput" - }, - "outgoingEvent": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState", - "localName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_CDSConfigModifyFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifyFailureResponseState", - "localName": "ApexExample_ConfigModifyFailureResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_CDSConfigModifyFailureResponseState" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_CDSConfigModifySuccessResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_CDSConfigModifySuccessResponseState" - }, - "trigger": { - "name": "ApexExample_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_ConfigModifySuccessResponseOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState", - "localName": "ApexExample_ConfigModifySuccessResponseOutput" - }, - "outgoingEvent": { - "name": "ApexExample_CDSRestartRequestEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState", - "localName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_CDSConfigModifySuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSConfigModifySuccessResponseState", - "localName": "ApexExample_ConfigModifySuccessResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_CDSConfigModifySuccessResponseState" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_CDSRestartFailureResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_CDSRestartFailureResponseState" - }, - "trigger": { - "name": "ApexExample_CDSRestartFailureResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_RestartFailureResponseOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartFailureResponseState", - "localName": "ApexExample_RestartFailureResponseOutput" - }, - "outgoingEvent": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartFailureResponseState", - "localName": "ApexExample_CDSRestartFailureResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_CDSRestartFailureResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartFailureResponseState", - "localName": "ApexExample_RestartFailureResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_CDSRestartFailureResponseState" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_CDSRestartSuccessResponseState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_CDSRestartSuccessResponseState" - }, - "trigger": { - "name": "ApexExample_CDSRestartSuccessResponseEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_RestartSuccessResponseOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartSuccessResponseState", - "localName": "ApexExample_RestartSuccessResponseOutput" - }, - "outgoingEvent": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartSuccessResponseState", - "localName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_CDSRestartSuccessResponseHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_CDSRestartSuccessResponseState", - "localName": "ApexExample_RestartSuccessResponseOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_CDSRestartSuccessResponseState" - } - }, - { - "key": { - "name": "ApexExample_VesEventHandlerPolicy", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "ApexExample_VesEventHandlerPolicy", - "version": "0.0.1" - }, - "template": "Freestyle", - "state": { - "entry": [ - { - "key": "ApexExample_ReceiveVesState", - "value": { - "stateKey": { - "parentKeyName": "ApexExample_VesEventHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "ApexExample_ReceiveVesState" - }, - "trigger": { - "name": "ApexExample_VesEvent", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "ApexExample_VesOutput", - "value": { - "key": { - "parentKeyName": "ApexExample_VesEventHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveVesState", - "localName": "ApexExample_VesOutput" - }, - "outgoingEvent": { - "name": "ApexExample_AAIRequestEvent", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [], - "taskSelectionLogic": { - "key": "NULL", - "logicFlavour": "UNDEFINED", - "logic": "" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "ApexExample_VesEventHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveVesState", - "localName": "ApexExample_VesEventHandlerPolicy" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "ApexExample_VesEventHandlerPolicy", - "parentKeyVersion": "0.0.1", - "parentLocalName": "ApexExample_ReceiveVesState", - "localName": "ApexExample_VesOutput" - } - } - } - ] - } - } - } - ] - }, - "firstState": "ApexExample_ReceiveVesState" - } - } - ] - } - }, - "tasks": { - "key": { - "name": "onap.policies.apex.Example_Tasks", - "version": "0.0.1" - }, - "taskMap": { - "entry": [ - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "message", - "value": { - "key": "message", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nerrorMessage = errorMessage.replace(/\"/g, '\\\\\\\"')\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime());\nvar faultFields = eventDetailsAlbum.get(\"faultFields\");\nvar vnfDetails = eventDetailsAlbum.get(\"vnfDetails\");\nvar commonHeader = executor.subject.getOutFieldSchemaHelper(\"commonHeader\").createNewInstance();\ncommonHeader.put(\"subRequestId\", commonEventHeader.get(\"eventId\"));\ncommonHeader.put(\"requestId\", uuidType.randomUUID().toString());\ncommonHeader.put(\"originatorId\", \"POLICY\");\n\nvar actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"actionIdentifiers\").createNewInstance();\nactionIdentifiers.put(\"mode\", \"sync\");\nactionIdentifiers.put(\"blueprintName\", \"apex-example-cba\");\nactionIdentifiers.put(\"blueprintVersion\", \"1.0.0\");\nactionIdentifiers.put(\"actionName\", \"restart\");\n\nvar payloadProperties = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_properties_record\");\npayloadProperties.put(\"service_DasH_instance_DoT_service_DasH_instance_DasH_id\", vnfDetails.get(\"service-id\").toString())\npayloadProperties.put(\"generic_DasH_vnf_DoT_vnf_DasH_id\", vnfDetails.get(\"vnf-name\").toString())\nvar dataRecord = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_data_record\");\ndataRecord.put(\"active_DasH_streams\",\"7\")\npayloadProperties.put(\"data\", dataRecord)\nvar payloadEntry = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"CDSRequestPayloadEntry\");\npayloadEntry.put(\"update_DasH_properties\", payloadProperties)\npayloadEntry.put(\"vfStatus\", faultFields.get(\"vfStatus\"))\nvar payload = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewInstance();\npayload.put(\"restart_DasH_request\", payloadEntry);\n\nexecutor.outFields.put(\"commonHeader\", commonHeader);\nexecutor.outFields.put(\"actionIdentifiers\", actionIdentifiers);\nexecutor.outFields.put(\"payload\", payload);\n\nexecutor.logger.info(+executor.outFields);\n\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"SUCCESS\", \"ConfigModify request is successful. Sending restart request to CDS.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartFailureResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "message", - "value": { - "key": "message", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "message", - "value": { - "key": "message", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar timestamp = longType(new Date().getTime());\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_SUCCESS\", \"Successfully processed the VES Event. Restart is complete.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleAAIFailureResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "requestError", - "value": { - "key": "requestError", - "fieldSchemaKey": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "message", - "value": { - "key": "message", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\n\nvar aaiErrorMessage = \"AAI operation failed. Error message from AAI - \" + executor.inFields.get(\"requestError\").get(\"serviceException\").get(\"text\");\nvar timestamp = longType(new Date().getTime());\n\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + aaiErrorMessage)\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleAAISuccessResponseTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "in-maint", - "value": { - "key": "in-maint", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "is-closed-loop-disabled", - "value": { - "key": "is-closed-loop-disabled", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-customization-id", - "value": { - "key": "model-customization-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-invariant-id", - "value": { - "key": "model-invariant-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-version-id", - "value": { - "key": "model-version-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "orchestration-status", - "value": { - "key": "orchestration-status", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "prov-status", - "value": { - "key": "prov-status", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "relationship-list", - "value": { - "key": "relationship-list", - "fieldSchemaKey": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "resource-version", - "value": { - "key": "resource-version", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "service-id", - "value": { - "key": "service-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-id", - "value": { - "key": "vnf-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-name", - "value": { - "key": "vnf-name", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-type", - "value": { - "key": "vnf-type", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\n\nvar vnfDetails = executor.inFields;\nexecutor.logger.info(\"ApexExample_HandleAAISuccessResponseTask processing event - \" + vnfDetails);\neventDetailsAlbum.put(\"vnfDetails\", vnfDetails);\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar faultFields = eventDetailsAlbum.get(\"faultFields\");\n\nvar commonHeader = executor.subject.getOutFieldSchemaHelper(\"commonHeader\").createNewInstance();\ncommonHeader.put(\"subRequestId\", commonEventHeader.get(\"eventId\"));\ncommonHeader.put(\"requestId\", uuidType.randomUUID().toString());\ncommonHeader.put(\"originatorId\", \"POLICY\");\n\nvar actionIdentifiers = executor.subject.getOutFieldSchemaHelper(\"actionIdentifiers\").createNewInstance();\nactionIdentifiers.put(\"mode\", \"sync\");\nactionIdentifiers.put(\"blueprintName\", \"apex-example-cba\");\nactionIdentifiers.put(\"blueprintVersion\", \"1.0.0\");\nactionIdentifiers.put(\"actionName\", \"modify-config\");\n\nvar payloadProperties = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_properties_record\");\npayloadProperties.put(\"service_DasH_instance_DoT_service_DasH_instance_DasH_id\", vnfDetails.get(\"service-id\").toString())\npayloadProperties.put(\"generic_DasH_vnf_DoT_vnf_DasH_id\", vnfDetails.get(\"vnf-id\").toString())\nvar dataRecord = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"update_DasH_data_record\");\ndataRecord.put(\"active_DasH_streams\",\"7\")\npayloadProperties.put(\"data\", dataRecord)\nvar payloadEntry = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewSubInstance(\"CDSRequestPayloadEntry\");\npayloadEntry.put(\"update_DasH_properties\", payloadProperties)\npayloadEntry.put(\"vfStatus\", faultFields.get(\"vfStatus\"))\nvar payload = executor.subject.getOutFieldSchemaHelper(\"payload\").createNewInstance();\nvar payloadSchemaHelper = executor.subject.getOutFieldSchemaHelper(\"payload\");\npayload.put(\"modify_DasH_config_DasH_request\", payloadEntry);\n\n//always use the executor.stringify2json method instead of JSON.strngify\nexecutor.logger.info(\"CDS modify config request payload - \" + executor.stringify2Json(payload, payloadSchemaHelper));\n\nexecutor.outFields.put(\"commonHeader\", commonHeader);\nexecutor.outFields.put(\"actionIdentifiers\", actionIdentifiers);\nexecutor.outFields.put(\"payload\", payload);\nvar timestamp = longType(new Date().getTime());\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"SUCCESS\", \"VNF details are received from AAI successfully. Sending ConfigModify request to CDS.\")\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - }, - { - "key": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_HandleVesEventTask", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "event", - "value": { - "key": "event", - "fieldSchemaKey": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "aaifield", - "value": { - "key": "aaifield", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [] - }, - "contextAlbumReference": [ - { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "var uuidType = java.util.UUID;\nvar HashMapType = java.util.HashMap;\nvar longType = java.lang.Long;\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").getSchemaHelper().createNewInstance();\nvar returnValue = true;\n\nvar event = executor.inFields.get(\"event\");\nexecutor.logger.info(\"ApexExample_HandleVesEventTask processing VES event - \" + event);\n\nvar commonEventHeader = event.get(\"commonEventHeader\");\nvar faultFields = event.get(\"faultFields\");\n\n//albumID will be used to fetch info from our album later\nvar albumID = commonEventHeader.get(\"sourceId\");\n\n// save the event processing start time in apex\ncommonEventHeader.put(\"startEpochMicrosec\", longType(new Date().getTime()));\n//save the incoming fault event details to album\neventDetailsAlbum.put(\"commonEventHeader\", commonEventHeader)\neventDetailsAlbum.put(\"faultFields\", faultFields)\nexecutor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").put(albumID.toString(), eventDetailsAlbum);\n\nexecutor.getExecutionProperties().setProperty(\"albumId\", albumID);\nexecutor.getExecutionProperties().setProperty(\"vnf-name\", eventDetailsAlbum.get(\"commonEventHeader\").get(\"sourceName\"));\n\nvar timestamp = longType(new Date().getTime());\nsend(eventDetailsAlbum.get(\"commonEventHeader\").get(\"eventId\"), \"VNF\", eventDetailsAlbum.get(\"commonEventHeader\").get(\"sourceId\"), timestamp, \"ACTIVE\", \"VES event has been received. Going to fetch VNF details from AAI.\")\n\nexecutor.logger.info(executor.outFields);\nreturnValue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}" - } - } - } - ] - } - }, - "events": { - "key": { - "name": "onap.policies.apex.Example_Events", - "version": "0.0.1" - }, - "eventMap": { - "entry": [ - { - "key": { - "name": "ApexExample_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "requestError", - "value": { - "key": "requestError", - "fieldSchemaKey": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - } - }, - { - "key": { - "name": "ApexExample_AAIRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "APEX", - "target": "AAI", - "parameter": { - "entry": [ - { - "key": "aaifield", - "value": { - "key": "aaifield", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAISuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "AAI", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "in-maint", - "value": { - "key": "in-maint", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "is-closed-loop-disabled", - "value": { - "key": "is-closed-loop-disabled", - "fieldSchemaKey": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-customization-id", - "value": { - "key": "model-customization-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-invariant-id", - "value": { - "key": "model-invariant-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "model-version-id", - "value": { - "key": "model-version-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "orchestration-status", - "value": { - "key": "orchestration-status", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "prov-status", - "value": { - "key": "prov-status", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "relationship-list", - "value": { - "key": "relationship-list", - "fieldSchemaKey": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "resource-version", - "value": { - "key": "resource-version", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "service-id", - "value": { - "key": "service-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-id", - "value": { - "key": "vnf-id", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-name", - "value": { - "key": "vnf-name", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "vnf-type", - "value": { - "key": "vnf-type", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "APEX", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifySuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartFailureResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartFailureResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_FAILURE" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartRequestEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartRequestEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "APEX", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartSuccessResponseEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "CDS", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "actionIdentifiers", - "value": { - "key": "actionIdentifiers", - "fieldSchemaKey": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "commonHeader", - "value": { - "key": "commonHeader", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "payload", - "value": { - "key": "payload", - "fieldSchemaKey": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "status", - "value": { - "key": "status", - "fieldSchemaKey": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "EXIT_SUCCESS" - } - }, - { - "key": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_LogStatusEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "APEX", - "target": "DCAE", - "parameter": { - "entry": [ - { - "key": "message", - "value": { - "key": "message", - "fieldSchemaKey": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "" - } - }, - { - "key": { - "name": "ApexExample_VesEvent", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VesEvent", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.example", - "source": "DCAE", - "target": "APEX", - "parameter": { - "entry": [ - { - "key": "event", - "value": { - "key": "event", - "fieldSchemaKey": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "toscaPolicyState": "ENTRY" - } - } - ] - } - }, - "albums": { - "key": { - "name": "onap.policies.apex.Example_Albums", - "version": "0.0.1" - }, - "albums": { - "entry": [ - { - "key": { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_EventDetailsAlbum", - "version": "0.0.1" - }, - "scope": "policy", - "isWritable": true, - "itemSchema": { - "name": "ApexExample_EventDetailsAlbumType", - "version": "0.0.1" - } - } - } - ] - } - }, - "schemas": { - "key": { - "name": "onap.policies.apex.Example_Schemas", - "version": "0.0.1" - }, - "schemas": { - "entry": [ - { - "key": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_AAIRequestErrorType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"AAIRequestErrorType\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"serviceException\",\n \"type\": {\n \"name\": \"serviceException\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"messageId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n },\n {\n \"name\": \"variables\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSActionIdentifiersType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSActionIdentifiers_Type\",\n \"fields\": [\n {\n \"name\": \"actionName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blueprintName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blueprintVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSConfigModifyResponsePayloadType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"CDSConfigResponsePayloadEntry\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"modify_DasH_config_DasH_response\",\n \"type\": {\n \"name\": \"modify_DasH_config_DasH_response\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"execute_DasH_command_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n },\n {\n \"name\": \"prepare_DasH_environment_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSFailureResponseCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSFailureResponseStatusType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseStatus_Type\",\n \"fields\": [\n {\n \"name\": \"code\",\n \"type\": \"int\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"errorMessage\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRequestCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSRequestCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRequestPayloadType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"map\",\n \"values\": {\n \"type\": \"record\",\n \"name\": \"CDSRequestPayloadEntry\",\n \"fields\": [\n {\n \"name\": \"vfStatus\",\n \"type\": \"string\"\n },\n {\n \"name\": \"update_DasH_properties\",\n \"type\": {\n \"name\": \"update_DasH_properties_record\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"service_DasH_instance_DoT_service_DasH_instance_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"generic_DasH_vnf_DoT_vnf_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"type\": {\n \"name\": \"update_DasH_data_record\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"active_DasH_streams\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n }\n }\n ]\n }\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSRestartResponsePayloadType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"CDSRestartResponsePayloadEntry\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"restart_DasH_response\",\n \"type\": {\n \"name\": \"restart_DasH_response\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"execute_DasH_command_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n },\n {\n \"name\": \"prepare_DasH_environment_DasH_logs\",\n \"type\": {\n \"type\": \"array\",\n \"items\": \"string\"\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSSuccessResponseCommonHeaderType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseCommonHeader_Type\",\n \"fields\": [\n {\n \"name\": \"originatorId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subRequestId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_CDSSuccessResponseStatusType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"type\": \"record\",\n \"name\": \"CDSResponseStatus_Type\",\n \"fields\": [\n {\n \"name\": \"code\",\n \"type\": \"int\"\n },\n {\n \"name\": \"eventType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"type\": \"string\"\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_EventDetailsAlbumType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_EventDetailsAlbumType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"eventDetails\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"commonEventHeader\",\n \"type\": {\n \"name\": \"commonEventHeader\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"domain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"priority\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingEntityName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sequence\",\n \"type\": \"int\"\n },\n {\n \"name\": \"sourceId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sourceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"timeZoneOffset\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vesEventListenerVersion\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"faultFields\",\n \"type\": {\n \"name\": \"faultFields\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"alarmAdditionalInformation\",\n \"type\": {\n \"name\": \"alarmAdditionalInformation\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"PilotNumberPoolSize\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"alarmCondition\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventSeverity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventSourceType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"faultFieldsVersion\",\n \"type\": \"int\"\n },\n {\n \"name\": \"specificProblem\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vfStatus\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"vnfDetails\",\n \"type\": {\n \"name\": \"vnfDetails\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"vnf_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vnf_DasH_name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vnf_DasH_type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"prov_DasH_status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"orchestration_DasH_status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"in_DasH_maint\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"is_DasH_closed_DasH_loop_DasH_disabled\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"resource_DasH_version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"model_DasH_invariant_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"model_DasH_version_DasH_id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"model_DasH_customization_DasH_id\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"target\",\n \"type\": {\n \"name\": \"target\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"targetType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"entityInfo\",\n \"type\": {\n \"name\": \"entityInfo\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VesEventType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"event\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"commonEventHeader\",\n \"type\": {\n \"name\": \"commonEventHeader\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"domain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"priority\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingEntityName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sequence\",\n \"type\": \"int\"\n },\n {\n \"name\": \"sourceId\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sourceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startEpochMicrosec\",\n \"type\": \"long\"\n },\n {\n \"name\": \"timeZoneOffset\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vesEventListenerVersion\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"faultFields\",\n \"type\": {\n \"name\": \"faultFields\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"alarmAdditionalInformation\",\n \"type\": {\n \"name\": \"alarmAdditionalInformation\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"PilotNumberPoolSize\",\n \"type\": \"string\"\n }\n ]\n }\n },\n {\n \"name\": \"alarmCondition\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventSeverity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"eventSourceType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"faultFieldsVersion\",\n \"type\": \"int\"\n },\n {\n \"name\": \"specificProblem\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vfStatus\",\n \"type\": \"string\"\n }\n ]\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ApexExample_VnfRelationShipListType", - "version": "0.0.1" - }, - "schemaFlavour": "Avro", - "schemaDefinition": "{\n \"name\": \"VnfRelationShipListType\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"relationship\",\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"relationship_record\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"related_DasH_to\",\n \"type\": \"string\"\n },\n {\n \"name\": \"relationship_DasH_label\",\n \"type\": \"string\"\n },\n {\n \"name\": \"related_DasH_link\",\n \"type\": \"string\"\n },\n {\n \"name\": \"relationship_DasH_data\",\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"relationship_DasH_data_record\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"relationship_DasH_key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"relationship_DasH_value\",\n \"type\": \"string\"\n }\n ]\n }\n }\n },\n {\n \"name\": \"related_DasH_to_DasH_property\",\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"name\": \"related_DasH_to_DasH_property_record\",\n \"type\": \"record\",\n \"fields\": [\n {\n \"name\": \"property_DasH_key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"property_DasH_value\",\n \"type\": \"string\"\n }\n ]\n }\n }\n }\n ]\n }\n }\n }\n ]\n}" - } - }, - { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleBooleanType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Boolean" - } - }, - { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleLongType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Long" - } - }, - { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SimpleStringType", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.String" - } - } - ] - } - } - } - } - }, - "eventInputParameters": { - "ApexExample_DCAEConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTCLIENT", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", - "parameters": { - "url": "http://message-router:3904/events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT/ApexExampleCG1/1?timeout=30000" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventName": "ApexExample_VesEvent" - }, - "ApexExample_AAIResponseConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters", - "parameters": { - "url": "http://aai-sim:6666/aai/v16/network/generic-vnfs/generic-vnf?vnf-name={vnf-name}", - "httpMethod": "GET", - "httpCodeFilter": "[245][0-9][0-9]", - "httpHeaders": [ - [ - "Accept", - "application/json" - ], - [ - "Content-Type", - "application/json" - ], - [ - "X-FromAppId", - "dcae-curl" - ], - [ - "x-transactionId", - "9998" - ], - [ - "Authorization", - "Basic QUFJOkFBSQ==" - ] - ] - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventName": "ApexExample_AAISuccessResponseEvent|ApexExample_AAIFailureResponseEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_AAIProducer", - "requestorTimeout": 2000 - }, - "ApexExample_CDSConfigModifyResponseConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "GRPC", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventName": "ApexExample_CDSConfigModifySuccessResponseEvent|ApexExample_CDSConfigModifyFailureResponseEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_CDSConfigModifyRequestProducer", - "requestorTimeout": 500 - }, - "ApexExample_CDSRestartResponseConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "GRPC", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventName": "ApexExample_CDSRestartSuccessResponseEvent|ApexExample_CDSRestartFailureResponseEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_CDSRestartRequestProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "ApexExample_AAIProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "ApexExample_AAIRequestEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_AAIResponseConsumer", - "requestorTimeout": 2000 - }, - "ApexExample_CDSConfigModifyRequestProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "GRPC", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters", - "parameters": { - "host": "grpc-sim", - "port": 6680, - "username": "ccsdkapps", - "password": "ccsdkapps", - "timeout": 10 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "ApexExample_CDSConfigModifyRequestEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_CDSConfigModifyResponseConsumer", - "requestorTimeout": 500 - }, - "ApexExample_CDSRestartRequestProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "GRPC", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters", - "parameters": { - "host": "grpc-sim", - "port": 6680, - "username": "ccsdkapps", - "password": "ccsdkapps", - "timeout": 10 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "ApexExample_CDSRestartRequestEvent", - "requestorMode": true, - "requestorPeer": "ApexExample_CDSRestartResponseConsumer", - "requestorTimeout": 500 - } - } - } - } - } - ] - } -} diff --git a/csit/apex-pdp/tests/data/onap.policies.native.apex.Sampledomain.json b/csit/apex-pdp/tests/data/onap.policies.native.apex.Sampledomain.json deleted file mode 100644 index d90ae08d..00000000 --- a/csit/apex-pdp/tests/data/onap.policies.native.apex.Sampledomain.json +++ /dev/null @@ -1,7436 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "topology_template": { - "policies": [ - { - "onap.policies.native.apex.Sampledomain": { - "type": "onap.policies.native.Apex", - "type_version": "1.0.0", - "version": "1.0.0", - "name": "onap.policies.native.apex.Sampledomain", - "properties": { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policy_type_impl": { - "apexPolicyModel": { - "key": { - "name": "SamplePolicyModelJAVASCRIPT", - "version": "0.0.1" - }, - "keyInformation": { - "key": { - "name": "KeyInformation", - "version": "0.0.1" - }, - "keyInfoMap": { - "entry": [ - { - "key": { - "name": "Context", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Context", - "version": "0.0.1" - }, - "UUID": "ca36bfd8-6042-3633-8c85-89c66507c3bf", - "description": "Generated description for concept referred to by key \"Context:0.0.1\"" - } - }, - { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "UUID": "465a81cc-885f-3a4d-bc4e-1508da92b236", - "description": "Generated description for concept referred to by key \"Event0000:0.0.1\"" - } - }, - { - "key": { - "name": "Event0001", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0001", - "version": "0.0.1" - }, - "UUID": "36b2d570-fff7-3a4b-bab2-6bf492f5129a", - "description": "Generated description for concept referred to by key \"Event0001:0.0.1\"" - } - }, - { - "key": { - "name": "Event0002", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0002", - "version": "0.0.1" - }, - "UUID": "ff6160a7-fb5e-379c-a6d2-2cd28053eacf", - "description": "Generated description for concept referred to by key \"Event0002:0.0.1\"" - } - }, - { - "key": { - "name": "Event0003", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0003", - "version": "0.0.1" - }, - "UUID": "5899e216-2abf-3781-abc4-2c257b92721e", - "description": "Generated description for concept referred to by key \"Event0003:0.0.1\"" - } - }, - { - "key": { - "name": "Event0004", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0004", - "version": "0.0.1" - }, - "UUID": "7c2692a7-4587-3d09-abf9-d96b339a316f", - "description": "Generated description for concept referred to by key \"Event0004:0.0.1\"" - } - }, - { - "key": { - "name": "Event0100", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0100", - "version": "0.0.1" - }, - "UUID": "b696048c-c0b0-34c1-8dbe-32ab6c8bc0c7", - "description": "Generated description for concept referred to by key \"Event0100:0.0.1\"" - } - }, - { - "key": { - "name": "Event0101", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0101", - "version": "0.0.1" - }, - "UUID": "edbfa868-2ab2-30fd-8078-4c7f67ca6122", - "description": "Generated description for concept referred to by key \"Event0101:0.0.1\"" - } - }, - { - "key": { - "name": "Event0102", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0102", - "version": "0.0.1" - }, - "UUID": "6b6ad2ff-ef63-3f7b-aabb-fba44f8de9d4", - "description": "Generated description for concept referred to by key \"Event0102:0.0.1\"" - } - }, - { - "key": { - "name": "Event0103", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0103", - "version": "0.0.1" - }, - "UUID": "c2550912-10d9-3000-8826-377288cd6cb1", - "description": "Generated description for concept referred to by key \"Event0103:0.0.1\"" - } - }, - { - "key": { - "name": "Event0104", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0104", - "version": "0.0.1" - }, - "UUID": "f6d75b71-c8a7-3337-a121-88d68c389f5a", - "description": "Generated description for concept referred to by key \"Event0104:0.0.1\"" - } - }, - { - "key": { - "name": "Events", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Events", - "version": "0.0.1" - }, - "UUID": "0215644c-4531-375c-8335-d558b4de8c03", - "description": "Generated description for concept referred to by key \"Events:0.0.1\"" - } - }, - { - "key": { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - "UUID": "976a79e7-5c80-3c03-9503-da3f41fec395", - "description": "Generated description for concept referred to by key \"ExternalContextAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - "UUID": "c95e9e5f-d2c7-3ac7-a205-ea3574530cb7", - "description": "Generated description for concept referred to by key \"GlobalContextAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "KeyInformation", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "KeyInformation", - "version": "0.0.1" - }, - "UUID": "1ff2f905-685c-3caf-95bc-0bbc90345888", - "description": "Generated description for concept referred to by key \"KeyInformation:0.0.1\"" - } - }, - { - "key": { - "name": "Policies", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policies", - "version": "0.0.1" - }, - "UUID": "f54c3b2b-be76-31c4-adfc-87c494c06808", - "description": "Generated description for concept referred to by key \"Policies:0.0.1\"" - } - }, - { - "key": { - "name": "Policy0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy0", - "version": "0.0.1" - }, - "UUID": "3410e939-30ca-32c4-a2d8-c30b6fee6eec", - "description": "Generated description for concept referred to by key \"Policy0:0.0.1\"" - } - }, - { - "key": { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - "UUID": "e27564c4-3cbf-3db2-9bf3-83ae80a2f907", - "description": "Generated description for concept referred to by key \"Policy0ContextAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "Policy1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy1", - "version": "0.0.1" - }, - "UUID": "d0b2b585-f344-33b8-af9e-250e7f4cfbce", - "description": "Generated description for concept referred to by key \"Policy1:0.0.1\"" - } - }, - { - "key": { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - }, - "UUID": "815d74ae-6fc0-3221-87b9-2bb1dfdfa7f0", - "description": "Generated description for concept referred to by key \"Policy1ContextAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "SamplePolicyModelJAVASCRIPT", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SamplePolicyModelJAVASCRIPT", - "version": "0.0.1" - }, - "UUID": "bc8ee312-81ce-3c4a-92d5-4a73b8077148", - "description": "Generated description for concept referred to by key \"SamplePolicyModelJAVASCRIPT:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "UUID": "0589ff20-adcc-3ce5-95fe-8d7978ed54ed", - "description": "Generated description for concept referred to by key \"Task_Act0:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "UUID": "095b126d-ca8b-32c9-ad52-d744e817a79c", - "description": "Generated description for concept referred to by key \"Task_Act1:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "UUID": "3d786b4c-d9ee-3367-ab71-c67271a4ea2f", - "description": "Generated description for concept referred to by key \"Task_Act2:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "UUID": "9231753e-20c5-3436-982f-9100340cc570", - "description": "Generated description for concept referred to by key \"Task_Act3:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "UUID": "502383d3-483f-3a56-a426-2f0406674c8d", - "description": "Generated description for concept referred to by key \"Task_Decide0:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "UUID": "16598106-41c8-3b5a-99c6-5fcf6d1a5ddf", - "description": "Generated description for concept referred to by key \"Task_Decide1:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "UUID": "ad3a89f5-e369-3c66-b22c-669f7b3653b8", - "description": "Generated description for concept referred to by key \"Task_Decide2:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "UUID": "56815939-1164-3867-9ed1-0a27ff8aafb3", - "description": "Generated description for concept referred to by key \"Task_Decide3:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "UUID": "0db0c566-ecd7-3e27-9865-4b82c893abdb", - "description": "Generated description for concept referred to by key \"Task_Establish0:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "UUID": "6944a4c1-6201-317c-8d7e-eaa7f2ee0ea0", - "description": "Generated description for concept referred to by key \"Task_Establish1:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "UUID": "0f766ea9-11cd-3e7d-a8c8-28c8dee6a85a", - "description": "Generated description for concept referred to by key \"Task_Establish2:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "UUID": "c3237a38-cc6d-3418-b1e1-0dc8b4bdcc66", - "description": "Generated description for concept referred to by key \"Task_Establish3:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "UUID": "051bcfd5-cf73-3c89-8ee7-ea6e005ec059", - "description": "Generated description for concept referred to by key \"Task_Match0:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "UUID": "3754fe19-98f2-34a1-9f45-db31052208d8", - "description": "Generated description for concept referred to by key \"Task_Match1:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "UUID": "8c200709-a180-3c8b-916f-275ff49ce194", - "description": "Generated description for concept referred to by key \"Task_Match2:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "UUID": "a1a879c6-4510-33b0-bbd0-ad6256189a37", - "description": "Generated description for concept referred to by key \"Task_Match3:0.0.1\"" - } - }, - { - "key": { - "name": "Tasks", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Tasks", - "version": "0.0.1" - }, - "UUID": "a7fab96b-ce1c-37ce-bbb2-556b6db524a5", - "description": "Generated description for concept referred to by key \"Tasks:0.0.1\"" - } - }, - { - "key": { - "name": "TestCase", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestCase", - "version": "0.0.1" - }, - "UUID": "0a652886-c88d-3f8c-8994-ae9161e7c963", - "description": "Generated description for concept referred to by key \"TestCase:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem000", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem000", - "version": "0.0.1" - }, - "UUID": "8efba9fa-371e-33df-a7d6-88b0284e7fd0", - "description": "Generated description for concept referred to by key \"TestContextItem000:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem001", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem001", - "version": "0.0.1" - }, - "UUID": "3740077c-a2b3-356b-81dc-5ded2118a951", - "description": "Generated description for concept referred to by key \"TestContextItem001:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem002", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem002", - "version": "0.0.1" - }, - "UUID": "b5c7df95-9af5-322f-9ea8-eb440a2bf926", - "description": "Generated description for concept referred to by key \"TestContextItem002:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem003", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem003", - "version": "0.0.1" - }, - "UUID": "b36f0aa5-0fb9-3e2c-8fa2-fddb7fd05f4b", - "description": "Generated description for concept referred to by key \"TestContextItem003:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem004", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem004", - "version": "0.0.1" - }, - "UUID": "093cda11-eaeb-3a46-a5b6-d5e30c00935b", - "description": "Generated description for concept referred to by key \"TestContextItem004:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem005", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem005", - "version": "0.0.1" - }, - "UUID": "569a758d-ba40-37c0-aebb-7ad138df25ac", - "description": "Generated description for concept referred to by key \"TestContextItem005:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem006", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem006", - "version": "0.0.1" - }, - "UUID": "252818d9-b61f-3962-a905-8865fb00fb04", - "description": "Generated description for concept referred to by key \"TestContextItem006:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem007", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem007", - "version": "0.0.1" - }, - "UUID": "fe1a5f7c-c083-377b-a797-752b01fc6c73", - "description": "Generated description for concept referred to by key \"TestContextItem007:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem008", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem008", - "version": "0.0.1" - }, - "UUID": "aa87d007-d07e-3f67-8c6d-0ebc3d85479d", - "description": "Generated description for concept referred to by key \"TestContextItem008:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem009", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem009", - "version": "0.0.1" - }, - "UUID": "126e7a3a-11b6-3f88-9397-c21d8819f859", - "description": "Generated description for concept referred to by key \"TestContextItem009:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem00A", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00A", - "version": "0.0.1" - }, - "UUID": "0e0e3dec-e03d-3379-a87b-1ecd4aa3d8cc", - "description": "Generated description for concept referred to by key \"TestContextItem00A:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem00B", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00B", - "version": "0.0.1" - }, - "UUID": "dbdc98df-3ff4-360c-b8d3-a7a836ac3de6", - "description": "Generated description for concept referred to by key \"TestContextItem00B:0.0.1\"" - } - }, - { - "key": { - "name": "TestContextItem00C", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00C", - "version": "0.0.1" - }, - "UUID": "32a2f355-77f3-3b25-ace6-7a9c5763a5ad", - "description": "Generated description for concept referred to by key \"TestContextItem00C:0.0.1\"" - } - }, - { - "key": { - "name": "TestDatatypes", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestDatatypes", - "version": "0.0.1" - }, - "UUID": "3f95472c-973e-30e2-95f1-bf00cbef909a", - "description": "Generated description for concept referred to by key \"TestDatatypes:0.0.1\"" - } - }, - { - "key": { - "name": "TestExternalContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestExternalContextItem", - "version": "0.0.1" - }, - "UUID": "610dbbd4-9149-3b3c-9af4-819056f0e169", - "description": "Generated description for concept referred to by key \"TestExternalContextItem:0.0.1\"" - } - }, - { - "key": { - "name": "TestGlobalContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestGlobalContextItem", - "version": "0.0.1" - }, - "UUID": "07fa8f68-55f1-3fd0-81c1-749a379753a7", - "description": "Generated description for concept referred to by key \"TestGlobalContextItem:0.0.1\"" - } - }, - { - "key": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - }, - "UUID": "d9c93cd1-539e-35c5-aaec-bb711ceb1251", - "description": "Generated description for concept referred to by key \"TestPolicyContextItem:0.0.1\"" - } - }, - { - "key": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "UUID": "683fe492-7eae-3ac7-9924-bb7850208d05", - "description": "Generated description for concept referred to by key \"TestSlogan:0.0.1\"" - } - }, - { - "key": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "UUID": "bba25b6f-e3cd-3060-9022-4ef3a79f8eb0", - "description": "Generated description for concept referred to by key \"TestTemperature:0.0.1\"" - } - }, - { - "key": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "UUID": "97b73937-c344-33c0-924c-4d26b6449564", - "description": "Generated description for concept referred to by key \"TestTimestamp:0.0.1\"" - } - } - ] - } - }, - "policies": { - "key": { - "name": "Policies", - "version": "0.0.1" - }, - "policyMap": { - "entry": [ - { - "key": { - "name": "Policy0", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "Policy0", - "version": "0.0.1" - }, - "template": "MEDA", - "state": { - "entry": [ - { - "key": "Act", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - }, - "trigger": { - "name": "Event0003", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Act_NULL", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - }, - "outgoingEvent": { - "name": "Event0004", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act0_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act1_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act2_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act3_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - } - ] - } - } - }, - { - "key": "Decide", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - }, - "trigger": { - "name": "Event0002", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Decide_Act", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - }, - "outgoingEvent": { - "name": "Event0003", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide0_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide1_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide2_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide3_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - } - ] - } - } - }, - { - "key": "Establish", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - }, - "trigger": { - "name": "Event0001", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Establish_Decide", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - }, - "outgoingEvent": { - "name": "Event0002", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish0_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish1_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish2_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish3_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - } - ] - } - } - }, - { - "key": "Match", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Match" - }, - "trigger": { - "name": "Event0000", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Match_Establish", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - }, - "outgoingEvent": { - "name": "Event0001", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match0_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match1_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match2_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match3_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - } - ] - } - } - } - ] - }, - "firstState": "Match" - } - }, - { - "key": { - "name": "Policy1", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "Policy1", - "version": "0.0.1" - }, - "template": "MEDA", - "state": { - "entry": [ - { - "key": "Act", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - }, - "trigger": { - "name": "Event0103", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Act_NULL", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - }, - "outgoingEvent": { - "name": "Event0104", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act0_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act1_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act2_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act3_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - } - ] - } - } - }, - { - "key": "Decide", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - }, - "trigger": { - "name": "Event0102", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Decide_Act", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - }, - "outgoingEvent": { - "name": "Event0103", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide0_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide1_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide2_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide3_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - } - ] - } - } - }, - { - "key": "Establish", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - }, - "trigger": { - "name": "Event0101", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Establish_Decide", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - }, - "outgoingEvent": { - "name": "Event0102", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish0_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish1_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish2_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish3_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - } - ] - } - } - }, - { - "key": "Match", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Match" - }, - "trigger": { - "name": "Event0100", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Match_Establish", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - }, - "outgoingEvent": { - "name": "Event0101", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\ntrue;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match0_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match1_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match2_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match3_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - } - ] - } - } - } - ] - }, - "firstState": "Match" - } - } - ] - } - }, - "tasks": { - "key": { - "name": "Tasks", - "version": "0.0.1" - }, - "taskMap": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Act1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Decide1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Establish1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Match1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "JAVASCRIPT", - "logic": "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = java.lang.Byte;\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = java.util.Date;\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\ntrue;" - } - } - } - ] - } - }, - "events": { - "key": { - "name": "Events", - "version": "0.0.1" - }, - "eventMap": { - "entry": [ - { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Outside", - "target": "Match", - "parameter": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0001", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0001", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Match", - "target": "Establish", - "parameter": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0002", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0002", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Establish", - "target": "Decide", - "parameter": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0003", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0003", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Decide", - "target": "Act", - "parameter": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0004", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0004", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Act", - "target": "Outside", - "parameter": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0100", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0100", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Outside", - "target": "Match", - "parameter": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0101", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0101", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Match", - "target": "Establish", - "parameter": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0102", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0102", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Establish", - "target": "Decide", - "parameter": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0103", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0103", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Decide", - "target": "Act", - "parameter": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - }, - { - "key": { - "name": "Event0104", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0104", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Act", - "target": "Outside", - "parameter": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "optional": false - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "optional": false - } - } - ] - } - } - } - ] - } - }, - "albums": { - "key": { - "name": "Context", - "version": "0.0.1" - }, - "albums": { - "entry": [ - { - "key": { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - "scope": "EXTERNAL", - "isWritable": false, - "itemSchema": { - "name": "TestExternalContextItem", - "version": "0.0.1" - } - } - }, - { - "key": { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - "scope": "GLOBAL", - "isWritable": true, - "itemSchema": { - "name": "TestGlobalContextItem", - "version": "0.0.1" - } - } - }, - { - "key": { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - "scope": "APPLICATION", - "isWritable": true, - "itemSchema": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - } - } - }, - { - "key": { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - }, - "scope": "APPLICATION", - "isWritable": true, - "itemSchema": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - } - } - } - ] - } - }, - "schemas": { - "key": { - "name": "TestDatatypes", - "version": "0.0.1" - }, - "schemas": { - "entry": [ - { - "key": { - "name": "TestCase", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestCase", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Byte" - } - }, - { - "key": { - "name": "TestContextItem000", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem000", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem000" - } - }, - { - "key": { - "name": "TestContextItem001", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem001", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem001" - } - }, - { - "key": { - "name": "TestContextItem002", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem002", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem002" - } - }, - { - "key": { - "name": "TestContextItem003", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem003", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem003" - } - }, - { - "key": { - "name": "TestContextItem004", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem004", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem004" - } - }, - { - "key": { - "name": "TestContextItem005", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem005", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem005" - } - }, - { - "key": { - "name": "TestContextItem006", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem006", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem006" - } - }, - { - "key": { - "name": "TestContextItem007", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem007", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem007" - } - }, - { - "key": { - "name": "TestContextItem008", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem008", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem008" - } - }, - { - "key": { - "name": "TestContextItem009", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem009", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem009" - } - }, - { - "key": { - "name": "TestContextItem00A", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00A", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00A" - } - }, - { - "key": { - "name": "TestContextItem00B", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00B", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00B" - } - }, - { - "key": { - "name": "TestContextItem00C", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestContextItem00C", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00C" - } - }, - { - "key": { - "name": "TestExternalContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestExternalContextItem", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestExternalContextItem" - } - }, - { - "key": { - "name": "TestGlobalContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestGlobalContextItem", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestGlobalContextItem" - } - }, - { - "key": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestPolicyContextItem", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestPolicyContextItem" - } - }, - { - "key": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestSlogan", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.String" - } - }, - { - "key": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestTemperature", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Double" - } - }, - { - "key": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "TestTimestamp", - "version": "0.0.1" - }, - "schemaFlavour": "Java", - "schemaDefinition": "java.lang.Long" - } - } - ] - } - } - } - }, - "engineParameters": { - "executorParameters": { - "JAVASCRIPT": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FirstConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTSERVER", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters", - "parameters": { - "standalone": true, - "host": "0.0.0.0", - "port": 23324 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "FirstProducer", - "synchronousTimeout": 2000 - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTSERVER", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "FirstConsumer", - "synchronousTimeout": 2000 - } - } - } - } - } - ] - } -} diff --git a/csit/apex-pdp/tests/data/policy_deploy.json b/csit/apex-pdp/tests/data/policy_deploy.json deleted file mode 100644 index e13f06ad..00000000 --- a/csit/apex-pdp/tests/data/policy_deploy.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "deploymentSubgroups": [ - { - "pdpType": "apex", - "action": "POST", - "policies": [{ - "name": "{policyName}", - "version": "1.0.0" - }] - } - ] - } - ] -} diff --git a/csit/api/plans/setup.sh b/csit/api/plans/setup.sh deleted file mode 100755 index 31d16836..00000000 --- a/csit/api/plans/setup.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -source "${SCRIPTS}"/get-versions.sh - -sudo apt-get -y install libxml2-utils -bash "${SCRIPTS}"/get-models-examples.sh - -DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies - -NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates - -# create a couple of variations of the policy definitions -sed -e 's!Measurement_vGMUX!ADifferentValue!' \ - ${DATA}/vCPE.policy.monitoring.input.tosca.json \ - >${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json - -sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \ - -e 's!"policy-version": 1!"policy-version": 2!' \ - ${DATA}/vCPE.policy.monitoring.input.tosca.json \ - >${DATA}/vCPE.policy.monitoring.input.tosca.v2.json - -echo "${POLICY_API_VERSION}" - -cd "${SCRIPTS}" -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d api grafana - -sleep 10 -unset http_proxy https_proxy - -POLICY_API_IP=$(get-instance-ip.sh policy-api) -POLICY_API_PORT=30440 -MARIADB_IP=$(get-instance-ip.sh mariadb) - -echo API IP IS "${POLICY_API_IP}" -echo MARIADB IP IS "${MARIADB_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "$POLICY_API_PORT" - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v NODETEMPLATES:${NODETEMPLATES}" \ No newline at end of file diff --git a/csit/api/plans/teardown.sh b/csit/api/plans/teardown.sh deleted file mode 100755 index 6f77caa4..00000000 --- a/csit/api/plans/teardown.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. -# Modifications copyright (c) 2022 Nordix Foundation. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/api/plans/testplan.txt b/csit/api/plans/testplan.txt deleted file mode 100644 index 9a731f89..00000000 --- a/csit/api/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -api-test.robot diff --git a/csit/api/tests/api-test.robot b/csit/api/tests/api-test.robot deleted file mode 100644 index 33848795..00000000 --- a/csit/api/tests/api-test.robot +++ /dev/null @@ -1,187 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Resource ${CURDIR}/../../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_PORT} ${auth} /policy/api/v1/ - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/statistics",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/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="/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="/policytypes",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{versionId}",} 3.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/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_PORT} ${url} 200 null ${auth} - [return] ${resp} - -DeleteReq - [Arguments] ${url} ${expectedstatus} - ${auth}= PolicyAdminAuth - ${resp}= PerformDeleteRequest ${POLICY_API_PORT} ${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_PORT} ${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/csit/api/tests/data/onap.policy.monitoring.tcagen2.v1.json b/csit/api/tests/data/onap.policy.monitoring.tcagen2.v1.json deleted file mode 100644 index a2e2ddc9..00000000 --- a/csit/api/tests/data/onap.policy.monitoring.tcagen2.v1.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "policy_types": { - "onap.policies.Monitoring": { - "derived_from": "tosca.policies.Root", - "version": "1.0.0", - "description": "a base policy type for all policies that governs monitoring provisioning" - }, - "onap.policies.monitoring.tcagen2": { - "derived_from": "onap.policies.Monitoring", - "version": "1.0.0", - "properties": { - "tca.policy": { - "type": "onap.datatypes.monitoring.tca_policy", - "description": "TCA Policy JSON" - } - } - } - }, - "data_types": { - "onap.datatypes.monitoring.metricsPerEventName": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "controlLoopSchemaType": { - "type": "string", - "required": true, - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", - "constraints": [ - { - "valid_values": [ - "VM", - "VNF" - ] - } - ] - }, - "eventName": { - "type": "string", - "required": true, - "description": "Event name to which thresholds need to be applied" - }, - "policyName": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Name" - }, - "policyScope": { - "type": "string", - "required": true, - "description": "TCA Policy Scope" - }, - "policyVersion": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Version" - }, - "thresholds": { - "type": "list", - "required": true, - "description": "Thresholds associated with eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.thresholds" - } - } - } - }, - "onap.datatypes.monitoring.tca_policy": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "domain": { - "type": "string", - "required": true, - "description": "Domain name to which TCA needs to be applied", - "default": "measurementsForVfScaling", - "constraints": [ - { - "equal": "measurementsForVfScaling" - } - ] - }, - "metricsPerEventName": { - "type": "list", - "required": true, - "description": "Contains eventName and threshold details that need to be applied to given eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.metricsPerEventName" - } - } - } - }, - "onap.datatypes.monitoring.thresholds": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "closedLoopControlName": { - "type": "string", - "required": true, - "description": "Closed Loop Control Name associated with the threshold" - }, - "closedLoopEventStatus": { - "type": "string", - "required": true, - "description": "Closed Loop Event Status of the threshold", - "constraints": [ - { - "valid_values": [ - "ONSET", - "ABATED" - ] - } - ] - }, - "direction": { - "type": "string", - "required": true, - "description": "Direction of the threshold", - "constraints": [ - { - "valid_values": [ - "LESS", - "LESS_OR_EQUAL", - "GREATER", - "GREATER_OR_EQUAL", - "EQUAL" - ] - } - ] - }, - "fieldPath": { - "type": "string", - "required": true, - "description": "Json field Path as per CEF message which needs to be analyzed for TCA", - "constraints": [ - { - "valid_values": [ - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", - "$.event.measurementsForVfScalingFields.meanRequestLatency", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" - ] - } - ] - }, - "severity": { - "type": "string", - "required": true, - "description": "Threshold Event Severity", - "constraints": [ - { - "valid_values": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "NORMAL" - ] - } - ] - }, - "thresholdValue": { - "type": "integer", - "required": true, - "description": "Threshold value for the field Path inside CEF message" - }, - "version": { - "type": "string", - "required": true, - "description": "Version number associated with the threshold" - } - } - } - } -} diff --git a/csit/api/tests/data/onap.policy.monitoring.tcagen2.v2.json b/csit/api/tests/data/onap.policy.monitoring.tcagen2.v2.json deleted file mode 100644 index d86749ef..00000000 --- a/csit/api/tests/data/onap.policy.monitoring.tcagen2.v2.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "policy_types": { - "onap.policies.monitoring.tcagen2": { - "derived_from": "onap.policies.Monitoring", - "version": "2.0.0", - "properties": { - "tca.policy": { - "type": "onap.datatypes.monitoring.tca_policy", - "description": "TCA Policy JSON" - } - } - } - }, - "data_types": { - "onap.datatypes.monitoring.metricsPerEventName": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "controlLoopSchemaType": { - "type": "string", - "required": true, - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", - "constraints": [ - { - "valid_values": [ - "VM", - "VNF" - ] - } - ] - }, - "eventName": { - "type": "string", - "required": true, - "description": "Event name to which thresholds need to be applied" - }, - "policyName": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Name" - }, - "policyScope": { - "type": "string", - "required": true, - "description": "TCA Policy Scope" - }, - "policyVersion": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Version" - }, - "thresholds": { - "type": "list", - "required": true, - "description": "Thresholds associated with eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.thresholds" - } - } - } - }, - "onap.datatypes.monitoring.tca_policy": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "domain": { - "type": "string", - "required": true, - "description": "Domain name to which TCA needs to be applied", - "default": "measurementsForVfScaling", - "constraints": [ - { - "equal": "measurementsForVfScaling" - } - ] - }, - "metricsPerEventName": { - "type": "list", - "required": true, - "description": "Contains eventName and threshold details that need to be applied to given eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.metricsPerEventName" - } - } - } - }, - "onap.datatypes.monitoring.thresholds": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "closedLoopControlName": { - "type": "string", - "required": true, - "description": "Closed Loop Control Name associated with the threshold" - }, - "closedLoopEventStatus": { - "type": "string", - "required": true, - "description": "Closed Loop Event Status of the threshold", - "constraints": [ - { - "valid_values": [ - "ONSET", - "ABATED" - ] - } - ] - }, - "direction": { - "type": "string", - "required": true, - "description": "Direction of the threshold", - "constraints": [ - { - "valid_values": [ - "LESS", - "LESS_OR_EQUAL", - "GREATER", - "GREATER_OR_EQUAL", - "EQUAL" - ] - } - ] - }, - "fieldPath": { - "type": "string", - "required": true, - "description": "Json field Path as per CEF message which needs to be analyzed for TCA", - "constraints": [ - { - "valid_values": [ - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", - "$.event.measurementsForVfScalingFields.meanRequestLatency", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" - ] - } - ] - }, - "severity": { - "type": "string", - "required": true, - "description": "Threshold Event Severity", - "constraints": [ - { - "valid_values": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "NORMAL" - ] - } - ] - }, - "thresholdValue": { - "type": "integer", - "required": true, - "description": "Threshold value for the field Path inside CEF message" - }, - "version": { - "type": "string", - "required": true, - "description": "Version number associated with the threshold" - } - } - } - } -} diff --git a/csit/api/tests/data/onap.policy.monitoring.tcagen2.v3.json b/csit/api/tests/data/onap.policy.monitoring.tcagen2.v3.json deleted file mode 100644 index 1767c508..00000000 --- a/csit/api/tests/data/onap.policy.monitoring.tcagen2.v3.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "policy_types": { - "onap.policies.monitoring.tcagen2": { - "derived_from": "onap.policies.Monitoring", - "version": "3.0.0", - "properties": { - "tca.policy": { - "type": "onap.datatypes.monitoring.tca_policy", - "description": "TCA Policy JSON" - } - } - } - }, - "data_types": { - "onap.datatypes.monitoring.metricsPerEventName": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "controlLoopSchemaType": { - "type": "string", - "required": true, - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", - "constraints": [ - { - "valid_values": [ - "VM", - "VNF" - ] - } - ] - }, - "eventName": { - "type": "string", - "required": true, - "description": "Event name to which thresholds need to be applied" - }, - "policyName": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Name" - }, - "policyScope": { - "type": "string", - "required": true, - "description": "TCA Policy Scope" - }, - "policyVersion": { - "type": "string", - "required": true, - "description": "TCA Policy Scope Version" - }, - "thresholds": { - "type": "list", - "required": true, - "description": "Thresholds associated with eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.thresholds" - } - } - } - }, - "onap.datatypes.monitoring.tca_policy": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "domain": { - "type": "string", - "required": true, - "description": "Domain name to which TCA needs to be applied", - "default": "measurementsForVfScaling", - "constraints": [ - { - "equal": "measurementsForVfScaling" - } - ] - }, - "metricsPerEventName": { - "type": "list", - "required": true, - "description": "Contains eventName and threshold details that need to be applied to given eventName", - "entry_schema": { - "type": "onap.datatypes.monitoring.metricsPerEventName" - } - } - } - }, - "onap.datatypes.monitoring.thresholds": { - "derived_from": "tosca.datatypes.Root", - "properties": { - "closedLoopControlName": { - "type": "string", - "required": true, - "description": "Closed Loop Control Name associated with the threshold" - }, - "closedLoopEventStatus": { - "type": "string", - "required": true, - "description": "Closed Loop Event Status of the threshold", - "constraints": [ - { - "valid_values": [ - "ONSET", - "ABATED" - ] - } - ] - }, - "direction": { - "type": "string", - "required": true, - "description": "Direction of the threshold", - "constraints": [ - { - "valid_values": [ - "LESS", - "LESS_OR_EQUAL", - "GREATER", - "GREATER_OR_EQUAL", - "EQUAL" - ] - } - ] - }, - "fieldPath": { - "type": "string", - "required": true, - "description": "Json field Path as per CEF message which needs to be analyzed for TCA", - "constraints": [ - { - "valid_values": [ - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", - "$.event.measurementsForVfScalingFields.meanRequestLatency", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" - ] - } - ] - }, - "severity": { - "type": "string", - "required": true, - "description": "Threshold Event Severity", - "constraints": [ - { - "valid_values": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "NORMAL" - ] - } - ] - }, - "thresholdValue": { - "type": "integer", - "required": true, - "description": "Threshold value for the field Path inside CEF message" - }, - "version": { - "type": "string", - "required": true, - "description": "Version number associated with the threshold" - } - } - } - } -} diff --git a/csit/clamp/plans/setup.sh b/csit/clamp/plans/setup.sh deleted file mode 100755 index b750b023..00000000 --- a/csit/clamp/plans/setup.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -pip uninstall -y docker-py -pip uninstall -y docker -pip install -U docker==2.7.0 - -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 grafana - -sleep 10 -unset http_proxy https_proxy - -POLICY_RUNTIME_ACM_IP=$(get-instance-ip.sh policy-clamp-runtime-acm) -POLICY_RUNTIME_ACM_PORT=30258 -MARIADB_IP=$(get-instance-ip.sh mariadb) -DMAAP_IP=$(get-instance-ip.sh simulator) - -echo MARIADB IP IS "${MARIADB_IP}" -echo DMAAP_IP IS "${DMAAP_IP}" -echo POLICY RUNTIME ACM IP IS "${POLICY_RUNTIME_ACM_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_RUNTIME_ACM_PORT}" - -# TODO: This disables the participant during ACM refactoring, will be reenabled when ACM -# TODO: tests are re-enabled - -# Bring up ACM participant containers -#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-k8s-ppnt -#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-http-ppnt -#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-pf-ppnt -#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-a1pms-ppnt - -#sleep 10 -unset http_proxy https_proxy - -POLICY_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-pf-ppnt) -POLICY_PARTICIPANT_PORT=30218 -POLICY_API_IP=$(get-instance-ip.sh policy-api) -POLICY_API_PORT=30440 -K8S_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-k8s-ppnt) -K8S_PARTICIPANT_PORT=30295 -HTTP_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-http-ppnt) -HTTP_PARTICIPANT_PORT=30290 -A1PMS_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-a1pms-ppnt) -A1PMS_PARTICIPANT_PORT=30296 - -echo POLICY PARTICIPANT IP IS "${POLICY_PARTICIPANT_IP}" -echo API IP IS "${POLICY_API_IP}" -echo K8S PARTICIPANT IP IS "${K8S_PARTICIPANT_IP}" -echo HTTP PARTICIPANT IP IS "${HTTP_PARTICIPANT_IP}" -echo A1PMS PARTICIPANT IP IS "${A1PMS_PARTICIPANT_IP}" - -# wait for the app to start up -#"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PARTICIPANT_PORT}" - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_RUNTIME_ACM_IP:${POLICY_RUNTIME_ACM_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_RUNTIME_ACM_PORT:${POLICY_RUNTIME_ACM_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PARTICIPANT_IP:${POLICY_PARTICIPANT_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PARTICIPANT_PORT:${POLICY_PARTICIPANT_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v K8S_PARTICIPANT_IP:${K8S_PARTICIPANT_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v K8S_PARTICIPANT_PORT:${K8S_PARTICIPANT_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v HTTP_PARTICIPANT_IP:${HTTP_PARTICIPANT_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v HTTP_PARTICIPANT_PORT:${HTTP_PARTICIPANT_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v A1PMS_PARTICIPANT_IP:${A1PMS_PARTICIPANT_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v A1PMS_PARTICIPANT_PORT:${A1PMS_PARTICIPANT_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" diff --git a/csit/clamp/plans/teardown.sh b/csit/clamp/plans/teardown.sh deleted file mode 100755 index e0fc58ed..00000000 --- a/csit/clamp/plans/teardown.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# ============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========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/clamp/plans/testplan.txt b/csit/clamp/plans/testplan.txt deleted file mode 100644 index 3c4f4bc2..00000000 --- a/csit/clamp/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -policy-clamp-test.robot diff --git a/csit/clamp/tests/data/AutomationComposition.json b/csit/clamp/tests/data/AutomationComposition.json deleted file mode 100644 index b58d6118..00000000 --- a/csit/clamp/tests/data/AutomationComposition.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "PMSHInstance0", - "version": "1.0.1", - "compositionId": "COMPOSITIONIDPLACEHOLDER", - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "PMSH automation composition instance 0", - "elements": { - "709c62b3-8918-41b9-a747-d21eb79c6c20": { - "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", - "definition": { - "name": "org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement", - "version": "1.2.3" - }, - "participantId": { - "name": "K8sParticipant0", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.policy.clamp.acm.KubernetesParticipant", - "version": "2.3.4" - }, - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "Automation composition element for the K8S microservice for PMSH" - }, - "709c62b3-8918-41b9-a747-d21eb79c6c21": { - "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", - "definition": { - "name": "org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement", - "version": "1.2.3" - }, - "participantId": { - "name": "HttpParticipant0", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.policy.clamp.acm.HttpParticipant", - "version": "2.3.4" - }, - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "Automation composition element for the http requests of PMSH microservice" - }, - "709c62b3-8918-41b9-a747-d21eb79c6c22": { - "id": "709c62b3-8918-41b9-a747-d21eb79c6c22", - "definition": { - "name": "org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement", - "version": "1.2.3" - }, - "participantId": { - "name": "org.onap.PM_Policy", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.policy.clamp.acm.PolicyParticipant", - "version": "2.3.1" - }, - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "Automation composition element for the operational policy for Performance Management Subscription Handling" - } - } -} diff --git a/csit/clamp/tests/data/InstantiateAC.json b/csit/clamp/tests/data/InstantiateAC.json deleted file mode 100644 index 4e93c032..00000000 --- a/csit/clamp/tests/data/InstantiateAC.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "automationCompositionList": [ - { - "name": "PMSHInstance0", - "version": "1.0.1", - "compositionId": "COMPOSITIONIDPLACEHOLDER", - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "PMSH automation composition instance 0", - "elements": { - "709c62b3-8918-41b9-a747-d21eb79c6c21": { - "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", - "definition": { - "name": "org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement", - "version": "1.2.3" - }, - "participantId": { - "name": "org.onap.PM_Policy", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.policy.clamp.acm.PolicyParticipant", - "version": "2.3.1" - }, - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "Monitoring Policy Automation Composition Element for the PMSH instance 0 automation composition" - }, - "709c62b3-8918-41b9-a747-d21eb79c6c22": { - "id": "709c62b3-8918-41b9-a747-d21eb79c6c22", - "definition": { - "name": "org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement", - "version": "1.2.3" - }, - "participantId": { - "name": "org.onap.PM_Policy", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.policy.clamp.acm.PolicyParticipant", - "version": "2.3.1" - }, - "state": "UNINITIALISED", - "orderedState": "UNINITIALISED", - "description": "Operational Policy Automation Composition Element for the PMSH instance 0 automation composition" - } - } - } - ] -} - diff --git a/csit/clamp/tests/data/PMSHMultipleACTosca.yaml b/csit/clamp/tests/data/PMSHMultipleACTosca.yaml deleted file mode 100644 index c6f61e72..00000000 --- a/csit/clamp/tests/data/PMSHMultipleACTosca.yaml +++ /dev/null @@ -1,932 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_3 -data_types: - onap.datatypes.ToscaConceptIdentifier: - derived_from: tosca.datatypes.Root - properties: - name: - type: string - required: true - version: - type: string - required: true - onap.datatype.acm.Target: - derived_from: tosca.datatypes.Root - description: >- - Definition for a entity in A&AI to perform an Automation Composition - operation on - properties: - targetType: - type: string - description: Category for the target type - required: true - constraints: - - valid_values: - - VNF - - VM - - VFMODULE - - PNF - entityIds: - type: map - description: > - Map of values that identify the resource. If none are provided, it is - assumed that the - - entity that generated the ONSET event will be the target. - required: false - metadata: - clamp_possible_values: 'ClampExecution:CSAR_RESOURCES' - entry_schema: - type: string - onap.datatype.acm.Actor: - derived_from: tosca.datatypes.Root - description: An actor/operation/target definition - properties: - actor: - type: string - description: The actor performing the operation. - required: true - metadata: - clamp_possible_values: 'Dictionary:DefaultActors,ClampExecution:CDS/actor' - operation: - type: string - description: The operation the actor is performing. - metadata: - clamp_possible_values: 'Dictionary:DefaultOperations,ClampExecution:CDS/operation' - required: true - target: - type: onap.datatype.acm.Target - description: The resource the operation should be performed on. - required: true - payload: - type: map - description: Name/value pairs of payload information passed by Policy to the actor - required: false - metadata: - clamp_possible_values: 'ClampExecution:CDS/payload' - entry_schema: - type: string - onap.datatype.acm.Operation: - derived_from: tosca.datatypes.Root - description: An operation supported by an actor - properties: - id: - type: string - description: Unique identifier for the operation - required: true - description: - type: string - description: A user-friendly description of the intent for the operation - required: false - operation: - type: onap.datatype.acm.Actor - description: The definition of the operation to be performed. - required: true - timeout: - type: integer - description: The amount of time for the actor to perform the operation. - required: true - retries: - type: integer - description: >- - The number of retries the actor should attempt to perform the - operation. - required: true - default: 0 - success: - type: string - description: >- - Points to the operation to invoke on success. A value of - "final_success" indicates and end to the operation. - required: false - default: final_success - failure: - type: string - description: Points to the operation to invoke on Actor operation failure. - required: false - default: final_failure - failure_timeout: - type: string - description: >- - Points to the operation to invoke when the time out for the operation - occurs. - required: false - default: final_failure_timeout - failure_retries: - type: string - description: >- - Points to the operation to invoke when the current operation has - exceeded its max retries. - required: false - default: final_failure_retries - failure_exception: - type: string - description: >- - Points to the operation to invoke when the current operation causes an - exception. - required: false - default: final_failure_exception - failure_guard: - type: string - description: >- - Points to the operation to invoke when the current operation is - blocked due to guard policy enforcement. - required: false - default: final_failure_guard - onap.datatypes.monitoring.managedObjectDNsBasic: - constraints: [] - properties: - DN: - name: DN - type: string - typeVersion: 0.0.0 - description: Managed object distinguished name - required: true - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.managedObjectDNsBasic - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.managedObjectDNsBasics: - constraints: [] - properties: - managedObjectDNsBasic: - name: managedObjectDNsBasic - type: map - typeVersion: 0.0.0 - description: Managed object distinguished name object - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.managedObjectDNsBasic - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.managedObjectDNsBasics - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.measurementGroup: - constraints: [] - properties: - measurementTypes: - name: measurementTypes - type: list - typeVersion: 0.0.0 - description: List of measurement types - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.measurementTypes - typeVersion: 0.0.0 - constraints: [] - metadata: {} - managedObjectDNsBasic: - name: managedObjectDNsBasic - type: list - typeVersion: 0.0.0 - description: List of managed object distinguished names - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.managedObjectDNsBasics - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.measurementGroup - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.measurementGroups: - constraints: [] - properties: - measurementGroup: - name: measurementGroup - type: map - typeVersion: 0.0.0 - description: Measurement Group - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.measurementGroup - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.measurementGroups - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.measurementType: - constraints: [] - properties: - measurementType: - name: measurementType - type: string - typeVersion: 0.0.0 - description: Measurement type - required: true - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.measurementType - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.measurementTypes: - constraints: [] - properties: - measurementType: - name: measurementType - type: map - typeVersion: 0.0.0 - description: Measurement type object - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.measurementType - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.measurementTypes - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.nfFilter: - constraints: [] - properties: - modelNames: - name: modelNames - type: list - typeVersion: 0.0.0 - description: List of model names - required: true - constraints: [] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [] - metadata: {} - modelInvariantIDs: - name: modelInvariantIDs - type: list - typeVersion: 0.0.0 - description: List of model invariant IDs - required: true - constraints: [] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [] - metadata: {} - modelVersionIDs: - name: modelVersionIDs - type: list - typeVersion: 0.0.0 - description: List of model version IDs - required: true - constraints: [] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [] - metadata: {} - nfNames: - name: nfNames - type: list - typeVersion: 0.0.0 - description: List of network functions - required: true - constraints: [] - entry_schema: - type: string - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.nfFilter - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - onap.datatypes.monitoring.subscription: - constraints: [] - properties: - measurementGroups: - name: measurementGroups - type: list - typeVersion: 0.0.0 - description: Measurement Groups - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.measurementGroups - typeVersion: 0.0.0 - constraints: [] - metadata: {} - fileBasedGP: - name: fileBasedGP - type: integer - typeVersion: 0.0.0 - description: File based granularity period - required: true - constraints: [] - metadata: {} - fileLocation: - name: fileLocation - type: string - typeVersion: 0.0.0 - description: ROP file location - required: true - constraints: [] - metadata: {} - subscriptionName: - name: subscriptionName - type: string - typeVersion: 0.0.0 - description: Name of the subscription - required: true - constraints: [] - metadata: {} - administrativeState: - name: administrativeState - type: string - typeVersion: 0.0.0 - description: State of the subscription - required: true - constraints: - - valid_values: - - LOCKED - - UNLOCKED - metadata: {} - nfFilter: - name: nfFilter - type: map - typeVersion: 0.0.0 - description: Network function filter - required: true - constraints: [] - entry_schema: - type: onap.datatypes.monitoring.nfFilter - typeVersion: 0.0.0 - constraints: [] - metadata: {} - name: onap.datatypes.monitoring.subscription - version: 0.0.0 - derived_from: tosca.datatypes.Root - metadata: {} - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - restRequestId: - type: onap.datatypes.ToscaConceptIdentifier - typeVersion: 1.0.0 - required: true - description: The name and version of a REST request to be sent to a REST endpoint - httpMethod: - type: string - required: true - constraints: - - valid_values: - - POST - - PUT - - GET - - DELETE - description: The REST method to use - path: - type: string - required: true - description: The path of the REST request relative to the base URL - body: - type: string - required: false - description: The body of the REST request for PUT and POST requests - expectedResponse: - type: integer - required: true - constraints: [] - description: THe expected HTTP status code for the REST request - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - configurationEntityId: - type: onap.datatypes.ToscaConceptIdentifier - typeVersion: 1.0.0 - required: true - description: >- - The name and version of a Configuration Entity to be handled by the - HTTP Automation Composition Element - restSequence: - type: list - entry_schema: - type: >- - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest - typeVersion: 1.0.0 - description: A sequence of REST commands to send to the REST endpoint - org.onap.datatypes.policy.clamp.acm.a1PmsAutomationCompositionElement.A1PolicyServiceEntity: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - a1PolicyServiceEntityId: - type: onap.datatypes.ToscaConceptIdentifier - typeVersion: 1.0.0 - required: true - description: The name and version of a Configuration Entity to be handled by the A1 PMS Automation Composition Element - clientId: - type: string - required: true - description: Client Id to be created - callbackUrl: - type: string - required: true - description: The callback URL to get registered - keepAliveIntervalSeconds: - type: integer - required: true - description: Keep alive interval time for the callback URL -policy_types: - onap.policies.Monitoring: - derived_from: tosca.policies.Root - description: a base policy type for all policies that govern monitoring provisioning - version: 1.0.0 - name: onap.policies.Monitoring - onap.policies.Sirisha: - derived_from: tosca.policies.Root - description: a base policy type for all policies that govern monitoring provisioning - version: 1.0.0 - name: onap.policies.Sirisha - onap.policies.monitoring.dcae-pm-subscription-handler: - properties: - pmsh_policy: - name: pmsh_policy - type: onap.datatypes.monitoring.subscription - typeVersion: 0.0.0 - description: PMSH Policy JSON - required: false - constraints: [] - metadata: {} - name: onap.policies.monitoring.dcae-pm-subscription-handler - version: 1.0.0 - derived_from: onap.policies.Monitoring - metadata: {} - onap.policies.acm.operational.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - name: onap.policies.acm.operational.Common - description: > - Operational Policy for Automation Composition execution. Originated in - Frankfurt to support TOSCA Compliant - - Policy Types. This does NOT support the legacy Policy YAML policy type. - properties: - id: - type: string - description: The unique Automation Composition id. - required: true - timeout: - type: integer - description: > - Overall timeout for executing all the operations. This timeout should - equal or exceed the total - - timeout for each operation listed. - required: true - abatement: - type: boolean - description: >- - Whether an abatement event message will be expected for the Automation - Composition from DCAE. - required: true - default: false - trigger: - type: string - description: >- - Initial operation to execute upon receiving an Onset event message for - the Automation Composition. - required: true - operations: - type: list - description: >- - List of operations to be performed when Automation Composition is - triggered. - required: true - entry_schema: - type: onap.datatype.acm.Operation - onap.policies.acm.operational.common.Apex: - derived_from: onap.policies.acm.operational.Common - type_version: 1.0.0 - version: 1.0.0 - name: onap.policies.acm.operational.common.Apex - description: Operational policies for Apex PDP - properties: - engineServiceParameters: - type: string - description: >- - The engine parameters like name, instanceCount, policy implementation, - parameters etc. - required: true - eventInputParameters: - type: string - description: The event input parameters. - required: true - eventOutputParameters: - type: string - description: The event output parameters. - required: true - javaProperties: - type: string - description: Name/value pairs of properties to be set for APEX if needed. - required: false -node_types: - org.onap.policy.clamp.acm.Participant: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - requred: false - org.onap.policy.clamp.acm.AutomationCompositionElement: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: >- - Specifies the organization that provides the automation composition - element - participant_id: - type: onap.datatypes.ToscaConceptIdentifier - requred: true - metadata: - common: true - participantType: - type: onap.datatypes.ToscaConceptIdentifier - required: true - metadata: - common: true - description: >- - The identity of the participant type that hosts this type of - Automation Composition Element - startPhase: - type: integer - required: false - constraints: - - greater_or_equal: 0 - metadata: - common: true - description: >- - A value indicating the start phase in which this automation - composition element will be started, the first start phase is zero. - Automation Composition Elements are started in their start_phase order - and stopped in reverse start phase order. Automation Composition - Elements with the same start phase are started and stopped - simultaneously - uninitializedToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: >- - The maximum time in seconds to wait for a state chage from - uninitialized to passive - passiveToRunningTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: >- - The maximum time in seconds to wait for a state chage from passive to - running - runningToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: >- - The maximum time in seconds to wait for a state chage from running to - passive - passiveToUninitializedTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: >- - The maximum time in seconds to wait for a state chage from passive to - uninitialized - org.onap.policy.clamp.acm.AutomationComposition: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: >- - Specifies the organization that provides the automation composition - element - elements: - type: list - required: true - metadata: - common: true - entry_schema: - type: onap.datatypes.ToscaConceptIdentifier - description: >- - Specifies a list of automation composition element definitions that - make up this automation composition definition - org.onap.policy.clamp.acm.PolicyAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - policy_type_id: - type: onap.datatypes.ToscaConceptIdentifier - requred: true - policy_id: - type: onap.datatypes.ToscaConceptIdentifier - requred: false - org.onap.policy.clamp.acm.CDSAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - cds_blueprint_id: - type: onap.datatypes.ToscaConceptIdentifier - requred: true - org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - chart: - type: string - required: true - configs: - type: list - required: false - requirements: - type: string - requred: false - templates: - type: list - required: false - entry_schema: null - values: - type: string - requred: true - org.onap.policy.clamp.acm.HttpAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - baseUrl: - type: string - required: true - description: >- - The base URL to be prepended to each path, identifies the host for the - REST endpoints. - httpHeaders: - type: map - required: false - entry_schema: - type: string - description: HTTP headers to send on REST requests - configurationEntities: - type: map - required: true - entry_schema: - type: >- - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity - typeVersion: 1.0.0 - description: >- - The connfiguration entities the Automation Composition Element is - managing and their associated REST requests - org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - policyServiceEntities: - type: list - required: true - entry_schema: - type: org.onap.datatypes.policy.clamp.acm.a1pmsAutomationCompositionElement.A1PolicyServiceEntity - typeVersion: 1.0.0 - description: The configuration entities of A1 PMS policy services -topology_template: - inputs: - pmsh_monitoring_policy: - type: onap.datatypes.ToscaConceptIdentifier - description: The ID of the PMSH monitoring policy to use - default: - name: >- - MICROSERVICE_vLoadBalancerMS_v1_0_dcae-pm-subscription-handler_1_0_0test - version: 1.0.0 - pmsh_operational_policy: - type: onap.datatypes.ToscaConceptIdentifier - description: The ID of the PMSH operational policy to use - default: - name: operational.apex.pmcontrol - version: 1.0.0 - node_templates: - org.onap.policy.clamp.acm.PolicyParticipant: - version: 2.3.1 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for DCAE microservices - properties: - provider: ONAP - org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement - type_version: 1.0.0 - description: >- - Automation composition element for the monitoring policy for Performance - Management Subscription Handling - properties: - provider: Ericsson - participant_id: - name: org.onap.PM_Policy - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.PolicyParticipant - version: 2.3.1 - policy_type_id: - name: onap.policies.monitoring.pm-subscription-handler - version: 1.0.0 - policy_id: - get_input: pmsh_monitoring_policy - org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement - type_version: 1.0.0 - description: >- - Automation composition element for the operational policy for - Performance Management Subscription Handling - properties: - provider: Ericsson - participant_id: - name: org.onap.PM_Policy - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.PolicyParticipant - version: 2.3.1 - policy_type_id: - name: onap.policies.operational.pm-subscription-handler - version: 1.0.0 - policy_id: - get_input: pmsh_operational_policy - org.onap.policy.clamp.acm.KubernetesParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for K8S - properties: - provider: ONAP - org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement - type_version: 1.0.0 - description: Automation composition element for the K8S microservice for PMSH - properties: - provider: ONAP - participant_id: - name: K8sParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.KubernetesParticipant - version: 2.3.4 - chart: - chartId: - name: dcae-pmsh - version: 10.0.0 - namespace: onap - releaseName: onap-dcae-pmsh - repository: - repoName: chartmuseum - address: 'http://chart-museum:80' - userName: onapinitializer - password: demo123456! - overrideParams: - global.masterPassword: test - org.onap.policy.clamp.acm.HttpParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for Http requests - properties: - provider: ONAP - org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - type_version: 1.0.1 - description: >- - Automation composition element for the http requests of PMSH - microservice - properties: - provider: ONAP - participant_id: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - uninitializedToPassiveTimeout: 180 - startPhase: 1 - baseUrl: 'https://dcae-pmsh:8443' - httpHeaders: - Content-Type: application/json - configurationEntities: - - configurationEntityId: - name: entity1 - version: 1.0.1 - restSequence: - - restRequestId: - name: request1 - version: 1.0.1 - httpMethod: POST - path: subscription - body: >- - { "subscription":{ "subscriptionName":"new_sub_01", - "operationalPolicyName":"pmsh-operational-policy", - "controlLoopName":"controlLoop-name", "nfFilter":{ "nfNames":[ - "^pnf*" ], "modelInvariantIDs":[ - "7129e420-d396-4efb-af02-6b83499b12f5" ], "modelVersionIDs":[ - "e80a6ae3-cafd-4d24-850d-e14c084a5ca7" ], "modelNames":[ - "pnf_134" ] }, "measurementGroups":[ { "measurementGroup":{ - "measurementGroupName":"msgroup_01", - "administrativeState":"UNLOCKED", "fileBasedGP":15, - "fileLocation":"/pm/pm.xml", "measurementTypes":[ { - "measurementType":"EutranCell.*" }, { - "measurementType":"EutranCellRelation.pmCounter1" }, { - "measurementType":"EutranCellRelation.pmCounter2" } ], - "managedObjectDNsBasic":[ { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" - }, { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, - EUtranCellRelation=CityCenter2" }, { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, - EUtranCellRelation=CityCenter3" } ] } } ] } } - expectedResponse: 201 - org.onap.k8s.acm.A1PMSAutomationCompositionParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for A1 PMS requests - properties: - provider: ONAP - org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the A1 PMS Requests - properties: - provider: ONAP - participantType: - name: org.onap.policy.clamp.acm.A1PMSParticipant - version: 2.3.4 - policyServiceEntities: - - a1PolicyServiceEntityId: - name: entity1 - version: 1.0.1 - clientId: firstService - callbackUrl: http://localhost - keepAliveIntervalSeconds: 0 - - a1PolicyServiceEntityId: - name: entity2 - version: 1.0.1 - clientId: secondService - callbackUrl: http://127.0.0.1 - keepAliveIntervalSeconds: 0 - org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition: - version: 1.2.3 - type: org.onap.policy.clamp.acm.AutomationComposition - type_version: 1.0.0 - description: Automation composition for Hello World - properties: - provider: ONAP - elements: - - name: >- - org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement - version: 1.2.3 - - name: >- - org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement - version: 1.2.3 - - name: >- - org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement - version: 1.2.3 - - name: >- - org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement - version: 1.2.3 - - name: >- - org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement - version: 1.2.3 diff --git a/csit/clamp/tests/data/PassivateAC.json b/csit/clamp/tests/data/PassivateAC.json deleted file mode 100644 index bd4c4a21..00000000 --- a/csit/clamp/tests/data/PassivateAC.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "orderedState": "PASSIVE", - "automationCompositionIdentifierList": [ - { - "name": "PMSHInstance0", - "version": "1.0.1" - } - ] -} diff --git a/csit/clamp/tests/data/PassiveCommand.json b/csit/clamp/tests/data/PassiveCommand.json deleted file mode 100644 index 48422d7e..00000000 --- a/csit/clamp/tests/data/PassiveCommand.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "instantiationCommand": { - "orderedState": "PASSIVE" - } -} diff --git a/csit/clamp/tests/data/RunningCommand.json b/csit/clamp/tests/data/RunningCommand.json deleted file mode 100644 index 56980e64..00000000 --- a/csit/clamp/tests/data/RunningCommand.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "instantiationCommand": { - "orderedState": "RUNNING" - } -} diff --git a/csit/clamp/tests/data/StateChangeRunningAC.json b/csit/clamp/tests/data/StateChangeRunningAC.json deleted file mode 100644 index 494f6fd7..00000000 --- a/csit/clamp/tests/data/StateChangeRunningAC.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "orderedState": "RUNNING", - "automationCompositionIdentifierList": [ - { - "name": "PMSHInstance0", - "version": "1.0.1" - } - ] -} diff --git a/csit/clamp/tests/data/functional-pmsh-usecase.yaml b/csit/clamp/tests/data/functional-pmsh-usecase.yaml deleted file mode 100644 index f0da6f35..00000000 --- a/csit/clamp/tests/data/functional-pmsh-usecase.yaml +++ /dev/null @@ -1,3404 +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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= -tosca_definitions_version: tosca_simple_yaml_1_3 -data_types: - onap.datatypes.ToscaConceptIdentifier: - derived_from: tosca.datatypes.Root - properties: - name: - type: string - required: true - version: - type: string - required: true - onap.datatype.controlloop.Target: - derived_from: tosca.datatypes.Root - description: Definition for a entity in A&AI to perform a control loop operation - on - properties: - targetType: - type: string - description: Category for the target type - required: true - constraints: - - valid_values: - - VNF - - VM - - VFMODULE - - PNF - entityIds: - type: map - description: | - Map of values that identify the resource. If none are provided, it is assumed that the - entity that generated the ONSET event will be the target. - required: false - metadata: - clamp_possible_values: ClampExecution:CSAR_RESOURCES - entry_schema: - type: string - onap.datatype.controlloop.Actor: - derived_from: tosca.datatypes.Root - description: An actor/operation/target definition - properties: - actor: - type: string - description: The actor performing the operation. - required: true - metadata: - clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor - operation: - type: string - description: The operation the actor is performing. - metadata: - clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation - required: true - target: - type: onap.datatype.controlloop.Target - description: The resource the operation should be performed on. - required: true - payload: - type: map - description: Name/value pairs of payload information passed by Policy to the - actor - required: false - metadata: - clamp_possible_values: ClampExecution:CDS/payload - entry_schema: - type: string - onap.datatype.controlloop.Operation: - derived_from: tosca.datatypes.Root - description: An operation supported by an actor - properties: - id: - type: string - description: Unique identifier for the operation - required: true - description: - type: string - description: A user-friendly description of the intent for the operation - required: false - operation: - type: onap.datatype.controlloop.Actor - description: The definition of the operation to be performed. - required: true - timeout: - type: integer - description: The amount of time for the actor to perform the operation. - required: true - retries: - type: integer - description: The number of retries the actor should attempt to perform the - operation. - required: true - default: 0 - success: - type: string - description: Points to the operation to invoke on success. A value of "final_success" - indicates and end to the operation. - required: false - default: final_success - failure: - type: string - description: Points to the operation to invoke on Actor operation failure. - required: false - default: final_failure - failure_timeout: - type: string - description: Points to the operation to invoke when the time out for the operation - occurs. - required: false - default: final_failure_timeout - failure_retries: - type: string - description: Points to the operation to invoke when the current operation - has exceeded its max retries. - required: false - default: final_failure_retries - failure_exception: - type: string - description: Points to the operation to invoke when the current operation - causes an exception. - required: false - default: final_failure_exception - failure_guard: - type: string - description: Points to the operation to invoke when the current operation - is blocked due to guard policy enforcement. - required: false - default: final_failure_guard - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - restRequestId: - type: onap.datatypes.ToscaConceptIdentifier - required: true - description: The name and version of a REST request to be sent to a REST endpoint - httpMethod: - type: string - required: true - constraints: - - valid_values: - - POST - - PUT - - GET - - DELETE - description: The REST method to use - path: - type: string - required: true - description: The path of the REST request relative to the base URL - body: - type: string - required: false - description: The body of the REST request for PUT and POST requests - expectedResponse: - type: integer - required: true - constraints: [] - description: THe expected HTTP status code for the REST request - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - configurationEntityId: - type: onap.datatypes.ToscaConceptIdentifier - required: true - description: The name and version of a Configuration Entity to be handled - by the HTTP Automation Composition Element - restSequence: - type: list - entry_schema: - type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest - type_version: 1.0.0 - description: A sequence of REST commands to send to the REST endpoint -policy_types: - onap.policies.Monitoring: - derived_from: tosca.policies.Root - description: a base policy type for all policies that govern monitoring provisioning - version: 1.0.0 - name: onap.policies.Monitoring - onap.policies.customPolicyType: - derived_from: tosca.policies.Root - description: a base policy type for all policies that govern monitoring provisioning - version: 1.0.0 - name: onap.policies.customPolicyType - onap.policies.controlloop.operational.Common: - derived_from: tosca.policies.Root - version: 1.0.0 - name: onap.policies.controlloop.operational.Common - description: | - Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant - Policy Types. This does NOT support the legacy Policy YAML policy type. - properties: - id: - type: string - description: The unique control loop id. - required: true - timeout: - type: integer - description: | - Overall timeout for executing all the operations. This timeout should equal or exceed the total - timeout for each operation listed. - required: true - abatement: - type: boolean - description: Whether an abatement event message will be expected for the control - loop from DCAE. - required: true - default: false - trigger: - type: string - description: Initial operation to execute upon receiving an Onset event message - for the Control Loop. - required: true - operations: - type: list - description: List of operations to be performed when Control Loop is triggered. - required: true - entry_schema: - type: onap.datatype.controlloop.Operation - onap.policies.controlloop.operational.common.Apex: - derived_from: onap.policies.controlloop.operational.Common - type_version: 1.0.0 - version: 1.0.0 - name: onap.policies.controlloop.operational.common.Apex - description: Operational policies for Apex PDP - properties: - engineServiceParameters: - type: string - description: The engine parameters like name, instanceCount, policy implementation, - parameters etc. - required: true - eventInputParameters: - type: string - description: The event input parameters. - required: true - eventOutputParameters: - type: string - description: The event output parameters. - required: true - javaProperties: - type: string - description: Name/value pairs of properties to be set for APEX if needed. - required: false - -node_types: - org.onap.policy.clamp.acm.Participant: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - org.onap.policy.clamp.acm.AutomationCompositionElement: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: Specifies the organization that provides the automation composition element - participant_id: - type: onap.datatypes.ToscaConceptIdentifier - required: true - metadata: - common: true - participantType: - type: onap.datatypes.ToscaConceptIdentifier - required: true - metadata: - common: true - description: The identity of the participant type that hosts this type of Automation Composition Element - startPhase: - type: integer - required: false - constraints: - - greater_or_equal: 0 - metadata: - common: true - description: A value indicating the start phase in which this automation composition element will be started, the - first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped - in reverse start phase order. Automation Composition Elements with the same start phase are started and - stopped simultaneously - uninitializedToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from uninitialized to passive - passiveToRunningTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from passive to running - runningToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from running to passive - passiveToUninitializedTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from passive to uninitialized - org.onap.policy.clamp.acm.AutomationComposition: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: Specifies the organization that provides the automation composition element - elements: - type: list - required: true - metadata: - common: true - entry_schema: - type: onap.datatypes.ToscaConceptIdentifier - description: Specifies a list of automation composition element definitions that make up this automation composition definition - org.onap.policy.clamp.acm.PolicyAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - policy_type_id: - type: onap.datatypes.ToscaConceptIdentifier - required: true - policy_id: - type: onap.datatypes.ToscaConceptIdentifier - required: false - org.onap.policy.clamp.acm.CDSAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - cds_blueprint_id: - type: onap.datatypes.ToscaConceptIdentifier - required: true - org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - chart: - type: string - required: true - configs: - type: list - required: false - requirements: - type: string - required: false - templates: - type: list - required: false - entry_schema: - values: - type: string - required: true - org.onap.policy.clamp.acm.HttpAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - baseUrl: - type: string - required: true - description: The base URL to be prepended to each path, identifies the host for the REST endpoints. - httpHeaders: - type: map - required: false - entry_schema: - type: string - description: HTTP headers to send on REST requests - configurationEntities: - type: map - required: true - entry_schema: - type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity - type_version: 1.0.0 - description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests - -topology_template: - inputs: - pmsh_operational_policy: - type: onap.datatypes.ToscaConceptIdentifier - description: The ID of the PMSH operational policy to use - default: - name: operational.apex.pmcontrol - version: 1.0.0 - node_templates: - org.onap.policy.clamp.acm.PolicyParticipant: - version: 2.3.1 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for DCAE microservices - properties: - provider: ONAP - org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement: - version: 1.2.3 - type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the operational policy for Performance Management Subscription Handling - properties: - provider: Ericsson - participant_id: - name: org.onap.PM_Policy - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.PolicyParticipant - version: 2.3.1 - policy_type_id: - name: onap.policies.operational.pm-subscription-handler - version: 1.0.0 - policy_id: - get_input: pmsh_operational_policy - - - org.onap.policy.clamp.acm.KubernetesParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for K8S - properties: - provider: ONAP - org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement: - # Chart from new repository - version: 1.2.3 - type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the K8S microservice for PMSH - properties: - provider: ONAP - participant_id: - name: K8sParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.KubernetesParticipant - version: 2.3.4 - chart: - chartId: - name: dcae-pmsh - version: 10.0.0 - namespace: onap - releaseName: dcae-pmsh - repository: - repoName: chartmuseum - address: http://chart-museum:80 - userName: onapinitializer - password: demo123456! - overrideParams: - global.masterPassword: test - global.centralizedLoggingEnabled: false - org.onap.policy.clamp.acm.HttpParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for Http requests - properties: - provider: ONAP - org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement: - # Http config for PMSH. - version: 1.2.3 - type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the http requests of PMSH microservice - properties: - provider: ONAP - participant_id: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - uninitializedToPassiveTimeout: 180 - startPhase: 1 - baseUrl: https://dcae-pmsh:8443 - httpHeaders: - Content-Type: application/json - configurationEntities: - - configurationEntityId: - name: entity1 - version: 1.0.1 - restSequence: - - restRequestId: - name: request1 - version: 1.0.1 - httpMethod: POST - path: subscription - body: '{ - "subscription":{ - "subscriptionName":"new_sub_01", - "operationalPolicyName":"pmsh-operational-policy", - "controlLoopName":"controlLoop-name", - "nfFilter":{ - "nfNames":[ - "^pnf*" - ], - "modelInvariantIDs":[ - "7129e420-d396-4efb-af02-6b83499b12f5" - ], - "modelVersionIDs":[ - "e80a6ae3-cafd-4d24-850d-e14c084a5ca7" - ], - "modelNames":[ - "pnf_134" - ] - }, - "measurementGroups":[ - { - "measurementGroup":{ - "measurementGroupName":"msgroup_01", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"/pm/pm.xml", - "measurementTypes":[ - { - "measurementType":"EutranCell.*" - }, - { - "measurementType":"EutranCellRelation.pmCounter1" - }, - { - "measurementType":"EutranCellRelation.pmCounter2" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" - }, - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" - }, - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" - } - ] - } - } - ] - } - }' - expectedResponse: 201 - - - org.onap.domain.pmsh.PMSHAutomationCompositionDefinition: - version: 1.2.3 - type: org.onap.policy.clamp.acm.AutomationComposition - type_version: 1.0.1 - description: Automation composition for PMSH - properties: - provider: ONAP - elements: - - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement - version: 1.2.3 - - name: org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement - version: 1.2.3 - - name: org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement - version: 1.2.3 - policies: - - operational.apex.pmcontrol: - type: onap.policies.controlloop.operational.common.Apex - type_version: 1.0.0 - version: 1.0.0 - properties: - engineServiceParameters: - name: MyApexEngine - version: 0.0.1 - id: 45 - instanceCount: 2 - deploymentPort: 12561 - engineParameters: - executorParameters: - JAVASCRIPT: - parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters - contextParameters: - parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters - schemaParameters: - 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.common.gson.InstantAsMillisTypeAdapter - policy_type_impl: - apexPolicyModel: - key: - name: PMControlPolicy - version: 0.0.1 - keyInformation: - key: - name: PMControlPolicy_KeyInfo - version: 0.0.1 - keyInfoMap: - entry: - - key: - name: CDSActionIdentifiersType - version: 0.0.1 - value: - key: - name: CDSActionIdentifiersType - version: 0.0.1 - UUID: 6e5fa19b-14df-37e3-a4ae-8c537e861a82 - description: Generated description for concept referred to by - key "CDSActionIdentifiersType:0.0.1" - - key: - name: CDSCreateResponseEvent - version: 0.0.1 - value: - key: - name: CDSCreateResponseEvent - version: 0.0.1 - UUID: 14b29e38-ac75-3273-aa4e-8583c0aa7dad - description: Generated description for concept referred to by - key "CDSCreateResponseEvent:0.0.1" - - key: - name: CDSCreateResponsePayloadType - version: 0.0.1 - value: - key: - name: CDSCreateResponsePayloadType - version: 0.0.1 - UUID: 04573f8f-e772-30a5-b1d9-d7318d4a1e13 - description: Generated description for concept referred to by - key "CDSCreateResponsePayloadType:0.0.1" - - key: - name: CDSCreateResponsePolicy - version: 0.0.1 - value: - key: - name: CDSCreateResponsePolicy - version: 0.0.1 - UUID: e126c965-fc09-3bfe-8f55-70f380a4a49c - description: Generated description for concept referred to by - key "CDSCreateResponsePolicy:0.0.1" - - key: - name: CDSCreateResponseTask - version: 0.0.1 - value: - key: - name: CDSCreateResponseTask - version: 0.0.1 - UUID: 6165ee82-afd2-3aab-a517-f00b3f2461d2 - description: Generated description for concept referred to by - key "CDSCreateResponseTask:0.0.1" - - key: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - value: - key: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - UUID: 8350ac5e-c157-38b9-9614-a0f93a830e60 - description: Generated description for concept referred to by - key "CDSCreateSubscriptionPayloadType:0.0.1" - - key: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - value: - key: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - UUID: cfa325ba-226b-3a31-9183-ec43e2b6e9a2 - description: Generated description for concept referred to by - key "CDSCreateSubscriptionRequestEvent:0.0.1" - - key: - name: CDSDeleteResponseEvent - version: 0.0.1 - value: - key: - name: CDSDeleteResponseEvent - version: 0.0.1 - UUID: 8be9c0fa-7437-3841-aff2-b3cec6ae3bd8 - description: Generated description for concept referred to by - key "CDSDeleteResponseEvent:0.0.1" - - key: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - value: - key: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - UUID: 3fbfe0c9-152e-34d3-a504-09cd13c058d0 - description: Generated description for concept referred to by - key "CDSDeleteResponsePayloadType:0.0.1" - - key: - name: CDSDeleteResponsePolicy - version: 0.0.1 - value: - key: - name: CDSDeleteResponsePolicy - version: 0.0.1 - UUID: a780251c-edd5-3132-b865-04313246b43c - description: Generated description for concept referred to by - key "CDSDeleteResponsePolicy:0.0.1" - - key: - name: CDSDeleteResponseTask - version: 0.0.1 - value: - key: - name: CDSDeleteResponseTask - version: 0.0.1 - UUID: afce4555-3aa3-3521-a7d8-ee8cdf0d3efc - description: Generated description for concept referred to by - key "CDSDeleteResponseTask:0.0.1" - - key: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - value: - key: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - UUID: 12658406-9147-3c9d-a38c-5ad5e30b092b - description: Generated description for concept referred to by - key "CDSDeleteSubscriptionPayloadType:0.0.1" - - key: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - value: - key: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - UUID: 24380c95-9289-36e6-8cbf-0edefa15ccd9 - description: Generated description for concept referred to by - key "CDSDeleteSubscriptionRequestEvent:0.0.1" - - key: - name: CDSRequestCommonHeaderType - version: 0.0.1 - value: - key: - name: CDSRequestCommonHeaderType - version: 0.0.1 - UUID: 35590ac0-062c-39f1-8786-b4ff716e30b1 - description: Generated description for concept referred to by - key "CDSRequestCommonHeaderType:0.0.1" - - key: - name: CDSResponseCommonHeaderType - version: 0.0.1 - value: - key: - name: CDSResponseCommonHeaderType - version: 0.0.1 - UUID: dd7e1805-885a-350b-aaf9-ed541321ae3c - description: Generated description for concept referred to by - key "CDSResponseCommonHeaderType:0.0.1" - - key: - name: CDSResponseStatusEvent - version: 0.0.1 - value: - key: - name: CDSResponseStatusEvent - version: 0.0.1 - UUID: 7986e21b-32f7-302e-9554-31f21b673493 - description: Generated description for concept referred to by - key "CDSResponseStatusEvent:0.0.1" - - key: - name: CDSResponseStatusType - version: 0.0.1 - value: - key: - name: CDSResponseStatusType - version: 0.0.1 - UUID: 92b8a2cf-344e-3ce1-8cc0-2b7d3cb695fa - description: Generated description for concept referred to by - key "CDSResponseStatusType:0.0.1" - - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - value: - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - UUID: 92162397-1a8e-3a3f-a469-d2af7700af4a - description: Generated description for concept referred to by - key "CreateSubscriptionPayloadEvent:0.0.1" - - key: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - value: - key: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - UUID: bc0c69f0-52ed-38ea-b468-ae4a6fd1730d - description: Generated description for concept referred to by - key "CreateSubscriptionPayloadTask:0.0.1" - - key: - name: CreateSubscriptionRequestTask - version: 0.0.1 - value: - key: - name: CreateSubscriptionRequestTask - version: 0.0.1 - UUID: 89cb75e9-f06c-30d3-b4ff-698d45f63869 - description: Generated description for concept referred to by - key "CreateSubscriptionRequestTask:0.0.1" - - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - value: - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - UUID: 994fa441-04ab-33bb-832d-1cd12ab5d074 - description: Generated description for concept referred to by - key "DeleteSubscriptionPayloadEvent:0.0.1" - - key: - name: DeleteSubscriptionPayloadTask - version: 0.0.1 - value: - key: - name: DeleteSubscriptionPayloadTask - version: 0.0.1 - UUID: 0f519117-5fea-3e4b-941f-8f778100465f - description: Generated description for concept referred to by - key "DeleteSubscriptionPayloadTask:0.0.1" - - key: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - value: - key: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - UUID: acb772fe-d442-39e3-98f9-b1080caf4150 - description: Generated description for concept referred to by - key "DeleteSubscriptionRequestTask:0.0.1" - - key: - name: MRResponseEvent - version: 0.0.1 - value: - key: - name: MRResponseEvent - version: 0.0.1 - UUID: 13c747a3-6bae-3bcf-9c80-b152e01dc194 - description: Generated description for concept referred to by - key "MRResponseEvent:0.0.1" - - key: - name: PMControlPolicy - version: 0.0.1 - value: - key: - name: PMControlPolicy - version: 0.0.1 - UUID: acf1e55c-7bc5-3bd5-975a-0ca54afcd8a4 - description: Generated description for concept referred to by - key "PMControlPolicy:0.0.1" - - key: - name: PMControlPolicy_Albums - version: 0.0.1 - value: - key: - name: PMControlPolicy_Albums - version: 0.0.1 - UUID: b38ad204-c2c8-32f4-9b5a-dda0aeb0145b - description: Generated description for concept referred to by - key "PMControlPolicy_Albums:0.0.1" - - key: - name: PMControlPolicy_Events - version: 0.0.1 - value: - key: - name: PMControlPolicy_Events - version: 0.0.1 - UUID: be3871a0-c42a-3113-a066-82d192840eca - description: Generated description for concept referred to by - key "PMControlPolicy_Events:0.0.1" - - key: - name: PMControlPolicy_KeyInfo - version: 0.0.1 - value: - key: - name: PMControlPolicy_KeyInfo - version: 0.0.1 - UUID: ced37634-28a4-3178-b7f6-2980794927b0 - description: Generated description for concept referred to by - key "PMControlPolicy_KeyInfo:0.0.1" - - key: - name: PMControlPolicy_Policies - version: 0.0.1 - value: - key: - name: PMControlPolicy_Policies - version: 0.0.1 - UUID: be3d180d-ef9c-3a75-8e9c-84271a038bed - description: Generated description for concept referred to by - key "PMControlPolicy_Policies:0.0.1" - - key: - name: PMControlPolicy_Schemas - version: 0.0.1 - value: - key: - name: PMControlPolicy_Schemas - version: 0.0.1 - UUID: e61973f1-189c-39e5-82f6-0d3afe298a20 - description: Generated description for concept referred to by - key "PMControlPolicy_Schemas:0.0.1" - - key: - name: PMControlPolicy_Tasks - version: 0.0.1 - value: - key: - name: PMControlPolicy_Tasks - version: 0.0.1 - UUID: 5658adb3-2962-30a3-a241-fae75bb8eb4a - description: Generated description for concept referred to by - key "PMControlPolicy_Tasks:0.0.1" - - key: - name: PMSubscriptionAlbum - version: 0.0.1 - value: - key: - name: PMSubscriptionAlbum - version: 0.0.1 - UUID: c2bd6f0d-6854-317a-9be2-97c08338428c - description: Generated description for concept referred to by - key "PMSubscriptionAlbum:0.0.1" - - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - value: - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - UUID: 992b7819-9f69-3aa0-bb0f-6e45ea15ce05 - description: Generated description for concept referred to by - key "PMSubscriptionOutputEvent:0.0.1" - - key: - name: PMSubscriptionType - version: 0.0.1 - value: - key: - name: PMSubscriptionType - version: 0.0.1 - UUID: 73c1c397-4fc3-357f-93b6-a8ad707fbaae - description: Generated description for concept referred to by - key "PMSubscriptionType:0.0.1" - - key: - name: ReceiveEventPolicy - version: 0.0.1 - value: - key: - name: ReceiveEventPolicy - version: 0.0.1 - UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1 - description: Generated description for concept referred to by - key "ReceiveEventPolicy:0.0.1" - - key: - name: ReceiveSubscriptionTask - version: 0.0.1 - value: - key: - name: ReceiveSubscriptionTask - version: 0.0.1 - UUID: f596afc8-100c-35eb-92c8-352355ea457d - description: Generated description for concept referred to by - key "ReceiveSubscriptionTask:0.0.1" - - key: - name: SimpleIntType - version: 0.0.1 - value: - key: - name: SimpleIntType - version: 0.0.1 - UUID: 153791fd-ae0a-36a7-88a5-309a7936415d - description: Generated description for concept referred to by - key "SimpleIntType:0.0.1" - - key: - name: SimpleStringType - version: 0.0.1 - value: - key: - name: SimpleStringType - version: 0.0.1 - UUID: 8a4957cf-9493-3a76-8c22-a208e23259af - description: Generated description for concept referred to by - key "SimpleStringType:0.0.1" - - key: - name: SubscriptionStatusType - version: 0.0.1 - value: - key: - name: SubscriptionStatusType - version: 0.0.1 - UUID: 597643b1-9db1-31ce-85d0-e1c63c43b30b - description: Generated description for concept referred to by - key "SubscriptionStatusType:0.0.1" - - key: - name: SubscriptionType - version: 0.0.1 - value: - key: - name: SubscriptionType - version: 0.0.1 - UUID: 184547bb-7d64-3cb2-a273-d7185102c5ce - description: Generated description for concept referred to by - key "SubscriptionType:0.0.1" - - key: - name: UUIDType - version: 0.0.1 - value: - key: - name: UUIDType - version: 0.0.1 - UUID: 6a8cc68e-dfc8-3403-9c6d-071c886b319c - description: Generated description for concept referred to by - key "UUIDType:0.0.1" - - key: - name: pmsh-operational-policy - version: 0.0.1 - value: - key: - name: pmsh-operational-policy - version: 0.0.1 - UUID: fdf2c9ff-6422-3ea6-b6b6-49b12116265d - description: Generated description for concept referred to by - key "pmsh-operational-policy:0.0.1" - policies: - key: - name: PMControlPolicy_Policies - version: 0.0.1 - policyMap: - entry: - - key: - name: CDSCreateResponsePolicy - version: 0.0.1 - value: - policyKey: - name: CDSCreateResponsePolicy - version: 0.0.1 - template: Freestyle - state: - entry: - - key: CDSCreateResponseState - value: - stateKey: - parentKeyName: CDSCreateResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CDSCreateResponseState - trigger: - name: CDSCreateResponseEvent - version: 0.0.1 - stateOutputs: - entry: - - key: ResponseOutput - value: - key: - parentKeyName: CDSCreateResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSCreateResponseState - localName: ResponseOutput - outgoingEvent: - name: CDSResponseStatusEvent - version: 0.0.1 - outgoingEventReference: - - name: CDSResponseStatusEvent - 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: CDSCreateResponseTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: CDSCreateResponseTask - version: 0.0.1 - value: - key: - parentKeyName: CDSCreateResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSCreateResponseState - localName: CDSCreateResponsePolicy - outputType: DIRECT - output: - parentKeyName: CDSCreateResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSCreateResponseState - localName: ResponseOutput - firstState: CDSCreateResponseState - - key: - name: CDSDeleteResponsePolicy - version: 0.0.1 - value: - policyKey: - name: CDSDeleteResponsePolicy - version: 0.0.1 - template: Freestyle - state: - entry: - - key: CDSDeleteResponseState - value: - stateKey: - parentKeyName: CDSDeleteResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CDSDeleteResponseState - trigger: - name: CDSDeleteResponseEvent - version: 0.0.1 - stateOutputs: - entry: - - key: ResponseOutput - value: - key: - parentKeyName: CDSDeleteResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSDeleteResponseState - localName: ResponseOutput - outgoingEvent: - name: CDSResponseStatusEvent - version: 0.0.1 - outgoingEventReference: - - name: CDSResponseStatusEvent - 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: CDSDeleteResponseTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: CDSDeleteResponseTask - version: 0.0.1 - value: - key: - parentKeyName: CDSDeleteResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSDeleteResponseState - localName: CDSDeleteResponsePolicy - outputType: DIRECT - output: - parentKeyName: CDSDeleteResponsePolicy - parentKeyVersion: 0.0.1 - parentLocalName: CDSDeleteResponseState - localName: ResponseOutput - firstState: CDSDeleteResponseState - - key: - name: ReceiveEventPolicy - version: 0.0.1 - value: - policyKey: - name: ReceiveEventPolicy - version: 0.0.1 - template: Freestyle - state: - entry: - - key: CreateOrDeleteState - value: - stateKey: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CreateOrDeleteState - trigger: - name: PMSubscriptionOutputEvent - version: 0.0.1 - stateOutputs: - entry: - - key: CreateSubscriptionPayload - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: CreateSubscriptionPayload - outgoingEvent: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - outgoingEventReference: - - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - nextState: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CreateSubscription - - key: DeleteSubscriptionPayload - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: DeleteSubscriptionPayload - outgoingEvent: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - outgoingEventReference: - - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - nextState: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: DeleteSubscription - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskSelectionLogic: - key: TaskSelectionLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) - var changeType = pmSubscriptionInfo.get("changeType").toString() - executor.logger.info("Change Type is " + changeType) - if ("CREATE".equals(changeType)) { - executor.logger.info("Choosing to create a subscription") - executor.subject.getTaskKey("CreateSubscriptionPayloadTask").copyTo(executor.selectedTask); - } - else if ("DELETE".equals(changeType)) { - executor.logger.info("Choosing to delete a subscription") - executor.subject.getTaskKey("DeleteSubscriptionPayloadTask").copyTo(executor.selectedTask); - } - returnValue = executor.isTrue; - true; - stateFinalizerLogicMap: - entry: [ ] - defaultTask: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: ReceiveEventPolicy - outputType: DIRECT - output: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: CreateSubscriptionPayload - - key: - name: DeleteSubscriptionPayloadTask - version: 0.0.1 - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: ReceiveEventPolicy - outputType: DIRECT - output: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateOrDeleteState - localName: DeleteSubscriptionPayload - - key: CreateSubscription - value: - stateKey: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CreateSubscription - trigger: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - stateOutputs: - entry: - - key: IssueCreateSubscriptionRequestOutput - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateSubscription - localName: IssueCreateSubscriptionRequestOutput - outgoingEvent: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - outgoingEventReference: - - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - nextState: - parentKeyName: 'NULL' - parentKeyVersion: 0.0.0 - parentLocalName: 'NULL' - localName: 'NULL' - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskSelectionLogic: - key: 'NULL' - logicFlavour: UNDEFINED - logic: '' - stateFinalizerLogicMap: - entry: [ ] - defaultTask: - name: CreateSubscriptionRequestTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: CreateSubscriptionRequestTask - version: 0.0.1 - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateSubscription - localName: ReceiveEventPolicy - outputType: DIRECT - output: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: CreateSubscription - localName: IssueCreateSubscriptionRequestOutput - - key: DeleteSubscription - value: - stateKey: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: DeleteSubscription - trigger: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - stateOutputs: - entry: - - key: IssueDeleteSubscriptionRequestOutput - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: DeleteSubscription - localName: IssueDeleteSubscriptionRequestOutput - outgoingEvent: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - outgoingEventReference: - - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - nextState: - parentKeyName: 'NULL' - parentKeyVersion: 0.0.0 - parentLocalName: 'NULL' - localName: 'NULL' - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskSelectionLogic: - key: 'NULL' - logicFlavour: UNDEFINED - logic: '' - stateFinalizerLogicMap: - entry: [ ] - defaultTask: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: DeleteSubscription - localName: ReceiveEventPolicy - outputType: DIRECT - output: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: DeleteSubscription - localName: IssueDeleteSubscriptionRequestOutput - - key: ReceiveSubscriptionState - value: - stateKey: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: ReceiveSubscriptionState - trigger: - name: pmsh-operational-policy - version: 0.0.1 - stateOutputs: - entry: - - key: ReceivePMSubscriptionOutput - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: ReceiveSubscriptionState - localName: ReceivePMSubscriptionOutput - outgoingEvent: - name: PMSubscriptionOutputEvent - version: 0.0.1 - outgoingEventReference: - - name: PMSubscriptionOutputEvent - version: 0.0.1 - nextState: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: 'NULL' - localName: CreateOrDeleteState - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskSelectionLogic: - key: 'NULL' - logicFlavour: UNDEFINED - logic: '' - stateFinalizerLogicMap: - entry: [ ] - defaultTask: - name: ReceiveSubscriptionTask - version: 0.0.1 - taskReferences: - entry: - - key: - name: ReceiveSubscriptionTask - version: 0.0.1 - value: - key: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: ReceiveSubscriptionState - localName: ReceiveEventPolicy - outputType: DIRECT - output: - parentKeyName: ReceiveEventPolicy - parentKeyVersion: 0.0.1 - parentLocalName: ReceiveSubscriptionState - localName: ReceivePMSubscriptionOutput - firstState: ReceiveSubscriptionState - tasks: - key: - name: PMControlPolicy_Tasks - version: 0.0.1 - taskMap: - entry: - - key: - name: CDSCreateResponseTask - version: 0.0.1 - value: - key: - name: CDSCreateResponseTask - version: 0.0.1 - inputEvent: - key: - name: CDSCreateResponseEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: CDS - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSResponseCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateResponsePayloadType - version: 0.0.1 - optional: false - - key: status - value: - key: status - fieldSchemaKey: - name: CDSResponseStatusType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: CDSResponseStatusEvent - value: - key: - name: CDSResponseStatusEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: DCAE - parameter: - entry: - - key: status - value: - key: status - fieldSchemaKey: - name: SubscriptionStatusType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var commonHeader = executor.inFields.get("commonHeader") - var response = executor.inFields.get("payload") - var albumID = commonHeader.get("requestId") - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString()); - var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance(); - var changeType = pmSubscriptionInfo.get("changeType").toUpperCase() - responseStatus.put("nfName", pmSubscriptionInfo.get("nfName")) - responseStatus.put("changeType", pmSubscriptionInfo.get("changeType")) - if ("CREATE".equals(changeType)) { - responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) - responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName")) - } - else if ("DELETE".equals(changeType)) { - responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) - responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) - } - var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status") - executor.logger.info("RESPONSE STATUS = " + status) - if(status == "success") { - responseStatus.put("message", "success") - } else { - responseStatus.put("message", "failed") - } - executor.outFields.put("status", responseStatus) - returnValue = executor.isTrue; - true; - - key: - name: CDSDeleteResponseTask - version: 0.0.1 - value: - key: - name: CDSDeleteResponseTask - version: 0.0.1 - inputEvent: - key: - name: CDSDeleteResponseEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: CDS - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSResponseCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - optional: false - - key: status - value: - key: status - fieldSchemaKey: - name: CDSResponseStatusType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: CDSResponseStatusEvent - value: - key: - name: CDSResponseStatusEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: DCAE - parameter: - entry: - - key: status - value: - key: status - fieldSchemaKey: - name: SubscriptionStatusType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var commonHeader = executor.inFields.get("commonHeader") - var response = executor.inFields.get("payload") - var albumID = commonHeader.get("requestId") - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString()); - var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance(); - var changeType = pmSubscriptionInfo.get("changeType").toUpperCase() - responseStatus.put("nfName", pmSubscriptionInfo.get("nfName")) - responseStatus.put("changeType", pmSubscriptionInfo.get("changeType")) - if ("CREATE".equals(changeType)) { - responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) - responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName")) - } - else if ("DELETE".equals(changeType)) { - responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) - responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) - } - var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status") - executor.logger.info("RESPONSE STATUS = " + status) - if(status == "success") { - responseStatus.put("message", "success") - } else { - responseStatus.put("message", "failed") - } - executor.outFields.put("status", responseStatus) - returnValue = executor.isTrue; - true; - - key: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - value: - key: - name: CreateSubscriptionPayloadTask - version: 0.0.1 - inputEvent: - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: CreateSubscriptionPayloadEvent - value: - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) - var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() - var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record"); - payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName")) - payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress")) - if ("create".equals(changeType)) { - payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) - payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString()) - payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation")) - payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup")) - } - else if ("delete".equals(changeType)) { - payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) - payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) - } - var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry"); - payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties) - var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance(); - payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry); - executor.outFields.put("albumID", executor.inFields.get("albumID")) - executor.outFields.put("payload", payload); - returnValue = executor.isTrue; - true; - - key: - name: CreateSubscriptionRequestTask - version: 0.0.1 - value: - key: - name: CreateSubscriptionRequestTask - version: 0.0.1 - inputEvent: - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: CDSCreateSubscriptionRequestEvent - value: - key: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSRequestCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) - executor.logger.info(pmSubscriptionInfo) - var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() - var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase() - var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase() - var payload = executor.inFields.get("payload") - var actionName = changeType + "-subscription" - var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance(); - commonHeader.put("originatorId", "sdnc"); - commonHeader.put("requestId", executor.inFields.get("albumID").toString()); - commonHeader.put("subRequestId", "sub-123456-1000"); - var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance(); - actionIdentifiers.put("actionName", actionName); - actionIdentifiers.put("blueprintName", blueprintName); - actionIdentifiers.put("blueprintVersion", blueprintVersion); - actionIdentifiers.put("mode", "sync"); - executor.outFields.put("commonHeader", commonHeader); - executor.outFields.put("actionIdentifiers", actionIdentifiers); - executor.outFields.put("payload", payload); - returnValue = executor.isTrue; - true; - - key: - name: DeleteSubscriptionPayloadTask - version: 0.0.1 - value: - key: - name: DeleteSubscriptionPayloadTask - version: 0.0.1 - inputEvent: - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: DeleteSubscriptionPayloadEvent - value: - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) - var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() - var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record"); - payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName")) - payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress")) - if ("create".equals(changeType)) { - payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) - payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString()) - payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation")) - payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup")) - } - else if ("delete".equals(changeType)) { - payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) - payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) - } - var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry"); - payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties) - var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance(); - payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry); - executor.outFields.put("albumID", executor.inFields.get("albumID")) - executor.outFields.put("payload", payload); - returnValue = executor.isTrue; - true; - - key: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - value: - key: - name: DeleteSubscriptionRequestTask - version: 0.0.1 - inputEvent: - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - optional: false - outputEvents: - entry: - - key: CDSDeleteSubscriptionRequestEvent - value: - key: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSRequestCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - executor.logger.info(executor.subject.id); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) - executor.logger.info(pmSubscriptionInfo) - var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() - var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase() - var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase() - var payload = executor.inFields.get("payload") - var actionName = changeType + "-subscription" - var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance(); - commonHeader.put("originatorId", "sdnc"); - commonHeader.put("requestId", executor.inFields.get("albumID").toString()); - commonHeader.put("subRequestId", "sub-123456-1000"); - var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance(); - actionIdentifiers.put("actionName", actionName); - actionIdentifiers.put("blueprintName", blueprintName); - actionIdentifiers.put("blueprintVersion", blueprintVersion); - actionIdentifiers.put("mode", "sync"); - executor.outFields.put("commonHeader", commonHeader); - executor.outFields.put("actionIdentifiers", actionIdentifiers); - executor.outFields.put("payload", payload); - returnValue = executor.isTrue; - true; - - key: - name: ReceiveSubscriptionTask - version: 0.0.1 - value: - key: - name: ReceiveSubscriptionTask - version: 0.0.1 - inputEvent: - key: - name: pmsh-operational-policy - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: DCAE - target: APEX - parameter: - entry: - - key: blueprintName - value: - key: blueprintName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: blueprintVersion - value: - key: blueprintVersion - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: changeType - value: - key: changeType - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: controlLoopName - value: - key: controlLoopName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: ipAddress - value: - key: ipAddress - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: measurementGroupName - value: - key: measurementGroupName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: true - - key: nfName - value: - key: nfName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: operationalPolicyName - value: - key: operationalPolicyName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: subscription - value: - key: subscription - fieldSchemaKey: - name: SubscriptionType - version: 0.0.1 - optional: true - - key: subscriptionName - value: - key: subscriptionName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: true - outputEvents: - entry: - - key: PMSubscriptionOutputEvent - value: - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - taskParameters: - entry: [ ] - contextAlbumReference: - - name: PMSubscriptionAlbum - version: 0.0.1 - taskLogic: - key: TaskLogic - logicFlavour: JAVASCRIPT - logic: |- - /* - * ============LICENSE_START======================================================= - * Copyright (C) 2020 Nordix. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - var uuidType = java.util.UUID; - executor.logger.info(executor.subject.id); - //albumID will be used to fetch info from our album later - var albumID = uuidType.randomUUID(); - var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").getSchemaHelper().createNewInstance(); - var returnValue = true; - if(executor.inFields.get("operationalPolicyName") != null) { - executor.logger.info("nfName in receive sub event " + executor.inFields.get("nfName")); - var changeType = executor.inFields.get("changeType") - var nfName = executor.inFields.get("nfName") - var ipAddress = executor.inFields.get("ipAddress") - var operationalPolicyName = executor.inFields.get("operationalPolicyName") - var controlLoopName = executor.inFields.get("controlLoopName") - var subscription = executor.inFields.get("subscription") - var blueprintName = executor.inFields.get("blueprintName") - var blueprintVersion = executor.inFields.get("blueprintVersion") - pmSubscriptionInfo.put("nfName", executor.inFields.get("nfName")); - pmSubscriptionInfo.put("ipAddress", executor.inFields.get("ipAddress")); - pmSubscriptionInfo.put("changeType", executor.inFields.get("changeType")) - pmSubscriptionInfo.put("operationalPolicyName", executor.inFields.get("operationalPolicyName")) - pmSubscriptionInfo.put("controlLoopName", executor.inFields.get("controlLoopName")) - pmSubscriptionInfo.put("subscription", subscription) - pmSubscriptionInfo.put("blueprintName", blueprintName) - pmSubscriptionInfo.put("blueprintVersion", blueprintVersion) - if ("delete".equals(changeType.toLowerCase())) { - pmSubscriptionInfo.put("subscriptionName", executor.inFields.get("subscriptionName")) - pmSubscriptionInfo.put("measurementGroupName", executor.inFields.get("measurementGroupName")) - } - executor.getContextAlbum("PMSubscriptionAlbum").put(albumID.toString(), pmSubscriptionInfo); - executor.outFields.put("albumID", albumID) - } else { - executor.message = "Received invalid event" - returnValue = false; - } - returnValue; - events: - key: - name: PMControlPolicy_Events - version: 0.0.1 - eventMap: - entry: - - key: - name: CDSCreateResponseEvent - version: 0.0.1 - value: - key: - name: CDSCreateResponseEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: CDS - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSResponseCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateResponsePayloadType - version: 0.0.1 - optional: false - - key: status - value: - key: status - fieldSchemaKey: - name: CDSResponseStatusType - version: 0.0.1 - optional: false - - key: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - value: - key: - name: CDSCreateSubscriptionRequestEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSRequestCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - optional: false - - key: - name: CDSDeleteResponseEvent - version: 0.0.1 - value: - key: - name: CDSDeleteResponseEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: CDS - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSResponseCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - optional: false - - key: status - value: - key: status - fieldSchemaKey: - name: CDSResponseStatusType - version: 0.0.1 - optional: false - - key: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - value: - key: - name: CDSDeleteSubscriptionRequestEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: actionIdentifiers - value: - key: actionIdentifiers - fieldSchemaKey: - name: CDSActionIdentifiersType - version: 0.0.1 - optional: false - - key: commonHeader - value: - key: commonHeader - fieldSchemaKey: - name: CDSRequestCommonHeaderType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - optional: false - - key: - name: CDSResponseStatusEvent - version: 0.0.1 - value: - key: - name: CDSResponseStatusEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: DCAE - parameter: - entry: - - key: status - value: - key: status - fieldSchemaKey: - name: SubscriptionStatusType - version: 0.0.1 - optional: false - - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - value: - key: - name: CreateSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - optional: false - - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - value: - key: - name: DeleteSubscriptionPayloadEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: payload - value: - key: payload - fieldSchemaKey: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - optional: false - - key: - name: MRResponseEvent - version: 0.0.1 - value: - key: - name: MRResponseEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: DCAE - target: APEX - parameter: - entry: - - key: count - value: - key: count - fieldSchemaKey: - name: SimpleIntType - version: 0.0.1 - optional: false - - key: serverTimeMs - value: - key: serverTimeMs - fieldSchemaKey: - name: SimpleIntType - version: 0.0.1 - optional: false - - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - value: - key: - name: PMSubscriptionOutputEvent - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: APEX - target: APEX - parameter: - entry: - - key: albumID - value: - key: albumID - fieldSchemaKey: - name: UUIDType - version: 0.0.1 - optional: false - - key: - name: pmsh-operational-policy - version: 0.0.1 - value: - key: - name: pmsh-operational-policy - version: 0.0.1 - nameSpace: org.onap.policy.apex.onap.pmcontrol - source: DCAE - target: APEX - parameter: - entry: - - key: blueprintName - value: - key: blueprintName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: blueprintVersion - value: - key: blueprintVersion - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: changeType - value: - key: changeType - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: controlLoopName - value: - key: controlLoopName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: ipAddress - value: - key: ipAddress - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: measurementGroupName - value: - key: measurementGroupName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: true - - key: nfName - value: - key: nfName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: operationalPolicyName - value: - key: operationalPolicyName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: false - - key: subscription - value: - key: subscription - fieldSchemaKey: - name: SubscriptionType - version: 0.0.1 - optional: true - - key: subscriptionName - value: - key: subscriptionName - fieldSchemaKey: - name: SimpleStringType - version: 0.0.1 - optional: true - albums: - key: - name: PMControlPolicy_Albums - version: 0.0.1 - albums: - entry: - - key: - name: PMSubscriptionAlbum - version: 0.0.1 - value: - key: - name: PMSubscriptionAlbum - version: 0.0.1 - scope: policy - isWritable: true - itemSchema: - name: PMSubscriptionType - version: 0.0.1 - schemas: - key: - name: PMControlPolicy_Schemas - version: 0.0.1 - schemas: - entry: - - key: - name: CDSActionIdentifiersType - version: 0.0.1 - value: - key: - name: CDSActionIdentifiersType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type": "record", - "name": "ActionIdentifiers_Type", - "namespace": "org.onap.policy.apex.onap.helloworld", - "fields": [ - { - "name": "actionName", - "type": "string" - }, - { - "name": "blueprintName", - "type": "string" - }, - { - "name": "blueprintVersion", - "type": "string" - }, - { - "name": "mode", - "type": "string" - } - ] - } - - key: - name: CDSCreateResponsePayloadType - version: 0.0.1 - value: - key: - name: CDSCreateResponsePayloadType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "name": "CreateResponsePayloadEntry", - "type": "record", - "namespace": "com.acme.avro", - "fields": [ - { - "name": "create_DasH_subscription_DasH_response", - "type": { - "name": "create_DasH_subscription_DasH_response", - "type": "record", - "fields": [ - { - "name": "odl_DasH_response", - "type": { - "name": "odl_DasH_response", - "type": "record", - "fields": [ - { - "name": "status", - "type": "string" - } - ] - } - } - ] - } - } - ] - } - - key: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - value: - key: - name: CDSCreateSubscriptionPayloadType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type":"map", - "values":{ - "type":"record", - "name":"CDSRequestPayloadEntry", - "fields":[ - { - "name":"create_DasH_subscription_DasH_properties", - "type":{ - "name":"create_DasH_subscription_DasH_properties_record", - "type":"record", - "fields":[ - { - "name":"nfName", - "type":"string" - }, - { - "name":"ipAddress", - "type":"string" - }, - { - "name":"subscriptionName", - "type":"string" - }, - { - "name":"fileBasedGP", - "type":"string" - }, - { - "name":"fileLocation", - "type":"string" - }, - { - "name":"measurementGroup", - "type":{ - "name":"Measurement_Group_Type", - "type":"record", - "fields":[ - { - "name":"measurementGroupName", - "type":"string" - }, - { - "name":"measurementTypes", - "type":{ - "type":"array", - "items":{ - "name":"Measurement_Types_Type", - "type":"record", - "fields":[ - { - "name":"measurementType", - "type":"string" - } - ] - } - } - }, - { - "name":"managedObjectDNsBasic", - "type":{ - "type":"array", - "items":{ - "name":"Managed_Object_Dns_Basic_Type", - "type":"record", - "fields":[ - { - "name":"DN", - "type":"string" - } - ] - } - } - } - ] - } - } - ] - } - } - ] - } - } - - key: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - value: - key: - name: CDSDeleteResponsePayloadType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "name": "DeleteResponsePayloadEntry", - "type": "record", - "namespace": "com.acme.avro", - "fields": [ - { - "name": "delete_DasH_subscription_DasH_response", - "type": { - "name": "delete_DasH_subscription_DasH_response", - "type": "record", - "fields": [ - { - "name": "odl_DasH_response", - "type": { - "name": "odl_DasH_response", - "type": "record", - "fields": [ - { - "name": "status", - "type": "string" - } - ] - } - } - ] - } - } - ] - } - - key: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - value: - key: - name: CDSDeleteSubscriptionPayloadType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type":"map", - "values":{ - "type":"record", - "name":"CDSRequestPayloadEntry", - "fields":[ - { - "name":"delete_DasH_subscription_DasH_properties", - "type":{ - "name":"delete_DasH_subscription_DasH_properties_record", - "type":"record", - "fields":[ - { - "name":"nfName", - "type":"string" - }, - { - "name":"ipAddress", - "type":"string" - }, - { - "name":"subscriptionName", - "type":"string" - }, - { - "name":"measurementGroupName", - "type":"string" - } - ] - } - } - ] - } - } - - key: - name: CDSRequestCommonHeaderType - version: 0.0.1 - value: - key: - name: CDSRequestCommonHeaderType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type": "record", - "name": "RequestCommonHeader_Type", - "namespace": "org.onap.policy.apex.onap.helloworld", - "fields": [ - { - "name": "originatorId", - "type": "string" - }, - { - "name": "requestId", - "type": "string" - }, - { - "name": "subRequestId", - "type": "string" - } - ] - } - - key: - name: CDSResponseCommonHeaderType - version: 0.0.1 - value: - key: - name: CDSResponseCommonHeaderType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type": "record", - "name": "ResponseCommonHeader_Type", - "namespace": "org.onap.policy.apex.onap.helloworld", - "fields": [ - { - "name": "originatorId", - "type": "string" - }, - { - "name": "requestId", - "type": "string" - }, - { - "name": "subRequestId", - "type": "string" - }, - { - "name": "timestamp", - "type": "string" - }, - { - "name": "flags", - "type": ["null", "string"] - } - ] - } - - key: - name: CDSResponseStatusType - version: 0.0.1 - value: - key: - name: CDSResponseStatusType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type": "record", - "name": "ResponseStatus_Type", - "namespace": "org.onap.policy.apex.onap.helloworld", - "fields": [ - { - "name": "code", - "type": "int" - }, - { - "name": "eventType", - "type": "string" - }, - { - "name": "timestamp", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - } - - key: - name: PMSubscriptionType - version: 0.0.1 - value: - key: - name: PMSubscriptionType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "name": "PMSubscription", - "type": "record", - "namespace": "org.onap.policy.apex.onap.pmcontrol", - "fields": [ - { - "name": "nfName", - "type": "string" - }, - { - "name": "ipAddress", - "type": "string" - }, - { - "name": "changeType", - "type": "string" - }, - { - "name": "controlLoopName", - "type": "string" - }, - { - "name": "operationalPolicyName", - "type": "string" - }, - { - "name": "blueprintName", - "type": "string" - }, - { - "name": "blueprintVersion", - "type": "string" - }, - { - "name": "subscriptionName", - "type": "string" - }, - { - "name": "measurementGroupName", - "type": "string" - }, - { - "name": "subscription", - "type": { - "name": "subscription", - "type": "record", - "fields": [ - { - "name": "subscriptionName", - "type": "string" - }, - { - "name": "fileBasedGP", - "type": "int" - }, - { - "name": "fileLocation", - "type": "string" - }, - { - "name": "measurementGroup", - "type": { - "name": "Measurement_Group_Type", - "type": "record", - "fields": [ - { - "name": "measurementGroupName", - "type": "string" - }, - { - "name": "measurementTypes", - "type": { - "type": "array", - "items": { - "name": "Measurement_Types_Type", - "type": "record", - "fields": [ - { - "name": "measurementType", - "type": "string" - } - ] - } - } - }, - { - "name": "managedObjectDNsBasic", - "type": { - "type": "array", - "items": { - "name": "Managed_Object_Dns_Basic_Type", - "type": "record", - "fields": [ - { - "name": "DN", - "type": "string" - } - ] - } - } - } - ] - } - } - ] - } - } - ] - } - - key: - name: SimpleIntType - version: 0.0.1 - value: - key: - name: SimpleIntType - version: 0.0.1 - schemaFlavour: Java - schemaDefinition: java.lang.Integer - - key: - name: SimpleStringType - version: 0.0.1 - value: - key: - name: SimpleStringType - version: 0.0.1 - schemaFlavour: Java - schemaDefinition: java.lang.String - - key: - name: SubscriptionStatusType - version: 0.0.1 - value: - key: - name: SubscriptionStatusType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "type": "record", - "name": "ActivateSubscriptionStatus_Type", - "namespace": "org.onap.policy.apex.onap.helloworld", - "fields": [ - { - "name": "subscriptionName", - "type": "string" - }, - { - "name": "measurementGroupName", - "type": "string" - }, - { - "name": "nfName", - "type": "string" - }, - { - "name": "changeType", - "type": "string" - }, - { - "name": "message", - "type": "string" - } - ] - } - - key: - name: SubscriptionType - version: 0.0.1 - value: - key: - name: SubscriptionType - version: 0.0.1 - schemaFlavour: Avro - schemaDefinition: |- - { - "name": "subscription", - "type": "record", - "default": "null", - "fields": [ - { - "name": "subscriptionName", - "type": "string" - }, - { - "name": "fileBasedGP", - "type": "int" - }, - { - "name": "fileLocation", - "type": "string" - }, - { - "name": "measurementGroup", - "type": { - "name": "Measurement_Group_Type", - "type": "record", - "fields": [ - { - "name": "measurementGroupName", - "type": "string" - }, - { - "name": "measurementTypes", - "type": { - "type": "array", - "items": { - "name": "Measurement_Types_Type", - "type": "record", - "fields": [ - { - "name": "measurementType", - "type": "string" - } - ] - } - } - }, - { - "name": "managedObjectDNsBasic", - "type": { - "type": "array", - "items": { - "name": "Managed_Object_Dns_Basic_Type", - "type": "record", - "fields": [ - { - "name": "DN", - "type": "string" - } - ] - } - } - } - ] - } - } - ] - } - - key: - name: UUIDType - version: 0.0.1 - value: - key: - name: UUIDType - version: 0.0.1 - schemaFlavour: Java - schemaDefinition: java.util.UUID - eventInputParameters: - DCAEConsumer: - carrierTechnologyParameters: - carrierTechnology: RESTCLIENT - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters - parameters: - consumerPollTime: '50' - url: https://message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT/cg1/sg1 - eventProtocolParameters: - eventProtocol: JSON - parameters: - nameAlias: operationalPolicyName - eventName: pmsh-operational-policy - eventNameFilter: pmsh-operational-policy - CDSRequestConsumer: - carrierTechnologyParameters: - carrierTechnology: RESTREQUESTOR - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters - parameters: - url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process - httpMethod: POST - restRequestTimeout: 2000 - httpHeaders: - - - Authorization - - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== - eventProtocolParameters: - eventProtocol: JSON - eventName: CDSCreateResponseEvent - eventNameFilter: CDSCreateResponseEvent - requestorMode: true - requestorPeer: CDSRequestProducer - requestorTimeout: 500 - CDSDeleteRequestConsumer: - carrierTechnologyParameters: - carrierTechnology: RESTREQUESTOR - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters - parameters: - url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process - httpMethod: POST - restRequestTimeout: 2000 - httpHeaders: - - - Authorization - - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== - eventProtocolParameters: - eventProtocol: JSON - eventName: CDSDeleteResponseEvent - eventNameFilter: CDSDeleteResponseEvent - requestorMode: true - requestorPeer: CDSDeleteRequestProducer - requestorTimeout: 500 - eventOutputParameters: - logOutputter: - carrierTechnologyParameters: - carrierTechnology: FILE - parameters: - standardIo: true - eventProtocolParameters: - eventProtocol: JSON - StdOutOutputter: - carrierTechnologyParameters: - carrierTechnology: FILE - parameters: - standardIo: true - eventProtocolParameters: - eventProtocol: JSON - CDSRequestProducer: - carrierTechnologyParameters: - carrierTechnology: RESTREQUESTOR - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters - eventProtocolParameters: - eventProtocol: JSON - eventNameFilter: CDSCreateSubscriptionRequestEvent - requestorMode: true - requestorPeer: CDSRequestConsumer - requestorTimeout: 500 - CDSDeleteRequestProducer: - carrierTechnologyParameters: - carrierTechnology: RESTREQUESTOR - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters - eventProtocolParameters: - eventProtocol: JSON - eventNameFilter: CDSDeleteSubscriptionRequestEvent - requestorMode: true - requestorPeer: CDSDeleteRequestConsumer - requestorTimeout: 500 - CDSReplyProducer: - carrierTechnologyParameters: - carrierTechnology: RESTCLIENT - parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters - parameters: - url: https://message-router:3905/events/unauthenticated.PMSH_CL_INPUT - httpMethod: POST - restRequestTimeout: 2000 - eventProtocolParameters: - eventProtocol: JSON - eventNameFilter: CDSResponseStatusEvent diff --git a/csit/clamp/tests/data/http-usecase.yaml b/csit/clamp/tests/data/http-usecase.yaml deleted file mode 100644 index cea74ab4..00000000 --- a/csit/clamp/tests/data/http-usecase.yaml +++ /dev/null @@ -1,312 +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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= -tosca_definitions_version: tosca_simple_yaml_1_3 -data_types: - onap.datatypes.ToscaConceptIdentifier: - derived_from: tosca.datatypes.Root - properties: - name: - type: string - required: true - version: - type: string - required: true - - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - restRequestId: - type: onap.datatypes.ToscaConceptIdentifier - required: true - description: The name and version of a REST request to be sent to a REST endpoint - httpMethod: - type: string - required: true - constraints: - - valid_values: - - POST - - PUT - - GET - - DELETE - description: The REST method to use - path: - type: string - required: true - description: The path of the REST request relative to the base URL - body: - type: string - required: false - description: The body of the REST request for PUT and POST requests - expectedResponse: - type: integer - required: true - constraints: [] - description: THe expected HTTP status code for the REST request - org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: - version: 1.0.0 - derived_from: tosca.datatypes.Root - properties: - configurationEntityId: - type: onap.datatypes.ToscaConceptIdentifier - required: true - description: The name and version of a Configuration Entity to be handled - by the HTTP Automation Composition Element - restSequence: - type: list - entry_schema: - type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest - type_version: 1.0.0 - description: A sequence of REST commands to send to the REST endpoint - -node_types: - org.onap.policy.clamp.acm.Participant: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - org.onap.policy.clamp.acm.AutomationCompositionElement: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: Specifies the organization that provides the automation composition element - participant_id: - type: onap.datatypes.ToscaConceptIdentifier - required: true - metadata: - common: true - participantType: - type: onap.datatypes.ToscaConceptIdentifier - required: true - metadata: - common: true - description: The identity of the participant type that hosts this type of Automation Composition Element - startPhase: - type: integer - required: false - constraints: - - greater_or_equal: 0 - metadata: - common: true - description: A value indicating the start phase in which this automation composition element will be started, the - first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped - in reverse start phase order. Automation Composition Elements with the same start phase are started and - stopped simultaneously - uninitializedToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from uninitialized to passive - passiveToRunningTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from passive to running - runningToPassiveTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from running to passive - passiveToUninitializedTimeout: - type: integer - required: false - constraints: - - greater_or_equal: 0 - default: 60 - metadata: - common: true - description: The maximum time in seconds to wait for a state chage from passive to uninitialized - org.onap.policy.clamp.acm.AutomationComposition: - version: 1.0.1 - derived_from: tosca.nodetypes.Root - properties: - provider: - type: string - required: false - metadata: - common: true - description: Specifies the organization that provides the automation composition element - elements: - type: list - required: true - metadata: - common: true - entry_schema: - type: onap.datatypes.ToscaConceptIdentifier - description: Specifies a list of automation composition element definitions that make up this automation composition definition - org.onap.policy.clamp.acm.HttpAutomationCompositionElement: - version: 1.0.1 - derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement - properties: - baseUrl: - type: string - required: true - description: The base URL to be prepended to each path, identifies the host for the REST endpoints. - httpHeaders: - type: map - required: false - entry_schema: - type: string - description: HTTP headers to send on REST requests - configurationEntities: - type: map - required: true - entry_schema: - type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity - type_version: 1.0.0 - description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests - -topology_template: - node_templates: - org.onap.policy.clamp.acm.HttpParticipant: - version: 2.3.4 - type: org.onap.policy.clamp.acm.Participant - type_version: 1.0.1 - description: Participant for Http requests - properties: - provider: ONAP - onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement: - # Http config for AC Element Starter. - version: 1.2.3 - type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the http requests of AC Element Starter microservice - properties: - provider: ONAP - participant_id: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - uninitializedToPassiveTimeout: 180 - startPhase: 0 - baseUrl: http://acelement-starter:8084 - httpHeaders: - Content-Type: application/json - Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' - configurationEntities: - - configurationEntityId: - name: onap.policy.clamp.ac.starter - version: 1.0.0 - restSequence: - - restRequestId: - name: request1 - version: 1.0.1 - httpMethod: POST - path: /activate - body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridge", "version": "1.0.0" }, "timerMs": 4000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' - expectedResponse: 201 - onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement: - # Http config for AC Element Bridge. - version: 1.2.3 - type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the http requests of AC Element Bridge microservice - properties: - provider: ONAP - participant_id: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - uninitializedToPassiveTimeout: 180 - startPhase: 0 - baseUrl: http://acelement-bridge:8084 - httpHeaders: - Content-Type: application/json - Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' - configurationEntities: - - configurationEntityId: - name: onap.policy.clamp.ac.bridge - version: 1.0.0 - restSequence: - - restRequestId: - name: request2 - version: 1.0.1 - httpMethod: POST - path: /activate - body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' - expectedResponse: 201 - onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement: - # Http config for AC Element Sink. - version: 1.2.3 - type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - type_version: 1.0.1 - description: Automation composition element for the http requests of AC Element Sink microservice - properties: - provider: ONAP - participant_id: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - uninitializedToPassiveTimeout: 180 - startPhase: 0 - baseUrl: http://acelement-sink:8084 - httpHeaders: - Content-Type: application/json - Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' - configurationEntities: - - configurationEntityId: - name: onap.policy.clamp.ac.sink - version: 1.0.0 - restSequence: - - restRequestId: - name: request3 - version: 1.0.1 - httpMethod: POST - path: /activate - body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' - expectedResponse: 201 - - onap.policy.clamp.ac.element.AutomationCompositionDefinition: - version: 1.2.3 - type: org.onap.policy.clamp.acm.AutomationComposition - type_version: 1.0.1 - description: Automation composition for Demp - properties: - provider: ONAP - elements: - - name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement - version: 1.2.3 - - name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement - version: 1.2.3 - - name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement - version: 1.2.3 diff --git a/csit/clamp/tests/policy-clamp-test.robot b/csit/clamp/tests/policy-clamp-test.robot deleted file mode 100644 index 2c31b9a3..00000000 --- a/csit/clamp/tests/policy-clamp-test.robot +++ /dev/null @@ -1,98 +0,0 @@ -*** 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://localhost:${POLICY_RUNTIME_ACM_PORT} - ${session}= Create Session ACM http://localhost:${POLICY_RUNTIME_ACM_PORT} 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://localhost:${POLICY_RUNTIME_ACM_PORT} -# ${postyaml}= Get file ${CURDIR}/data/functional-pmsh-usecase.yaml -# ${session}= Create Session policy http://localhost:${POLICY_RUNTIME_ACM_PORT} 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://localhost:${POLICY_RUNTIME_ACM_PORT} -# ${postjson}= Get file ${CURDIR}/data/AutomationComposition.json -# ${updatedpostjson}= Replace String ${postjson} COMPOSITIONIDPLACEHOLDER ${compositionId} -# ${session}= Create Session policy http://localhost:${POLICY_RUNTIME_ACM_PORT} 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://localhost:${POLICY_RUNTIME_ACM_PORT} -# ${postjson}= Get file ${CURDIR}/data/PassiveCommand.json -# ${session}= Create Session policy http://localhost:${POLICY_RUNTIME_ACM_PORT} 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://localhost:${POLICY_API_PORT} -# ${session}= Create Session policy http://localhost:${POLICY_API_PORT} 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://localhost:${POLICY_API_PORT}}:6969 -# ${session}= Create Session policy http://localhost:${POLICY_API_PORT} 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://localhost:${POLICY_RUNTIME_ACM_PORT} -# ${postjson}= Get file ${CURDIR}/data/RunningCommand.json -# ${session}= Create Session policy http://localhost:${POLICY_RUNTIME_ACM_PORT} 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://localhost:${POLICY_RUNTIME_ACM_PORT} -# ${session}= Create Session policy http://localhost:${POLICY_RUNTIME_ACM_PORT} 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/csit/common-library.robot b/csit/common-library.robot deleted file mode 100644 index 871e7efe..00000000 --- a/csit/common-library.robot +++ /dev/null @@ -1,137 +0,0 @@ -*** 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] ${port} ${url} ${expectedstatus} ${postjson} ${params} ${auth} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${port} 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] ${port} ${url} ${expectedstatus} ${params} ${auth} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${port} 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] ${port} ${url} ${expectedstatus} ${params} ${auth} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${port} 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] ${port} ${url} ${expectedstatus} ${auth} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${port} 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_PORT} ${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_PORT} ${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_PORT} /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_PORT} ${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_PORT} /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] ${port} ${auth} ${context_path} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${port} auth=${auth} - ${resp}= GET On Session policy ${context_path}metrics expected_status=200 - Log Received response from policy ${resp.text} - [return] ${resp} - -QueryPrometheus - [Arguments] ${query} - ${params}= Create Dictionary query=${query} - ${resp}= GET http://localhost:30259/api/v1/query ${params} - Status Should Be OK - Log Received response from Prometheus ${resp.text} - [return] ${resp.json()} - -ValidateResponseTime - [Arguments] ${job} ${uri} ${method} ${timeLimit} - [Documentation] Check if uri response is under the required time - ${resp}= QueryPrometheus http_server_requests_seconds_sum{uri="${uri}",method="${method}",job="${job}"}/http_server_requests_seconds_count{uri="${uri}",method="${method}",job="${job}"} - ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} - ${actualTime}= Set Variable ${rawNumber * ${1000}} - Should Be True ${actualTime} <= ${timeLimit} diff --git a/csit/compose-postgres.yml b/csit/compose-postgres.yml deleted file mode 100644 index 6c5e00a7..00000000 --- a/csit/compose-postgres.yml +++ /dev/null @@ -1,69 +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: - postgres: - image: nexus3.onap.org:10001/library/postgres:${POLICY_POSTGRES_VER} - container_name: postgres - hostname: postgres - command: ['--idle_in_transaction_session_timeout=28800'] - env_file: config/db-pg/db-pg.conf - volumes: - - ./config/db-pg:/docker-entrypoint-initdb.d:ro - expose: - - 5432 - policy-db-migrator-postgres: - image: nexus3.onap.org:10001/onap/policy-db-migrator:${POLICY_DOCKER_VERSION} - container_name: policy-db-migrator-postgres - hostname: policy-db-migrator-postgres - depends_on: - - postgres - expose: - - 6824 - env_file: config/db-pg/db-pg.conf - environment: - SQL_DB: policyadmin - SQL_HOST: postgres - PGPASSWORD: policy_user - volumes: - - ./db_migrator_policy_init_pg.sh:/opt/app/policy/bin/db_migrator_policy_init_pg.sh:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', - '/opt/app/policy/bin/db_migrator_policy_init_pg.sh', - 'postgres', '5432' - ] - api: - image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION} - container_name: policy-api - depends_on: - - policy-db-migrator-postgres - hostname: policy-api - expose: - - 6980 - volumes: - - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/api/etc/ssl/policy-truststore: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', - 'postgres', '5432', - 'policy-db-migrator-postgres', '6824' - ] \ No newline at end of file diff --git a/csit/config/apex-pdp/OnapPfConfig.json b/csit/config/apex-pdp/OnapPfConfig.json deleted file mode 100644 index 57ca7200..00000000 --- a/csit/config/apex-pdp/OnapPfConfig.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name":"OnapPfParameterGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "https": false, - "prometheus": true - }, - "pdpStatusParameters":{ - "pdpGroup": "defaultGroup", - "timeIntervalMs": 120000, - "pdpType":"apex", - "description":"Pdp Heartbeat", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ] - }, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : false - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : false - }] - } -} diff --git a/csit/config/apex-pdp/groups.json b/csit/config/apex-pdp/groups.json deleted file mode 100644 index bd5c2868..00000000 --- a/csit/config/apex-pdp/groups.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/csit/config/apex-pdp/logback.xml b/csit/config/apex-pdp/logback.xml deleted file mode 100644 index eb5613c0..00000000 --- a/csit/config/apex-pdp/logback.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/api/apiParameters.yaml b/csit/config/api/apiParameters.yaml deleted file mode 100644 index 36d53915..00000000 --- a/csit/config/api/apiParameters.yaml +++ /dev/null @@ -1,86 +0,0 @@ -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /policy/api/v1 - -spring: - security.user: - name: policyadmin - password: zb!XztG34 - mvc.converters.preferred-json-mapper: gson - - datasource: - url: jdbc:mariadb://mariadb:3306/policyadmin - driverClassName: org.mariadb.jdbc.Driver - username: policy_user - password: policy_user - jpa: - properties: - hibernate: - dialect: org.hibernate.dialect.MariaDB103Dialect - hibernate: - ddl-auto: none - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy - -policy-api: - name: ApiGroup - aaf: false - -database: - name: PolicyProviderParameterGroup - implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl - driver: org.mariadb.jdbc.Driver - url: jdbc:mariadb://mariadb:3306/policyadmin - user: policy_user - password: policy_user - persistenceUnit: PolicyDb - -policy-preload: - policyTypes: - - policytypes/onap.policies.monitoring.tcagen2.yaml - - policytypes/onap.policies.monitoring.tcagen2.v2.yaml - - policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml - - policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml - - policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml - - policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml - - policytypes/onap.policies.Optimization.yaml - - policytypes/onap.policies.optimization.Resource.yaml - - policytypes/onap.policies.optimization.Service.yaml - - policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml - - policytypes/onap.policies.optimization.resource.DistancePolicy.yaml - - policytypes/onap.policies.optimization.resource.HpaPolicy.yaml - - policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml - - policytypes/onap.policies.optimization.resource.PciPolicy.yaml - - policytypes/onap.policies.optimization.service.QueryPolicy.yaml - - policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml - - policytypes/onap.policies.optimization.resource.Vim_fit.yaml - - policytypes/onap.policies.optimization.resource.VnfPolicy.yaml - - policytypes/onap.policies.controlloop.guard.Common.yaml - - policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml - - policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml - - policytypes/onap.policies.controlloop.guard.common.MinMax.yaml - - policytypes/onap.policies.controlloop.guard.common.Filter.yaml - - policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml - - policytypes/onap.policies.Naming.yaml - - policytypes/onap.policies.Match.yaml - - policytypes/onap.policies.native.Drools.yaml - - policytypes/onap.policies.native.Xacml.yaml - - policytypes/onap.policies.native.Apex.yaml - - policytypes/onap.policies.controlloop.operational.Common.yaml - - policytypes/onap.policies.controlloop.operational.common.Apex.yaml - - policytypes/onap.policies.controlloop.operational.common.Drools.yaml - policies: - - policies/sdnc.policy.naming.input.tosca.yaml - -management: - endpoints: - web: - base-path: / - exposure: - include: health,metrics,prometheus - path-mapping.metrics: plain-metrics - path-mapping.prometheus: metrics diff --git a/csit/config/api/groups.json b/csit/config/api/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/api/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/api/logback.xml b/csit/config/api/logback.xml deleted file mode 100644 index 83a70993..00000000 --- a/csit/config/api/logback.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - ${logDir}/${metricLog}.log - - ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${metricPattern} - - - - - - - - - ${logDir}/${transactionLog}.log - - ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${transactionPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/clamp/A1pmsParticipantParameters.yaml b/csit/config/clamp/A1pmsParticipantParameters.yaml deleted file mode 100755 index c9b5a8ad..00000000 --- a/csit/config/clamp/A1pmsParticipantParameters.yaml +++ /dev/null @@ -1,59 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: - - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration - - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration - - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration -security: - enable-csrf: false - -a1pms: - baseUrl: http://a1policymanagement.onap:8081 - headers: - content-type: application/json - endpoints: - health: /a1-policy/v2/rics - services: /a1-policy/v2/services - service: /a1-policy/v2/services/{service_id} - -participant: - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: - name: A1PMSParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.A1PMSParticipant - version: 2.3.4 - clampAutomationCompositionTopics: - topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - fetchTimeout: 15000 - topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - - -management: - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/a1pmsparticipant \ No newline at end of file diff --git a/csit/config/clamp/AcRuntimeParameters.yaml b/csit/config/clamp/AcRuntimeParameters.yaml deleted file mode 100644 index dc7b6b92..00000000 --- a/csit/config/clamp/AcRuntimeParameters.yaml +++ /dev/null @@ -1,71 +0,0 @@ -spring: - security: - user: - name: runtimeUser - password: zb!XztG34 - mvc: - converters: - preferred-json-mapper: gson - datasource: - url: jdbc:mariadb://${mariadb.host:mariadb}:${mariadb.port:3306}/clampacm - driverClassName: org.mariadb.jdbc.Driver - username: policy_user - password: policy_user - hikari: - connectionTimeout: 30000 - idleTimeout: 600000 - maxLifetime: 1800000 - maximumPoolSize: 10 - jpa: - hibernate: - ddl-auto: update - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy - properties: - hibernate: - dialect: org.hibernate.dialect.MariaDB103Dialect - format_sql: true - -security: - enable-csrf: false - -server: - servlet: - context-path: /onap/policy/clamp/acm - port: 6969 - ssl: - enabled: false - error: - path: /error - -runtime: - participantParameters: - heartBeatMs: 20000 - maxStatusWaitMs: 100000 - updateParameters: - maxRetryCount: 3 - maxWaitMs: 20000 - topicParameterGroup: - topicSources: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - useHttps: false - -management: - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus diff --git a/csit/config/clamp/ClampBackend.properties b/csit/config/clamp/ClampBackend.properties deleted file mode 100644 index b9776d04..00000000 --- a/csit/config/clamp/ClampBackend.properties +++ /dev/null @@ -1,197 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ONAP POLICY-DOCKER -# ================================================================================ -# Copyright (C) 2022 Nordix Foundation. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END============================================ -# =================================================================== -# -### - -### Set the port for HTTP or HTTPS protocol (Controlled by Spring framework, only one at a time). -### (See below for the parameter 'server.http.port' if you want to have both enabled) -### To have only HTTP, keep the lines server.ssl.* commented -### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location -### server.port=8080 -### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port') -#server.ssl.key-store=file:/tmp/mykey.jks -#server.ssl.key-store-password=pass -#server.ssl.key-password=pass - -### In order to be user friendly when HTTPS is enabled, -### you can add another HTTP port that will be automatically redirected to HTTPS -### by enabling this parameter (server.http.port) and set it to another port (80 or 8080, 8090, etc ...) -#server.http-to-https-redirection.port=8090 - -### HTTP Example: -###-------------- -### server.port=8080 - -### HTTPS Example: -### -------------- -### server.port=8443 -#server.ssl.key-store=file:/opt/policy/clamp/policy-keystore -#server.ssl.key-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd -#server.ssl.key-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd -#server.ssl.key-store-type=jks -server.port=8445 -## Config part for Server certificates -# Can be a classpath parameter instead of file:/ -#server.ssl.key-store=classpath:/clds/aaf/org.onap.clamp.p12 -#server.ssl.key-store-password=enc:YZs7M6IftyPjHniTa6J7G2416hssb8qI-Av8D1b8pPS -#server.ssl.key-password=enc:YZs7M6IftyPjHniTa6J7G2416hssb8qI-Av8D1b8pPS - -## Config part for Client certificates -#server.ssl.client-auth=want -#server.ssl.trust-store=classpath:/clds/aaf/truststoreONAPall.jks -#server.ssl.trust-store-password=enc:iDnPBBLq_EMidXlMa1FEuBR8TZzYxrCg66vq_XfLHdJ -#server.ssl.trust-store=file:/opt/policy/clamp/policy-truststore -#server.ssl.trust-store-password=enc:qWxBtY7w9h5Hl72vQKgI5G1qqyRIuBarQqMkVDHqZmd - -# The key file used to decode the key store and trust store password -# If not defined, the key store and trust store password will not be decrypted -#clamp.config.keyFile=classpath:/clds/aaf/org.onap.clamp.keyfile -#clamp.config.keyFile=file:/opt/policy/clamp/clamp-be-keyfile - -server.http-to-https-redirection.port=8080 - -server.servlet.context-path=/ -#Modified engine-rest applicationpath -spring.profiles.active=clamp-default,clamp-default-user,clamp-policy-controller,default-dictionary-elements -spring.http.converters.preferred-json-mapper=gson - -#The max number of active threads in this pool -server.tomcat.max-threads=200 -#The minimum number of threads always kept alive -server.tomcat.min-Spare-Threads=25 -#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads -server.tomcat.max-idle-time=60000 - -#Servlet context parameters -server.context_parameters.p-name=value #context parameter with p-name as key and value as value. - -camel.springboot.consumer-template-cache-size=1000 -camel.springboot.producer-template-cache-size=1000 -camel.springboot.jmx-enabled=true -camel.defaultthreadpool.poolsize=10 -camel.defaultthreadpool.maxpoolsize=20 -camel.defaultthreadpool.maxqueuesize=1000 -camel.defaultthreadpool.keepaliveTime=60 -camel.defaultthreadpool.rejectpolicy=CallerRuns -camel.springboot.xml-routes=classpath:/clds/camel/routes/*.xml -camel.springboot.xml-rests=classpath:/clds/camel/rest/*.xml -camel.springboot.backlog-tracing=true -camel.springboot.tracing=true - -#clds datasource connection details -spring.datasource.driverClassName=org.mariadb.jdbc.Driver -spring.datasource.url=jdbc:mariadb:sequential://${MARIADB_HOST}:3306/policyclamp?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3 -spring.datasource.username=policy_user -spring.datasource.password=policy_user -spring.datasource.validationQuery=SELECT 1 -spring.datasource.validationQueryTimeout=20000 -spring.datasource.validationInterval=30000 -spring.datasource.testWhileIdle = true -spring.datasource.minIdle = 0 -spring.datasource.initialSize=0 -# Automatically test whether a connection provided is good or not -spring.datasource.testOnBorrow=true -spring.datasource.ignoreExceptionOnPreLoad=true -# control the sql db initialization (from schema.sql and data.sql) -spring.datasource..initialize=false - -spring.jpa.properties.javax.persistence.schema-generation.database.action=none -s#pring.jpa.properties.javax.persistence.schema-generation.create-source=metadata -#spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create -#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql -# disable Hibernate DDL generation because the schema will be generated from a sql script -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -spring.jpa.properties.hibernate.ddl-auto=validate -spring.jpa.properties.hibernate.hbm2ddl.delimiter=; -spring.jpa.properties.hibernate.format_sql=true -spring.jpa.properties.hibernate.use-new-id-generator-mappings=true - -# Whether to enable logging of SQL statements. -#spring.jpa.show-sql=true - -#Async Executor default Parameters -async.core.pool.size=10 -async.max.pool.size=20 -async.queue.capacity=500 - -#For logback file -clamp.config.logback.path=/opt/policy/clamp/config -clamp.config.logback.filename=logback.xml -#The log folder that will be used in logback.xml file -clamp.config.log.path=/var/log/onap/policy/clamp -clamp.config.files.systemProperties=classpath:/system.properties -clamp.config.files.cldsUsers=classpath:/clds/clds-users.json -clamp.config.files.globalProperties=classpath:/clds/templates/globalProperties.json -clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json - -clamp.config.httpclient.socketTimeout=60000 -clamp.config.httpclient.connectTimeout=10000 - -# -# Configuration Settings for Policy Engine Components -clamp.config.policy.api.url=http://${POLICY_API_HOST}:6969 -clamp.config.policy.api.userName=policyadmin -clamp.config.policy.api.password=zb!XztG34 -clamp.config.policy.pap.url=http://${POLICY_PAP_HOST}:6969 -clamp.config.policy.pap.userName=policyadmin -clamp.config.policy.pap.password=zb!XztG34 - -# -# Sdc service properties -clamp.config.sdc.csarFolder = /tmp/sdc-controllers - -#DCAE Inventory Url Properties -clamp.config.dcae.inventory.url=http://localhost:8085 -clamp.config.dcae.intentory.retry.interval=10000 -clamp.config.dcae.intentory.retry.limit=5 - -#DCAE Deployment Url Properties -clamp.config.dcae.deployment.url=http://localhost:8085 -clamp.config.dcae.deployment.userName=test -clamp.config.dcae.deployment.password=test - -#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case ! -clamp.config.security.permission.type.cl=org.onap.clamp.clds.cl -clamp.config.security.permission.type.cl.manage=org.onap.clamp.clds.cl.manage -clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event -clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf -clamp.config.security.permission.type.template=org.onap.clamp.clds.template -clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca -clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies -#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties -clamp.config.security.permission.instance=dev -clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal - -## Tosca converter -clamp.config.tosca.converter.json.schema.templates=classpath:/clds/tosca-converter/templates.json -clamp.config.tosca.converter.default.datatypes=classpath:/clds/tosca-converter/default-tosca-types.yaml -clamp.config.tosca.converter.dictionary.support.enabled=true - -# Configuration settings for CDS -clamp.config.cds.url=http://cds-blueprints-processor-http:8080 -clamp.config.cds.userName=ccsdkapps -clamp.config.cds.password=ccsdkapps - -# Configuration settings for ControlLoop Runtime Rest API -clamp.config.acm.runtime.url=http://${RUNTIME_HOST}:6969 -clamp.config.acm.runtime.userName=runtimeUser -clamp.config.acm.runtime.password=zb!XztG34 diff --git a/csit/config/clamp/HttpParticipantParameters.yaml b/csit/config/clamp/HttpParticipantParameters.yaml deleted file mode 100644 index 038e97af..00000000 --- a/csit/config/clamp/HttpParticipantParameters.yaml +++ /dev/null @@ -1,47 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -security: - enable-csrf: false -participant: - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: - name: HttpParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.HttpParticipant - version: 2.3.4 - clampAutomationCompositionTopics: - topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - fetchTimeout: 15000 - useHttps: false - topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - useHttps: false -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/httpparticipant diff --git a/csit/config/clamp/KubernetesParticipantParameters.yaml b/csit/config/clamp/KubernetesParticipantParameters.yaml deleted file mode 100644 index d9c3326f..00000000 --- a/csit/config/clamp/KubernetesParticipantParameters.yaml +++ /dev/null @@ -1,68 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -security: - enable-csrf: false - -participant: - localChartDirectory: /home/policy/local-charts - infoFileName: CHART_INFO.json - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: - name: K8sParticipant0 - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.KubernetesParticipant - version: 2.3.4 - clampAutomationCompositionTopics: - topicSources: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - useHttps: false - -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/k8sparticipant - -logging: - # Configuration of logging - level: - ROOT: ERROR - org.springframework: ERROR - org.springframework.data: ERROR - org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - org.onap.policy.clamp.acm.participant.kubernetes: INFO - file: - name: /var/log/onap/policy/clamp/application.log - -chart: - api: - enabled: false diff --git a/csit/config/clamp/PolicyParticipantParameters.yaml b/csit/config/clamp/PolicyParticipantParameters.yaml deleted file mode 100644 index 8db98a78..00000000 --- a/csit/config/clamp/PolicyParticipantParameters.yaml +++ /dev/null @@ -1,65 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -participant: - pdpGroup: defaultGroup - pdpType: apex - policyApiParameters: - clientName: api - hostname: policy-api - port: 6969 - userName: policyadmin - password: zb!XztG34 - useHttps: false - allowSelfSignedCerts: true - policyPapParameters: - clientName: pap - hostname: policy-pap - port: 6969 - userName: policyadmin - password: zb!XztG34 - useHttps: false - allowSelfSignedCerts: true - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: - name: org.onap.PM_Policy - version: 1.0.0 - participantType: - name: org.onap.policy.clamp.acm.PolicyParticipant - version: 2.3.1 - clampAutomationCompositionTopics: - topicSources: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: POLICY-ACRUNTIME-PARTICIPANT - servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap - useHttps: false -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/policyparticipant diff --git a/csit/config/clamp/groups.json b/csit/config/clamp/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/clamp/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/clamp/logback-backend.xml b/csit/config/clamp/logback-backend.xml deleted file mode 100644 index cfa280c4..00000000 --- a/csit/config/clamp/logback-backend.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - INFO - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - - - - ERROR - ACCEPT - DENY - - ${logDirectory}/error.log - true - - ${errorPattern} - - - ${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - ${logDirectory}/debug.log - true - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - ${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - - ${logDirectory}/audit.log - - ${auditPattern} - - - ${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - - ${logDirectory}/metric.log - - ${metricPattern} - - - ${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - - - ${logDirectory}/security.log - - %X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n - - - - ${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - - - - ${logDirectory}/Audits.log - - ${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - "%d [%thread] %-5level %logger{1024} - %msg%n" - - - - - - - ${logDirectory}/Perform.log - - ${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - "%d [%thread] %-5level %logger{1024} - %msg%n" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/clamp/logback.xml b/csit/config/clamp/logback.xml deleted file mode 100644 index c316e179..00000000 --- a/csit/config/clamp/logback.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - ${logDir}/${metricLog}.log - - ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${metricPattern} - - - - - - - - - ${logDir}/${transactionLog}.log - - ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${transactionPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/clamp/org.onap.clamp.keyfile b/csit/config/clamp/org.onap.clamp.keyfile deleted file mode 100644 index c2521fc8..00000000 --- a/csit/config/clamp/org.onap.clamp.keyfile +++ /dev/null @@ -1,27 +0,0 @@ -kzJMxgphAoBxJz1_vYjxx-V87fahDQdYUqBIyWhZp8ojXdNpmB-96T9CvgJScJynbLcqw2Cj2CYx -wd97vFOYhlyz5zK3tSyIuydOkVGJsJ1S4PviTtjhiJvNourJNDHgtas1Y1y2fQ5_8aVxj-s4W72N -MNYhkeTinaQx_d_5hkBPABJlgCxKLnmxHo2jAJktnZYa5t5h48m7KiUx_RVEkQVtEvux-7vgXaC4 -ymTXj6zI9XoMTVxM0OAl4y7kBiUoOUaxS4tVKV34RJYNNqBjiUTQa_ag-KeUacRABk1ozfwzpvE5 -Sjz8WCy0L-LtCQnapkhKLt04ndCZtw8LDJ-Zz0ZgR2PVIPpTgs9VnVuOi5jf4LzTrtUatvOWkKB9 -drXKzp6cNXnZ0jkD3vV1BzqzhynKnZR2o_ilZv5CTTdpGUt906N_DwZuX6LfcV_7yvjX42bTfeIR -ycPtodFPXlqqn9VUyh5nOauJlnOHAQmSDzjMEgjy17nQX3Ad7s4BfvujzUl-d0MqB_HCKbaW32UT -xcY-0JfI1Y-2IdYfIkUdhVmxop6sSg0jAobWzgCRoRQkP3a2iIlKdfMyskshoWKIDVtlr-3fkDEb -x_b_o1rRoUfzUzxEdphaUAq80Sc0i77ZLT3KF9vJOhyU_pBnApYFxVk7Hkk3VRxJKS7jyL4H7k1x -2m5-2G8fB9XbYZT82xmAquNx4oBdpwj3_ncGF9YRF94K6NZgqemT5iWhpXMoelSU1blASgT3qlTm -B6YgbD5owExNHwRVd8KeRsYrOnBWUiktsIhXFhNZmDUNWMFGQ2KxEcOt1tJwsQDehJFgY_l1JQ0d -643wJ7rTJkGkYX309cydRQUX4Z0ckSQS9LhMd9stxF5XOHlvHdbW0pXNS7SaLbzKCVldUgncvI6z -KWkwrWbftrZK2RT1UZKNngQDMGOk9OhbHAs7YzhFNFARZoRNobIv5tZVDomy-YgJb9-mD1UTkRBL -WXOyoryDlgKrgFsgHclGDI1UFO5N-JfebPKxbP505f4924hxF2r8bspvVW8ZtHQo_SJmhauOX8n_ -eN_LK43LB9k53WAHZ_utvs0s6wGf7I73oj_N7DIFaHTDSm_MhDsFDLVG_wUzCpZ5FP2uL3nnqMkF -Ob-l1fywfmfOmrz1BY6g4sRPPeWXuclYTnRnDRu5VQyc7_aBEVkyt3zw0JEex0vJNFUJl3pYjS55 -GplAB6p7VbS9ceZEtc5Z3qFIVHEzKWZxT190E23t_LlMuEoQ1zaqdHynNaMs61-q_A2aHRiTqlRm -7FahVB3RX4AVLl23mu4u3A9ZDXc40nzjs9mwOVsuKlPvQ2rteDUG1njr2R1_V_MyQuoJjdfbIkPG -4eF0QzlSMdbkeprdQxSfV5YT-yPpkBxSsCMMM43sKm4Hy7_CUdvp4Iayrp3vtK3oYMuCGi6qTadz -KzxfTf8meKan3eMZW4RLByyniH5nQnX_KGfBly05AmFyVH_j0fyOg-48kDhtEKeqmDnP4C01jOID -Ip_AKaB6e0GwsHzVTLZOklHwu_qzsaTzchBOG_dJJju7bxY7qv78Pa92wZIP311gSCVbc-gxxbsR -qI555twmYEoasFm4xz10OYDOkvM1E1Rtxu3ymRLZpe6AoyFBVzEW7Dncdw7O98dKcgrp8ZlQ_8Wg -5zZH0Cic7xnIZ0bNZyQXw56CSUiXVWuwVY3e0djXP3F-FO5gP8VTxbpW4C0t6McXAOlvSEfFKxN7 -u6OBeOKwjrtHaJk2ghF8MUcpDXanhbAgHez9larGlscCkgvoRLNaRH9GIdSVgY3HtNhJRaJIq01S -OGeBjC5J4o-nTrqRFkwyDAYcPL373eYX1dBFFVHR-4q50H9m_zMxZHXETafxzV4DT3Qi8Sxh3uaS -ZX7mRaNaOE0uC1n87_IZ9WhrwIQaZng2lnd9yZ-4rx8fB8WA8KQzifzvHAcMb_HV10JWGaz5A2Rm -EXDsfexQC6CqYg5rdzzlNWDPNlHy5ubyz7fRXZ99uIwBY9aJcvCXCiEXJkC6utj3NcXQrJmk \ No newline at end of file diff --git a/csit/config/clamp/policy-clamp-create-tables.sql b/csit/config/clamp/policy-clamp-create-tables.sql deleted file mode 100644 index 5d655ad5..00000000 --- a/csit/config/clamp/policy-clamp-create-tables.sql +++ /dev/null @@ -1,275 +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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -create table if not exists dictionary ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - dictionary_second_level integer, - dictionary_type varchar(255), - primary key (name) - ) engine=InnoDB; - -create table if not exists dictionary_elements ( - short_name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - description varchar(255) not null, - name varchar(255) not null, - subdictionary_name varchar(255), - type varchar(255) not null, - primary key (short_name) - ) engine=InnoDB; - -create table if not exists dictionary_to_dictionaryelements ( - dictionary_name varchar(255) not null, - dictionary_element_short_name varchar(255) not null, - primary key (dictionary_name, dictionary_element_short_name) - ) engine=InnoDB; - -create table if not exists hibernate_sequence ( - next_val bigint -) engine=InnoDB; - -insert into hibernate_sequence values ( 1 ); - -create table if not exists loop_element_models ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - blueprint_yaml MEDIUMTEXT, - dcae_blueprint_id varchar(255), - loop_element_type varchar(255) not null, - short_name varchar(255), - primary key (name) - ) engine=InnoDB; - -create table if not exists loop_logs ( - id bigint not null, - log_component varchar(255) not null, - log_instant datetime(6) not null, - log_type varchar(255) not null, - message MEDIUMTEXT not null, - loop_id varchar(255) not null, - primary key (id) - ) engine=InnoDB; - -create table if not exists loop_templates ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - allowed_loop_type varchar(255), - blueprint_yaml MEDIUMTEXT, - dcae_blueprint_id varchar(255), - maximum_instances_allowed integer, - svg_representation MEDIUMTEXT, - unique_blueprint boolean default false, - service_uuid varchar(255), - primary key (name) - ) engine=InnoDB; - -create table if not exists loopelementmodels_to_policymodels ( - loop_element_name varchar(255) not null, - policy_model_type varchar(255) not null, - policy_model_version varchar(255) not null, - primary key (loop_element_name, policy_model_type, policy_model_version) - ) engine=InnoDB; - -create table if not exists loops ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - dcae_deployment_id varchar(255), - dcae_deployment_status_url varchar(255), - global_properties_json json, - last_computed_state varchar(255) not null, - svg_representation MEDIUMTEXT, - loop_template_name varchar(255) not null, - service_uuid varchar(255), - primary key (name) - ) engine=InnoDB; - -create table if not exists loops_to_microservicepolicies ( - loop_name varchar(255) not null, - microservicepolicy_name varchar(255) not null, - primary key (loop_name, microservicepolicy_name) - ) engine=InnoDB; - -create table if not exists looptemplates_to_loopelementmodels ( - loop_element_model_name varchar(255) not null, - loop_template_name varchar(255) not null, - flow_order integer not null, - primary key (loop_element_model_name, loop_template_name) - ) engine=InnoDB; - -create table if not exists micro_service_policies ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - configurations_json json, - json_representation json not null, - pdp_group varchar(255), - pdp_sub_group varchar(255), - context varchar(255), - dcae_blueprint_id varchar(255), - dcae_deployment_id varchar(255), - dcae_deployment_status_url varchar(255), - device_type_scope varchar(255), - shared bit not null, - loop_element_model_id varchar(255), - policy_model_type varchar(255), - policy_model_version varchar(255), - primary key (name) - ) engine=InnoDB; - -create table if not exists operational_policies ( - name varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - configurations_json json, - json_representation json not null, - pdp_group varchar(255), - pdp_sub_group varchar(255), - loop_element_model_id varchar(255), - policy_model_type varchar(255), - policy_model_version varchar(255), - loop_id varchar(255) not null, - primary key (name) - ) engine=InnoDB; - -create table if not exists policy_models ( - policy_model_type varchar(255) not null, - version varchar(255) not null, - created_by varchar(255), - created_timestamp datetime(6) not null, - updated_by varchar(255), - updated_timestamp datetime(6) not null, - policy_acronym varchar(255), - policy_tosca MEDIUMTEXT, - policy_pdp_group json, - primary key (policy_model_type, version) - ) engine=InnoDB; - -create table if not exists services ( - service_uuid varchar(255) not null, - name varchar(255) not null, - resource_details json, - service_details json, - version varchar(255), - primary key (service_uuid) - ) engine=InnoDB; - -alter table dictionary_to_dictionaryelements - add constraint FK68hjjinnm8nte2owstd0xwp23 - foreign key (dictionary_element_short_name) - references dictionary_elements (short_name); - -alter table dictionary_to_dictionaryelements - add constraint FKtqfxg46gsxwlm2gkl6ne3cxfe - foreign key (dictionary_name) - references dictionary (name); - -alter table loop_logs - add constraint FK1j0cda46aickcaoxqoo34khg2 - foreign key (loop_id) - references loops (name); - -alter table loop_templates - add constraint FKn692dk6281wvp1o95074uacn6 - foreign key (service_uuid) - references services (service_uuid); - -alter table loopelementmodels_to_policymodels - add constraint FK23j2q74v6kaexefy0tdabsnda - foreign key (policy_model_type, policy_model_version) - references policy_models (policy_model_type, version); - -alter table loopelementmodels_to_policymodels - add constraint FKjag1iu0olojfwryfkvb5o0rk5 - foreign key (loop_element_name) - references loop_element_models (name); - -alter table loops - add constraint FK844uwy82wt0l66jljkjqembpj - foreign key (loop_template_name) - references loop_templates (name); - -alter table loops - add constraint FK4b9wnqopxogwek014i1shqw7w - foreign key (service_uuid) - references services (service_uuid); - -alter table loops_to_microservicepolicies - add constraint FKle255jmi7b065fwbvmwbiehtb - foreign key (microservicepolicy_name) - references micro_service_policies (name); - -alter table loops_to_microservicepolicies - add constraint FK8avfqaf7xl71l7sn7a5eri68d - foreign key (loop_name) - references loops (name); - -alter table looptemplates_to_loopelementmodels - add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9 - foreign key (loop_element_model_name) - references loop_element_models (name); - -alter table looptemplates_to_loopelementmodels - add constraint FKj29yxyw0x7ue6mwgi6d3qg748 - foreign key (loop_template_name) - references loop_templates (name); - -alter table micro_service_policies - add constraint FKqvvdypacbww07fuv8xvlvdjgl - foreign key (loop_element_model_id) - references loop_element_models (name); - -alter table micro_service_policies - add constraint FKn17j9ufmyhqicb6cvr1dbjvkt - foreign key (policy_model_type, policy_model_version) - references policy_models (policy_model_type, version); - -alter table operational_policies - add constraint FKi9kh7my40737xeuaye9xwbnko - foreign key (loop_element_model_id) - references loop_element_models (name); - -alter table operational_policies - add constraint FKlsyhfkoqvkwj78ofepxhoctip - foreign key (policy_model_type, policy_model_version) - references policy_models (policy_model_type, version); - -alter table operational_policies - add constraint FK1ddoggk9ni2bnqighv6ecmuwu - foreign key (loop_id) - references loops (name); diff --git a/csit/config/db-pg/db-pg.conf b/csit/config/db-pg/db-pg.conf deleted file mode 100644 index d4d58cec..00000000 --- a/csit/config/db-pg/db-pg.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2022 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. -MYSQL_ROOT_PASSWORD=secret -MYSQL_USER=policy_user -MYSQL_PASSWORD=policy_user -PGPASSWORD=policy_user \ No newline at end of file diff --git a/csit/config/db-pg/db-pg.sh b/csit/config/db-pg/db-pg.sh deleted file mode 100755 index 14816f08..00000000 --- a/csit/config/db-pg/db-pg.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -xv -# Copyright 2022 Nordix Foundation. All rights reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -psql -U postgres -d postgres --command "CREATE USER ${MYSQL_USER} WITH PASSWORD '${MYSQL_PASSWORD}';" - -for db in migration pooling policyadmin policyclamp operationshistory clampacm -do - psql -U postgres -d postgres --command "CREATE DATABASE ${db};" - psql -U postgres -d postgres --command "GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${MYSQL_USER} ;" -done \ No newline at end of file diff --git a/csit/config/db/db.conf b/csit/config/db/db.conf deleted file mode 100644 index 29638c86..00000000 --- a/csit/config/db/db.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2019,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. -MYSQL_ROOT_PASSWORD=secret -MYSQL_USER=policy_user -MYSQL_PASSWORD=policy_user -MYSQL_CMD=mysql diff --git a/csit/config/db/db.sh b/csit/config/db/db.sh deleted file mode 100755 index 0363ed8a..00000000 --- a/csit/config/db/db.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -xv -# Copyright 2019,2021 AT&T Intellectual Property. All rights reserved -# Modifications 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. - -for db in migration pooling policyadmin operationshistory clampacm policyclamp -do - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" -done - -mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" -mysql -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -f policyclamp < /tmp/policy-clamp-create-tables.sql diff --git a/csit/config/distribution/defaultConfig.json b/csit/config/distribution/defaultConfig.json deleted file mode 100644 index c8451eba..00000000 --- a/csit/config/distribution/defaultConfig.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name":"SDCDistributionGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"policyadmin", - "password":"zb!XztG34", - "https": false, - "prometheus": true - }, - "receptionHandlerParameters":{ - "FileReceptionHandler":{ - "receptionHandlerType":"File", - "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler", - "receptionHandlerConfigurationName":"fileConfiguration", - "pluginHandlerParameters":{ - "policyDecoders":{ - "ApexDecoder":{ - "decoderType":"ApexDecoder", - "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", - "decoderConfigurationName": "apexDecoderConfiguration" - } - }, - "policyForwarders":{ - "LifeCycleApiForwarder":{ - "forwarderType":"LifeCycleAPI", - "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder", - "forwarderConfigurationName": "lifecycleApiConfiguration" - } - } - } - } - }, - "receptionHandlerConfigurationParameters":{ - "fileConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup", - "parameters":{ - "watchPath": "/opt/app/policy/distribution/etc/temp/", - "maxThread": 1 - } - } - }, - "policyDecoderConfigurationParameters":{ - "apexDecoderConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", - "parameters":{ - "policyFileName": "apex_policy.json", - "policyTypeFileName": "apex_policy_type.json" - } - } - }, - "policyForwarderConfigurationParameters":{ - "lifecycleApiConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters", - "parameters":{ - "apiParameters": { - "clientName": "policy-api", - "hostname": "policy-api", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "useHttps": false - }, - "papParameters": { - "clientName": "policy-pap", - "hostname": "policy-pap", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "useHttps": false - }, - "deployPolicies": true - } - } - } -} diff --git a/csit/config/distribution/groups.json b/csit/config/distribution/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/distribution/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/distribution/logback.xml b/csit/config/distribution/logback.xml deleted file mode 100644 index fdd850f9..00000000 --- a/csit/config/distribution/logback.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/drools-applications/custom/engine-system.properties b/csit/config/drools-applications/custom/engine-system.properties deleted file mode 100644 index 19e03b51..00000000 --- a/csit/config/drools-applications/custom/engine-system.properties +++ /dev/null @@ -1,45 +0,0 @@ -# -# ============LICENSE_START======================================================= -# ONAP -# ================================================================================ -# Copyright (C) 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========================================================= -# - -# system properties set within the application - -java.net.preferIPv4Stack=true - -# jmx - -com.sun.management.jmxremote.port=9991 -com.sun.management.jmxremote.authenticate=false -com.sun.management.jmxremote.ssl=false - -# certs - -javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} -javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} - -javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} -javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} - -# kie - -kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} - -# symmetric key for sensitive configuration data - -engine.symm.key=${envd:SYMM_KEY} diff --git a/csit/config/drools-applications/custom/feature-lifecycle.properties b/csit/config/drools-applications/custom/feature-lifecycle.properties deleted file mode 100644 index 3e862970..00000000 --- a/csit/config/drools-applications/custom/feature-lifecycle.properties +++ /dev/null @@ -1,38 +0,0 @@ -# ============LICENSE_START======================================================= -# ONAP -# ================================================================================ -# Copyright (C) 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========================================================= - -lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup} -lifecycle.pdp.type=${envd:POLICY_PDP_PAP_TYPE:drools} - -# Mandatory policy types that this PDP-D must support at a minimum -lifecycle.pdp.policytypes=${envd:POLICY_PDP_PAP_POLICYTYPES} - -dmaap.source.topics=POLICY-PDP-PAP -dmaap.sink.topics=POLICY-PDP-PAP - -dmaap.source.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} -dmaap.source.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} -dmaap.source.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} -dmaap.source.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} -dmaap.source.topics.POLICY-PDP-PAP.https=${envd:DMAAP_HTTPS:false} - -dmaap.sink.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} -dmaap.sink.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} -dmaap.sink.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} -dmaap.sink.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} -dmaap.sink.topics.POLICY-PDP-PAP.https=${envd:DMAAP_HTTPS:false} diff --git a/csit/config/drools-applications/custom/features.pre.sh b/csit/config/drools-applications/custom/features.pre.sh deleted file mode 100755 index fd7b5b91..00000000 --- a/csit/config/drools-applications/custom/features.pre.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# ============LICENSE_START=================================================== -# Copyright (C) 2020 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===================================================== - -sh -c "features disable distributed-locking" diff --git a/csit/config/drools-applications/custom/standalone-settings.xml b/csit/config/drools-applications/custom/standalone-settings.xml deleted file mode 100644 index ebd6dd2a..00000000 --- a/csit/config/drools-applications/custom/standalone-settings.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - true - - - - - policy-local - - - - file-repository - file:${user.home}/.m2/file-repository - - true - always - - - true - always - - - - - - - - - - policy-local - - - diff --git a/csit/config/drools-applications/env/base.conf b/csit/config/drools-applications/env/base.conf deleted file mode 100644 index ca944dbb..00000000 --- a/csit/config/drools-applications/env/base.conf +++ /dev/null @@ -1,146 +0,0 @@ -# ============LICENSE_START================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. -# =========================================================================== -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END==================================================== - -# JVM options - -JVM_OPTIONS=-server -Xms512m -Xmx512m - -# SYSTEM software configuration - -DEBUG=y -POLICY_HOME=/opt/app/policy -POLICY_LOGS=/var/log/onap/policy/pdpd -KEYSTORE_PASSWD=Pol1cy_0nap -TRUSTSTORE_PASSWD=Pol1cy_0nap - -# Telemetry credentials - -TELEMETRY_PORT=9696 -TELEMETRY_HOST=0.0.0.0 -TELEMETRY_USER=demo@people.osaaf.org -TELEMETRY_PASSWORD=demo123456! - -# nexus repository - -SNAPSHOT_REPOSITORY_ID= -SNAPSHOT_REPOSITORY_URL= -RELEASE_REPOSITORY_ID= -RELEASE_REPOSITORY_URL= -REPOSITORY_USERNAME= -REPOSITORY_PASSWORD= -REPOSITORY_OFFLINE=true - -# Relational (SQL) DB access - -SQL_HOST=mariadb -SQL_USER=policy_user -SQL_PASSWORD=policy_user -SQL_PORT=3306 -JDBC_URL=jdbc:mariadb://mariadb:3306/ -JDBC_OPTS= -MYSQL_CMD= - -# AAF - -AAF=false -AAF_NAMESPACE=org.onap.policy -AAF_HOST=aaf.api.simpledemo.onap.org - -# HTTP Servers - -HTTP_SERVER_HTTPS=false -PROMETHEUS=true - -# LIVENESS Checks - -LIVENESS_CONTROLLERS=* - -# PDP-D DMaaP configuration channel - -PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION -PDPD_CONFIGURATION_API_KEY= -PDPD_CONFIGURATION_API_SECRET= -PDPD_CONFIGURATION_CONSUMER_GROUP= -PDPD_CONFIGURATION_CONSUMER_INSTANCE= -PDPD_CONFIGURATION_PARTITION_KEY= - -# PAP-PDP configuration channel - -POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP -POLICY_PDP_PAP_API_KEY= -POLICY_PDP_PAP_API_SECRET= - -# PAP - -PAP_HOST=policy-pap -PAP_USERNAME=policyadmin -PAP_PASSWORD=zb!XztG34 - -# PDP-X - -GUARD_DISABLED=false -PDP_HOST=policy-xacml-pdp -PDP_PORT=6969 -PDP_CONTEXT_URI=policy/pdpx/v1/ -PDP_USERNAME=policyadmin -PDP_PASSWORD=zb!XztG34 -PDP_HTTPS=false - -# DCAE DMaaP - -DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT -DCAE_SERVERS=message-router -DCAE_CONSUMER_GROUP=dcae.policy.shared - -# Open DMaaP - -DMAAP_SERVERS=message-router -DMAAP_HTTPS=false - -# AAI - -AAI_HOST=aai-sim -AAI_PORT=6666 -AAI_CONTEXT_URI= -AAI_USERNAME=policy@policy.onap.org -AAI_PASSWORD=demo123456! -AAI_HTTPS=false - -# MSO - -SO_HOST=so-sim -SO_PORT=6669 -SO_CONTEXT_URI= -SO_URL=http://message-router:6669/ -SO_USERNAME=InfraPortalClient -SO_PASSWORD='password1$' - -# VFC - -VFC_HOST=vfc-sim -VFC_PORT=6670 -VFC_CONTEXT_URI= -VFC_USERNAME= -VFC_PASSWORD= - -# SDNC - -SDNC_HOST=sdnc-sim -SDNC_PORT=6668 -SDNC_CONTEXT_URI= -SDNC_USERNAME= -SDNC_PASSWORD= diff --git a/csit/config/drools-applications/env/feature-healthcheck.conf b/csit/config/drools-applications/env/feature-healthcheck.conf deleted file mode 100644 index 1c710547..00000000 --- a/csit/config/drools-applications/env/feature-healthcheck.conf +++ /dev/null @@ -1,18 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 2020 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========================================================= - -HEALTHCHECK_USER=demo@people.osaaf.org -HEALTHCHECK_PASSWORD=demo123456! diff --git a/csit/config/drools-applications/env/feature-pooling-dmaap.conf b/csit/config/drools-applications/env/feature-pooling-dmaap.conf deleted file mode 100644 index 3808e3d9..00000000 --- a/csit/config/drools-applications/env/feature-pooling-dmaap.conf +++ /dev/null @@ -1,17 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 2020 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========================================================= - -POOLING_TOPIC=POOLING diff --git a/csit/config/drools-applications/groups.json b/csit/config/drools-applications/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/drools-applications/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/drools-pdp/custom/engine-system.properties b/csit/config/drools-pdp/custom/engine-system.properties deleted file mode 100644 index 19e03b51..00000000 --- a/csit/config/drools-pdp/custom/engine-system.properties +++ /dev/null @@ -1,45 +0,0 @@ -# -# ============LICENSE_START======================================================= -# ONAP -# ================================================================================ -# Copyright (C) 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========================================================= -# - -# system properties set within the application - -java.net.preferIPv4Stack=true - -# jmx - -com.sun.management.jmxremote.port=9991 -com.sun.management.jmxremote.authenticate=false -com.sun.management.jmxremote.ssl=false - -# certs - -javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} -javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} - -javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} -javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} - -# kie - -kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} - -# symmetric key for sensitive configuration data - -engine.symm.key=${envd:SYMM_KEY} diff --git a/csit/config/drools-pdp/custom/noop.pre.sh b/csit/config/drools-pdp/custom/noop.pre.sh deleted file mode 100755 index 63bdc4cf..00000000 --- a/csit/config/drools-pdp/custom/noop.pre.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -x -# ============LICENSE_START======================================================= -# Copyright (C) 2020 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========================================================= - -sed -i "s/^dmaap/noop/g" \ - ${POLICY_HOME}/config/engine.properties \ - ${POLICY_HOME}/config/feature-lifecycle.properties - -chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties diff --git a/csit/config/drools-pdp/env/base.conf b/csit/config/drools-pdp/env/base.conf deleted file mode 100644 index 98cc10f8..00000000 --- a/csit/config/drools-pdp/env/base.conf +++ /dev/null @@ -1,144 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= - -# JVM options - -JVM_OPTIONS=-server -Xms512m -Xmx512m - -# SYSTEM software configuration - -DEBUG=y -POLICY_HOME=/opt/app/policy -POLICY_LOGS=/var/log/onap/policy/pdpd -KEYSTORE_PASSWD=Pol1cy_0nap -TRUSTSTORE_PASSWD=Pol1cy_0nap - -# Telemetry credentials - -TELEMETRY_PORT=9696 -TELEMETRY_HOST=0.0.0.0 -TELEMETRY_USER=demo@people.osaaf.org -TELEMETRY_PASSWORD=demo123456! - -# nexus repository - -SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots -SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/ -RELEASE_REPOSITORY_ID=policy-nexus-releases -RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/ -REPOSITORY_USERNAME=admin -REPOSITORY_PASSWORD=admin123 -REPOSITORY_OFFLINE=false - -# Relational (SQL) DB access - -SQL_HOST=mariadb -SQL_USER=policy_user -SQL_PASSWORD=policy_user -SQL_PORT=3306 -JDBC_URL=jdbc:mariadb://mariadb:3306/ -JDBC_OPTS= -MYSQL_CMD= - - -# AAF - -AAF=false -AAF_NAMESPACE=org.onap.policy -AAF_HOST=aaf.api.simpledemo.onap.org - -# HTTP Servers - -HTTP_SERVER_HTTPS=false -PROMETHEUS=true - -# PDP-D DMaaP configuration channel - -PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION -PDPD_CONFIGURATION_API_KEY= -PDPD_CONFIGURATION_API_SECRET= -PDPD_CONFIGURATION_CONSUMER_GROUP= -PDPD_CONFIGURATION_CONSUMER_INSTANCE= -PDPD_CONFIGURATION_PARTITION_KEY= - -# PAP-PDP configuration channel - -POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP -POLICY_PDP_PAP_API_KEY= -POLICY_PDP_PAP_API_SECRET= - -# PAP - -PAP_HOST= -PAP_USERNAME= -PAP_PASSWORD= - -# PDP-X - -PDP_HOST= -PDP_PORT= -PDP_CONTEXT_URI=policy/pdpx/v1/ -PDP_USERNAME= -PDP_PASSWORD= -PDP_CLIENT_USERNAME= -PDP_CLIENT_PASSWORD= -PDP_ENVIRONMENT= -GUARD_DISABLED=false - -# DCAE DMaaP - -DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT -DCAE_SERVERS= -DCAE_CONSUMER_GROUP=dcae.policy.shared - -# Open DMaaP - -DMAAP_SERVERS=mr.api.simpledemo.onap.org -DMAAP_HTTPS=false - -# AAI - -AAI_HOST=aai.api.simpledemo.onap.org -AAI_PORT=8443 -AAI_CONTEXT_URI= -AAI_USERNAME=policy@policy.onap.org -AAI_PASSWORD=demo123456! - -# MSO - -SO_HOST=vm1.mso.simpledemo.onap.org -SO_PORT=8080 -SO_CONTEXT_URI=onap/so/infra/ -SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra -SO_USERNAME=InfraPortalClient -SO_PASSWORD='password1$' - -# VFC - -VFC_HOST= -VFC_PORT= -VFC_CONTEXT_URI=api/nslcm/v1/ -VFC_USERNAME= -VFC_PASSWORD= - -# SDNC - -SDNC_HOST= -SDNC_PORT= -SDNC_CONTEXT_URI=restconf/operations/ -SDNC_USERNAME= -SDNC_PASSWORD= diff --git a/csit/config/drools-pdp/groups.json b/csit/config/drools-pdp/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/drools-pdp/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/pap/groups.json b/csit/config/pap/groups.json deleted file mode 100644 index bd5c2868..00000000 --- a/csit/config/pap/groups.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/csit/config/pap/logback.xml b/csit/config/pap/logback.xml deleted file mode 100644 index a88f60a7..00000000 --- a/csit/config/pap/logback.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/config/pap/papParameters.yaml b/csit/config/pap/papParameters.yaml deleted file mode 100644 index cc59dda5..00000000 --- a/csit/config/pap/papParameters.yaml +++ /dev/null @@ -1,90 +0,0 @@ -spring: - security: - user: - name: policyadmin - password: zb!XztG34 - http: - converters: - preferred-json-mapper: gson - datasource: - url: jdbc:mariadb://mariadb:3306/policyadmin - driverClassName: org.mariadb.jdbc.Driver - username: policy_user - password: policy_user - jpa: - properties: - hibernate: - dialect: org.hibernate.dialect.MariaDB103Dialect - hibernate: - ddl-auto: none - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy - -server: - port: 6969 - servlet: - context-path: /policy/pap/v1 - ssl: - enabled: false - -pap: - name: PapGroup - aaf: false - topic: - pdp-pap.name: POLICY-PDP-PAP - notification.name: POLICY-NOTIFICATION - heartbeat.name: POLICY-HEARTBEAT - pdpParameters: - heartBeatMs: 120000 - updateParameters: - maxRetryCount: 1 - maxWaitMs: 30000 - stateChangeParameters: - maxRetryCount: 1 - maxWaitMs: 30000 - savePdpStatisticsInDb: true - topicParameterGroup: - topicSources: - - topic: ${pap.topic.pdp-pap.name} - servers: - - message-router - topicCommInfrastructure: dmaap - useHttps: false - fetchTimeout: 15000 - - topic: ${pap.topic.heartbeat.name} - effectiveTopic: ${pap.topic.pdp-pap.name} - consumerGroup: policy-pap - servers: - - message-router - topicCommInfrastructure: dmaap - useHttps: false - fetchTimeout: 15000 - topicSinks: - - topic: ${pap.topic.pdp-pap.name} - servers: - - message-router - topicCommInfrastructure: dmaap - useHttps: false - - topic: ${pap.topic.notification.name} - servers: - - message-router - topicCommInfrastructure: dmaap - useHttps: false - healthCheckRestClientParameters: - - clientName: api - hostname: policy-api - port: 6969 - userName: policyadmin - password: zb!XztG34 - useHttps: false - basePath: policy/api/v1/healthcheck - -management: - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus - path-mapping.metrics: plain-metrics - path-mapping.prometheus: metrics diff --git a/csit/config/policy-gui/application.yaml b/csit/config/policy-gui/application.yaml deleted file mode 100644 index 30de64bf..00000000 --- a/csit/config/policy-gui/application.yaml +++ /dev/null @@ -1,37 +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===================================================== -# -server: - port: 2445 - ssl: - enabled: false - -clamp: - url: http://policy-clamp-be:8445 - disable-ssl-validation: true - disable-ssl-hostname-check: true - -apex-editor: - upload-url: - upload-userid: - -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus - diff --git a/csit/config/policy-gui/groups.json b/csit/config/policy-gui/groups.json deleted file mode 100644 index 6ee30e1c..00000000 --- a/csit/config/policy-gui/groups.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "drools", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Drools", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Controller", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.drools.Artifact", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - }, - { - "pdpType": "apex", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [] - } - ] - } - ] -} diff --git a/csit/config/policy-gui/logback.xml b/csit/config/policy-gui/logback.xml deleted file mode 100644 index 04bc5671..00000000 --- a/csit/config/policy-gui/logback.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/csit/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json b/csit/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json deleted file mode 100644 index 2e2105f8..00000000 --- a/csit/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "vnf-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", - "vnf-name": "vfw-cnf-cds-test-1-vnf", - "vnf-type": "vfw_cnf_cds/null", - "service-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", - "prov-status": "ACTIVE", - "orchestration-status": "Assigned", - "in-maint": false, - "is-closed-loop-disabled": false, - "resource-version": "1607506390862", - "model-invariant-id": "vTEST_XYZ", - "model-version-id": "vTEST", - "model-customization-id": "37b008b9-b367-4359-93fd-74d3ce0ee1a0", - "relationship-list": { - "relationship": [ - { - "related-to": "service-instance", - "relationship-label": "org.onap.relationships.inventory.ComposedOf", - "related-link": "/aai/v14/business/customers/customer/DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf/service-subscriptions/service-subscription/vFWDT/service-instances/service-instance/55322ada-145a-492e-b196-0d171539a4b2", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "DemoCust_47417dae-a821-4068-9736-e71c7da0d8bf" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFWDT" - }, - { - "relationship-key": "service-instance.service-instance-id", - "relationship-value": "55322ada-145a-492e-b196-0d171539a4b2" - } - ], - "related-to-property": [ - { - "property-key": "service-instance.service-instance-name", - "property-value": "Service_Ete_Namea337dd5b-4620-4ea6-bc3f-6edf1124d659" - } - ] - } - ] - } -} - diff --git a/csit/config/sim-all/cdsresponse/apex-example-cba-modify-config.json b/csit/config/sim-all/cdsresponse/apex-example-cba-modify-config.json deleted file mode 100644 index 4f03bbfa..00000000 --- a/csit/config/sim-all/cdsresponse/apex-example-cba-modify-config.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "correlationUUID": null, - "commonHeader": { - "timestamp": "2020-12-16T10:29:00.450Z", - "originatorId": "POLICY", - "requestId": "f392e439-c176-411b-b972-8acadac0f8df", - "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "apex-example-cba", - "blueprintVersion": "1.0.0", - "actionName": "modify-config", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-12-16T10:29:01.737Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "modify-config-response": { - "execute-command-logs": [ - "INFO:root:Arguments : Active,," - ], - "prepare-environment-logs": [ - "Installed pip packages:\n requirements.txt\n\n" - ] - } - } -} diff --git a/csit/config/sim-all/cdsresponse/apex-example-cba-restart.json b/csit/config/sim-all/cdsresponse/apex-example-cba-restart.json deleted file mode 100644 index 694bc6df..00000000 --- a/csit/config/sim-all/cdsresponse/apex-example-cba-restart.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "correlationUUID": null, - "commonHeader": { - "timestamp": "2020-12-16T10:30:46.213Z", - "originatorId": "POLICY", - "requestId": "f392e439-c176-411b-b972-8acadac0f8df", - "subRequestId": "8c7935a4-79d8-4ec0-b661-dcca3cd68006", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "apex-example-cba", - "blueprintVersion": "1.0.0", - "actionName": "restart", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-12-16T10:30:46.828Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "restart-response": { - "execute-command-logs": [ - "INFO:root:Arguments : Active,," - ], - "prepare-environment-logs": [ - "Installed pip packages:\n requirements.txt\n\n" - ] - } - } -} diff --git a/csit/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json b/csit/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json deleted file mode 100644 index 7009a358..00000000 --- a/csit/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "commonHeader": { - "timestamp": "2020-08-24T14:45:07.491Z", - "originatorId": "CDS", - "requestId": "123456", - "subRequestId": "123-123", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "controlloop-hostname-update", - "blueprintVersion": "1.0.4", - "actionName": "update-config", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-08-24T14:45:12.863Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "update-config-response": { - "execute-command-logs": [ - "INFO:root:", - "INFO:root:configuring Device....", - "INFO:root:Done Device Configuration Successfully", - "INFO:root:Device Configuration After modification", - "INFO:root:http://10.101.200.10:32777/restconf/config/network-topology:network-topology/topology/topology-netconf/node/927b2580-36d9-4f13-8421-3c9d43b7a57e/yang-ext:mount", - "INFO:root:testhost-1212332324343" - ], - "prepare-environment-logs": ["Installed pip packages:\n requirements.txt\n\n"] - } - } -} diff --git a/csit/config/sim-all/logback.xml b/csit/config/sim-all/logback.xml deleted file mode 100644 index 131b0fe3..00000000 --- a/csit/config/sim-all/logback.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - %d %level %msg%n - - - - - - - - diff --git a/csit/config/sim-all/simParameters.json b/csit/config/sim-all/simParameters.json deleted file mode 100644 index 41fc9057..00000000 --- a/csit/config/sim-all/simParameters.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "dmaapProvider": { - "name": "DMaaP simulator", - "topicSweepSec": 300 - }, - "restServers": [ - { - "name": "DMaaP simulator", - "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", - "host": "0.0.0.0", - "port": 3904, - "https": false - }, - { - "name": "A&AI simulator", - "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6666, - "https": false, - "userName": "policy@policy.onap.org", - "password": "demo123456!", - "resourceLocation": "/opt/app/policy/simulators/etc/mounted/aairesponse/" - }, - { - "name": "SDNC simulator", - "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6668, - "https": false - }, - { - "name": "SO simulator", - "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6669, - "https": false, - "userName": "InfraPortalClient", - "password": "password1$" - }, - { - "name": "VFC simulator", - "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6670, - "https": false - } - ], - "topicSinks": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-WRITE", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicSources": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-READ", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicServers": [ - { - "name": "APPC Legacy simulator", - "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer", - "sink": "APPC-CL", - "source": "APPC-CL" - }, - { - "name": "APPC-LCM simulator", - "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer", - "sink": "APPC-LCM-WRITE", - "source": "APPC-LCM-READ" - } - ], - "grpcServer": { - "name": "CDS simulator", - "providerClass": "org.onap.policy.simulators.CdsSimulator", - "host": "0.0.0.0", - "port": 6680, - "timeout": 30, - "username": "ccsdkapps", - "password": "ccsdkapps", - "resourceLocation": "/opt/app/policy/simulators/etc/mounted/cdsresponse/", - "successRepeatCount": 0, - "requestedResponseDelayMs": 0 - } -} diff --git a/csit/config/xacml-pdp/defaultConfig.json b/csit/config/xacml-pdp/defaultConfig.json deleted file mode 100644 index d6f3bd99..00000000 --- a/csit/config/xacml-pdp/defaultConfig.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "XacmlPdpParameters", - "pdpGroup": "defaultGroup", - "pdpType": "xacml", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "https": false, - "aaf": false, - "prometheus": true - }, - "policyApiParameters": { - "hostname": "policy-api", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "useHttps": false, - "aaf": false - }, - "applicationParameters": { - "applicationPath": "/opt/app/policy/pdpx/apps" - }, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : false - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : false - }] - } -} diff --git a/csit/config/xacml-pdp/groups.json b/csit/config/xacml-pdp/groups.json deleted file mode 100644 index 0a7e5fe3..00000000 --- a/csit/config/xacml-pdp/groups.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "version": "1.0.0", - "description": "The default group that registers all supported policy types and pdps.", - "pdpGroupState": "ACTIVE", - "pdpSubgroups": [ - { - "pdpType": "xacml", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.guard.common.FrequencyLimiter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.MinMax", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Blacklist", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.common.Filter", - "version": "1.0.0" - }, - { - "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond", - "version": "1.0.0" - }, - { - "name": "onap.policies.monitoring.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.*", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.AffinityPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.DistancePolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.HpaPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.OptimizationPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.PciPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.QueryPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.service.SubscriberPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.Vim_fit", - "version": "1.0.0" - }, - { - "name": "onap.policies.optimization.resource.VnfPolicy", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Xacml", - "version": "1.0.0" - }, - { - "name": "onap.policies.Naming", - "version": "1.0.0" - }, - { - "name": "onap.policies.match.*", - "version": "1.0.0" - } - ], - "currentInstanceCount": 0, - "desiredInstanceCount": 1, - "policies": [ - { - "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/csit/config/xacml-pdp/logback.xml b/csit/config/xacml-pdp/logback.xml deleted file mode 100644 index e075f905..00000000 --- a/csit/config/xacml-pdp/logback.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/db-migrator/plans/setup.sh b/csit/db-migrator/plans/setup.sh deleted file mode 100755 index 31d93111..00000000 --- a/csit/db-migrator/plans/setup.sh +++ /dev/null @@ -1,26 +0,0 @@ -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker -python3 -m pip install -U robotframework-databaselibrary -python3 -m pip install psycopg2-binary - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh - -cd "${SCRIPTS}" -docker-compose -f "${SCRIPTS}"/compose-postgres.yml up -d - -sleep 15 -unset http_proxy https_proxy - -POSTGRES_IP=$(get-instance-ip.sh postgres) -POLICY_API_IP=$(get-instance-ip.sh policy-api) - -echo POSTGRES IP IS "${POSTGRES_IP}" -echo POLICY_API_IP IS "${POLICY_API_IP}" - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POSTGRES_IP:${POSTGRES_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" \ No newline at end of file diff --git a/csit/db-migrator/plans/teardown.sh b/csit/db-migrator/plans/teardown.sh deleted file mode 100755 index 0483d84d..00000000 --- a/csit/db-migrator/plans/teardown.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/compose-postgres.yml down -v \ No newline at end of file diff --git a/csit/db-migrator/plans/testplan.txt b/csit/db-migrator/plans/testplan.txt deleted file mode 100644 index 4d281179..00000000 --- a/csit/db-migrator/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -db-migrator-test.robot diff --git a/csit/db-migrator/tests/db-migrator-test.robot b/csit/db-migrator/tests/db-migrator-test.robot deleted file mode 100644 index 44cb1553..00000000 --- a/csit/db-migrator/tests/db-migrator-test.robot +++ /dev/null @@ -1,34 +0,0 @@ -*** Settings *** -Suite Setup Connect To Database psycopg2 ${DB_NAME} ${DB_USERNAME} ${DB_PASSWORD} ${POSTGRES_IP} ${DB_PORT} -Suite Teardown Disconnect From Database -Library DatabaseLibrary -Library String -Library RequestsLibrary -Library OperatingSystem -Library json -Resource ${CURDIR}/../../common-library.robot - -*** Variables *** -${DB_NAME} = policyadmin -${DB_USERNAME} = policy_user -${DB_PASSWORD} = policy_user -${DB_PORT} = 5432 -${PGPASSWORD} = policy_user - -*** Keywords *** -GetReq - [Arguments] ${url} - ${auth}= PolicyAdminAuth - ${resp}= PerformGetRequest ${POLICY_API_IP} ${url} 200 null ${auth} - [return] ${resp} - -*** Test Cases *** -Test Connection - ${output} = Execute SQL String SELECT datname FROM pg_database WHERE datname='policyadmin'; - Log ${output} - Should Be Equal As Strings ${output} None - -Healthcheck - [Documentation] Verify policy api health check - ${resp}= GetReq /policy/api/v1/healthcheck - Should Be Equal As Strings ${resp.json()['code']} 200 \ No newline at end of file diff --git a/csit/db_migrator_policy_init.sh b/csit/db_migrator_policy_init.sh deleted file mode 100755 index 047d947e..00000000 --- a/csit/db_migrator_policy_init.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ============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====================================================== - -export POLICY_HOME=/opt/app/policy -export SQL_USER=${MYSQL_USER} -export SQL_PASSWORD=${MYSQL_PASSWORD} -export SCRIPT_DIRECTORY=sql - -/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB} - -/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report - -/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -rc=$? - -/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report - -nc -l -p 6824 - -exit $rc diff --git a/csit/db_migrator_policy_init_pg.sh b/csit/db_migrator_policy_init_pg.sh deleted file mode 100755 index 9b5f38e1..00000000 --- a/csit/db_migrator_policy_init_pg.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ============LICENSE_START==================================================== -# Copyright (C) 2022 Nordix Foundation. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - -export POLICY_HOME=/opt/app/policy -export SQL_USER=${MYSQL_USER} -export SQL_PASSWORD=${MYSQL_PASSWORD} -export SCRIPT_DIRECTORY=postgres - -/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB} - -/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report - -/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o upgrade -rc=$? - -/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report - -nc -l -p 6824 - -exit $rc diff --git a/csit/distribution/config/csar/sample_csar_with_apex_policy.csar b/csit/distribution/config/csar/sample_csar_with_apex_policy.csar deleted file mode 100644 index 4d293e42..00000000 Binary files a/csit/distribution/config/csar/sample_csar_with_apex_policy.csar and /dev/null differ diff --git a/csit/distribution/plans/setup.sh b/csit/distribution/plans/setup.sh deleted file mode 100755 index 8efb935d..00000000 --- a/csit/distribution/plans/setup.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2018 Ericsson. All rights reserved. -# Modifications Copyright (c) 2019-2023 Nordix Foundation. -# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh - -SCRIPT_DIR=${TESTPLANDIR}/config - -# Remaking the csar file in case if the file got corrupted -zip -F "${SCRIPT_DIR}"/csar/sample_csar_with_apex_policy.csar --out "${SCRIPT_DIR}"/csar/csar_temp.csar - -# Remake temp directory -rm -rf "${SCRIPT_DIR}"/temp -mkdir "${SCRIPT_DIR}"/temp - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d distribution - -unset http_proxy https_proxy - -POLICY_API_IP=$(get-instance-ip.sh policy-api) -POLICY_PAP_IP=$(get-instance-ip.sh policy-pap) -MARIADB_IP=$(get-instance-ip.sh mariadb) -APEX_IP=$(get-instance-ip.sh policy-apex-pdp) -APEX_PORT=30237 -DMAAP_IP=$(get-instance-ip.sh simulator) -POLICY_DISTRIBUTION_IP=$(get-instance-ip.sh policy-distribution) -POLICY_DISTRIBUTION_PORT=30238 - -echo PAP IP IS "${POLICY_PAP_IP}" -echo MARIADB IP IS "${MARIADB_IP}" -echo API IP IS "${POLICY_API_IP}" -echo APEX IP IS "${APEX_IP}" -echo DMAAP_IP IS "${DMAAP_IP}" -echo POLICY_DISTRIBUTION_IP IS "${POLICY_DISTRIBUTION_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_DISTRIBUTION_PORT}" - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_PORT:${APEX_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPT_DIR:${SCRIPT_DIR}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_IP:${POLICY_DISTRIBUTION_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_PORT:${POLICY_DISTRIBUTION_PORT}" diff --git a/csit/distribution/plans/teardown.sh b/csit/distribution/plans/teardown.sh deleted file mode 100755 index 9bfdfe88..00000000 --- a/csit/distribution/plans/teardown.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2018 Ericsson. All rights reserved. -# -# Modifications copyright (c) 2019-2022 Nordix Foundation. -# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/distribution/plans/testplan.txt b/csit/distribution/plans/testplan.txt deleted file mode 100644 index fa0ab03f..00000000 --- a/csit/distribution/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -distribution-test.robot diff --git a/csit/distribution/tests/data/event.json b/csit/distribution/tests/data/event.json deleted file mode 100644 index 9dbf2790..00000000 --- a/csit/distribution/tests/data/event.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "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/distribution/tests/distribution-test.robot b/csit/distribution/tests/distribution-test.robot deleted file mode 100644 index 8cfc3fac..00000000 --- a/csit/distribution/tests/distribution-test.robot +++ /dev/null @@ -1,57 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Resource ${CURDIR}/../../common-library.robot - -*** Test Cases *** - -Healthcheck - [Documentation] Verify policy distribution health check - ${hcauth}= HealthCheckAuth - ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_PORT} /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_PORT} /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_PORT} /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_PORT} /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://localhost: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/csit/docker-compose-all.yml b/csit/docker-compose-all.yml deleted file mode 100644 index 2116e547..00000000 --- a/csit/docker-compose-all.yml +++ /dev/null @@ -1,406 +0,0 @@ -# -# ===========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-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. -# ============LICENSE_END===================================================== -# -version: '2' -services: - mariadb: - image: ${CONTAINER_LOCATION}mariadb:${POLICY_MARIADB_VER} - container_name: mariadb - hostname: mariadb - command: ['--lower-case-table-names=1', '--wait_timeout=28800', '--default-authentication-plugin=mysql_native_password'] - 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 - ports: - - 3306:3306 - policy-db-migrator: - image: ${CONTAINER_LOCATION}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: ${CONTAINER_LOCATION}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 - - ./config/sim-all/logback.xml:/opt/app/policy/simulators/etc/mounted/logback.xml:ro - expose: - - 6666 - - 6668 - - 6669 - - 6670 - - 3904 - - 6680 - ports: - - 30227:3904 - api: - image: ${CONTAINER_LOCATION}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 - - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro - entrypoint: ./wait_for_port.sh - command: [ - '-c', './policy-api.sh', - 'mariadb', '3306', - 'policy-db-migrator', '6824' - ] - pap: - image: ${CONTAINER_LOCATION}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/${PROJECT}/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro - - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro - entrypoint: ./wait_for_port.sh - command: [ - '-c', './policy-pap.sh', - 'mariadb', '3306', - 'message-router', '3904', - 'api', '6969' - ] - xacml-pdp: - image: ${CONTAINER_LOCATION}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 - - ./config/xacml-pdp/logback.xml:/opt/app/policy/pdpx/etc/logback.xml: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: ${CONTAINER_LOCATION}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: ${CONTAINER_LOCATION}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: ${CONTAINER_LOCATION}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 - - 23324:23324 - volumes: - - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro - - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', - 'mariadb', '3306', - 'message-router', '3904', - 'pap', '6969' - ] - distribution: - image: ${CONTAINER_LOCATION}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 - - ./config/distribution/logback.xml:/opt/app/policy/distribution/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './policy-dist.sh', - 'mariadb', '3306', - 'message-router', '3904', - 'pap', '6969', - 'apex-pdp', '6969' - ] - policy-clamp-runtime-acm: - image: ${CONTAINER_LOCATION}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: - - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/AcRuntimeParameters.yaml - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './acm-runtime.sh', - 'mariadb', '3306', - 'message-router', '3904' - ] - policy-clamp-ac-http-ppnt: - image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_VERSION} - container_name: policy-clamp-ac-http-ppnt - depends_on: - - simulator - hostname: policy-clamp-ac-http-ppnt - ports: - - 30290:6969 - volumes: - - ./config/clamp/HttpParticipantParameters.yaml:/opt/app/policy/clamp/etc/HttpParticipantParameters.yaml - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './http-participant.sh', - 'message-router', '3904' - ] - policy-clamp-ac-k8s-ppnt: - image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_VERSION} - container_name: policy-clamp-ac-k8s-ppnt - depends_on: - - simulator - hostname: policy-clamp-ac-k8s-ppnt - ports: - - 30295:6969 - volumes: - - ./config/clamp/KubernetesParticipantParameters.yaml:/opt/app/policy/clamp/etc/KubernetesParticipantParameters.yaml - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './kubernetes-participant.sh', - 'message-router', '3904' - ] - policy-clamp-ac-pf-ppnt: - image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_VERSION} - container_name: policy-clamp-ac-pf-ppnt - depends_on: - - simulator - - api - hostname: policy-clamp-ac-pf-ppnt - ports: - - 30218:6969 - volumes: - - ./config/clamp/PolicyParticipantParameters.yaml:/opt/app/policy/clamp/etc/PolicyParticipantParameters.yaml:ro - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './policy-participant.sh', - 'message-router', '3904', - 'api', '6969' - ] - policy-clamp-ac-a1pms-ppnt: - image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_VERSION} - container_name: policy-clamp-ac-a1pms-ppnt - depends_on: - - simulator - hostname: policy-clamp-ac-a1pms-ppnt - ports: - - 30296:6969 - volumes: - - ./config/clamp/A1pmsParticipantParameters.yaml:/opt/app/policy/clamp/etc/A1pmsParticipantParameters.yaml:ro - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', './a1pms-participant.sh', - 'message-router', '3904' - ] - policy-gui: - image: ${CONTAINER_LOCATION}onap/policy-gui:latest - container_name: policy-gui - depends_on: - - policy-clamp-backend - hostname: policy-gui - environment: - CLAMP_URL: http://policy-clamp-backend:8445 - CLAMP_DISABLE_SSL_VALIDATION: "true" - ports: - - 2445:2445 - volumes: - - ./config/policy-gui/application.yaml:/opt/app/policy/gui/etc/application.yml - - ./config/policy-gui/logback.xml:/opt/app/policy/gui/etc/logback.xml:ro - - ./wait_for_port.sh:/opt/app/policy/gui/bin/wait_for_port.sh:ro - entrypoint: ./policy-gui.sh - working_dir: /opt/app/policy/gui/bin - command: ./policy-gui.sh - policy-clamp-backend: - image: ${CONTAINER_LOCATION}onap/policy-clamp-backend:${POLICY_CLAMP_VERSION} - container_name: policy-clamp-backend - depends_on: - - policy-clamp-runtime-acm - - distribution - hostname: policy-clamp-backend - environment: - POLICY_API_HOST: api - POLICY_PAP_HOST: pap - MARIADB_HOST: mariadb - RUNTIME_HOST: policy-clamp-runtime-acm - ports: - - 8445:8445 - volumes: - - ./config/clamp/ClampBackend.properties:/opt/policy/clamp/config/ClampBackend.properties:ro - - ./config/clamp/logback-backend.xml:/opt/policy/clamp/config/logback.xml:ro - working_dir: /opt/policy/clamp - command: java - -Djava.security.egd=file:/dev/./urandom - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=75 - -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/drools-applications/plans/setup.sh b/csit/drools-applications/plans/setup.sh deleted file mode 100755 index 5f680b44..00000000 --- a/csit/drools-applications/plans/setup.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# 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. -# 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===================================================== -# - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh -bash "${SCRIPTS}"/get-models-examples.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools-apps - -unset http_proxy https_proxy - -DROOLS_IP=$(get-instance-ip.sh drools-apps) -DROOLS_PORT=30221 -API_IP=$(get-instance-ip.sh policy-api) -API_PORT=30440 -PAP_IP=$(get-instance-ip.sh policy-pap) -PAP_PORT=30442 -XACML_IP=$(get-instance-ip.sh policy-xacml-pdp) -XACML_PORT=30441 -SIM_IP=$(get-instance-ip.sh simulator) -export SIM_IP - -echo DROOLS IP IS "${DROOLS_IP}" -echo API IP IS "${API_IP}" -echo PAP IP IS "${PAP_IP}" -echo XACML IP IS "${XACML_IP}" -echo SIMULATORS IP IS "${SIM_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost 30219 - -# give enough time for the controllers to come up -sleep 15 - -DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies -DATA2=${TESTPLANDIR}/tests/data - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR2:${SCRIPTS}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_IP:${DROOLS_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_PORT:${DROOLS_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_IP:${API_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_PORT:${API_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_IP:${PAP_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_PORT:${PAP_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_IP:${XACML_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_PORT:${XACML_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SIM_IP:${SIM_IP}" diff --git a/csit/drools-applications/plans/teardown.sh b/csit/drools-applications/plans/teardown.sh deleted file mode 100755 index 72ade97b..00000000 --- a/csit/drools-applications/plans/teardown.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications 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===================================================== -# - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/drools-applications/plans/testplan.txt b/csit/drools-applications/plans/testplan.txt deleted file mode 100644 index 6ca73849..00000000 --- a/csit/drools-applications/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -drools-applications-test.robot diff --git a/csit/drools-applications/tests/data/deploy.drools.policies.json b/csit/drools-applications/tests/data/deploy.drools.policies.json deleted file mode 100644 index 24c90d0d..00000000 --- a/csit/drools-applications/tests/data/deploy.drools.policies.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "deploymentSubgroups": [ - { - "pdpType": "drools", - "action": "POST", - "policies": [ - { - "name": "operational.restart", - "version": "1.0.0" - }, - { - "name": "operational.scaleout", - "version": "1.0.0" - }, - { - "name": "operational.modifyconfig", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/csit/drools-applications/tests/data/deploy.xacml.policies.json b/csit/drools-applications/tests/data/deploy.xacml.policies.json deleted file mode 100644 index 46da9021..00000000 --- a/csit/drools-applications/tests/data/deploy.xacml.policies.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "deploymentSubgroups": [ - { - "pdpType": "xacml", - "action": "POST", - "policies": [ - { - "name": "onap.restart.tca", - "version": "1.0.0" - }, - { - "name": "onap.scaleout.tca", - "version": "1.0.0" - }, - { - "name": "onap.vfirewall.tca", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/csit/drools-applications/tests/data/vcpeOnset.json b/csit/drools-applications/tests/data/vcpeOnset.json deleted file mode 100644 index 7dd9d5a0..00000000 --- a/csit/drools-applications/tests/data/vcpeOnset.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", - "closedLoopEventStatus": "ONSET", - "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", - "target_type": "VNF", - "target": "generic-vnf.vnf-id", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/csit/drools-applications/tests/data/vdnsOnset.json b/csit/drools-applications/tests/data/vdnsOnset.json deleted file mode 100644 index 13f69095..00000000 --- a/csit/drools-applications/tests/data/vdnsOnset.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", - "target_type": "VNF", - "target": "vserver.vserver-name", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "vserver.vserver-name": "OzVServer" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/csit/drools-applications/tests/data/vfwOnset.json b/csit/drools-applications/tests/data/vfwOnset.json deleted file mode 100644 index 7782867a..00000000 --- a/csit/drools-applications/tests/data/vfwOnset.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", - "target_type": "VNF", - "target": "generic-vnf.vnf-name", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "generic-vnf.vnf-name": "fw0002vm002fw002", - "vserver.vserver-name": "OzVServer" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/csit/drools-applications/tests/drools-applications-test.robot b/csit/drools-applications/tests/drools-applications-test.robot deleted file mode 100644 index 02dc0f32..00000000 --- a/csit/drools-applications/tests/drools-applications-test.robot +++ /dev/null @@ -1,232 +0,0 @@ -*** 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 30219 200 - Should Be Equal As Strings ${resp.json()['alive']} True - -Metrics - [Documentation] Verify drools-apps is exporting metrics - ${resp}= PeformGetRequest /metrics 30219 200 - Should Contain ${resp.text} jvm_threads_current - -Healthcheck - [Documentation] Runs Policy PDP-D Health check - ${resp}= PeformGetRequest /healthcheck ${DROOLS_PORT} 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_PORT} vCPE.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 - -CreateVcpeDroolsPolicy - [Documentation] Create VCPE Policy for Drools - PerformPostRequest /policy/api/v1/policies null ${API_PORT} vCPE.policy.operational.input.tosca.yaml ${DATA} yaml 200 - -CreateVdnsXacmlPolicy - [Documentation] Create VDNS Policy for Xacml - PerformPostRequest /policy/api/v1/policies null ${API_PORT} vDNS.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 - -CreateVdnsDroolsPolicy - [Documentation] Create VDNS Policy for Drools - PerformPostRequest /policy/api/v1/policies null ${API_PORT} vDNS.policy.operational.input.tosca.json ${DATA} json 200 - -CreateVfwXacmlPolicy - [Documentation] Create VFW Policy for Xacml - PerformPostRequest /policy/api/v1/policies null ${API_PORT} vFirewall.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 - -CreateVfwDroolsPolicy - [Documentation] Create VFW Policy for Drools - PerformPostRequest /policy/api/v1/policies null ${API_PORT} 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_PORT} 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_PORT} 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 30219 200 - Should Be Equal As Strings ${resp.json()['usecases']} 1 - -PeformGetRequest - [Arguments] ${url} ${port} ${expectedstatus} - ${auth}= Create List demo@people.osaaf.org demo123456! - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${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} ${port} ${jsonfile} ${filepath} ${contenttype} ${expectedstatus} - ${auth}= Create List policyadmin zb!XztG34 - ${postjson}= Get file ${filepath}/${jsonfile} - Log Creating session http://localhost:${port} - ${session}= Create Session policy http://localhost:${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/csit/drools-pdp/plans/setup.sh b/csit/drools-pdp/plans/setup.sh deleted file mode 100755 index f08126ec..00000000 --- a/csit/drools-pdp/plans/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright 2017-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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools - -POLICY_DROOLS_IP=$(get-instance-ip.sh drools) -POLICY_DROOLS_PORT=30217 -MARIADB_IP=$(get-instance-ip.sh mariadb) - -echo DROOLS IP IS "${POLICY_DROOLS_IP}" -echo MARIADB IP IS "${MARIADB_IP}" - -# wait for the app to start up - looking for telemetry service on port 30216 forwarded from 9696 -"${SCRIPTS}"/wait_for_rest.sh localhost 30216 - -# give enough time for the controllers to come up -sleep 15 - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_PORT:${POLICY_DROOLS_PORT}" diff --git a/csit/drools-pdp/plans/teardown.sh b/csit/drools-pdp/plans/teardown.sh deleted file mode 100755 index c2b68155..00000000 --- a/csit/drools-pdp/plans/teardown.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright 2017-2021 AT&T Intellectual Property. All rights reserved. -# Modifications 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========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/drools-pdp/plans/testplan.txt b/csit/drools-pdp/plans/testplan.txt deleted file mode 100644 index a63b6ed1..00000000 --- a/csit/drools-pdp/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -drools-pdp-test.robot diff --git a/csit/drools-pdp/tests/drools-pdp-test.robot b/csit/drools-pdp/tests/drools-pdp-test.robot deleted file mode 100644 index b895857f..00000000 --- a/csit/drools-pdp/tests/drools-pdp-test.robot +++ /dev/null @@ -1,26 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json - -*** Test Cases *** -Alive - [Documentation] Runs Policy PDP Alive Check - ${auth}= Create List demo@people.osaaf.org demo123456! - Log Creating session http://localhost:30216 - ${session}= Create Session policy http://localhost:30216 auth=${auth} - ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= GET On Session policy /policy/pdp/engine headers=${headers} expected_status=200 - Log Received response from policy ${resp.text} - Should Be Equal As Strings ${resp.json()['alive']} True - -Metrics - [Documentation] Verify drools-pdp is exporting metrics - ${auth}= Create List demo@people.osaaf.org demo123456! - Log Creating session http://localhost:30216 - ${session}= Create Session policy http://localhost:30216 auth=${auth} - ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= GET On Session policy /metrics headers=${headers} expected_status=200 - Log Received response from policy ${resp.text} - Should Contain ${resp.text} jvm_threads_current diff --git a/csit/get-branch.sh b/csit/get-branch.sh deleted file mode 100755 index 3ce51315..00000000 --- a/csit/get-branch.sh +++ /dev/null @@ -1,25 +0,0 @@ -# ============LICENSE_START==================================================== -# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright 2022 Nordix Foundation. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - -export NEXUS_URL=https://nexus.onap.org/content/repositories/snapshots - -GIT_TOP=$(git rev-parse --show-toplevel) -GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \ - "${GIT_TOP}"/.gitreview) -echo GERRIT_BRANCH="${GERRIT_BRANCH}" diff --git a/csit/get-cluster-info.sh b/csit/get-cluster-info.sh deleted file mode 100644 index efe0f517..00000000 --- a/csit/get-cluster-info.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -# This script will be used to gather cluster information -# for JMeter to work towards the installed cluster - -# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES -export APEX_PORT=30001 -export API_PORT=30002 -export PAP_PORT=30003 -export XACML_PORT=30004 -export DROOLS_PORT=30005 -export DIST_PORT=30006 -export ACM_PORT=30007 -export POLICY_PARTICIPANT_PORT=30008 -export DMAAP_PORT=30904 - -# Retrieve pod names -function get_pod_names() { - export APEX_POD=$(get_pod_name apex) - export PAP_POD=$(get_pod_name pap) - export API_POD=$(get_pod_name api) - export DMAAP_POD=$(get_pod_name message-router) - export XACML_POD=$(get_pod_name xacml) - export DROOLS_POD=$(get_pod_name drools-pdp) - export DIST_POD=$(get_pod_name distribution) - export ACM_POD=$(get_pod_name acm-runtime) - export POLICY_PPNT_POD=$(get_pod_name policy-ppnt) -} - -# Retrieve service names -function get_svc_names() { - export APEX_SVC=$(get_svc_name policy-apex) - export PAP_SVC=$(get_svc_name policy-pap) - export API_SVC=$(get_svc_name policy-api) - export DMAAP_SVC=$(get_svc_name message-router) - export DROOLS_SVC=$(get_svc_name drools-pdp) - export XACML_SVC=$(get_svc_name xacml) - export DIST_SVC=$(get_svc_name distribution) - export ACM_SVC=$(get_svc_name acm-runtime) - export POLICY_PPNT_SVC=$(get_svc_name policy-ppnt) -} - -# Expose services in order to perform tests from JMeter -function expose_services() { - expose_service $APEX_SVC - expose_service $PAP_SVC - expose_service $API_SVC - expose_service $XACML_SVC - expose_service $DROOLS_SVC - expose_service $DIST_SVC - expose_service $ACM_SVC - export_service $POLICY_PPNT_SVC - - setup_message_router_svc - sleep 2 - patch_ports -} - -function get_pod_name() { - microk8s kubectl get pods --no-headers -o custom-columns=':metadata.name' | grep $1 -} - -function get_svc_name() { - microk8s kubectl get svc --no-headers -o custom-columns=':metadata.name' | grep $1 -} - -function expose_service() { - microk8s kubectl expose service $1 --name $1"-svc" --type NodePort --protocol TCP --port 6969 --target-port 6969 -} - -function patch_port() { - microk8s kubectl patch service "$1-svc" --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$2"'}]' -} - -# Assign set port values -function patch_ports() { - patch_port "$APEX_SVC" $APEX_PORT - patch_port "$API_SVC" $API_PORT - patch_port "$PAP_SVC" $PAP_PORT - patch_port "$ACM_SVC" $ACM_PORT - patch_port "$POLICY_PPNT_SVC" $POLICY_PARTICIPANT_PORT - patch_port "$DIST_SVC" $DIST_PORT - patch_port "$DROOLS_SVC" $DROOLS_PORT - patch_port "$XACML_SVC" $XACML_PORT -} - -function setup_message_router_svc() { - microk8s kubectl expose service message-router --name message-router-svc --type NodePort --protocol TCP --port 3904 --target-port 3904 - microk8s kubectl patch service message-router-svc --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$DMAAP_PORT"'}]' -} - -####MAIN### -get_pod_names -get_svc_names -expose_services diff --git a/csit/get-instance-ip.sh b/csit/get-instance-ip.sh deleted file mode 100755 index d6e055f4..00000000 --- a/csit/get-instance-ip.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# Modification Copyright 2021 © AT&T Intellectual Property. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1 diff --git a/csit/get-models-examples.sh b/csit/get-models-examples.sh deleted file mode 100755 index fe75c90d..00000000 --- a/csit/get-models-examples.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START=================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright 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===================================================== -# - -source "${SCRIPTS}"/get-branch.sh - -rm -rf "${WORKSPACE}"/models -mkdir "${WORKSPACE}"/models -cd "${WORKSPACE}" - -# download models examples -git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git models diff --git a/csit/get-versions.sh b/csit/get-versions.sh deleted file mode 100755 index d3090842..00000000 --- a/csit/get-versions.sh +++ /dev/null @@ -1,135 +0,0 @@ -#! /bin/bash - -# ============LICENSE_START==================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modification Copyright 2021-2022 Nordix Foundation. -# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - - -if [[ -z "$GERRIT_BRANCH" ]] -then - source "${SCRIPTS}"/get-branch.sh -else - echo GERRIT_BRANCH="${GERRIT_BRANCH}" -fi - -export POLICY_MARIADB_VER=10.10.2 -echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER} - -export POLICY_POSTGRES_VER=11.1 -echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER} - -function getDockerVersion -{ - REPO=$1 - DEFAULT_DOCKER_IMAGE_NAME=$2 - DEFAULT_DOCKER_IMAGE_VERSION=$3 - - REPO_RELEASE_DATA=$( - curl -qL --silent \ - "https://github.com/onap/policy-parent/raw/$GERRIT_BRANCH/integration/src/main/resources/release/pf_release_data.csv" | - grep "^policy/$REPO" - ) - - # shellcheck disable=SC2034 - read -r repo \ - latest_released_tag \ - latest_snapshot_tag \ - changed_files \ - docker_images \ - <<< "$(echo "$REPO_RELEASE_DATA" | tr ',' ' ' )" - - if [[ -z "$docker_images" ]] - then - if [[ -z "$DEFAULT_DOCKER_IMAGE_NAME" ]] - then - echo "repo $REPO does not produce a docker image, execution terminated" - exit 1 - else - docker_images="$DEFAULT_DOCKER_IMAGE_NAME" - fi - fi - - docker_image_version=$(echo "$latest_snapshot_tag" | awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}') - docker_image_name=$(echo "$docker_images" | sed -e "s/^.*://" -e "s/^.//" -e "s/.$//") - - if \ - curl -qL --silent \ - "https://nexus3.onap.org/service/rest/repository/browse/docker.snapshot/v2/onap/$docker_image_name/tags/" | - grep -q "$docker_image_version" - then - echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" - return - fi - - docker_image_version="$latest_released_tag" - if \ - curl -qL --silent \ - "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" | - grep -q "$docker_image_version" - then - echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" - return - fi - - docker_image_version="$DEFAULT_DOCKER_IMAGE_VERSION" - if \ - curl -qL --silent \ - "https://nexus3.onap.org/service/rest/repository/browse/docker.release/v2/onap/$docker_image_name/tags/" | - grep -q "$docker_image_version" - then - echo "using \"$docker_image_name:$docker_image_version\" docker image for repo \"$repo\"" - return - else - echo "docker image \"$docker_image_name:$docker_image_version\" not found for repo \"$repo\"" - exit 1 - fi -} - -getDockerVersion docker -export POLICY_DOCKER_VERSION="$docker_image_version" - -getDockerVersion models "'policy-models-simulator'" 2.6.4 -export POLICY_MODELS_VERSION="$docker_image_version" - -getDockerVersion api -export POLICY_API_VERSION="$docker_image_version" - -getDockerVersion pap -export POLICY_PAP_VERSION="$docker_image_version" - -getDockerVersion apex-pdp -export POLICY_APEX_PDP_VERSION="$docker_image_version" - -getDockerVersion drools-pdp -export POLICY_DROOLS_PDP_VERSION="$docker_image_version" - -getDockerVersion xacml-pdp -export POLICY_XACML_PDP_VERSION="$docker_image_version" - -getDockerVersion distribution -export POLICY_DISTRIBUTION_VERSION="$docker_image_version" - -getDockerVersion clamp -export POLICY_CLAMP_VERSION="$docker_image_version" - -getDockerVersion gui -export POLICY_GUI_VERSION="$docker_image_version" - -getDockerVersion drools-applications -export POLICY_DROOLS_APPS_VERSION="$docker_image_version" diff --git a/csit/make_topic.sh b/csit/make_topic.sh deleted file mode 100755 index f50753ce..00000000 --- a/csit/make_topic.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END===================================================== -# - -# -# 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 - -topic="${1}" - -curl -s -k "http://localhost:30227/events/${topic}/script/1?limit=1&timeout=0" -echo diff --git a/csit/metrics/dashboard.yaml b/csit/metrics/dashboard.yaml deleted file mode 100644 index b6e31e44..00000000 --- a/csit/metrics/dashboard.yaml +++ /dev/null @@ -1,33 +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===================================================== -# - -apiVersion: 1 - -providers: - - name: 'Policy Framework' - orgId: 1 - folder: 'Policy Framework' - folderUid: '' - type: file - disableDeletion: false - updateIntervalSeconds: 60 - allowUiUpdates: true - editable: true - options: - path: /var/lib/grafana/dashboards - foldersFromFilesStructure: true diff --git a/csit/metrics/dashboards/dashboard-apex-pdp.json b/csit/metrics/dashboards/dashboard-apex-pdp.json deleted file mode 100644 index e0199a47..00000000 --- a/csit/metrics/dashboards/dashboard-apex-pdp.json +++ /dev/null @@ -1,1527 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy APEX-PDP", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 7, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime per pod for Policy APEX-PDP application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "(time() - process_start_time_seconds{job=\"apex-pdp-metrics\"}) / 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "process_uptime: {{ pod }}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy APEX-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 7, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false, - "text": {} - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"apex-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy APEX-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"apex-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"apex-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy APEX-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"apex-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy APEX-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"apex-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"apex-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy APEX-PDP JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 19 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"apex-pdp-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"apex-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon{job=\"apex-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_count{job=\"apex-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "{{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_sum{job=\"apex-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"apex-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "avg {{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 21, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "description": "Policy Deployments Total for APEX-PDP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", - "interval": "", - "legendFormat": "Deploy - Success", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"FAIL\"})", - "hide": false, - "interval": "", - "legendFormat": "Deploy - Failure", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"deploy\", status=\"TOTAL\"})", - "hide": false, - "interval": "", - "legendFormat": "Deploy - Total", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Success", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"FAIL\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Failure", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(service)(pdpa_policy_deployments_total{job=\"apex-pdp-metrics\", operation=\"undeploy\", status=\"TOTAL\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Total", - "refId": "F" - } - ], - "title": "Policy Deployments Total", - "type": "bargauge" - }, - { - "description": "Policy Executions Total for APEX-PDP per instance", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "id": 30, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"SUCCESS\"}", - "interval": "", - "legendFormat": "Executions - SUCCESS : {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"FAIL\"}", - "hide": false, - "interval": "", - "legendFormat": "Executions - FAILURE : {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"TOTAL\"}", - "hide": false, - "interval": "", - "legendFormat": "Executions - TOTAL : {{ pod }}", - "refId": "C" - } - ], - "title": "Policy Executions Total", - "type": "bargauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 50 - }, - "id": 34, - "panels": [], - "title": "Engine Stats", - "type": "row" - }, - { - "description": "Policy Engine States for APEX-PDP per engine per instance", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [ - { - "options": { - "0": { - "color": "text", - "index": 0, - "text": "UNDEFINED" - }, - "1": { - "color": "dark-red", - "index": 1, - "text": "STOPPED" - }, - "2": { - "color": "dark-green", - "index": 2, - "text": "READY" - }, - "3": { - "color": "dark-yellow", - "index": 3, - "text": "EXECUTING" - }, - "4": { - "color": "dark-red", - "index": 4, - "text": "STOPPING" - } - }, - "type": "value" - } - ], - "max": 4, - "min": 0 - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 51 - }, - "id": 31, - "options": { - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_engine_state{job=\"apex-pdp-metrics\"}", - "interval": "", - "legendFormat": "{{ engine_instance_id }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Engine States", - "type": "piechart" - }, - { - "description": "Uptime per engine for Policy APEX-PDP application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 51 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(engine_instance_id)((time() - pdpa_engine_last_start_timestamp_epoch{job=\"apex-pdp-metrics\"}/1000)/86400)", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Engine Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Number of APEX event execution counter per engine thread", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 59 - }, - "id": 35, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by (engine_instance_id)(rate(pdpa_engine_event_executions{job=\"apex-pdp-metrics\"}[5m]))", - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Engine Executions", - "type": "timeseries" - }, - { - "description": "Average time taken to execute an APEX policy in seconds per engine instance per pod", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 59 - }, - "id": 36, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last *", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_engine_average_execution_time_seconds{job=\"apex-pdp-metrics\"}", - "interval": "", - "legendFormat": "{{ engine_instance_id }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Engine Average Latency", - "type": "timeseries" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateSpectral", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "tsbuckets", - "description": "Time taken to execute the last APEX policy in seconds expressed as a histogram over time", - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 67 - }, - "heatmap": {}, - "hideZeroBuckets": true, - "highlightCards": true, - "id": 38, - "legend": { - "show": true - }, - "maxDataPoints": 100, - "reverseYBuckets": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum by(le)(increase(pdpa_engine_last_execution_time_bucket{job=\"apex-pdp-metrics\"}[$__interval]))", - "format": "heatmap", - "interval": "", - "legendFormat": "{{ le }}", - "refId": "A" - } - ], - "title": "Engine Latency distribution", - "tooltip": { - "show": true, - "showHistogram": false - }, - "tooltipDecimals": 0, - "transparent": true, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "s", - "logBase": 1, - "show": true - }, - "yBucketBound": "upper" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy APEX-PDP Jakarta", - "uid": "DM56uTogk", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-api.json b/csit/metrics/dashboards/dashboard-api.json deleted file mode 100644 index 8a31de80..00000000 --- a/csit/metrics/dashboards/dashboard-api.json +++ /dev/null @@ -1,1457 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy API", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime per pod for Policy API application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": false, - "expr": "process_uptime_seconds{job=\"api-metrics\"} * 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "process_uptime:{{pod}}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy API CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 7, - "x": 9, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "system_cpu_usage{job=\"api-metrics\"} * 100", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy API Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 17, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum by(job)(jvm_memory_used_bytes{area=\"heap\", job=\"api-metrics\"}) / sum by(job)(jvm_memory_max_bytes{area=\"heap\", job=\"api-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{pod}}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum by(job)(jvm_memory_used_bytes{area=\"nonheap\", job=\"api-metrics\"}) / sum by(job)(jvm_memory_max_bytes{area=\"nonheap\", job=\"api-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Non Heap : {{pod}}", - "refId": "B" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy API CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 11 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "system_cpu_usage{job=\"api-metrics\"} * 100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_cpu_usage{job=\"api-metrics\"} * 100", - "hide": false, - "interval": "", - "legendFormat": "process: {{pod}}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_usage{job=\"api-metrics\"}[1h]) * 100", - "hide": false, - "interval": "", - "legendFormat": "process_1h: {{pod}}", - "refId": "C" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy API Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 11 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum(jvm_memory_used_bytes{area=\"heap\", job=\"api-metrics\"}) / sum(jvm_memory_max_bytes{area=\"heap\", job=\"api-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum(jvm_memory_used_bytes{area=\"nonheap\", job=\"api-metrics\"}) / sum(jvm_memory_max_bytes{area=\"nonheap\", job=\"api-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Non Heap", - "refId": "B" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy API JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 22 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_live_threads{job=\"api-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak_threads{job=\"api-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon_threads{job=\"api-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 35 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 36 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_pause_seconds_count{job=\"api-metrics\"}[1h])", - "interval": "", - "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 36 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_pause_seconds_sum{job=\"api-metrics\"}[1h])/rate(jvm_gc_pause_seconds_count{job=\"api-metrics\"}[1h])", - "interval": "", - "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 21, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "description": "HTTP API requests rate filtered by URI and REST method", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 45 - }, - "id": 12, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(method, uri) (rate(http_server_requests_seconds_count{job=\"api-metrics\"}[5m]))", - "interval": "", - "legendFormat": "{{ method }} - {{ uri }}", - "refId": "A" - } - ], - "title": "HTTP Request Rate", - "type": "timeseries" - }, - { - "description": "Time taken for an API request filtered by REST method and URI", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 45 - }, - "id": 23, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum by (method, uri)(http_server_requests_seconds_sum{job=\"api-metrics\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"api-metrics\"})", - "interval": "", - "legendFormat": "{{ method }} - {{ uri }}", - "refId": "A" - } - ], - "title": "Latency", - "type": "timeseries" - }, - { - "description": "Stats for Policy API Operations", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 53 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12 - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy - Total", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy - Successful", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy - Failed", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", uri=~\"/metrics\"})", - "interval": "", - "legendFormat": "Delete Policy - Total", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Delete Policy - Successful", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Delete Policy - Failed", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy - Total", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy - Successful", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy - Failed", - "refId": "I" - } - ], - "title": "Policy API Requests", - "transparent": true, - "type": "bargauge" - }, - { - "description": "Stats for Policy Types API operations", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 53 - }, - "id": 28, - "options": { - "displayMode": "gradient", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12 - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy Type - Total", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy Type - Successful", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"POST\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Create Policy Type - Failed", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", uri=~\"/metrics\"})", - "interval": "", - "legendFormat": "Delete Policy Type - Total", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Delete Policy Type - Successful", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"DELETE\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Delete Policy Type - Failed", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy Type - Total", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy Type - Successful", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(http_server_requests_seconds_count{job=\"api-metrics\", method=\"GET\", outcome!=\"SUCCESS\", uri=~\"/metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Get Policy Type - Failed", - "refId": "I" - } - ], - "title": "Policy Types API Requests", - "transparent": true, - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy API Jakarta", - "uid": "DM56uKltt", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-distribution.json b/csit/metrics/dashboards/dashboard-distribution.json deleted file mode 100644 index 1a53fcbc..00000000 --- a/csit/metrics/dashboards/dashboard-distribution.json +++ /dev/null @@ -1,927 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy Distribution", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 5, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime for Policy Distribution application", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": false, - "expr": "time()-process_start_time_seconds{job=\"distribution-metrics\"}", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Process Uptime", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy Distribution CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 7, - "x": 9, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_cpu_seconds_total{job=\"distribution-metrics\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy Distribution Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 17, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum by(job)(jvm_memory_bytes_used{area=\"heap\", job=\"distribution-metrics\"}) / sum by(job)(jvm_memory_bytes_max{area=\"heap\", job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{pod}}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy Distribution CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 11 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[1m]) * 100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[5m]) * 100", - "hide": false, - "interval": "", - "legendFormat": "process: {{pod}}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_seconds_total{job=\"distribution-metrics\"}[1h]) * 100", - "hide": false, - "interval": "", - "legendFormat": "process_1h: {{pod}}", - "refId": "C" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy Distribution Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 11 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum(jvm_memory_bytes_used{area=\"heap\", job=\"distribution-metrics\"}) / sum(jvm_memory_bytes_max{area=\"heap\", job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy Distribution JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 22 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"distribution-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"distribution-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_state{job=\"distribution-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "State Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 35 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 36 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_count{job=\"distribution-metrics\"}[1h])", - "interval": "", - "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 36 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_sum{job=\"distribution-metrics\"}[1h])/rate(jvm_gc_collection_seconds_count{job=\"distribution-metrics\"}[1h])", - "interval": "", - "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 21, - "panels": [], - "title": "Statistics", - "type": "row" - }, - { - "description": "Stats for Distribution Statistics Count", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 45 - }, - "id": 32, - "options": { - "displayMode": "gradient", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12 - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(total_distribution_received_count{job=\"distribution-metrics\"})", - "interval": "", - "legendFormat": "Total Count", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(distribution_success_count{job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Success Count", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(distribution_failure_count{job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Failure Count", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(total_download_received_count{job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Total Download Count", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(download_success_count{job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Download Success Count", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(download_failure_count{job=\"distribution-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Download Failure Count", - "refId": "F" - } - ], - "title": "Distribution Statistics", - "transparent": true, - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy Distribution", - "uid": "5HkCopg4z", - "version": 5, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-drools-apps b/csit/metrics/dashboards/dashboard-drools-apps deleted file mode 100644 index a8049274..00000000 --- a/csit/metrics/dashboards/dashboard-drools-apps +++ /dev/null @@ -1,1068 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy Drools-APPS", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 10, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [ - { - "description": "Uptime per pod for Policy Drools-APPS application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "(time() - process_start_time_seconds{job=\"drools-apps-metrics\"}) / 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{ pod }}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy Drools-APPS CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 7, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false, - "text": {} - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"drools-apps-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy Drools-APPS Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-apps-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-apps-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "gauge" - } - ], - "title": "Quick Info", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 17, - "panels": [ - { - "description": "Policy Drools-APPS CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"drools-apps-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy Drools-APPS Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 2 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-apps-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-apps-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy Drools-APPS JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 13 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"drools-apps-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"drools-apps-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon{job=\"drools-apps-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - } - ], - "title": "System", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 15, - "panels": [ - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_count{job=\"drools-apps-metrics\"}[5m])", - "interval": "", - "legendFormat": "{{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_sum{job=\"drools-apps-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"drools-apps-metrics\"}[5m])", - "interval": "", - "legendFormat": "avg {{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - } - ], - "title": "Garbage Collection", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 21, - "panels": [ - { - "description": "Policy Deployments Total for Drools-APPS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 4 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", - "interval": "", - "legendFormat": "Deploy - Success", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"deploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Deploy - Failure", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Success", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-apps-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Failure", - "refId": "E" - } - ], - "title": "Policy Deployments Total", - "type": "bargauge" - }, - { - "description": "Policy Executions Total for Drools-APPS per instance", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 30, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpd_policy_executions_latency_seconds_count{job=\"drools-apps-metrics\", status=\"SUCCESS\"}", - "interval": "", - "legendFormat": "Executions - Count", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpd_policy_executions_latency_seconds_sum{job=\"drools-apps-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Executions - Sum", - "refId": "B" - } - ], - "title": "Policy Executions", - "type": "bargauge" - } - ], - "title": "Requests", - "type": "row" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy Drools-APPS", - "uid": "i9l6oyz4z", - "version": 3, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-drools-pdp.json b/csit/metrics/dashboards/dashboard-drools-pdp.json deleted file mode 100644 index 683d7686..00000000 --- a/csit/metrics/dashboards/dashboard-drools-pdp.json +++ /dev/null @@ -1,1150 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy Drools-PDP", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 9, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime per pod for Policy Drools-PDP application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "(time() - process_start_time_seconds{job=\"drools-pdp-metrics\"}) / 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "process_uptime: {{ pod }}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy Drools-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 7, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false, - "text": {} - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"drools-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy Drools-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy Drools-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"drools-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy Drools-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"drools-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"drools-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy Drools-PDP JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 19 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"drools-pdp-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"drools-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon{job=\"policy-drools-pdp\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_count{job=\"drools-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "{{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_sum{job=\"drools-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"drools-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "avg {{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 21, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "description": "Policy Deployments Total for Drools-PDP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", - "interval": "", - "legendFormat": "Deploy - Success", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"deploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Deploy - Failure", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Success", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpd_policy_deployments_total{job=\"drools-pdp-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeploy - Failure", - "refId": "E" - } - ], - "title": "Policy Deployments Total", - "type": "bargauge" - }, - { - "description": "Policy Executions Total for Drools-PDP per instance", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "id": 30, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpd_policy_executions_latency_seconds_count{job=\"drools-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Executions - Count", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpd_policy_executions_latency_seconds_sum{job=\"drools-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Executions - Sum", - "refId": "C" - } - ], - "title": "Policy Executions", - "type": "bargauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 50 - }, - "id": 34, - "panels": [], - "title": "Logging", - "type": "row" - }, - { - "description": "Policy number of log entries for Drool-PDP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 51 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "logback_appender_total{job=\"drools-pdp-metrics\"}", - "interval": "", - "legendFormat": "Level", - "refId": "A" - } - ], - "title": "Logback Total", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy Drools-PDP", - "uid": "ro24hskVz", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-for-springboot.json b/csit/metrics/dashboards/dashboard-for-springboot.json deleted file mode 100644 index b91aa04b..00000000 --- a/csit/metrics/dashboards/dashboard-for-springboot.json +++ /dev/null @@ -1,3681 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for Spring Boot Statistics(by micrometer-prometheus)", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 14430, - "graphTooltip": 0, - "id": 1, - "iteration": 1645635034981, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 54, - "panels": [], - "title": "Basic Statistics", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 52, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "process_uptime_seconds{application=\"$application\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "dateTimeAsIso" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 56, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "process_start_time_seconds{application=\"$application\", instance=\"$instance\"}*1000", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Start time", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 58, - "links": [], - "maxDataPoints": 100, - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\", area=\"heap\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Heap Used", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - }, - { - "options": { - "from": -1e+32, - "result": { - "text": "N/A" - }, - "to": 0 - }, - "type": "range" - } - ], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 60, - "links": [], - "maxDataPoints": 100, - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",instance=\"$instance\", area=\"nonheap\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Non-Heap Used", - "type": "gauge" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 - }, - "hiddenSeries": false, - "id": 95, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "system_cpu_usage{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "System CPU Usage", - "refId": "A" - }, - { - "expr": "process_cpu_usage{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Process CPU Usage", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 - }, - "hiddenSeries": false, - "id": 96, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "system_load_average_1m{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Load Average [1m]", - "refId": "A" - }, - { - "expr": "system_cpu_count{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "CPU Core Size", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Load Average", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 14 - }, - "id": 66, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{uri}}", - "refId": "A" - } - ], - "title": "HTTP Server Requests Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 14 - }, - "id": 110, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "http_server_requests_seconds_sum{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{uri}}", - "refId": "A" - } - ], - "title": "HTTP Server Requests Sum", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 14 - }, - "id": 111, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "http_server_requests_seconds_max{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{uri}}", - "refId": "A" - } - ], - "title": "HTTP Server Requests Max", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 48, - "panels": [], - "title": "JVM Statistics - Memory", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 8, - "x": 0, - "y": 21 - }, - "id": 85, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "repeat": "memory_pool_heap", - "repeatDirection": "h", - "targets": [ - { - "expr": "jvm_memory_used_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Used", - "refId": "C" - }, - { - "expr": "jvm_memory_committed_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Commited", - "refId": "A" - }, - { - "expr": "jvm_memory_max_bytes{instance=\"$instance\", application=\"$application\", id=\"$memory_pool_heap\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Max", - "refId": "B" - } - ], - "title": "$memory_pool_heap (heap)", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 6, - "x": 0, - "y": 31 - }, - "id": 88, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "repeat": "memory_pool_nonheap", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Used", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Commited", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Max", - "refId": "B" - } - ], - "title": "$memory_pool_nonheap (non-heap)", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 31 - }, - "id": 80, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(jvm_classes_unloaded_classes_total{instance=\"$instance\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Classes Unloaded", - "refId": "A" - } - ], - "title": "Classes Unloaded", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 39 - }, - "id": 83, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", id=\"mapped\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Used Bytes", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", id=\"mapped\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Capacity Bytes", - "refId": "B" - } - ], - "title": "Mapped Buffers", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 51 - }, - "id": 50, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_classes_loaded_classes{instance=\"$instance\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Classes Loaded", - "refId": "A" - } - ], - "title": "Classes Loaded", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 56 - }, - "id": 78, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(jvm_gc_memory_allocated_bytes_total{instance=\"$instance\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "allocated", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(jvm_gc_memory_promoted_bytes_total{instance=\"$instance\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "promoted", - "refId": "B" - } - ], - "title": "Memory Allocate/Promote", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 59 - }, - "id": 82, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", application=\"$application\", id=\"direct\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Used Bytes", - "refId": "A" - }, - { - "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", application=\"$application\", id=\"direct\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Capacity Bytes", - "refId": "B" - } - ], - "title": "Direct Buffers", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 66 - }, - "id": 68, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon_threads{instance=\"$instance\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Daemon", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_live_threads{instance=\"$instance\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Live", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak_threads{instance=\"$instance\", application=\"$application\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Peak", - "refId": "C" - } - ], - "title": "Threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 74 - }, - "id": 72, - "panels": [], - "title": "JVM Statistics - GC", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 75 - }, - "id": 74, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(jvm_gc_pause_seconds_count{instance=\"$instance\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{action}} [{{cause}}]", - "refId": "A" - } - ], - "title": "GC Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 75 - }, - "id": 76, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "irate(jvm_gc_pause_seconds_sum{instance=\"$instance\", application=\"$application\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{action}} [{{cause}}]", - "refId": "A" - } - ], - "title": "GC Stop the World Duration", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 85 - }, - "id": 34, - "panels": [], - "title": "HikariCP Statistics", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 86 - }, - "id": 44, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^hikaricp_connections{app=\"orders\", app_kubernetes_io_instance=\"mushop\", app_kubernetes_io_name=\"orders\", instance=\"10.1.0.72:80\", job=\"kubernetes-pods\", kubernetes_namespace=\"mushop\", kubernetes_pod_name=\"mushop-orders-67bb8f45c8-5cr5p\", mockmode=\"false\", pod_template_hash=\"67bb8f45c8\", pool=\"HikariPool-1\", version=\"local\"}$/", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "hikaricp_connections{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Connections Size", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 20, - "x": 4, - "y": 86 - }, - "id": 36, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "hikaricp_connections_active{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Active", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "hikaricp_connections_idle{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Idle", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "expr": "hikaricp_connections_pending{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Pending", - "refId": "C" - } - ], - "title": "Connections", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 90 - }, - "id": 46, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^hikaricp_connections_timeout_total{app=\"orders\", app_kubernetes_io_instance=\"mushop\", app_kubernetes_io_name=\"orders\", instance=\"10.1.0.72:80\", job=\"kubernetes-pods\", kubernetes_namespace=\"mushop\", kubernetes_pod_name=\"mushop-orders-67bb8f45c8-5cr5p\", mockmode=\"false\", pod_template_hash=\"67bb8f45c8\", pool=\"HikariPool-1\", version=\"local\"}$/", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "hikaricp_connections_timeout_total{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Connection Timeout Count", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 94 - }, - "id": 38, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "hikaricp_connections_creation_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_creation_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Creation Time", - "refId": "A" - } - ], - "title": "Connection Creation Time", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 94 - }, - "id": 42, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "hikaricp_connections_usage_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_usage_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Usage Time", - "refId": "A" - } - ], - "title": "Connection Usage Time", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 94 - }, - "id": 40, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "hikaricp_connections_acquire_seconds_sum{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"} / hikaricp_connections_acquire_seconds_count{instance=\"$instance\", application=\"$application\", pool=\"$hikaricp\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Acquire Time", - "refId": "A" - } - ], - "title": "Connection Acquire Time", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 100 - }, - "id": 101, - "panels": [], - "title": "Database Stats", - "type": "row" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 101 - }, - "id": 102, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jdbc_connections_active{instance=\"$instance\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Active Connections", - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 101 - }, - "id": 106, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jdbc_connections_idle{instance=\"$instance\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Idle Connections", - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 101 - }, - "id": 108, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(spring_data_repository_invocations_seconds_count{instance=\"$instance\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Total query executions", - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 104 - }, - "id": 107, - "links": [], - "maxDataPoints": 100, - "options": { - "legend": { - "calcs": [ - "mean", - "min", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(rate(spring_data_repository_invocations_seconds_max{instance=\"$instance\"}[5m]))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "rate", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Response Time", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 112 - }, - "id": 18, - "panels": [], - "title": "HTTP Statistics", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 113 - }, - "id": 4, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "irate(http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\", uri!~\".*actuator.*\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{uri}}", - "refId": "A" - } - ], - "title": "Request Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 120 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "irate(http_server_requests_seconds_sum{instance=\"$instance\", application=\"$application\", exception=\"None\", uri!~\".*actuator.*\"}[5m]) / irate(http_server_requests_seconds_count{instance=\"$instance\", application=\"$application\", exception=\"None\", uri!~\".*actuator.*\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{uri}}", - "refId": "A" - } - ], - "title": "Response Time", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 127 - }, - "id": 8, - "panels": [], - "title": "Logback Statistics", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 128 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"info\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "info", - "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", - "refId": "A" - } - ], - "title": "INFO logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 128 - }, - "id": 10, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"error\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "error", - "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", - "refId": "A" - } - ], - "title": "ERROR logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 135 - }, - "id": 14, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"warn\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "warn", - "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", - "refId": "A" - } - ], - "title": "WARN logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 135 - }, - "id": 16, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"debug\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "debug", - "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", - "refId": "A" - } - ], - "title": "DEBUG logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 135 - }, - "id": 20, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min", - "sum" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "expr": "irate(logback_events_total{instance=\"$instance\", application=\"$application\", level=\"trace\"}[5m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "trace", - "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", - "refId": "A" - } - ], - "title": "TRACE logs", - "type": "timeseries" - } - ], - "refresh": "10s", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "policy-api:6969", - "value": "policy-api:6969" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "label_values(jvm_classes_loaded_classes, instance)", - "hide": 0, - "includeAll": false, - "label": "Instance", - "multi": false, - "name": "instance", - "options": [], - "query": { - "query": "label_values(jvm_classes_loaded_classes, instance)", - "refId": "Prometheus-instance-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "", - "hide": 0, - "includeAll": false, - "label": "Application", - "multi": false, - "name": "application", - "options": [], - "query": { - "query": "label_values(jvm_classes_loaded{instance=\"$instance\"}, application)", - "refId": "Prometheus-application-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "", - "hide": 0, - "includeAll": false, - "label": "HikariCP-Pool", - "multi": false, - "name": "hikaricp", - "options": [], - "query": { - "query": "label_values(hikaricp_connections{instance=\"$instance\", application=\"$application\"}, pool)", - "refId": "Prometheus-hikaricp-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "", - "hide": 0, - "includeAll": true, - "label": "Memory Pool (heap)", - "multi": false, - "name": "memory_pool_heap", - "options": [], - "query": { - "query": "label_values(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"heap\"},id)", - "refId": "Prometheus-memory_pool_heap-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "", - "hide": 0, - "includeAll": true, - "label": "Memory Pool (nonheap)", - "multi": false, - "name": "memory_pool_nonheap", - "options": [], - "query": { - "query": "label_values(jvm_memory_used_bytes{application=\"$application\", instance=\"$instance\", area=\"nonheap\"},id)", - "refId": "Prometheus-memory_pool_nonheap-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Spring Boot Statistics & Endpoint Metrics", - "uid": "OS7-NUiGz", - "version": 1, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-jvm-basic.json b/csit/metrics/dashboards/dashboard-jvm-basic.json deleted file mode 100644 index dce01fc8..00000000 --- a/csit/metrics/dashboards/dashboard-jvm-basic.json +++ /dev/null @@ -1,2753 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "limit": 100, - "name": "Annotations & Alerts", - "showIn": 0, - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - { - "datasource": "dkSf71fnz", - "enable": true, - "expr": "resets(process_uptime_seconds{job=\"$job\"}[1m]) > 0", - "iconColor": "rgba(255, 96, 96, 1)", - "name": "Restart Detection", - "showIn": 0, - "step": "1m", - "tagKeys": "restart-tag", - "textFormat": "uptime reset", - "titleFormat": "Restart" - } - ] - }, - "description": "Dashboard for JVM Basic Metrics", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 4701, - "graphTooltip": 1, - "id": 4, - "iteration": 1645634994099, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 125, - "panels": [], - "title": "Quick Facts", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 63, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "time()-process_start_time_seconds{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "dateTimeAsIso" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 9, - "x": 3, - "y": 1 - }, - "id": 92, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "process_start_time_seconds{job=\"$job\"}*1000", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Start time", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 65, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Heap used", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - }, - { - "options": { - "from": -1e+32, - "result": { - "text": "N/A" - }, - "to": 0 - }, - "type": "range" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 75, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})*100/sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Non-Heap used", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 127, - "panels": [], - "title": "JVM Memory", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 5 - }, - "id": 24, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"heap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_committed{job=\"$job\", area=\"heap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "committed", - "refId": "B", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"heap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "refId": "C", - "step": 2400 - } - ], - "title": "JVM Heap", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 5 - }, - "id": 25, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_used{job=\"$job\", area=\"nonheap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_commited{job=\"$job\", area=\"nonheap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "committed", - "refId": "B", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_max{job=\"$job\", area=\"nonheap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "refId": "C", - "step": 2400 - } - ], - "title": "JVM Non-Heap", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 5 - }, - "id": 26, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_used{job=\"$job\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_committed{job=\"$job\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "committed", - "refId": "B", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_bytes_max{job=\"$job\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "refId": "C", - "step": 2400 - } - ], - "title": "JVM Total", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 5 - }, - "id": 86, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_virtual_memory_bytes{job=\"$job\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "vss", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_resident_memory_bytes{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "rss", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_resident_memory_bytes{job=\"$job\"} + process_virtual_memory_bytes{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "total", - "refId": "D" - } - ], - "title": "JVM Process Memory", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 12 - }, - "id": 128, - "panels": [], - "title": "JVM Misc", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 1, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 13 - }, - "id": 106, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(process_cpu_seconds_total{job=\"$job\"}[5m])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "system + process", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_usage{job=\"$job\"}[1h])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "process-1h", - "refId": "C" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 13 - }, - "id": 61, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_open_fds{job=\"$job\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "open", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_max_fds{job=\"$job\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "metric": "", - "refId": "B", - "step": 2400 - } - ], - "title": "File Descriptors", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 13 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_state{state=\"RUNNABLE\", job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "live", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "daemon", - "metric": "", - "refId": "B", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "peak", - "refId": "C", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "process", - "refId": "D", - "step": 2400 - } - ], - "title": "Threads", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "blocked" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "new" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#fce2de", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "runnable" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7eb26d", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "terminated" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#511749", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "timed-waiting" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#c15c17", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "waiting" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#eab839", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 13 - }, - "id": 124, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_state{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{state}}", - "refId": "A" - } - ], - "title": "Thread States", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 129, - "panels": [], - "repeat": "persistence_counts", - "title": "JVM Memory Pools (Heap)", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 21 - }, - "id": 3, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "repeat": "jvm_memory_pool_heap", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 1800 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_commited{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "commited", - "metric": "", - "refId": "B", - "step": 1800 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"G1 Eden Space|G1 Old Gen|G1 Survivor Space\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "metric": "", - "refId": "C", - "step": 1800 - } - ], - "title": "JVM Memory Pool heap", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 130, - "panels": [], - "title": "JVM Memory Pools (Non-Heap)", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 29 - }, - "id": 78, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "repeat": "jvm_memory_pool_nonheap", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_used{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 1800 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_committed{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "commited", - "metric": "", - "refId": "B", - "step": 1800 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_pool_bytes_max{job=\"$job\", pool=~\"CodeHeap 'non-nmethods'|Metaspace|CodeHeap 'profiled nmethods'|Compressed Class Space|CodeHeap 'non-profiled nmethods'\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "max", - "metric": "", - "refId": "C", - "step": 1800 - } - ], - "title": "JVM Memory Pool nonheap", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 36 - }, - "id": 131, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 37 - }, - "id": 98, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m]))", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "rate", - "refId": "A" - } - ], - "title": "Collections", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 37 - }, - "id": 101, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(rate(jvm_gc_collection_seconds_sum{job=\"$job\"}[5m]))/sum(rate(jvm_gc_collection_seconds_count{job=\"$job\"}[5m]))", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "avg", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "expr": "jvm_gc_pause_seconds_max{job=\"$job\"}", - "format": "time_series", - "hide": false, - "instant": false, - "intervalFactor": 1, - "legendFormat": "max {{action}} ({{cause}})", - "refId": "B" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 37 - }, - "id": 99, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(rate(jvm_memory_pool_allocated_bytes_total{job=\"$job\"}[5m]))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "allocated", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(rate(jvm_memory_pool_allocated_bytes_created{job=\"$job\"}[5m]))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "created", - "refId": "B" - } - ], - "title": "Allocated/Created", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 132, - "panels": [], - "title": "Classloading", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 45 - }, - "id": 37, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_classes_loaded{job=\"$job\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "loaded", - "metric": "", - "refId": "A", - "step": 1200 - } - ], - "title": "Classes loaded", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 45 - }, - "id": 38, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "delta(jvm_classes_loaded{job=\"$job\"}[5m])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "delta-1m", - "metric": "", - "refId": "A", - "step": 1200 - } - ], - "title": "Class delta", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 52 - }, - "id": 133, - "panels": [], - "title": "Buffer Pools", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 53 - }, - "id": 33, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"direct\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"direct\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "capacity", - "metric": "", - "refId": "B", - "step": 2400 - } - ], - "title": "Direct Buffers", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 53 - }, - "id": 83, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"direct\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "count", - "metric": "", - "refId": "A", - "step": 2400 - } - ], - "title": "Direct Buffers", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 53 - }, - "id": 85, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_used_bytes{job=\"$job\", pool=\"mapped\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "used", - "metric": "", - "refId": "A", - "step": 2400 - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_capacity_bytes{job=\"$job\", pool=\"mapped\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "capacity", - "metric": "", - "refId": "B", - "step": 2400 - } - ], - "title": "Mapped Buffers", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 53 - }, - "id": 84, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_buffer_pool_used_buffers{job=\"$job\", pool=\"mapped\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "count", - "metric": "", - "refId": "A", - "step": 2400 - } - ], - "title": "Mapped Buffers", - "type": "timeseries" - } - ], - "refresh": "30s", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "apex-pdp-metrics", - "value": "apex-pdp-metrics" - }, - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "definition": "label_values(job)", - "hide": 0, - "includeAll": false, - "label": "Job", - "multi": false, - "name": "job", - "options": [], - "query": { - "query": "label_values(job)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "now": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "JVM Basic Metrics", - "uid": "SLdKRfB7z", - "version": 1, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-pap.json b/csit/metrics/dashboards/dashboard-pap.json deleted file mode 100644 index 93f54256..00000000 --- a/csit/metrics/dashboards/dashboard-pap.json +++ /dev/null @@ -1,1328 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy PAP", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 4, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime per pod for Policy PAP application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_uptime_seconds{job=\"pap-metrics\"} / 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "process_uptime: {{ pod }}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy PAP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 6, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false, - "text": {} - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "system_cpu_usage{job=\"pap-metrics\"} * 100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy PAP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 15, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum by(pod)(jvm_memory_used_bytes{area=\"heap\", job=\"pap-metrics\"}) / sum by(pod)(jvm_memory_max_bytes{area=\"heap\", job=\"pap-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum by(pod)(jvm_memory_used_bytes{area=\"nonheap\", job=\"pap-metrics\"}) / sum by(pod)(jvm_memory_max_bytes{area=\"nonheap\", job=\"pap-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Non Heap : {{ pod }}", - "refId": "B" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy PAP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "system_cpu_usage{job=\"pap-metrics\"} * 100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_cpu_usage{job=\"pap-metrics\"} * 100", - "hide": false, - "interval": "", - "legendFormat": "process: {{pod}}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg_over_time(process_cpu_usage{job=\"pap-metrics\"}[1h]) * 100", - "hide": false, - "interval": "", - "legendFormat": "process_1h: {{pod}}", - "refId": "C" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy PAP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum(jvm_memory_used_bytes{area=\"heap\", job=\"pap-metrics\"}) / sum(jvm_memory_max_bytes{area=\"heap\", job=\"pap-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Heap", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * sum(jvm_memory_used_bytes{area=\"nonheap\", job=\"pap-metrics\"}) / sum(jvm_memory_max_bytes{area=\"nonheap\", job=\"pap-metrics\"})", - "hide": false, - "interval": "", - "legendFormat": "Non Heap", - "refId": "B" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy PAP JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 19 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_live_threads{job=\"pap-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak_threads{job=\"pap-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon_threads{job=\"pap-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_pause_seconds_count{job=\"pap-metrics\"}[1h])", - "interval": "", - "legendFormat": "{{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_pause_seconds_sum{job=\"pap-metrics\"}[1h])/rate(jvm_gc_pause_seconds_count{job=\"pap-metrics\"}[1h])", - "interval": "", - "legendFormat": "avg {{action}} ({{cause}}) : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 21, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "description": "Total number of PAP requests per second filtered by URI and REST method", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "id": 12, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(method, uri) (rate(http_server_requests_seconds_count{job=\"pap-metrics\"}[5m]))", - "interval": "", - "legendFormat": "{{ method }} - {{ uri }}", - "refId": "A" - } - ], - "title": "HTTP Request Rate", - "type": "timeseries" - }, - { - "description": "Time taken for PAP request filtered by REST method and URI", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "id": 23, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum by (method, uri)(http_server_requests_seconds_sum{job=\"pap-metrics\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\"})", - "interval": "", - "legendFormat": "{{ method }} - {{ uri }}", - "refId": "A" - } - ], - "title": "Latency", - "type": "timeseries" - }, - { - "description": "Percentage of PAP calls that passed filtered by method and URI", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 50 - }, - "id": 29, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "text": { - "titleSize": 12 - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum by (method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\", outcome=\"SUCCESS\"})/sum by(method, uri)(http_server_requests_seconds_count{job=\"pap-metrics\"})*100", - "interval": "", - "legendFormat": "{{ method }} - {{ uri }}", - "refId": "A" - } - ], - "title": "HTTP API Success %age", - "type": "gauge" - }, - { - "description": "Stats for Policy PAP Deployment/Undeployment Operations", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 50 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "text": { - "titleSize": 12 - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"deploy\"})", - "hide": false, - "interval": "", - "legendFormat": "Deployment - Total", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"deploy\",status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "Deployment - Success", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"deploy\",status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Deployment - Failure", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeployment - Total", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\",status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeployment - Success", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(pap_policy_deployments_total{operation=\"undeploy\",status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "Undeployment - Failure", - "refId": "F" - } - ], - "title": "Policy Deployment/Undeployment Stats", - "transparent": true, - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy PAP Jakarta", - "uid": "DM56uKldd", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/dashboard-xacml-pdp.json b/csit/metrics/dashboards/dashboard-xacml-pdp.json deleted file mode 100644 index a1c10c5b..00000000 --- a/csit/metrics/dashboards/dashboard-xacml-pdp.json +++ /dev/null @@ -1,1162 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Grafana Dashboard for Policy XACML-PDP", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 5, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 19, - "panels": [], - "title": "Quick Info", - "type": "row" - }, - { - "description": "Uptime per pod for Policy XACML-PDP application calculated in days", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "(time() - process_start_time_seconds{job=\"xacml-pdp-metrics\"}) / 86400", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "process_uptime: {{pod}}", - "refId": "A" - } - ], - "title": "Process Uptime (days)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "description": "Policy XACML-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 2, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 7, - "y": 1 - }, - "id": 26, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false, - "text": {} - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"xacml-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "gauge" - }, - { - "description": "Policy XACML-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 27, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": false - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"xacml-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 17, - "panels": [], - "title": "System", - "type": "row" - }, - { - "description": "Policy XACML-PDP CPU Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "process-1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "process_1h: dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(process_cpu_seconds_total{job=\"xacml-pdp-metrics\"}[5m])*100", - "interval": "", - "legendFormat": "system: {{pod}}", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "description": "Policy XACML-PDP Memory Usage Monitoring", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "{area=\"heap\", container=\"policy-api\", endpoint=\"policy-api\", id=\"Tenured Gen\", instance=\"10.42.7.19:6969\", job=\"policy-api\", namespace=\"onap\", pod=\"dev-policy-api-69f54f45cc-sb56v\", service=\"policy-api\"}" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "text", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Tenured Gen - dev-policy-api-69f54f45cc-wq6xq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-purple", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "sortBy": "Last", - "sortDesc": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "100 * jvm_memory_bytes_used{area=\"heap\", job=\"xacml-pdp-metrics\"} / jvm_memory_bytes_max{area=\"heap\", job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Heap : {{ pod }}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "description": "Policy XACML-PDP JVM Threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 19 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_current{job=\"xacml-pdp-metrics\"}", - "interval": "", - "legendFormat": "Live Threads: {{ pod }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_peak{job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Peak Threads: {{ pod }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "jvm_threads_daemon{job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Daemon Threads: {{ pod }}", - "refId": "C" - } - ], - "title": "JVM threads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 15, - "panels": [], - "title": "Garbage Collection", - "type": "row" - }, - { - "description": "GC operations per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "{{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Collection", - "type": "timeseries" - }, - { - "description": "Average GC Time", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(jvm_gc_collection_seconds_sum{job=\"xacml-pdp-metrics\"}[5m])/rate(jvm_gc_collection_seconds_count{job=\"xacml-pdp-metrics\"}[5m])", - "interval": "", - "legendFormat": "avg {{ gc }} : {{ pod }}", - "refId": "A" - } - ], - "title": "Pause Durations", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 21, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "description": "Policy Deployments Total for XACML-PDP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"deploy\", status=\"SUCCESS\"})", - "interval": "", - "legendFormat": "{{ deploy }}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"deploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "{{ deploy }}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"undeploy\", status=\"SUCCESS\"})", - "hide": false, - "interval": "", - "legendFormat": "{{ undeploy }}", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by(job)(pdpx_policy_deployments_total{job=\"xacml-pdp-metrics\", operation=\"undeploy\", status=\"FAILURE\"})", - "hide": false, - "interval": "", - "legendFormat": "{{ undeploy }}", - "refId": "E" - } - ], - "title": "Policy Deployments Total", - "type": "bargauge" - }, - { - "description": "Policy Decisions Total for XACML-PDP per instance", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "id": 30, - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Deny", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Indeterminant", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpx_policy_decisions_total{job=\"xacml-pdp-metrics\"}", - "hide": false, - "interval": "", - "legendFormat": "Not Applicable", - "refId": "A" - } - ], - "title": "Policy Decisions", - "type": "bargauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 50 - }, - "id": 34, - "panels": [], - "title": "Logging", - "type": "row" - }, - { - "description": "Policy number of log entries for XACML-PDP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 51 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "logback_appender_total{job=\"xacml-pdp-metrics\"}", - "interval": "", - "legendFormat": "Level", - "refId": "A" - } - ], - "title": "Logback Total", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Policy XACML-PDP", - "uid": "Fk_2HkmVk", - "version": 2, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/dashboards/sla-metrics.json b/csit/metrics/dashboards/sla-metrics.json deleted file mode 100644 index e94d91dc..00000000 --- a/csit/metrics/dashboards/sla-metrics.json +++ /dev/null @@ -1,1778 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for Service Level Agreeements", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 14430, - "graphTooltip": 0, - "id": 3, - "iteration": 1673599566103, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 54, - "panels": [], - "title": "Basic Statistics", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 52, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_uptime_seconds", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{job}}", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "dateTimeAsIso" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 56, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "process_start_time_seconds{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"}*1000", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}}", - "metric": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Start time", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 7 - }, - "id": 58, - "links": [], - "maxDataPoints": 100, - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"heap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Heap Used", - "type": "gauge" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - }, - { - "options": { - "from": -1e+32, - "result": { - "text": "N/A" - }, - "to": 0 - }, - "type": "range" - } - ], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 7 - }, - "id": 60, - "links": [], - "maxDataPoints": 100, - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "sum(jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\", area=\"nonheap\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 14400 - } - ], - "title": "Non-Heap Used", - "type": "gauge" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 13 - }, - "id": 96, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg(system_load_average_1m{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Load Average [1m] ", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg(system_cpu_count{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "CPU Core Size", - "refId": "B" - } - ], - "title": "Load Average", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 21 - }, - "id": 95, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg(system_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "System CPU Usage", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg(process_cpu_usage{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Process CPU Usage", - "refId": "B" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 28 - }, - "id": 113, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "min", - "max" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "avg by (id) (jvm_memory_used_bytes{job=~\"api-metrics|acm-metrics|pap-metrics|apex-pdp-metrics\"})", - "interval": "", - "legendFormat": "{{id}}", - "refId": "A" - } - ], - "title": "Memory Usage", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 36 - }, - "id": 18, - "panels": [], - "title": "HTTP Statistics", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 23, - "x": 0, - "y": 37 - }, - "id": 4, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "sum" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(http_server_requests_seconds_count{uri!~\".*metrics.*|.*prometheus.*\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", - "refId": "A" - } - ], - "title": "Request Count", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 23, - "x": 0, - "y": 47 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(http_server_requests_seconds_sum{job=~\"api-metrics|acm-metrics|pap-metrics\", exception=\"None\", uri!~\".*metrics.*|.*prometheus.*\"}[5m]) / irate(http_server_requests_seconds_count{job=~\"api-metrics|acm-metrics|pap-metrics\", exception=\"None\", uri!~\".*metrics.*|.*prometheus.*\"}[5m])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", - "refId": "A" - } - ], - "title": "Response Time", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 22, - "x": 0, - "y": 57 - }, - "id": 111, - "links": [], - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "http_server_requests_seconds_max{job=~\"api-metrics|acm-metrics|pap-metrics\", uri!~\".*metrics.*|.*prometheus.*\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{method}} [{{status}}] - {{instance}}{{uri}}", - "refId": "A" - } - ], - "title": "HTTP Server Requests Max", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 67 - }, - "id": 115, - "panels": [], - "title": "Deployment statistics", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 0, - "y": 68 - }, - "id": 117, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pap_policy_deployments_total{operation=\"deploy\", status=\"SUCCESS\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Successful deployments", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 3, - "y": 68 - }, - "id": 118, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pap_policy_deployments_total{operation=\"undeploy\", status=\"SUCCESS\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Successful undeployments", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 6, - "y": 68 - }, - "id": 119, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pap_policy_deployments_total{operation=\"deploy\", status=\"FAILURE\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Failed deployments", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 9, - "y": 68 - }, - "id": 120, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pap_policy_deployments_total{operation=\"undeploy\", status=\"FAILURE\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Failed undeployments", - "type": "stat" - }, - { - "description": "Policy Executions Total for APEX-PDP", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 74 - }, - "id": 128, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"SUCCESS\"}", - "interval": "", - "legendFormat": "Successful", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"FAIL\"}", - "hide": false, - "interval": "", - "legendFormat": "Failed", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_policy_executions_total{job=\"apex-pdp-metrics\", status=\"TOTAL\"}", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "C" - } - ], - "title": "Policy Executions", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 400 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 82 - }, - "id": 122, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "min", - "max" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "irate(pap_policy_deployments_seconds_sum[5m])/irate(pap_policy_deployments_seconds_count[5m])", - "interval": "", - "legendFormat": "{{operation}} - {{status}}", - "refId": "A" - } - ], - "title": "Deployment timing", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 90 - }, - "id": 124, - "panels": [], - "title": "Apex-PDP", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 0, - "text": "Undefined" - }, - "1": { - "color": "#ffffff", - "index": 1, - "text": "Stopped" - }, - "2": { - "color": "blue", - "index": 2, - "text": "Ready" - }, - "3": { - "color": "green", - "index": 3, - "text": "Running" - }, - "4": { - "color": "yellow", - "index": 4, - "text": "Stopping" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 0, - "y": 91 - }, - "id": 126, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "titleSize": 20, - "valueSize": 20 - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_engine_state{job=\"apex-pdp-metrics\"}", - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Engines Stats", - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 5, - "y": 91 - }, - "id": 130, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "titleSize": 25, - "valueSize": 25 - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": false, - "expr": "(time() * 1000) - (pdpa_engine_last_start_timestamp_epoch{job=\"apex-pdp-metrics\"})", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Engine Uptime (since last start)", - "transformations": [], - "type": "stat" - }, - { - "description": "Number of APEX event execution counter per engine thread", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 99 - }, - "id": 132, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "min", - "max" - ], - "displayMode": "table", - "placement": "right" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "rate(pdpa_engine_average_execution_time_seconds{job=\"apex-pdp-metrics\"}[5m])", - "format": "time_series", - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Avg Engine Execution Time", - "type": "timeseries" - }, - { - "description": "Number of APEX event execution counter per engine thread", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 107 - }, - "id": 133, - "options": { - "displayLabels": [ - "percent" - ], - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.4.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "dkSf71fnz" - }, - "exemplar": true, - "expr": "pdpa_engine_event_executions{job=\"apex-pdp-metrics\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ engine_instance_id }}", - "refId": "A" - } - ], - "title": "Engine Executions Count", - "type": "piechart" - } - ], - "refresh": "10s", - "schemaVersion": 34, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "SLA's Metrics", - "uid": "ySoel0jnk", - "version": 6, - "weekStart": "" -} \ No newline at end of file diff --git a/csit/metrics/datasource.yaml b/csit/metrics/datasource.yaml deleted file mode 100644 index b8220d0e..00000000 --- a/csit/metrics/datasource.yaml +++ /dev/null @@ -1,49 +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===================================================== -# - -# config file version -apiVersion: 1 - -# list of datasources to insert/update depending -# what's available in the database -deleteDatasources: - - name: PolicyPrometheus - orgId: 1 - -datasources: - # name of the datasource. Required - - name: PolicyPrometheus - type: prometheus - access: proxy - orgId: 1 - uid: "dkSf71fnz" - url: http://prometheus:9090/ - password: '' - user: '' - database: '' - basicAuth: false - basicAuthUser: '' - basicAuthPassword: '' - withCredentials: false - isDefault: true - jsonData: - httpMethod: GET - tlsSkipVerify: true - secureJsonFields: {} - version: 2 - readOnly: false diff --git a/csit/metrics/prometheus.yml b/csit/metrics/prometheus.yml deleted file mode 100644 index 789cfc2a..00000000 --- a/csit/metrics/prometheus.yml +++ /dev/null @@ -1,101 +0,0 @@ -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END===================================================== -# - -# global config -global: - scrape_interval: 60s - evaluation_interval: 60s - -# Alertmanager configuration -alerting: - alertmanagers: - - static_configs: - - targets: - # - alertmanager:9093 - -# scrape config -scrape_configs: - - - job_name: "api-metrics" - metrics_path: /policy/api/v1/metrics - static_configs: - - targets: ["policy-api:6969"] - basic_auth: - username: "policyadmin" - password: "zb!XztG34" - - - job_name: "pap-metrics" - metrics_path: /policy/pap/v1/metrics - static_configs: - - targets: ["policy-pap:6969"] - basic_auth: - username: "policyadmin" - password: "zb!XztG34" - - - job_name: "apex-pdp-metrics" - static_configs: - - targets: - - "policy-apex-pdp:6969" - basic_auth: - username: "policyadmin" - password: "zb!XztG34" - - - job_name: "drools-apps-metrics" - static_configs: - - targets: - - "drools-apps:9696" - basic_auth: - username: "demo@people.osaaf.org" - password: "demo123456!" - - - job_name: "drools-pdp-metrics" - static_configs: - - targets: - - "drools:9696" - basic_auth: - username: "demo@people.osaaf.org" - password: "demo123456!" - - - job_name: "distribution-metrics" - static_configs: - - targets: - - "policy-distribution:6969" - basic_auth: - username: "policyadmin" - password: "zb!XztG34" - - - job_name: "xacml-pdp-metrics" - static_configs: - - targets: - - "policy-xacml-pdp:6969" - basic_auth: - username: "policyadmin" - password: "zb!XztG34" - - - job_name: "acm-metrics" - metrics_path: "/onap/policy/clamp/acm/prometheus" - static_configs: - - targets: - - "policy-clamp-runtime-acm:6969" - basic_auth: - username: "runtimeUser" - password: "zb!XztG34" - - - job_name: "node" - static_configs: - - targets: ["node-exporter:9100"] diff --git a/csit/onset.sh b/csit/onset.sh deleted file mode 100755 index 6b9d900e..00000000 --- a/csit/onset.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END===================================================== -# - -# -# Injects an ONSET event on the DCAE_CL_OUTPUT topic. -# - -if [ $# -ne 1 ] -then - echo "arg(s): json-message-file-name" >&2 - exit 1 -fi - -curl -k -H "Content-type: application/json" --data-binary @$1 \ - http://localhost:30227/events/unauthenticated.DCAE_CL_OUTPUT -echo diff --git a/csit/pap/plans/setup.sh b/csit/pap/plans/setup.sh deleted file mode 100755 index 4c77accf..00000000 --- a/csit/pap/plans/setup.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2019-2022 Nordix Foundation. -# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -source "${SCRIPTS}"/get-versions.sh - -sudo apt-get -y install libxml2-utils -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 grafana - -sleep 10 -unset http_proxy https_proxy - -POLICY_PAP_PORT=30442 -POLICY_API_PORT=30440 - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PAP_PORT}" - -DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies - -NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v NODETEMPLATES:${NODETEMPLATES}" diff --git a/csit/pap/plans/teardown.sh b/csit/pap/plans/teardown.sh deleted file mode 100755 index 0d4c6ed2..00000000 --- a/csit/pap/plans/teardown.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2019-2022 Nordix Foundation. -# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/pap/plans/testplan.txt b/csit/pap/plans/testplan.txt deleted file mode 100644 index 4fac1027..00000000 --- a/csit/pap/plans/testplan.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -pap-test.robot -pap-slas.robot diff --git a/csit/pap/tests/data/apex.policy.decisionmaker.input.tosca.json b/csit/pap/tests/data/apex.policy.decisionmaker.input.tosca.json deleted file mode 100644 index 5d84c294..00000000 --- a/csit/pap/tests/data/apex.policy.decisionmaker.input.tosca.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "tosca_definitions_version": "tosca_simple_yaml_1_1_0", - "topology_template": { - "policies": [ - { - "operational.apex.decisionMaker": { - "type": "onap.policies.native.Apex", - "type_version": "1.0.0", - "name": "operational.apex.decisionMaker", - "version": "1.0.0", - "metadata": { - "metadataSetName": "apexMetadata_decisionMaker", - "metadataSetVersion": "1.0.0" - }, - "properties": { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "engineParameters": { - "executorParameters": { - "JAVASCRIPT": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" - } - }, - "contextParameters": { - "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", - "schemaParameters": { - "Avro": { - "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters" - }, - "Java": { - "parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters", - "jsonAdapters": { - "Instant": { - "adaptedClass": "java.time.Instant", - "adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter" - } - } - } - } - }, - "taskParameters": [ - { - "key": "ParameterKey1", - "value": "ParameterValue1" - }, - { - "taskId": "AAILookupTask:0.0.1", - "key": "SomeKeyForThisTask", - "value": "Value" - } - ] - } - }, - "eventInputParameters": { - "GuardRequestorConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters", - "parameters": { - "url": "http://111.222.333.444:5555/pdp/api/getDecision", - "httpMethod": "POST", - "restRequestTimeout": 2000, - "httpHeader": "Authorization:aaaaaaaaa== ClientAuth:bbbbbbbbb=" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventName": "GuardResponseEvent", - "eventNameFilter": "GuardResponseEvent", - "requestorMode": true, - "requestorPeer": "GuardRequestorProducer", - "requestorTimeout": 500 - }, - "DCAEConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTCLIENT", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", - "parameters": { - "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/APEX/1?timeout=60000" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON", - "parameters": { - "nameAlias": "closedLoopControlName", - "versionAlias": "version", - "sourceAlias": "from", - "pojoField": "VirtualControlLoopEvent" - } - }, - "eventName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e" - }, - "APPCConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTCLIENT", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", - "parameters": { - "url": "http://message-router:3904/events/APPC-LCM-WRITE/APEX/1?timeout=60000" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON", - "parameters": { - "versionAlias": "version", - "pojoField": "APPCLCMResponseEvent" - } - }, - "eventName": "APPCRestartVNFResponseEvent", - "eventNameFilter": "APPCRestartVNFResponseEvent" - } - }, - "eventOutputParameters": { - "logProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "/tmp/VCPEEventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "GuardRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "GuardRequestEvent", - "requestorMode": true, - "requestorPeer": "GuardRequestorConsumer", - "requestorTimeout": 500 - }, - "APPCProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTCLIENT", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", - "parameters": { - "url": "http://message-router:3904/events/APPC-LCM-READ" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON", - "parameters": { - "versionAlias": "version", - "sourceAlias": "from", - "pojoField": "APPCLCMRequestEvent" - } - }, - "eventNameFilter": "APPCRestartVNFRequestEvent" - }, - "PolicyLogProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTCLIENT", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", - "parameters": { - "url": "http://message-router:3904/events/POLICY-CL-MGT" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON", - "parameters": { - "versionAlias": "version", - "sourceAlias": "from", - "pojoField": "VirtualControlLoopNotification" - } - }, - "eventNameFilter": "ControlLoopLogEvent" - } - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/csit/pap/tests/data/create.group.request.json b/csit/pap/tests/data/create.group.request.json deleted file mode 100644 index 1e37583c..00000000 --- a/csit/pap/tests/data/create.group.request.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "groups": [ - { - "name": "testGroup", - "pdpGroupState": "PASSIVE", - "properties": { - "hello": "world" - }, - "pdpSubgroups": [ - { - "pdpType": "pdpTypeA", - "desiredInstanceCount": 2, - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.monitoring.tcagen2", - "version": "1.0.0" - } - ], - "policies": [] - }, - { - "pdpType": "pdpTypeB", - "desiredInstanceCount": 1, - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.monitoring.tcagen2", - "version": "1.0.0" - } - ], - "policies": [] - }, - { - "pdpType": "pdpTypeC", - "desiredInstanceCount": 1, - "properties": {}, - "supportedPolicyTypes": [ - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ], - "policies": [] - } - ] - } - ] -} diff --git a/csit/pap/tests/data/deploy.group.request.json b/csit/pap/tests/data/deploy.group.request.json deleted file mode 100644 index cfd86d1e..00000000 --- a/csit/pap/tests/data/deploy.group.request.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "groups": [ - { - "name": "testGroup", - "deploymentSubgroups": [ - { - "pdpType": "pdpTypeA", - "action": "POST", - "policies": [ - { - "name": "onap.restart.tca", - "version": "1.0.0" - } - ] - }, - { - "pdpType": "pdpTypeC", - "action": "POST", - "policies": [ - { - "name": "operational.apex.decisionMaker", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/csit/pap/tests/pap-slas.robot b/csit/pap/tests/pap-slas.robot deleted file mode 100644 index 045530ae..00000000 --- a/csit/pap/tests/pap-slas.robot +++ /dev/null @@ -1,60 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Resource ${CURDIR}/../../common-library.robot - -*** Keywords *** -ValidateResponseTimeForPap - [Arguments] ${uri} ${method} - [Documentation] Check if uri response is under the 500ms required time for pap metrics - ValidateResponseTime pap-metrics ${uri} ${method} 500 - -*** Test Cases *** -WaitForPrometheusServer - [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute - -ValidateResponseTimeForHealthcheck - [Documentation] Validate component healthcheck response time - ValidateResponseTimeForPap /healthcheck GET - -ValidateResponseTimeForSystemHealthcheck - [Documentation] Validate if system healthcheck response time is under 1000ms - ValidateResponseTime pap-metrics /components/healthcheck GET 10000 - -ValidateResponseTimeForStatistics - [Documentation] Validate statistics response time - ValidateResponseTimeForPap /statistics GET - -# TODO: includes notification, so always over 500ms -# ValidateResponseTimeCreateGroup -# [Documentation] Validate create group response time -# ValidateResponseTimeForPap /pdps/groups/batch POST - -ValidateResponseTimeQueryPolicyAudit - [Documentation] Validate query audits response time - ValidateResponseTimeForPap /policies/audit GET - -ValidateResponseTimeUpdateGroup - [Documentation] Validate pdps/group response time - ValidateResponseTimeForPap /pdps/groups/{name} PUT - -ValidatePolicyDeploymentTime - [Documentation] Check if deployment of policy is under 2000ms - ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="deploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="deploy",status="SUCCESS"} - ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} - ${actualTime}= Set Variable ${rawNumber * ${1000}} - Should Be True ${actualTime} <= ${2000} - -ValidateResponseTimeDeletePolicy - [Documentation] Check if undeployment of policy is under 2000ms - ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="undeploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="undeploy",status="SUCCESS"} - ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} - ${actualTime}= Set Variable ${rawNumber * ${1000}} - Should Be True ${actualTime} <= ${2000} - -ValidateResponseTimeDeleteGroup - [Documentation] Validate delete group response time - ValidateResponseTimeForPap /pdps/groups/{name} DELETE diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot deleted file mode 100644 index a4f0853d..00000000 --- a/csit/pap/tests/pap-test.robot +++ /dev/null @@ -1,153 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Resource ${CURDIR}/../../common-library.robot - -*** Keywords *** -GetReq - [Arguments] ${url} - ${auth}= PolicyAdminAuth - ${resp}= PerformGetRequest ${POLICY_PAP_PORT} ${url} 200 null ${auth} - [return] ${resp} - -ValidateResponseTimeForPap - [Arguments] ${uri} ${method} - [Documentation] Check if uri response is under the required time for pap metrics - ValidateResponseTime pap-metrics ${uri} ${method} 500 - -ValidateDeploymentTime - [Documentation] Check if deployment of policy is under 2000ms - ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="deploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="deploy",status="SUCCESS"} - ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} - ${actualTime}= Set Variable ${rawNumber * ${1000}} - Should Be True ${actualTime} <= ${2000} - -*** 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_PORT} ${auth} /policy/pap/v1/ - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0 - Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/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_PORT} /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_PORT} /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_PORT} /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_PORT} /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_PORT} /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 20 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_PORT} /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_PORT} /policy/pap/v1/pdps/groups/testGroup 200 ${auth} - -QueryPdpGroupsAfterDelete - [Documentation] Verify PdpGroups after delete - QueryPdpGroups 1 defaultGroup ACTIVE 0 null null null - -# ValidateSlaForPap -# [Documentation] Run checks against Prometheus server to check response time -# Sleep 30s -# ValidateDeploymentTime -# ValidateResponseTime pap-metrics /components/healthcheck GET 10000 -# ValidateResponseTimeForPap /healthcheck GET -# ValidateResponseTimeForPap /statistics GET -# ValidateResponseTimeForPap /policies/audit GET -# ValidateResponseTimeForPap /pdps/groups/{name} PUT -# ValidateResponseTimeForPap /pdps/policies/{name} DELETE -# ValidateResponseTimeForPap /pdps/groups/{name} DELETE -# ValidateResponseTimeForPap /pdps/groups/batch POST diff --git a/csit/prepare-robot-env.sh b/csit/prepare-robot-env.sh deleted file mode 100755 index 25376cda..00000000 --- a/csit/prepare-robot-env.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -x -# -# Copyright 2019 © Samsung Electronics Co., Ltd. -# Modification Copyright 2021 © AT&T Intellectual Property. -# 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. -# 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. -# -# This script installs common libraries required by CSIT tests -# - -if [ -z "$WORKSPACE" ]; then - export WORKSPACE=$(git rev-parse --show-toplevel) -fi - -ROBOT_VENV=$(mktemp -d) -echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties" - -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 -rm -rf "${ROBOT_VENV}"/src/onap/testsuite -python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre - -python3 -m pip freeze diff --git a/csit/pylibs.txt b/csit/pylibs.txt deleted file mode 100644 index a8d8c4e3..00000000 --- a/csit/pylibs.txt +++ /dev/null @@ -1,26 +0,0 @@ -docker-py -ipaddr -netaddr -netifaces -pyhocon -requests -robotframework-httplibrary -robotframework-requests -robotframework-selenium2library -robotframework-sshlibrary -scapy -# Module jsonpath is needed by current AAA idmlite suite. -jsonpath-rw -# Modules for longevity framework robot library -elasticsearch -elasticsearch-dsl -# Module for pyangbind used by lispflowmapping project -pyangbind -# Module for iso8601 datetime format -isodate -# Module for TemplatedRequests.robot library -jmespath -# Module for backup-restore support library -jsonpatch -# odltools for extra debugging -odltools diff --git a/csit/resources/Dockerfile b/csit/resources/Dockerfile new file mode 100644 index 00000000..6288c054 --- /dev/null +++ b/csit/resources/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/csit/resources/scripts/get-cluster-info.sh b/csit/resources/scripts/get-cluster-info.sh new file mode 100644 index 00000000..efe0f517 --- /dev/null +++ b/csit/resources/scripts/get-cluster-info.sh @@ -0,0 +1,112 @@ +#!/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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# This script will be used to gather cluster information +# for JMeter to work towards the installed cluster + +# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES +export APEX_PORT=30001 +export API_PORT=30002 +export PAP_PORT=30003 +export XACML_PORT=30004 +export DROOLS_PORT=30005 +export DIST_PORT=30006 +export ACM_PORT=30007 +export POLICY_PARTICIPANT_PORT=30008 +export DMAAP_PORT=30904 + +# Retrieve pod names +function get_pod_names() { + export APEX_POD=$(get_pod_name apex) + export PAP_POD=$(get_pod_name pap) + export API_POD=$(get_pod_name api) + export DMAAP_POD=$(get_pod_name message-router) + export XACML_POD=$(get_pod_name xacml) + export DROOLS_POD=$(get_pod_name drools-pdp) + export DIST_POD=$(get_pod_name distribution) + export ACM_POD=$(get_pod_name acm-runtime) + export POLICY_PPNT_POD=$(get_pod_name policy-ppnt) +} + +# Retrieve service names +function get_svc_names() { + export APEX_SVC=$(get_svc_name policy-apex) + export PAP_SVC=$(get_svc_name policy-pap) + export API_SVC=$(get_svc_name policy-api) + export DMAAP_SVC=$(get_svc_name message-router) + export DROOLS_SVC=$(get_svc_name drools-pdp) + export XACML_SVC=$(get_svc_name xacml) + export DIST_SVC=$(get_svc_name distribution) + export ACM_SVC=$(get_svc_name acm-runtime) + export POLICY_PPNT_SVC=$(get_svc_name policy-ppnt) +} + +# Expose services in order to perform tests from JMeter +function expose_services() { + expose_service $APEX_SVC + expose_service $PAP_SVC + expose_service $API_SVC + expose_service $XACML_SVC + expose_service $DROOLS_SVC + expose_service $DIST_SVC + expose_service $ACM_SVC + export_service $POLICY_PPNT_SVC + + setup_message_router_svc + sleep 2 + patch_ports +} + +function get_pod_name() { + microk8s kubectl get pods --no-headers -o custom-columns=':metadata.name' | grep $1 +} + +function get_svc_name() { + microk8s kubectl get svc --no-headers -o custom-columns=':metadata.name' | grep $1 +} + +function expose_service() { + microk8s kubectl expose service $1 --name $1"-svc" --type NodePort --protocol TCP --port 6969 --target-port 6969 +} + +function patch_port() { + microk8s kubectl patch service "$1-svc" --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$2"'}]' +} + +# Assign set port values +function patch_ports() { + patch_port "$APEX_SVC" $APEX_PORT + patch_port "$API_SVC" $API_PORT + patch_port "$PAP_SVC" $PAP_PORT + patch_port "$ACM_SVC" $ACM_PORT + patch_port "$POLICY_PPNT_SVC" $POLICY_PARTICIPANT_PORT + patch_port "$DIST_SVC" $DIST_PORT + patch_port "$DROOLS_SVC" $DROOLS_PORT + patch_port "$XACML_SVC" $XACML_PORT +} + +function setup_message_router_svc() { + microk8s kubectl expose service message-router --name message-router-svc --type NodePort --protocol TCP --port 3904 --target-port 3904 + microk8s kubectl patch service message-router-svc --namespace=default --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":'"$DMAAP_PORT"'}]' +} + +####MAIN### +get_pod_names +get_svc_names +expose_services diff --git a/csit/resources/scripts/node-templates.sh b/csit/resources/scripts/node-templates.sh new file mode 100755 index 00000000..4dc19d22 --- /dev/null +++ b/csit/resources/scripts/node-templates.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright 2023 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +if [ -z "${WORKSPACE}" ]; then + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE +fi + +GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \ + "${WORKSPACE}"/.gitreview) + +echo GERRIT_BRANCH="${GERRIT_BRANCH}" + +rm -rf "${WORKSPACE}"/models +mkdir "${WORKSPACE}"/models + +# download models examples +git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git \ + "${WORKSPACE}"/models + +export DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies + +export NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates + +# create a couple of variations of the policy definitions +sed -e 's!Measurement_vGMUX!ADifferentValue!' \ + "${DATA}"/vCPE.policy.monitoring.input.tosca.json \ + >"${DATA}"/vCPE.policy.monitoring.input.tosca.v1_2.json + +sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \ + -e 's!"policy-version": 1!"policy-version": 2!' \ + "${DATA}"/vCPE.policy.monitoring.input.tosca.json \ + >"${DATA}"/vCPE.policy.monitoring.input.tosca.v2.json diff --git a/csit/resources/scripts/prepare-robot-env.sh b/csit/resources/scripts/prepare-robot-env.sh new file mode 100755 index 00000000..aeab5cd0 --- /dev/null +++ b/csit/resources/scripts/prepare-robot-env.sh @@ -0,0 +1,54 @@ +#!/bin/bash -x +# +# Copyright 2019 © Samsung Electronics Co., Ltd. +# Modification Copyright 2021 © AT&T Intellectual Property. +# 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. +# 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. +# +# This script installs common libraries required by CSIT tests +# + +if [ -z "$WORKSPACE" ]; then + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE +fi + +ROBOT_VENV=$(mktemp -d) +echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties" + +echo "Python version is: $(python3 --version)" + +python3 -m venv --clear "${ROBOT_VENV}" +source "${ROBOT_VENV}/bin/activate" > /dev/null + +set -exu + +python3 -m pip install -qq --upgrade pip setuptools +echo "Installing Python Requirements" +python3 -m pip install -qq -r "${SCRIPTS}"/pylibs.txt +python3 -m pip -qq freeze + +# install eteutils +mkdir -p "${ROBOT_VENV}"/src/onap +rm -rf "${ROBOT_VENV}"/src/onap/testsuite +python3 -m pip install -qq --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre + +echo "Uninstall docker-py and reinstall docker." +python3 -m pip uninstall -y -qq docker-py +python3 -m pip uninstall -y -qq docker +python3 -m pip install -U -qq docker + +python3 -m pip -qq freeze + +sudo apt-get -y -qq install libxml2-utils diff --git a/csit/resources/scripts/pylibs.txt b/csit/resources/scripts/pylibs.txt new file mode 100644 index 00000000..a8d8c4e3 --- /dev/null +++ b/csit/resources/scripts/pylibs.txt @@ -0,0 +1,26 @@ +docker-py +ipaddr +netaddr +netifaces +pyhocon +requests +robotframework-httplibrary +robotframework-requests +robotframework-selenium2library +robotframework-sshlibrary +scapy +# Module jsonpath is needed by current AAA idmlite suite. +jsonpath-rw +# Modules for longevity framework robot library +elasticsearch +elasticsearch-dsl +# Module for pyangbind used by lispflowmapping project +pyangbind +# Module for iso8601 datetime format +isodate +# Module for TemplatedRequests.robot library +jmespath +# Module for backup-restore support library +jsonpatch +# odltools for extra debugging +odltools diff --git a/csit/resources/scripts/run-test.sh b/csit/resources/scripts/run-test.sh new file mode 100755 index 00000000..977bef75 --- /dev/null +++ b/csit/resources/scripts/run-test.sh @@ -0,0 +1,45 @@ +#!/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 DEFAULT_PORT=6969 +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:${DEFAULT_PORT} +export POLICY_API_IP=policy-api:${DEFAULT_PORT} +export POLICY_PAP_IP=policy-pap:${DEFAULT_PORT} +export APEX_IP=policy-apex-pdp:${DEFAULT_PORT} +export DMAAP_IP=message-router:3904 +export SIMULATOR_IP=message-router +export PROMETHEUS_IP=prometheus:9090 + +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 -v SIMULATOR_IP:$SIMULATOR_IP -v PROMETHEUS_IP:${PROMETHEUS_IP}" + +echo "Run Robot test" +echo ROBOT_VARIABLES="${ROBOT_VARIABLES}" +echo "Starting Robot test suites ..." +python3 -m robot.run -d /tmp/ $ROBOT_VARIABLES $1 +RESULT=$? +echo "RESULT: ${RESULT}" diff --git a/csit/resources/scripts/setup-apex-pdp.sh b/csit/resources/scripts/setup-apex-pdp.sh new file mode 100755 index 00000000..acebb284 --- /dev/null +++ b/csit/resources/scripts/setup-apex-pdp.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2018 Ericsson. All rights reserved. +# +# Modifications Copyright (c) 2019-2023 Nordix Foundation. +# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +source "${SCRIPTS}"/setup-pap.sh + +# wait for the app to start up +"${SCRIPTS}"/wait_for_rest.sh localhost "${APEX_PORT}" + +export DMAAP_IP="localhost:${DMAAP_PORT}" +export SUITES="apex-pdp-test.robot" + +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:localhost:${APEX_PORT} -v DMAAP_IP:${DMAAP_IP} +-v APEX_EVENTS_IP:localhost:${APEX_EVENTS_PORT}" diff --git a/csit/resources/scripts/setup-api.sh b/csit/resources/scripts/setup-api.sh new file mode 100755 index 00000000..2a984643 --- /dev/null +++ b/csit/resources/scripts/setup-api.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# 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. +# 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========================================================= + +source "${SCRIPTS}"/node-templates.sh + +source "${WORKSPACE}"/compose/start-compose.sh api --grafana + +sleep 10 +unset http_proxy https_proxy + +# wait for the app to start up +bash "${SCRIPTS}"/wait_for_rest.sh localhost ${API_PORT} + +export SUITES="api-test.robot" + +ROBOT_VARIABLES="-v POLICY_API_IP:localhost:${API_PORT} -v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT} +-v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}" diff --git a/csit/resources/scripts/setup-clamp.sh b/csit/resources/scripts/setup-clamp.sh new file mode 100755 index 00000000..923b5218 --- /dev/null +++ b/csit/resources/scripts/setup-clamp.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# 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. +# 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========================================================= + +source "${WORKSPACE}"/compose/start-compose.sh policy-clamp-runtime-acm + +sleep 10 +unset http_proxy https_proxy + +# wait for the app to start up +"${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}" + +export SUITES="policy-clamp-test.robot" + +ROBOT_VARIABLES="-v POLICY_RUNTIME_ACM_IP:localhost:${ACM_PORT} +-v POLICY_API_IP:localhost:${POLICY_API_PORT}" diff --git a/csit/resources/scripts/setup-distribution.sh b/csit/resources/scripts/setup-distribution.sh new file mode 100755 index 00000000..3840d9d7 --- /dev/null +++ b/csit/resources/scripts/setup-distribution.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2018 Ericsson. All rights reserved. +# Modifications Copyright (c) 2019-2023 Nordix Foundation. +# Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# Remaking the csar file in case if the file got corrupted +DIST_TEMP_FOLDER=/tmp/distribution + +zip -F "${TEST_PLAN_DIR}"/data/csar/sample_csar_with_apex_policy.csar \ + --out "${TEST_PLAN_DIR}"/data/csar/csar_temp.csar + +# Remake temp directory +rm -rf "${DIST_TEMP_FOLDER}" +mkdir "${DIST_TEMP_FOLDER}" + +source "${WORKSPACE}"/compose/start-compose.sh distribution + +sleep 10 +unset http_proxy https_proxy + +# wait for the app to start up +"${SCRIPTS}"/wait_for_rest.sh localhost "${DIST_PORT}" + +export SUITES="distribution-test.robot" + +ROBOT_VARIABLES="-v APEX_EVENTS_IP:localhost:${APEX_EVENTS_PORT} +-v DISTRIBUTION_IP:localhost:${DIST_PORT} -v TEMP_FOLDER:${DIST_TEMP_FOLDER}" diff --git a/csit/resources/scripts/setup-drools-applications.sh b/csit/resources/scripts/setup-drools-applications.sh new file mode 100755 index 00000000..189fa6c9 --- /dev/null +++ b/csit/resources/scripts/setup-drools-applications.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# ===========LICENSE_START==================================================== +# 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. +# 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===================================================== +# + +source "${SCRIPTS}"/node-templates.sh + +source "${WORKSPACE}"/compose/start-compose.sh drools-apps + +sleep 10 +unset http_proxy https_proxy + +export DMAAP_IP="localhost:${DMAAP_PORT}" +export SUITES="drools-applications-test.robot" + +# wait for the app to start up +"${SCRIPTS}"/wait_for_rest.sh localhost ${DROOLS_APPS_PORT} + +# give enough time for the controllers to come up +sleep 15 + +ROBOT_VARIABLES="-v DATA:${DATA} -v DROOLS_IP:localhost:${DROOLS_APPS_PORT} +-v DROOLS_IP_2:localhost:${DROOLS_APPS_TELEMETRY_PORT} -v POLICY_API_IP:localhost:${API_PORT} +-v POLICY_PAP_IP:localhost:${PAP_PORT}" diff --git a/csit/resources/scripts/setup-drools-pdp.sh b/csit/resources/scripts/setup-drools-pdp.sh new file mode 100755 index 00000000..f6341908 --- /dev/null +++ b/csit/resources/scripts/setup-drools-pdp.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright 2017-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. +# 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========================================================= + +source "${WORKSPACE}"/compose/start-compose.sh drools + +sleep 10 +unset http_proxy https_proxy + +export SUITES="drools-pdp-test.robot" + +# wait for the app to start up - looking for telemetry service on port ${DROOLS_PORT} forwarded from 9696 +"${SCRIPTS}"/wait_for_rest.sh localhost ${DROOLS_TELEMETRY_PORT} + +# give enough time for the controllers to come up +sleep 15 + +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:localhost:${DROOLS_TELEMETRY_PORT}" diff --git a/csit/resources/scripts/setup-pap.sh b/csit/resources/scripts/setup-pap.sh new file mode 100755 index 00000000..741f0644 --- /dev/null +++ b/csit/resources/scripts/setup-pap.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2019-2022 Nordix Foundation. +# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +source "${SCRIPTS}"/node-templates.sh + +source "${WORKSPACE}"/compose/start-compose.sh apex-pdp --grafana + +sleep 10 +unset http_proxy https_proxy + +# wait for the app to start up +bash "${SCRIPTS}"/wait_for_rest.sh localhost ${PAP_PORT} + +export SUITES="pap-test.robot +pap-slas.robot" + +ROBOT_VARIABLES="-v POLICY_PAP_IP:localhost:${PAP_PORT} -v POLICY_API_IP:localhost:${API_PORT} +-v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT} -v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}" diff --git a/csit/resources/scripts/setup-xacml-pdp.sh b/csit/resources/scripts/setup-xacml-pdp.sh new file mode 100755 index 00000000..53c44cbd --- /dev/null +++ b/csit/resources/scripts/setup-xacml-pdp.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2020-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. +# 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========================================================= + +source "${SCRIPTS}"/node-templates.sh + +source "${WORKSPACE}"/compose/start-compose.sh xacml-pdp + +sleep 10 +unset http_proxy https_proxy + +export DMAAP_IP="localhost:${DMAAP_PORT}" +export SUITES="xacml-pdp-test.robot" + +# wait for the app to start up +"${SCRIPTS}"/wait_for_rest.sh localhost "${XACML_PORT}" + +ROBOT_VARIABLES="-v DATA:${DATA} -v POLICY_PDPX_IP:localhost:${XACML_PORT} +-v POLICY_API_IP:localhost:${API_PORT} -v POLICY_PAP_IP:localhost:${PAP_PORT}" diff --git a/csit/resources/scripts/wait_for_rest.sh b/csit/resources/scripts/wait_for_rest.sh new file mode 100755 index 00000000..e400bbd4 --- /dev/null +++ b/csit/resources/scripts/wait_for_rest.sh @@ -0,0 +1,77 @@ +#!/bin/sh +# ============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====================================================== +usage() { + echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2 + exit 1 +} +tmout=300 +cmd= +while getopts c:t: opt +do + case "$opt" in + c) + cmd="$OPTARG" + ;; + t) + tmout="$OPTARG" + ;; + *) + usage + ;; + esac +done +nargs=$((OPTIND-1)) +shift "$nargs" +even_args=$(($#%2)) +if [ $# -lt 2 ] || [ "$even_args" -ne 0 ] +then + usage +fi +while [ $# -ge 2 ] +do + export host="$1" + export port="$2" + shift + shift + echo "Waiting for REST to come up on $host port $port..." + while [ "$tmout" -gt 0 ] + do + if command -v docker > /dev/null 2>&1 + then + docker ps --format "table {{ .Names }}\t{{ .Status }}" + fi + curl "http://$host:$port" > /dev/null 2>&1 + rc=$? + if [ $rc -eq 0 ] + then + break + else + tmout=$((tmout-5)) + sleep 5 + fi + done + if [ $rc -ne 0 ] + then + echo "$host port $port REST cannot be detected" + exit $rc + fi +done +$cmd +exit 0 + diff --git a/csit/resources/tests/apex-pdp-test.robot b/csit/resources/tests/apex-pdp-test.robot new file mode 100644 index 00000000..28a57065 --- /dev/null +++ b/csit/resources/tests/apex-pdp-test.robot @@ -0,0 +1,147 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library Process +Resource ${CURDIR}/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 + Log ${policyName} + ${postjson}= Get File ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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 ${CURDIR}/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_EVENTS_IP} 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} + 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} max_retries=1 + ${data}= Get Binary File ${CURDIR}/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} max_retries=1 + ${data}= Get Binary File ${CURDIR}/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 ${CURDIR}/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/csit/resources/tests/api-test.robot b/csit/resources/tests/api-test.robot new file mode 100644 index 00000000..e8679a7f --- /dev/null +++ b/csit/resources/tests/api-test.robot @@ -0,0 +1,187 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ${CURDIR}/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="/healthcheck",} + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/statistics",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/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="/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="/policytypes",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{versionId}",} 3.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/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/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot new file mode 100644 index 00000000..fb6f52f0 --- /dev/null +++ b/csit/resources/tests/common-library.robot @@ -0,0 +1,137 @@ +*** 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] ${domain} ${url} ${expectedstatus} ${postjson} ${params} ${auth} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= POST On Session policy ${url} data=${postjson} params=${params} headers=${headers} expected_status=${expectedstatus} + Log Received response from policy ${resp.text} + [return] ${resp} + +PerformPutRequest + [Arguments] ${domain} ${url} ${expectedstatus} ${params} ${auth} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= PUT On Session policy ${url} params=${params} headers=${headers} expected_status=${expectedstatus} + Log Received response from policy ${resp.text} + [return] ${resp} + +PerformGetRequest + [Arguments] ${domain} ${url} ${expectedstatus} ${params} ${auth} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= GET On Session policy ${url} params=${params} headers=${headers} expected_status=${expectedstatus} + Log Received response from policy ${resp.text} + [return] ${resp} + +PerformDeleteRequest + [Arguments] ${domain} ${url} ${expectedstatus} ${auth} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= DELETE On Session policy ${url} headers=${headers} expected_status=${expectedstatus} + Log Received response from policy ${resp.text} + +CreatePolicy + [Arguments] ${url} ${expectedstatus} ${postjson} ${policyname} ${policyversion} + [Documentation] Create the specific policy + ${policyadmin}= PolicyAdminAuth + ${resp}= PerformPostRequest ${POLICY_API_IP} ${url} ${expectedstatus} ${postjson} null ${policyadmin} + 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 - suphosts upto 2 groups + [Arguments] ${groupsLength} ${group1Name} ${group1State} ${policiesLengthInGroup1} ${group2Name} ${group2State} ${policiesLengthInGroup2} + ${policyadmin}= PolicyAdminAuth + ${resp}= PerformGetRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps 200 null ${policyadmin} + Length Should Be ${resp.json()['groups']} ${groupsLength} + Should Be Equal As Strings ${resp.json()['groups'][0]['name']} ${group1Name} + Should Be Equal As Strings ${resp.json()['groups'][0]['pdpGroupState']} ${group1State} + Length Should Be ${resp.json()['groups'][0]['pdpSubgroups'][0]['policies']} ${policiesLengthInGroup1} + Run Keyword If ${groupsLength}>1 Should Be Equal As Strings ${resp.json()['groups'][1]['name']} ${group2Name} + Run Keyword If ${groupsLength}>1 Should Be Equal As Strings ${resp.json()['groups'][1]['pdpGroupState']} ${group2State} + Run Keyword If ${groupsLength}>1 Length Should Be ${resp.json()['groups'][1]['pdpSubgroups'][0]['policies']} ${policiesLengthInGroup2} + +QueryPolicyAudit + [Arguments] ${url} ${expectedstatus} ${pdpGroup} ${pdpType} ${policyName} ${expectedAction} + ${policyadmin}= PolicyAdminAuth + ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} ${expectedstatus} recordCount=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] ${domain} ${auth} ${context_path} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${resp}= GET On Session policy ${context_path}metrics expected_status=200 + Log Received response from policy ${resp.text} + [return] ${resp} + +QueryPrometheus + [Arguments] ${query} + ${params}= Create Dictionary query=${query} + ${resp}= GET http://${PROMETHEUS_IP}/api/v1/query ${params} + Status Should Be OK + Log Received response from Prometheus ${resp.text} + [return] ${resp.json()} + +ValidateResponseTime + [Arguments] ${job} ${uri} ${method} ${timeLimit} + [Documentation] Check if uri response is under the required time + ${resp}= QueryPrometheus http_server_requests_seconds_sum{uri="${uri}",method="${method}",job="${job}"}/http_server_requests_seconds_count{uri="${uri}",method="${method}",job="${job}"} + ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} + ${actualTime}= Set Variable ${rawNumber * ${1000}} + Should Be True ${actualTime} <= ${timeLimit} diff --git a/csit/resources/tests/data/AutomationComposition.json b/csit/resources/tests/data/AutomationComposition.json new file mode 100644 index 00000000..b58d6118 --- /dev/null +++ b/csit/resources/tests/data/AutomationComposition.json @@ -0,0 +1,64 @@ +{ + "name": "PMSHInstance0", + "version": "1.0.1", + "compositionId": "COMPOSITIONIDPLACEHOLDER", + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "PMSH automation composition instance 0", + "elements": { + "709c62b3-8918-41b9-a747-d21eb79c6c20": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", + "definition": { + "name": "org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement", + "version": "1.2.3" + }, + "participantId": { + "name": "K8sParticipant0", + "version": "1.0.0" + }, + "participantType": { + "name": "org.onap.policy.clamp.acm.KubernetesParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Automation composition element for the K8S microservice for PMSH" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c21": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", + "definition": { + "name": "org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement", + "version": "1.2.3" + }, + "participantId": { + "name": "HttpParticipant0", + "version": "1.0.0" + }, + "participantType": { + "name": "org.onap.policy.clamp.acm.HttpParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Automation composition element for the http requests of PMSH microservice" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c22": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c22", + "definition": { + "name": "org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement", + "version": "1.2.3" + }, + "participantId": { + "name": "org.onap.PM_Policy", + "version": "1.0.0" + }, + "participantType": { + "name": "org.onap.policy.clamp.acm.PolicyParticipant", + "version": "2.3.1" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Automation composition element for the operational policy for Performance Management Subscription Handling" + } + } +} diff --git a/csit/resources/tests/data/InstantiateAC.json b/csit/resources/tests/data/InstantiateAC.json new file mode 100644 index 00000000..4e93c032 --- /dev/null +++ b/csit/resources/tests/data/InstantiateAC.json @@ -0,0 +1,51 @@ +{ + "automationCompositionList": [ + { + "name": "PMSHInstance0", + "version": "1.0.1", + "compositionId": "COMPOSITIONIDPLACEHOLDER", + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "PMSH automation composition instance 0", + "elements": { + "709c62b3-8918-41b9-a747-d21eb79c6c21": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", + "definition": { + "name": "org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement", + "version": "1.2.3" + }, + "participantId": { + "name": "org.onap.PM_Policy", + "version": "1.0.0" + }, + "participantType": { + "name": "org.onap.policy.clamp.acm.PolicyParticipant", + "version": "2.3.1" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Monitoring Policy Automation Composition Element for the PMSH instance 0 automation composition" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c22": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c22", + "definition": { + "name": "org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement", + "version": "1.2.3" + }, + "participantId": { + "name": "org.onap.PM_Policy", + "version": "1.0.0" + }, + "participantType": { + "name": "org.onap.policy.clamp.acm.PolicyParticipant", + "version": "2.3.1" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Operational Policy Automation Composition Element for the PMSH instance 0 automation composition" + } + } + } + ] +} + diff --git a/csit/resources/tests/data/PMSHMultipleACTosca.yaml b/csit/resources/tests/data/PMSHMultipleACTosca.yaml new file mode 100644 index 00000000..c6f61e72 --- /dev/null +++ b/csit/resources/tests/data/PMSHMultipleACTosca.yaml @@ -0,0 +1,932 @@ +tosca_definitions_version: tosca_simple_yaml_1_3 +data_types: + onap.datatypes.ToscaConceptIdentifier: + derived_from: tosca.datatypes.Root + properties: + name: + type: string + required: true + version: + type: string + required: true + onap.datatype.acm.Target: + derived_from: tosca.datatypes.Root + description: >- + Definition for a entity in A&AI to perform an Automation Composition + operation on + properties: + targetType: + type: string + description: Category for the target type + required: true + constraints: + - valid_values: + - VNF + - VM + - VFMODULE + - PNF + entityIds: + type: map + description: > + Map of values that identify the resource. If none are provided, it is + assumed that the + + entity that generated the ONSET event will be the target. + required: false + metadata: + clamp_possible_values: 'ClampExecution:CSAR_RESOURCES' + entry_schema: + type: string + onap.datatype.acm.Actor: + derived_from: tosca.datatypes.Root + description: An actor/operation/target definition + properties: + actor: + type: string + description: The actor performing the operation. + required: true + metadata: + clamp_possible_values: 'Dictionary:DefaultActors,ClampExecution:CDS/actor' + operation: + type: string + description: The operation the actor is performing. + metadata: + clamp_possible_values: 'Dictionary:DefaultOperations,ClampExecution:CDS/operation' + required: true + target: + type: onap.datatype.acm.Target + description: The resource the operation should be performed on. + required: true + payload: + type: map + description: Name/value pairs of payload information passed by Policy to the actor + required: false + metadata: + clamp_possible_values: 'ClampExecution:CDS/payload' + entry_schema: + type: string + onap.datatype.acm.Operation: + derived_from: tosca.datatypes.Root + description: An operation supported by an actor + properties: + id: + type: string + description: Unique identifier for the operation + required: true + description: + type: string + description: A user-friendly description of the intent for the operation + required: false + operation: + type: onap.datatype.acm.Actor + description: The definition of the operation to be performed. + required: true + timeout: + type: integer + description: The amount of time for the actor to perform the operation. + required: true + retries: + type: integer + description: >- + The number of retries the actor should attempt to perform the + operation. + required: true + default: 0 + success: + type: string + description: >- + Points to the operation to invoke on success. A value of + "final_success" indicates and end to the operation. + required: false + default: final_success + failure: + type: string + description: Points to the operation to invoke on Actor operation failure. + required: false + default: final_failure + failure_timeout: + type: string + description: >- + Points to the operation to invoke when the time out for the operation + occurs. + required: false + default: final_failure_timeout + failure_retries: + type: string + description: >- + Points to the operation to invoke when the current operation has + exceeded its max retries. + required: false + default: final_failure_retries + failure_exception: + type: string + description: >- + Points to the operation to invoke when the current operation causes an + exception. + required: false + default: final_failure_exception + failure_guard: + type: string + description: >- + Points to the operation to invoke when the current operation is + blocked due to guard policy enforcement. + required: false + default: final_failure_guard + onap.datatypes.monitoring.managedObjectDNsBasic: + constraints: [] + properties: + DN: + name: DN + type: string + typeVersion: 0.0.0 + description: Managed object distinguished name + required: true + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.managedObjectDNsBasic + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.managedObjectDNsBasics: + constraints: [] + properties: + managedObjectDNsBasic: + name: managedObjectDNsBasic + type: map + typeVersion: 0.0.0 + description: Managed object distinguished name object + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.managedObjectDNsBasic + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.managedObjectDNsBasics + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.measurementGroup: + constraints: [] + properties: + measurementTypes: + name: measurementTypes + type: list + typeVersion: 0.0.0 + description: List of measurement types + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.measurementTypes + typeVersion: 0.0.0 + constraints: [] + metadata: {} + managedObjectDNsBasic: + name: managedObjectDNsBasic + type: list + typeVersion: 0.0.0 + description: List of managed object distinguished names + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.managedObjectDNsBasics + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.measurementGroup + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.measurementGroups: + constraints: [] + properties: + measurementGroup: + name: measurementGroup + type: map + typeVersion: 0.0.0 + description: Measurement Group + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.measurementGroup + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.measurementGroups + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.measurementType: + constraints: [] + properties: + measurementType: + name: measurementType + type: string + typeVersion: 0.0.0 + description: Measurement type + required: true + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.measurementType + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.measurementTypes: + constraints: [] + properties: + measurementType: + name: measurementType + type: map + typeVersion: 0.0.0 + description: Measurement type object + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.measurementType + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.measurementTypes + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.nfFilter: + constraints: [] + properties: + modelNames: + name: modelNames + type: list + typeVersion: 0.0.0 + description: List of model names + required: true + constraints: [] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [] + metadata: {} + modelInvariantIDs: + name: modelInvariantIDs + type: list + typeVersion: 0.0.0 + description: List of model invariant IDs + required: true + constraints: [] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [] + metadata: {} + modelVersionIDs: + name: modelVersionIDs + type: list + typeVersion: 0.0.0 + description: List of model version IDs + required: true + constraints: [] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [] + metadata: {} + nfNames: + name: nfNames + type: list + typeVersion: 0.0.0 + description: List of network functions + required: true + constraints: [] + entry_schema: + type: string + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.nfFilter + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + onap.datatypes.monitoring.subscription: + constraints: [] + properties: + measurementGroups: + name: measurementGroups + type: list + typeVersion: 0.0.0 + description: Measurement Groups + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.measurementGroups + typeVersion: 0.0.0 + constraints: [] + metadata: {} + fileBasedGP: + name: fileBasedGP + type: integer + typeVersion: 0.0.0 + description: File based granularity period + required: true + constraints: [] + metadata: {} + fileLocation: + name: fileLocation + type: string + typeVersion: 0.0.0 + description: ROP file location + required: true + constraints: [] + metadata: {} + subscriptionName: + name: subscriptionName + type: string + typeVersion: 0.0.0 + description: Name of the subscription + required: true + constraints: [] + metadata: {} + administrativeState: + name: administrativeState + type: string + typeVersion: 0.0.0 + description: State of the subscription + required: true + constraints: + - valid_values: + - LOCKED + - UNLOCKED + metadata: {} + nfFilter: + name: nfFilter + type: map + typeVersion: 0.0.0 + description: Network function filter + required: true + constraints: [] + entry_schema: + type: onap.datatypes.monitoring.nfFilter + typeVersion: 0.0.0 + constraints: [] + metadata: {} + name: onap.datatypes.monitoring.subscription + version: 0.0.0 + derived_from: tosca.datatypes.Root + metadata: {} + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + restRequestId: + type: onap.datatypes.ToscaConceptIdentifier + typeVersion: 1.0.0 + required: true + description: The name and version of a REST request to be sent to a REST endpoint + httpMethod: + type: string + required: true + constraints: + - valid_values: + - POST + - PUT + - GET + - DELETE + description: The REST method to use + path: + type: string + required: true + description: The path of the REST request relative to the base URL + body: + type: string + required: false + description: The body of the REST request for PUT and POST requests + expectedResponse: + type: integer + required: true + constraints: [] + description: THe expected HTTP status code for the REST request + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + configurationEntityId: + type: onap.datatypes.ToscaConceptIdentifier + typeVersion: 1.0.0 + required: true + description: >- + The name and version of a Configuration Entity to be handled by the + HTTP Automation Composition Element + restSequence: + type: list + entry_schema: + type: >- + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest + typeVersion: 1.0.0 + description: A sequence of REST commands to send to the REST endpoint + org.onap.datatypes.policy.clamp.acm.a1PmsAutomationCompositionElement.A1PolicyServiceEntity: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + a1PolicyServiceEntityId: + type: onap.datatypes.ToscaConceptIdentifier + typeVersion: 1.0.0 + required: true + description: The name and version of a Configuration Entity to be handled by the A1 PMS Automation Composition Element + clientId: + type: string + required: true + description: Client Id to be created + callbackUrl: + type: string + required: true + description: The callback URL to get registered + keepAliveIntervalSeconds: + type: integer + required: true + description: Keep alive interval time for the callback URL +policy_types: + onap.policies.Monitoring: + derived_from: tosca.policies.Root + description: a base policy type for all policies that govern monitoring provisioning + version: 1.0.0 + name: onap.policies.Monitoring + onap.policies.Sirisha: + derived_from: tosca.policies.Root + description: a base policy type for all policies that govern monitoring provisioning + version: 1.0.0 + name: onap.policies.Sirisha + onap.policies.monitoring.dcae-pm-subscription-handler: + properties: + pmsh_policy: + name: pmsh_policy + type: onap.datatypes.monitoring.subscription + typeVersion: 0.0.0 + description: PMSH Policy JSON + required: false + constraints: [] + metadata: {} + name: onap.policies.monitoring.dcae-pm-subscription-handler + version: 1.0.0 + derived_from: onap.policies.Monitoring + metadata: {} + onap.policies.acm.operational.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + name: onap.policies.acm.operational.Common + description: > + Operational Policy for Automation Composition execution. Originated in + Frankfurt to support TOSCA Compliant + + Policy Types. This does NOT support the legacy Policy YAML policy type. + properties: + id: + type: string + description: The unique Automation Composition id. + required: true + timeout: + type: integer + description: > + Overall timeout for executing all the operations. This timeout should + equal or exceed the total + + timeout for each operation listed. + required: true + abatement: + type: boolean + description: >- + Whether an abatement event message will be expected for the Automation + Composition from DCAE. + required: true + default: false + trigger: + type: string + description: >- + Initial operation to execute upon receiving an Onset event message for + the Automation Composition. + required: true + operations: + type: list + description: >- + List of operations to be performed when Automation Composition is + triggered. + required: true + entry_schema: + type: onap.datatype.acm.Operation + onap.policies.acm.operational.common.Apex: + derived_from: onap.policies.acm.operational.Common + type_version: 1.0.0 + version: 1.0.0 + name: onap.policies.acm.operational.common.Apex + description: Operational policies for Apex PDP + properties: + engineServiceParameters: + type: string + description: >- + The engine parameters like name, instanceCount, policy implementation, + parameters etc. + required: true + eventInputParameters: + type: string + description: The event input parameters. + required: true + eventOutputParameters: + type: string + description: The event output parameters. + required: true + javaProperties: + type: string + description: Name/value pairs of properties to be set for APEX if needed. + required: false +node_types: + org.onap.policy.clamp.acm.Participant: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + requred: false + org.onap.policy.clamp.acm.AutomationCompositionElement: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: >- + Specifies the organization that provides the automation composition + element + participant_id: + type: onap.datatypes.ToscaConceptIdentifier + requred: true + metadata: + common: true + participantType: + type: onap.datatypes.ToscaConceptIdentifier + required: true + metadata: + common: true + description: >- + The identity of the participant type that hosts this type of + Automation Composition Element + startPhase: + type: integer + required: false + constraints: + - greater_or_equal: 0 + metadata: + common: true + description: >- + A value indicating the start phase in which this automation + composition element will be started, the first start phase is zero. + Automation Composition Elements are started in their start_phase order + and stopped in reverse start phase order. Automation Composition + Elements with the same start phase are started and stopped + simultaneously + uninitializedToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: >- + The maximum time in seconds to wait for a state chage from + uninitialized to passive + passiveToRunningTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: >- + The maximum time in seconds to wait for a state chage from passive to + running + runningToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: >- + The maximum time in seconds to wait for a state chage from running to + passive + passiveToUninitializedTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: >- + The maximum time in seconds to wait for a state chage from passive to + uninitialized + org.onap.policy.clamp.acm.AutomationComposition: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: >- + Specifies the organization that provides the automation composition + element + elements: + type: list + required: true + metadata: + common: true + entry_schema: + type: onap.datatypes.ToscaConceptIdentifier + description: >- + Specifies a list of automation composition element definitions that + make up this automation composition definition + org.onap.policy.clamp.acm.PolicyAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + policy_type_id: + type: onap.datatypes.ToscaConceptIdentifier + requred: true + policy_id: + type: onap.datatypes.ToscaConceptIdentifier + requred: false + org.onap.policy.clamp.acm.CDSAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + cds_blueprint_id: + type: onap.datatypes.ToscaConceptIdentifier + requred: true + org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + chart: + type: string + required: true + configs: + type: list + required: false + requirements: + type: string + requred: false + templates: + type: list + required: false + entry_schema: null + values: + type: string + requred: true + org.onap.policy.clamp.acm.HttpAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + baseUrl: + type: string + required: true + description: >- + The base URL to be prepended to each path, identifies the host for the + REST endpoints. + httpHeaders: + type: map + required: false + entry_schema: + type: string + description: HTTP headers to send on REST requests + configurationEntities: + type: map + required: true + entry_schema: + type: >- + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity + typeVersion: 1.0.0 + description: >- + The connfiguration entities the Automation Composition Element is + managing and their associated REST requests + org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + policyServiceEntities: + type: list + required: true + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.a1pmsAutomationCompositionElement.A1PolicyServiceEntity + typeVersion: 1.0.0 + description: The configuration entities of A1 PMS policy services +topology_template: + inputs: + pmsh_monitoring_policy: + type: onap.datatypes.ToscaConceptIdentifier + description: The ID of the PMSH monitoring policy to use + default: + name: >- + MICROSERVICE_vLoadBalancerMS_v1_0_dcae-pm-subscription-handler_1_0_0test + version: 1.0.0 + pmsh_operational_policy: + type: onap.datatypes.ToscaConceptIdentifier + description: The ID of the PMSH operational policy to use + default: + name: operational.apex.pmcontrol + version: 1.0.0 + node_templates: + org.onap.policy.clamp.acm.PolicyParticipant: + version: 2.3.1 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for DCAE microservices + properties: + provider: ONAP + org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement + type_version: 1.0.0 + description: >- + Automation composition element for the monitoring policy for Performance + Management Subscription Handling + properties: + provider: Ericsson + participant_id: + name: org.onap.PM_Policy + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.PolicyParticipant + version: 2.3.1 + policy_type_id: + name: onap.policies.monitoring.pm-subscription-handler + version: 1.0.0 + policy_id: + get_input: pmsh_monitoring_policy + org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement + type_version: 1.0.0 + description: >- + Automation composition element for the operational policy for + Performance Management Subscription Handling + properties: + provider: Ericsson + participant_id: + name: org.onap.PM_Policy + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.PolicyParticipant + version: 2.3.1 + policy_type_id: + name: onap.policies.operational.pm-subscription-handler + version: 1.0.0 + policy_id: + get_input: pmsh_operational_policy + org.onap.policy.clamp.acm.KubernetesParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for K8S + properties: + provider: ONAP + org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement + type_version: 1.0.0 + description: Automation composition element for the K8S microservice for PMSH + properties: + provider: ONAP + participant_id: + name: K8sParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.KubernetesParticipant + version: 2.3.4 + chart: + chartId: + name: dcae-pmsh + version: 10.0.0 + namespace: onap + releaseName: onap-dcae-pmsh + repository: + repoName: chartmuseum + address: 'http://chart-museum:80' + userName: onapinitializer + password: demo123456! + overrideParams: + global.masterPassword: test + org.onap.policy.clamp.acm.HttpParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for Http requests + properties: + provider: ONAP + org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + type_version: 1.0.1 + description: >- + Automation composition element for the http requests of PMSH + microservice + properties: + provider: ONAP + participant_id: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + startPhase: 1 + baseUrl: 'https://dcae-pmsh:8443' + httpHeaders: + Content-Type: application/json + configurationEntities: + - configurationEntityId: + name: entity1 + version: 1.0.1 + restSequence: + - restRequestId: + name: request1 + version: 1.0.1 + httpMethod: POST + path: subscription + body: >- + { "subscription":{ "subscriptionName":"new_sub_01", + "operationalPolicyName":"pmsh-operational-policy", + "controlLoopName":"controlLoop-name", "nfFilter":{ "nfNames":[ + "^pnf*" ], "modelInvariantIDs":[ + "7129e420-d396-4efb-af02-6b83499b12f5" ], "modelVersionIDs":[ + "e80a6ae3-cafd-4d24-850d-e14c084a5ca7" ], "modelNames":[ + "pnf_134" ] }, "measurementGroups":[ { "measurementGroup":{ + "measurementGroupName":"msgroup_01", + "administrativeState":"UNLOCKED", "fileBasedGP":15, + "fileLocation":"/pm/pm.xml", "measurementTypes":[ { + "measurementType":"EutranCell.*" }, { + "measurementType":"EutranCellRelation.pmCounter1" }, { + "measurementType":"EutranCellRelation.pmCounter2" } ], + "managedObjectDNsBasic":[ { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" + }, { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, + EUtranCellRelation=CityCenter2" }, { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, + EUtranCellRelation=CityCenter3" } ] } } ] } } + expectedResponse: 201 + org.onap.k8s.acm.A1PMSAutomationCompositionParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for A1 PMS requests + properties: + provider: ONAP + org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the A1 PMS Requests + properties: + provider: ONAP + participantType: + name: org.onap.policy.clamp.acm.A1PMSParticipant + version: 2.3.4 + policyServiceEntities: + - a1PolicyServiceEntityId: + name: entity1 + version: 1.0.1 + clientId: firstService + callbackUrl: http://localhost + keepAliveIntervalSeconds: 0 + - a1PolicyServiceEntityId: + name: entity2 + version: 1.0.1 + clientId: secondService + callbackUrl: http://127.0.0.1 + keepAliveIntervalSeconds: 0 + org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition: + version: 1.2.3 + type: org.onap.policy.clamp.acm.AutomationComposition + type_version: 1.0.0 + description: Automation composition for Hello World + properties: + provider: ONAP + elements: + - name: >- + org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement + version: 1.2.3 + - name: >- + org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement + version: 1.2.3 + - name: >- + org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement + version: 1.2.3 + - name: >- + org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement + version: 1.2.3 + - name: >- + org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement + version: 1.2.3 diff --git a/csit/resources/tests/data/PassivateAC.json b/csit/resources/tests/data/PassivateAC.json new file mode 100644 index 00000000..bd4c4a21 --- /dev/null +++ b/csit/resources/tests/data/PassivateAC.json @@ -0,0 +1,9 @@ +{ + "orderedState": "PASSIVE", + "automationCompositionIdentifierList": [ + { + "name": "PMSHInstance0", + "version": "1.0.1" + } + ] +} diff --git a/csit/resources/tests/data/PassiveCommand.json b/csit/resources/tests/data/PassiveCommand.json new file mode 100644 index 00000000..48422d7e --- /dev/null +++ b/csit/resources/tests/data/PassiveCommand.json @@ -0,0 +1,5 @@ +{ + "instantiationCommand": { + "orderedState": "PASSIVE" + } +} diff --git a/csit/resources/tests/data/RunningCommand.json b/csit/resources/tests/data/RunningCommand.json new file mode 100644 index 00000000..56980e64 --- /dev/null +++ b/csit/resources/tests/data/RunningCommand.json @@ -0,0 +1,5 @@ +{ + "instantiationCommand": { + "orderedState": "RUNNING" + } +} diff --git a/csit/resources/tests/data/StateChangeRunningAC.json b/csit/resources/tests/data/StateChangeRunningAC.json new file mode 100644 index 00000000..494f6fd7 --- /dev/null +++ b/csit/resources/tests/data/StateChangeRunningAC.json @@ -0,0 +1,9 @@ +{ + "orderedState": "RUNNING", + "automationCompositionIdentifierList": [ + { + "name": "PMSHInstance0", + "version": "1.0.1" + } + ] +} diff --git a/csit/resources/tests/data/VesEventForPnfPolicy.json b/csit/resources/tests/data/VesEventForPnfPolicy.json new file mode 100644 index 00000000..9998fc6f --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/VesEventForVnfPolicy.json b/csit/resources/tests/data/VesEventForVnfPolicy.json new file mode 100644 index 00000000..0fc8481d --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json b/csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json new file mode 100644 index 00000000..5d84c294 --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/create.group.request.json b/csit/resources/tests/data/create.group.request.json new file mode 100644 index 00000000..1e37583c --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/csar/sample_csar_with_apex_policy.csar b/csit/resources/tests/data/csar/sample_csar_with_apex_policy.csar new file mode 100644 index 00000000..4d293e42 Binary files /dev/null and b/csit/resources/tests/data/csar/sample_csar_with_apex_policy.csar differ diff --git a/csit/resources/tests/data/deploy.drools.policies.json b/csit/resources/tests/data/deploy.drools.policies.json new file mode 100644 index 00000000..24c90d0d --- /dev/null +++ b/csit/resources/tests/data/deploy.drools.policies.json @@ -0,0 +1,27 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "deploymentSubgroups": [ + { + "pdpType": "drools", + "action": "POST", + "policies": [ + { + "name": "operational.restart", + "version": "1.0.0" + }, + { + "name": "operational.scaleout", + "version": "1.0.0" + }, + { + "name": "operational.modifyconfig", + "version": "1.0.0" + } + ] + } + ] + } + ] +} diff --git a/csit/resources/tests/data/deploy.group.request.json b/csit/resources/tests/data/deploy.group.request.json new file mode 100644 index 00000000..cfd86d1e --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/deploy.xacml.policies.json b/csit/resources/tests/data/deploy.xacml.policies.json new file mode 100644 index 00000000..46da9021 --- /dev/null +++ b/csit/resources/tests/data/deploy.xacml.policies.json @@ -0,0 +1,27 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "deploymentSubgroups": [ + { + "pdpType": "xacml", + "action": "POST", + "policies": [ + { + "name": "onap.restart.tca", + "version": "1.0.0" + }, + { + "name": "onap.scaleout.tca", + "version": "1.0.0" + }, + { + "name": "onap.vfirewall.tca", + "version": "1.0.0" + } + ] + } + ] + } + ] +} diff --git a/csit/resources/tests/data/event.json b/csit/resources/tests/data/event.json new file mode 100644 index 00000000..9dbf2790 --- /dev/null +++ b/csit/resources/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/resources/tests/data/functional-pmsh-usecase.yaml b/csit/resources/tests/data/functional-pmsh-usecase.yaml new file mode 100644 index 00000000..f0da6f35 --- /dev/null +++ b/csit/resources/tests/data/functional-pmsh-usecase.yaml @@ -0,0 +1,3404 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +tosca_definitions_version: tosca_simple_yaml_1_3 +data_types: + onap.datatypes.ToscaConceptIdentifier: + derived_from: tosca.datatypes.Root + properties: + name: + type: string + required: true + version: + type: string + required: true + onap.datatype.controlloop.Target: + derived_from: tosca.datatypes.Root + description: Definition for a entity in A&AI to perform a control loop operation + on + properties: + targetType: + type: string + description: Category for the target type + required: true + constraints: + - valid_values: + - VNF + - VM + - VFMODULE + - PNF + entityIds: + type: map + description: | + Map of values that identify the resource. If none are provided, it is assumed that the + entity that generated the ONSET event will be the target. + required: false + metadata: + clamp_possible_values: ClampExecution:CSAR_RESOURCES + entry_schema: + type: string + onap.datatype.controlloop.Actor: + derived_from: tosca.datatypes.Root + description: An actor/operation/target definition + properties: + actor: + type: string + description: The actor performing the operation. + required: true + metadata: + clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor + operation: + type: string + description: The operation the actor is performing. + metadata: + clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation + required: true + target: + type: onap.datatype.controlloop.Target + description: The resource the operation should be performed on. + required: true + payload: + type: map + description: Name/value pairs of payload information passed by Policy to the + actor + required: false + metadata: + clamp_possible_values: ClampExecution:CDS/payload + entry_schema: + type: string + onap.datatype.controlloop.Operation: + derived_from: tosca.datatypes.Root + description: An operation supported by an actor + properties: + id: + type: string + description: Unique identifier for the operation + required: true + description: + type: string + description: A user-friendly description of the intent for the operation + required: false + operation: + type: onap.datatype.controlloop.Actor + description: The definition of the operation to be performed. + required: true + timeout: + type: integer + description: The amount of time for the actor to perform the operation. + required: true + retries: + type: integer + description: The number of retries the actor should attempt to perform the + operation. + required: true + default: 0 + success: + type: string + description: Points to the operation to invoke on success. A value of "final_success" + indicates and end to the operation. + required: false + default: final_success + failure: + type: string + description: Points to the operation to invoke on Actor operation failure. + required: false + default: final_failure + failure_timeout: + type: string + description: Points to the operation to invoke when the time out for the operation + occurs. + required: false + default: final_failure_timeout + failure_retries: + type: string + description: Points to the operation to invoke when the current operation + has exceeded its max retries. + required: false + default: final_failure_retries + failure_exception: + type: string + description: Points to the operation to invoke when the current operation + causes an exception. + required: false + default: final_failure_exception + failure_guard: + type: string + description: Points to the operation to invoke when the current operation + is blocked due to guard policy enforcement. + required: false + default: final_failure_guard + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + restRequestId: + type: onap.datatypes.ToscaConceptIdentifier + required: true + description: The name and version of a REST request to be sent to a REST endpoint + httpMethod: + type: string + required: true + constraints: + - valid_values: + - POST + - PUT + - GET + - DELETE + description: The REST method to use + path: + type: string + required: true + description: The path of the REST request relative to the base URL + body: + type: string + required: false + description: The body of the REST request for PUT and POST requests + expectedResponse: + type: integer + required: true + constraints: [] + description: THe expected HTTP status code for the REST request + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + configurationEntityId: + type: onap.datatypes.ToscaConceptIdentifier + required: true + description: The name and version of a Configuration Entity to be handled + by the HTTP Automation Composition Element + restSequence: + type: list + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest + type_version: 1.0.0 + description: A sequence of REST commands to send to the REST endpoint +policy_types: + onap.policies.Monitoring: + derived_from: tosca.policies.Root + description: a base policy type for all policies that govern monitoring provisioning + version: 1.0.0 + name: onap.policies.Monitoring + onap.policies.customPolicyType: + derived_from: tosca.policies.Root + description: a base policy type for all policies that govern monitoring provisioning + version: 1.0.0 + name: onap.policies.customPolicyType + onap.policies.controlloop.operational.Common: + derived_from: tosca.policies.Root + version: 1.0.0 + name: onap.policies.controlloop.operational.Common + description: | + Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant + Policy Types. This does NOT support the legacy Policy YAML policy type. + properties: + id: + type: string + description: The unique control loop id. + required: true + timeout: + type: integer + description: | + Overall timeout for executing all the operations. This timeout should equal or exceed the total + timeout for each operation listed. + required: true + abatement: + type: boolean + description: Whether an abatement event message will be expected for the control + loop from DCAE. + required: true + default: false + trigger: + type: string + description: Initial operation to execute upon receiving an Onset event message + for the Control Loop. + required: true + operations: + type: list + description: List of operations to be performed when Control Loop is triggered. + required: true + entry_schema: + type: onap.datatype.controlloop.Operation + onap.policies.controlloop.operational.common.Apex: + derived_from: onap.policies.controlloop.operational.Common + type_version: 1.0.0 + version: 1.0.0 + name: onap.policies.controlloop.operational.common.Apex + description: Operational policies for Apex PDP + properties: + engineServiceParameters: + type: string + description: The engine parameters like name, instanceCount, policy implementation, + parameters etc. + required: true + eventInputParameters: + type: string + description: The event input parameters. + required: true + eventOutputParameters: + type: string + description: The event output parameters. + required: true + javaProperties: + type: string + description: Name/value pairs of properties to be set for APEX if needed. + required: false + +node_types: + org.onap.policy.clamp.acm.Participant: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + org.onap.policy.clamp.acm.AutomationCompositionElement: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: Specifies the organization that provides the automation composition element + participant_id: + type: onap.datatypes.ToscaConceptIdentifier + required: true + metadata: + common: true + participantType: + type: onap.datatypes.ToscaConceptIdentifier + required: true + metadata: + common: true + description: The identity of the participant type that hosts this type of Automation Composition Element + startPhase: + type: integer + required: false + constraints: + - greater_or_equal: 0 + metadata: + common: true + description: A value indicating the start phase in which this automation composition element will be started, the + first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped + in reverse start phase order. Automation Composition Elements with the same start phase are started and + stopped simultaneously + uninitializedToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from uninitialized to passive + passiveToRunningTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from passive to running + runningToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from running to passive + passiveToUninitializedTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from passive to uninitialized + org.onap.policy.clamp.acm.AutomationComposition: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: Specifies the organization that provides the automation composition element + elements: + type: list + required: true + metadata: + common: true + entry_schema: + type: onap.datatypes.ToscaConceptIdentifier + description: Specifies a list of automation composition element definitions that make up this automation composition definition + org.onap.policy.clamp.acm.PolicyAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + policy_type_id: + type: onap.datatypes.ToscaConceptIdentifier + required: true + policy_id: + type: onap.datatypes.ToscaConceptIdentifier + required: false + org.onap.policy.clamp.acm.CDSAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + cds_blueprint_id: + type: onap.datatypes.ToscaConceptIdentifier + required: true + org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + chart: + type: string + required: true + configs: + type: list + required: false + requirements: + type: string + required: false + templates: + type: list + required: false + entry_schema: + values: + type: string + required: true + org.onap.policy.clamp.acm.HttpAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + baseUrl: + type: string + required: true + description: The base URL to be prepended to each path, identifies the host for the REST endpoints. + httpHeaders: + type: map + required: false + entry_schema: + type: string + description: HTTP headers to send on REST requests + configurationEntities: + type: map + required: true + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity + type_version: 1.0.0 + description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests + +topology_template: + inputs: + pmsh_operational_policy: + type: onap.datatypes.ToscaConceptIdentifier + description: The ID of the PMSH operational policy to use + default: + name: operational.apex.pmcontrol + version: 1.0.0 + node_templates: + org.onap.policy.clamp.acm.PolicyParticipant: + version: 2.3.1 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for DCAE microservices + properties: + provider: ONAP + org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement: + version: 1.2.3 + type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the operational policy for Performance Management Subscription Handling + properties: + provider: Ericsson + participant_id: + name: org.onap.PM_Policy + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.PolicyParticipant + version: 2.3.1 + policy_type_id: + name: onap.policies.operational.pm-subscription-handler + version: 1.0.0 + policy_id: + get_input: pmsh_operational_policy + + + org.onap.policy.clamp.acm.KubernetesParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for K8S + properties: + provider: ONAP + org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement: + # Chart from new repository + version: 1.2.3 + type: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the K8S microservice for PMSH + properties: + provider: ONAP + participant_id: + name: K8sParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.KubernetesParticipant + version: 2.3.4 + chart: + chartId: + name: dcae-pmsh + version: 10.0.0 + namespace: onap + releaseName: dcae-pmsh + repository: + repoName: chartmuseum + address: http://chart-museum:80 + userName: onapinitializer + password: demo123456! + overrideParams: + global.masterPassword: test + global.centralizedLoggingEnabled: false + org.onap.policy.clamp.acm.HttpParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for Http requests + properties: + provider: ONAP + org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement: + # Http config for PMSH. + version: 1.2.3 + type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the http requests of PMSH microservice + properties: + provider: ONAP + participant_id: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + startPhase: 1 + baseUrl: https://dcae-pmsh:8443 + httpHeaders: + Content-Type: application/json + configurationEntities: + - configurationEntityId: + name: entity1 + version: 1.0.1 + restSequence: + - restRequestId: + name: request1 + version: 1.0.1 + httpMethod: POST + path: subscription + body: '{ + "subscription":{ + "subscriptionName":"new_sub_01", + "operationalPolicyName":"pmsh-operational-policy", + "controlLoopName":"controlLoop-name", + "nfFilter":{ + "nfNames":[ + "^pnf*" + ], + "modelInvariantIDs":[ + "7129e420-d396-4efb-af02-6b83499b12f5" + ], + "modelVersionIDs":[ + "e80a6ae3-cafd-4d24-850d-e14c084a5ca7" + ], + "modelNames":[ + "pnf_134" + ] + }, + "measurementGroups":[ + { + "measurementGroup":{ + "measurementGroupName":"msgroup_01", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"/pm/pm.xml", + "measurementTypes":[ + { + "measurementType":"EutranCell.*" + }, + { + "measurementType":"EutranCellRelation.pmCounter1" + }, + { + "measurementType":"EutranCellRelation.pmCounter2" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" + }, + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" + }, + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" + } + ] + } + } + ] + } + }' + expectedResponse: 201 + + + org.onap.domain.pmsh.PMSHAutomationCompositionDefinition: + version: 1.2.3 + type: org.onap.policy.clamp.acm.AutomationComposition + type_version: 1.0.1 + description: Automation composition for PMSH + properties: + provider: ONAP + elements: + - name: org.onap.domain.database.PMSH_K8SMicroserviceAutomationCompositionElement + version: 1.2.3 + - name: org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement + version: 1.2.3 + - name: org.onap.domain.pmsh.PMSH_OperationalPolicyAutomationCompositionElement + version: 1.2.3 + policies: + - operational.apex.pmcontrol: + type: onap.policies.controlloop.operational.common.Apex + type_version: 1.0.0 + version: 1.0.0 + properties: + engineServiceParameters: + name: MyApexEngine + version: 0.0.1 + id: 45 + instanceCount: 2 + deploymentPort: 12561 + engineParameters: + executorParameters: + JAVASCRIPT: + parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters + contextParameters: + parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters + schemaParameters: + 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.common.gson.InstantAsMillisTypeAdapter + policy_type_impl: + apexPolicyModel: + key: + name: PMControlPolicy + version: 0.0.1 + keyInformation: + key: + name: PMControlPolicy_KeyInfo + version: 0.0.1 + keyInfoMap: + entry: + - key: + name: CDSActionIdentifiersType + version: 0.0.1 + value: + key: + name: CDSActionIdentifiersType + version: 0.0.1 + UUID: 6e5fa19b-14df-37e3-a4ae-8c537e861a82 + description: Generated description for concept referred to by + key "CDSActionIdentifiersType:0.0.1" + - key: + name: CDSCreateResponseEvent + version: 0.0.1 + value: + key: + name: CDSCreateResponseEvent + version: 0.0.1 + UUID: 14b29e38-ac75-3273-aa4e-8583c0aa7dad + description: Generated description for concept referred to by + key "CDSCreateResponseEvent:0.0.1" + - key: + name: CDSCreateResponsePayloadType + version: 0.0.1 + value: + key: + name: CDSCreateResponsePayloadType + version: 0.0.1 + UUID: 04573f8f-e772-30a5-b1d9-d7318d4a1e13 + description: Generated description for concept referred to by + key "CDSCreateResponsePayloadType:0.0.1" + - key: + name: CDSCreateResponsePolicy + version: 0.0.1 + value: + key: + name: CDSCreateResponsePolicy + version: 0.0.1 + UUID: e126c965-fc09-3bfe-8f55-70f380a4a49c + description: Generated description for concept referred to by + key "CDSCreateResponsePolicy:0.0.1" + - key: + name: CDSCreateResponseTask + version: 0.0.1 + value: + key: + name: CDSCreateResponseTask + version: 0.0.1 + UUID: 6165ee82-afd2-3aab-a517-f00b3f2461d2 + description: Generated description for concept referred to by + key "CDSCreateResponseTask:0.0.1" + - key: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + value: + key: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + UUID: 8350ac5e-c157-38b9-9614-a0f93a830e60 + description: Generated description for concept referred to by + key "CDSCreateSubscriptionPayloadType:0.0.1" + - key: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + value: + key: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + UUID: cfa325ba-226b-3a31-9183-ec43e2b6e9a2 + description: Generated description for concept referred to by + key "CDSCreateSubscriptionRequestEvent:0.0.1" + - key: + name: CDSDeleteResponseEvent + version: 0.0.1 + value: + key: + name: CDSDeleteResponseEvent + version: 0.0.1 + UUID: 8be9c0fa-7437-3841-aff2-b3cec6ae3bd8 + description: Generated description for concept referred to by + key "CDSDeleteResponseEvent:0.0.1" + - key: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + value: + key: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + UUID: 3fbfe0c9-152e-34d3-a504-09cd13c058d0 + description: Generated description for concept referred to by + key "CDSDeleteResponsePayloadType:0.0.1" + - key: + name: CDSDeleteResponsePolicy + version: 0.0.1 + value: + key: + name: CDSDeleteResponsePolicy + version: 0.0.1 + UUID: a780251c-edd5-3132-b865-04313246b43c + description: Generated description for concept referred to by + key "CDSDeleteResponsePolicy:0.0.1" + - key: + name: CDSDeleteResponseTask + version: 0.0.1 + value: + key: + name: CDSDeleteResponseTask + version: 0.0.1 + UUID: afce4555-3aa3-3521-a7d8-ee8cdf0d3efc + description: Generated description for concept referred to by + key "CDSDeleteResponseTask:0.0.1" + - key: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + value: + key: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + UUID: 12658406-9147-3c9d-a38c-5ad5e30b092b + description: Generated description for concept referred to by + key "CDSDeleteSubscriptionPayloadType:0.0.1" + - key: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + value: + key: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + UUID: 24380c95-9289-36e6-8cbf-0edefa15ccd9 + description: Generated description for concept referred to by + key "CDSDeleteSubscriptionRequestEvent:0.0.1" + - key: + name: CDSRequestCommonHeaderType + version: 0.0.1 + value: + key: + name: CDSRequestCommonHeaderType + version: 0.0.1 + UUID: 35590ac0-062c-39f1-8786-b4ff716e30b1 + description: Generated description for concept referred to by + key "CDSRequestCommonHeaderType:0.0.1" + - key: + name: CDSResponseCommonHeaderType + version: 0.0.1 + value: + key: + name: CDSResponseCommonHeaderType + version: 0.0.1 + UUID: dd7e1805-885a-350b-aaf9-ed541321ae3c + description: Generated description for concept referred to by + key "CDSResponseCommonHeaderType:0.0.1" + - key: + name: CDSResponseStatusEvent + version: 0.0.1 + value: + key: + name: CDSResponseStatusEvent + version: 0.0.1 + UUID: 7986e21b-32f7-302e-9554-31f21b673493 + description: Generated description for concept referred to by + key "CDSResponseStatusEvent:0.0.1" + - key: + name: CDSResponseStatusType + version: 0.0.1 + value: + key: + name: CDSResponseStatusType + version: 0.0.1 + UUID: 92b8a2cf-344e-3ce1-8cc0-2b7d3cb695fa + description: Generated description for concept referred to by + key "CDSResponseStatusType:0.0.1" + - key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + value: + key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + UUID: 92162397-1a8e-3a3f-a469-d2af7700af4a + description: Generated description for concept referred to by + key "CreateSubscriptionPayloadEvent:0.0.1" + - key: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + value: + key: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + UUID: bc0c69f0-52ed-38ea-b468-ae4a6fd1730d + description: Generated description for concept referred to by + key "CreateSubscriptionPayloadTask:0.0.1" + - key: + name: CreateSubscriptionRequestTask + version: 0.0.1 + value: + key: + name: CreateSubscriptionRequestTask + version: 0.0.1 + UUID: 89cb75e9-f06c-30d3-b4ff-698d45f63869 + description: Generated description for concept referred to by + key "CreateSubscriptionRequestTask:0.0.1" + - key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + value: + key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + UUID: 994fa441-04ab-33bb-832d-1cd12ab5d074 + description: Generated description for concept referred to by + key "DeleteSubscriptionPayloadEvent:0.0.1" + - key: + name: DeleteSubscriptionPayloadTask + version: 0.0.1 + value: + key: + name: DeleteSubscriptionPayloadTask + version: 0.0.1 + UUID: 0f519117-5fea-3e4b-941f-8f778100465f + description: Generated description for concept referred to by + key "DeleteSubscriptionPayloadTask:0.0.1" + - key: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + value: + key: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + UUID: acb772fe-d442-39e3-98f9-b1080caf4150 + description: Generated description for concept referred to by + key "DeleteSubscriptionRequestTask:0.0.1" + - key: + name: MRResponseEvent + version: 0.0.1 + value: + key: + name: MRResponseEvent + version: 0.0.1 + UUID: 13c747a3-6bae-3bcf-9c80-b152e01dc194 + description: Generated description for concept referred to by + key "MRResponseEvent:0.0.1" + - key: + name: PMControlPolicy + version: 0.0.1 + value: + key: + name: PMControlPolicy + version: 0.0.1 + UUID: acf1e55c-7bc5-3bd5-975a-0ca54afcd8a4 + description: Generated description for concept referred to by + key "PMControlPolicy:0.0.1" + - key: + name: PMControlPolicy_Albums + version: 0.0.1 + value: + key: + name: PMControlPolicy_Albums + version: 0.0.1 + UUID: b38ad204-c2c8-32f4-9b5a-dda0aeb0145b + description: Generated description for concept referred to by + key "PMControlPolicy_Albums:0.0.1" + - key: + name: PMControlPolicy_Events + version: 0.0.1 + value: + key: + name: PMControlPolicy_Events + version: 0.0.1 + UUID: be3871a0-c42a-3113-a066-82d192840eca + description: Generated description for concept referred to by + key "PMControlPolicy_Events:0.0.1" + - key: + name: PMControlPolicy_KeyInfo + version: 0.0.1 + value: + key: + name: PMControlPolicy_KeyInfo + version: 0.0.1 + UUID: ced37634-28a4-3178-b7f6-2980794927b0 + description: Generated description for concept referred to by + key "PMControlPolicy_KeyInfo:0.0.1" + - key: + name: PMControlPolicy_Policies + version: 0.0.1 + value: + key: + name: PMControlPolicy_Policies + version: 0.0.1 + UUID: be3d180d-ef9c-3a75-8e9c-84271a038bed + description: Generated description for concept referred to by + key "PMControlPolicy_Policies:0.0.1" + - key: + name: PMControlPolicy_Schemas + version: 0.0.1 + value: + key: + name: PMControlPolicy_Schemas + version: 0.0.1 + UUID: e61973f1-189c-39e5-82f6-0d3afe298a20 + description: Generated description for concept referred to by + key "PMControlPolicy_Schemas:0.0.1" + - key: + name: PMControlPolicy_Tasks + version: 0.0.1 + value: + key: + name: PMControlPolicy_Tasks + version: 0.0.1 + UUID: 5658adb3-2962-30a3-a241-fae75bb8eb4a + description: Generated description for concept referred to by + key "PMControlPolicy_Tasks:0.0.1" + - key: + name: PMSubscriptionAlbum + version: 0.0.1 + value: + key: + name: PMSubscriptionAlbum + version: 0.0.1 + UUID: c2bd6f0d-6854-317a-9be2-97c08338428c + description: Generated description for concept referred to by + key "PMSubscriptionAlbum:0.0.1" + - key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + value: + key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + UUID: 992b7819-9f69-3aa0-bb0f-6e45ea15ce05 + description: Generated description for concept referred to by + key "PMSubscriptionOutputEvent:0.0.1" + - key: + name: PMSubscriptionType + version: 0.0.1 + value: + key: + name: PMSubscriptionType + version: 0.0.1 + UUID: 73c1c397-4fc3-357f-93b6-a8ad707fbaae + description: Generated description for concept referred to by + key "PMSubscriptionType:0.0.1" + - key: + name: ReceiveEventPolicy + version: 0.0.1 + value: + key: + name: ReceiveEventPolicy + version: 0.0.1 + UUID: 568b7345-9de1-36d3-b6a3-9b857e6809a1 + description: Generated description for concept referred to by + key "ReceiveEventPolicy:0.0.1" + - key: + name: ReceiveSubscriptionTask + version: 0.0.1 + value: + key: + name: ReceiveSubscriptionTask + version: 0.0.1 + UUID: f596afc8-100c-35eb-92c8-352355ea457d + description: Generated description for concept referred to by + key "ReceiveSubscriptionTask:0.0.1" + - key: + name: SimpleIntType + version: 0.0.1 + value: + key: + name: SimpleIntType + version: 0.0.1 + UUID: 153791fd-ae0a-36a7-88a5-309a7936415d + description: Generated description for concept referred to by + key "SimpleIntType:0.0.1" + - key: + name: SimpleStringType + version: 0.0.1 + value: + key: + name: SimpleStringType + version: 0.0.1 + UUID: 8a4957cf-9493-3a76-8c22-a208e23259af + description: Generated description for concept referred to by + key "SimpleStringType:0.0.1" + - key: + name: SubscriptionStatusType + version: 0.0.1 + value: + key: + name: SubscriptionStatusType + version: 0.0.1 + UUID: 597643b1-9db1-31ce-85d0-e1c63c43b30b + description: Generated description for concept referred to by + key "SubscriptionStatusType:0.0.1" + - key: + name: SubscriptionType + version: 0.0.1 + value: + key: + name: SubscriptionType + version: 0.0.1 + UUID: 184547bb-7d64-3cb2-a273-d7185102c5ce + description: Generated description for concept referred to by + key "SubscriptionType:0.0.1" + - key: + name: UUIDType + version: 0.0.1 + value: + key: + name: UUIDType + version: 0.0.1 + UUID: 6a8cc68e-dfc8-3403-9c6d-071c886b319c + description: Generated description for concept referred to by + key "UUIDType:0.0.1" + - key: + name: pmsh-operational-policy + version: 0.0.1 + value: + key: + name: pmsh-operational-policy + version: 0.0.1 + UUID: fdf2c9ff-6422-3ea6-b6b6-49b12116265d + description: Generated description for concept referred to by + key "pmsh-operational-policy:0.0.1" + policies: + key: + name: PMControlPolicy_Policies + version: 0.0.1 + policyMap: + entry: + - key: + name: CDSCreateResponsePolicy + version: 0.0.1 + value: + policyKey: + name: CDSCreateResponsePolicy + version: 0.0.1 + template: Freestyle + state: + entry: + - key: CDSCreateResponseState + value: + stateKey: + parentKeyName: CDSCreateResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CDSCreateResponseState + trigger: + name: CDSCreateResponseEvent + version: 0.0.1 + stateOutputs: + entry: + - key: ResponseOutput + value: + key: + parentKeyName: CDSCreateResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSCreateResponseState + localName: ResponseOutput + outgoingEvent: + name: CDSResponseStatusEvent + version: 0.0.1 + outgoingEventReference: + - name: CDSResponseStatusEvent + 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: CDSCreateResponseTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: CDSCreateResponseTask + version: 0.0.1 + value: + key: + parentKeyName: CDSCreateResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSCreateResponseState + localName: CDSCreateResponsePolicy + outputType: DIRECT + output: + parentKeyName: CDSCreateResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSCreateResponseState + localName: ResponseOutput + firstState: CDSCreateResponseState + - key: + name: CDSDeleteResponsePolicy + version: 0.0.1 + value: + policyKey: + name: CDSDeleteResponsePolicy + version: 0.0.1 + template: Freestyle + state: + entry: + - key: CDSDeleteResponseState + value: + stateKey: + parentKeyName: CDSDeleteResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CDSDeleteResponseState + trigger: + name: CDSDeleteResponseEvent + version: 0.0.1 + stateOutputs: + entry: + - key: ResponseOutput + value: + key: + parentKeyName: CDSDeleteResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSDeleteResponseState + localName: ResponseOutput + outgoingEvent: + name: CDSResponseStatusEvent + version: 0.0.1 + outgoingEventReference: + - name: CDSResponseStatusEvent + 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: CDSDeleteResponseTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: CDSDeleteResponseTask + version: 0.0.1 + value: + key: + parentKeyName: CDSDeleteResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSDeleteResponseState + localName: CDSDeleteResponsePolicy + outputType: DIRECT + output: + parentKeyName: CDSDeleteResponsePolicy + parentKeyVersion: 0.0.1 + parentLocalName: CDSDeleteResponseState + localName: ResponseOutput + firstState: CDSDeleteResponseState + - key: + name: ReceiveEventPolicy + version: 0.0.1 + value: + policyKey: + name: ReceiveEventPolicy + version: 0.0.1 + template: Freestyle + state: + entry: + - key: CreateOrDeleteState + value: + stateKey: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CreateOrDeleteState + trigger: + name: PMSubscriptionOutputEvent + version: 0.0.1 + stateOutputs: + entry: + - key: CreateSubscriptionPayload + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: CreateSubscriptionPayload + outgoingEvent: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + outgoingEventReference: + - name: CreateSubscriptionPayloadEvent + version: 0.0.1 + nextState: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CreateSubscription + - key: DeleteSubscriptionPayload + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: DeleteSubscriptionPayload + outgoingEvent: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + outgoingEventReference: + - name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + nextState: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: DeleteSubscription + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskSelectionLogic: + key: TaskSelectionLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) + var changeType = pmSubscriptionInfo.get("changeType").toString() + executor.logger.info("Change Type is " + changeType) + if ("CREATE".equals(changeType)) { + executor.logger.info("Choosing to create a subscription") + executor.subject.getTaskKey("CreateSubscriptionPayloadTask").copyTo(executor.selectedTask); + } + else if ("DELETE".equals(changeType)) { + executor.logger.info("Choosing to delete a subscription") + executor.subject.getTaskKey("DeleteSubscriptionPayloadTask").copyTo(executor.selectedTask); + } + returnValue = executor.isTrue; + true; + stateFinalizerLogicMap: + entry: [ ] + defaultTask: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: ReceiveEventPolicy + outputType: DIRECT + output: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: CreateSubscriptionPayload + - key: + name: DeleteSubscriptionPayloadTask + version: 0.0.1 + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: ReceiveEventPolicy + outputType: DIRECT + output: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateOrDeleteState + localName: DeleteSubscriptionPayload + - key: CreateSubscription + value: + stateKey: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CreateSubscription + trigger: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + stateOutputs: + entry: + - key: IssueCreateSubscriptionRequestOutput + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateSubscription + localName: IssueCreateSubscriptionRequestOutput + outgoingEvent: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + outgoingEventReference: + - name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + nextState: + parentKeyName: 'NULL' + parentKeyVersion: 0.0.0 + parentLocalName: 'NULL' + localName: 'NULL' + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskSelectionLogic: + key: 'NULL' + logicFlavour: UNDEFINED + logic: '' + stateFinalizerLogicMap: + entry: [ ] + defaultTask: + name: CreateSubscriptionRequestTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: CreateSubscriptionRequestTask + version: 0.0.1 + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateSubscription + localName: ReceiveEventPolicy + outputType: DIRECT + output: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: CreateSubscription + localName: IssueCreateSubscriptionRequestOutput + - key: DeleteSubscription + value: + stateKey: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: DeleteSubscription + trigger: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + stateOutputs: + entry: + - key: IssueDeleteSubscriptionRequestOutput + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: DeleteSubscription + localName: IssueDeleteSubscriptionRequestOutput + outgoingEvent: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + outgoingEventReference: + - name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + nextState: + parentKeyName: 'NULL' + parentKeyVersion: 0.0.0 + parentLocalName: 'NULL' + localName: 'NULL' + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskSelectionLogic: + key: 'NULL' + logicFlavour: UNDEFINED + logic: '' + stateFinalizerLogicMap: + entry: [ ] + defaultTask: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: DeleteSubscription + localName: ReceiveEventPolicy + outputType: DIRECT + output: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: DeleteSubscription + localName: IssueDeleteSubscriptionRequestOutput + - key: ReceiveSubscriptionState + value: + stateKey: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: ReceiveSubscriptionState + trigger: + name: pmsh-operational-policy + version: 0.0.1 + stateOutputs: + entry: + - key: ReceivePMSubscriptionOutput + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: ReceiveSubscriptionState + localName: ReceivePMSubscriptionOutput + outgoingEvent: + name: PMSubscriptionOutputEvent + version: 0.0.1 + outgoingEventReference: + - name: PMSubscriptionOutputEvent + version: 0.0.1 + nextState: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: 'NULL' + localName: CreateOrDeleteState + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskSelectionLogic: + key: 'NULL' + logicFlavour: UNDEFINED + logic: '' + stateFinalizerLogicMap: + entry: [ ] + defaultTask: + name: ReceiveSubscriptionTask + version: 0.0.1 + taskReferences: + entry: + - key: + name: ReceiveSubscriptionTask + version: 0.0.1 + value: + key: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: ReceiveSubscriptionState + localName: ReceiveEventPolicy + outputType: DIRECT + output: + parentKeyName: ReceiveEventPolicy + parentKeyVersion: 0.0.1 + parentLocalName: ReceiveSubscriptionState + localName: ReceivePMSubscriptionOutput + firstState: ReceiveSubscriptionState + tasks: + key: + name: PMControlPolicy_Tasks + version: 0.0.1 + taskMap: + entry: + - key: + name: CDSCreateResponseTask + version: 0.0.1 + value: + key: + name: CDSCreateResponseTask + version: 0.0.1 + inputEvent: + key: + name: CDSCreateResponseEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: CDS + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSResponseCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateResponsePayloadType + version: 0.0.1 + optional: false + - key: status + value: + key: status + fieldSchemaKey: + name: CDSResponseStatusType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: CDSResponseStatusEvent + value: + key: + name: CDSResponseStatusEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: DCAE + parameter: + entry: + - key: status + value: + key: status + fieldSchemaKey: + name: SubscriptionStatusType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var commonHeader = executor.inFields.get("commonHeader") + var response = executor.inFields.get("payload") + var albumID = commonHeader.get("requestId") + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString()); + var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance(); + var changeType = pmSubscriptionInfo.get("changeType").toUpperCase() + responseStatus.put("nfName", pmSubscriptionInfo.get("nfName")) + responseStatus.put("changeType", pmSubscriptionInfo.get("changeType")) + if ("CREATE".equals(changeType)) { + responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) + responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName")) + } + else if ("DELETE".equals(changeType)) { + responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) + responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) + } + var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status") + executor.logger.info("RESPONSE STATUS = " + status) + if(status == "success") { + responseStatus.put("message", "success") + } else { + responseStatus.put("message", "failed") + } + executor.outFields.put("status", responseStatus) + returnValue = executor.isTrue; + true; + - key: + name: CDSDeleteResponseTask + version: 0.0.1 + value: + key: + name: CDSDeleteResponseTask + version: 0.0.1 + inputEvent: + key: + name: CDSDeleteResponseEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: CDS + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSResponseCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + optional: false + - key: status + value: + key: status + fieldSchemaKey: + name: CDSResponseStatusType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: CDSResponseStatusEvent + value: + key: + name: CDSResponseStatusEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: DCAE + parameter: + entry: + - key: status + value: + key: status + fieldSchemaKey: + name: SubscriptionStatusType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var commonHeader = executor.inFields.get("commonHeader") + var response = executor.inFields.get("payload") + var albumID = commonHeader.get("requestId") + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(albumID.toString()); + var responseStatus = executor.subject.getOutFieldSchemaHelper("status").createNewInstance(); + var changeType = pmSubscriptionInfo.get("changeType").toUpperCase() + responseStatus.put("nfName", pmSubscriptionInfo.get("nfName")) + responseStatus.put("changeType", pmSubscriptionInfo.get("changeType")) + if ("CREATE".equals(changeType)) { + responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) + responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("subscription").get("measurementGroup").get("measurementGroupName")) + } + else if ("DELETE".equals(changeType)) { + responseStatus.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) + responseStatus.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) + } + var status = response.get(pmSubscriptionInfo.get("changeType").toLowerCase() + "_DasH_subscription_DasH_response").get("odl_DasH_response").get("status") + executor.logger.info("RESPONSE STATUS = " + status) + if(status == "success") { + responseStatus.put("message", "success") + } else { + responseStatus.put("message", "failed") + } + executor.outFields.put("status", responseStatus) + returnValue = executor.isTrue; + true; + - key: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + value: + key: + name: CreateSubscriptionPayloadTask + version: 0.0.1 + inputEvent: + key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: CreateSubscriptionPayloadEvent + value: + key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) + var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() + var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record"); + payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName")) + payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress")) + if ("create".equals(changeType)) { + payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) + payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString()) + payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation")) + payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup")) + } + else if ("delete".equals(changeType)) { + payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) + payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) + } + var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry"); + payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties) + var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance(); + payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry); + executor.outFields.put("albumID", executor.inFields.get("albumID")) + executor.outFields.put("payload", payload); + returnValue = executor.isTrue; + true; + - key: + name: CreateSubscriptionRequestTask + version: 0.0.1 + value: + key: + name: CreateSubscriptionRequestTask + version: 0.0.1 + inputEvent: + key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: CDSCreateSubscriptionRequestEvent + value: + key: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSRequestCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) + executor.logger.info(pmSubscriptionInfo) + var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() + var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase() + var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase() + var payload = executor.inFields.get("payload") + var actionName = changeType + "-subscription" + var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance(); + commonHeader.put("originatorId", "sdnc"); + commonHeader.put("requestId", executor.inFields.get("albumID").toString()); + commonHeader.put("subRequestId", "sub-123456-1000"); + var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance(); + actionIdentifiers.put("actionName", actionName); + actionIdentifiers.put("blueprintName", blueprintName); + actionIdentifiers.put("blueprintVersion", blueprintVersion); + actionIdentifiers.put("mode", "sync"); + executor.outFields.put("commonHeader", commonHeader); + executor.outFields.put("actionIdentifiers", actionIdentifiers); + executor.outFields.put("payload", payload); + returnValue = executor.isTrue; + true; + - key: + name: DeleteSubscriptionPayloadTask + version: 0.0.1 + value: + key: + name: DeleteSubscriptionPayloadTask + version: 0.0.1 + inputEvent: + key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: DeleteSubscriptionPayloadEvent + value: + key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) + var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() + var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance(changeType + "_DasH_subscription_DasH_properties_record"); + payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName")) + payloadProperties.put("ipAddress", pmSubscriptionInfo.get("ipAddress")) + if ("create".equals(changeType)) { + payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName")) + payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get("fileBasedGP").toString()) + payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation")) + payloadProperties.put("measurementGroup", pmSubscriptionInfo.get("subscription").get("measurementGroup")) + } + else if ("delete".equals(changeType)) { + payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscriptionName")) + payloadProperties.put("measurementGroupName", pmSubscriptionInfo.get("measurementGroupName")) + } + var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry"); + payloadEntry.put(changeType + "_DasH_subscription_DasH_properties", payloadProperties) + var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance(); + payload.put(changeType + "_DasH_subscription_DasH_request", payloadEntry); + executor.outFields.put("albumID", executor.inFields.get("albumID")) + executor.outFields.put("payload", payload); + returnValue = executor.isTrue; + true; + - key: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + value: + key: + name: DeleteSubscriptionRequestTask + version: 0.0.1 + inputEvent: + key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + optional: false + outputEvents: + entry: + - key: CDSDeleteSubscriptionRequestEvent + value: + key: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSRequestCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + executor.logger.info(executor.subject.id); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString()) + executor.logger.info(pmSubscriptionInfo) + var changeType = pmSubscriptionInfo.get("changeType").toLowerCase() + var blueprintName = pmSubscriptionInfo.get("blueprintName").toLowerCase() + var blueprintVersion = pmSubscriptionInfo.get("blueprintVersion").toLowerCase() + var payload = executor.inFields.get("payload") + var actionName = changeType + "-subscription" + var commonHeader = executor.subject.getOutFieldSchemaHelper("commonHeader").createNewInstance(); + commonHeader.put("originatorId", "sdnc"); + commonHeader.put("requestId", executor.inFields.get("albumID").toString()); + commonHeader.put("subRequestId", "sub-123456-1000"); + var actionIdentifiers = executor.subject.getOutFieldSchemaHelper("actionIdentifiers").createNewInstance(); + actionIdentifiers.put("actionName", actionName); + actionIdentifiers.put("blueprintName", blueprintName); + actionIdentifiers.put("blueprintVersion", blueprintVersion); + actionIdentifiers.put("mode", "sync"); + executor.outFields.put("commonHeader", commonHeader); + executor.outFields.put("actionIdentifiers", actionIdentifiers); + executor.outFields.put("payload", payload); + returnValue = executor.isTrue; + true; + - key: + name: ReceiveSubscriptionTask + version: 0.0.1 + value: + key: + name: ReceiveSubscriptionTask + version: 0.0.1 + inputEvent: + key: + name: pmsh-operational-policy + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: DCAE + target: APEX + parameter: + entry: + - key: blueprintName + value: + key: blueprintName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: blueprintVersion + value: + key: blueprintVersion + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: changeType + value: + key: changeType + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: controlLoopName + value: + key: controlLoopName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: ipAddress + value: + key: ipAddress + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: measurementGroupName + value: + key: measurementGroupName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: true + - key: nfName + value: + key: nfName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: operationalPolicyName + value: + key: operationalPolicyName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: subscription + value: + key: subscription + fieldSchemaKey: + name: SubscriptionType + version: 0.0.1 + optional: true + - key: subscriptionName + value: + key: subscriptionName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: true + outputEvents: + entry: + - key: PMSubscriptionOutputEvent + value: + key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + taskParameters: + entry: [ ] + contextAlbumReference: + - name: PMSubscriptionAlbum + version: 0.0.1 + taskLogic: + key: TaskLogic + logicFlavour: JAVASCRIPT + logic: |- + /* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + var uuidType = java.util.UUID; + executor.logger.info(executor.subject.id); + //albumID will be used to fetch info from our album later + var albumID = uuidType.randomUUID(); + var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").getSchemaHelper().createNewInstance(); + var returnValue = true; + if(executor.inFields.get("operationalPolicyName") != null) { + executor.logger.info("nfName in receive sub event " + executor.inFields.get("nfName")); + var changeType = executor.inFields.get("changeType") + var nfName = executor.inFields.get("nfName") + var ipAddress = executor.inFields.get("ipAddress") + var operationalPolicyName = executor.inFields.get("operationalPolicyName") + var controlLoopName = executor.inFields.get("controlLoopName") + var subscription = executor.inFields.get("subscription") + var blueprintName = executor.inFields.get("blueprintName") + var blueprintVersion = executor.inFields.get("blueprintVersion") + pmSubscriptionInfo.put("nfName", executor.inFields.get("nfName")); + pmSubscriptionInfo.put("ipAddress", executor.inFields.get("ipAddress")); + pmSubscriptionInfo.put("changeType", executor.inFields.get("changeType")) + pmSubscriptionInfo.put("operationalPolicyName", executor.inFields.get("operationalPolicyName")) + pmSubscriptionInfo.put("controlLoopName", executor.inFields.get("controlLoopName")) + pmSubscriptionInfo.put("subscription", subscription) + pmSubscriptionInfo.put("blueprintName", blueprintName) + pmSubscriptionInfo.put("blueprintVersion", blueprintVersion) + if ("delete".equals(changeType.toLowerCase())) { + pmSubscriptionInfo.put("subscriptionName", executor.inFields.get("subscriptionName")) + pmSubscriptionInfo.put("measurementGroupName", executor.inFields.get("measurementGroupName")) + } + executor.getContextAlbum("PMSubscriptionAlbum").put(albumID.toString(), pmSubscriptionInfo); + executor.outFields.put("albumID", albumID) + } else { + executor.message = "Received invalid event" + returnValue = false; + } + returnValue; + events: + key: + name: PMControlPolicy_Events + version: 0.0.1 + eventMap: + entry: + - key: + name: CDSCreateResponseEvent + version: 0.0.1 + value: + key: + name: CDSCreateResponseEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: CDS + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSResponseCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateResponsePayloadType + version: 0.0.1 + optional: false + - key: status + value: + key: status + fieldSchemaKey: + name: CDSResponseStatusType + version: 0.0.1 + optional: false + - key: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + value: + key: + name: CDSCreateSubscriptionRequestEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSRequestCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + optional: false + - key: + name: CDSDeleteResponseEvent + version: 0.0.1 + value: + key: + name: CDSDeleteResponseEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: CDS + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSResponseCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + optional: false + - key: status + value: + key: status + fieldSchemaKey: + name: CDSResponseStatusType + version: 0.0.1 + optional: false + - key: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + value: + key: + name: CDSDeleteSubscriptionRequestEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: actionIdentifiers + value: + key: actionIdentifiers + fieldSchemaKey: + name: CDSActionIdentifiersType + version: 0.0.1 + optional: false + - key: commonHeader + value: + key: commonHeader + fieldSchemaKey: + name: CDSRequestCommonHeaderType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + optional: false + - key: + name: CDSResponseStatusEvent + version: 0.0.1 + value: + key: + name: CDSResponseStatusEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: DCAE + parameter: + entry: + - key: status + value: + key: status + fieldSchemaKey: + name: SubscriptionStatusType + version: 0.0.1 + optional: false + - key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + value: + key: + name: CreateSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + optional: false + - key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + value: + key: + name: DeleteSubscriptionPayloadEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: payload + value: + key: payload + fieldSchemaKey: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + optional: false + - key: + name: MRResponseEvent + version: 0.0.1 + value: + key: + name: MRResponseEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: DCAE + target: APEX + parameter: + entry: + - key: count + value: + key: count + fieldSchemaKey: + name: SimpleIntType + version: 0.0.1 + optional: false + - key: serverTimeMs + value: + key: serverTimeMs + fieldSchemaKey: + name: SimpleIntType + version: 0.0.1 + optional: false + - key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + value: + key: + name: PMSubscriptionOutputEvent + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: APEX + target: APEX + parameter: + entry: + - key: albumID + value: + key: albumID + fieldSchemaKey: + name: UUIDType + version: 0.0.1 + optional: false + - key: + name: pmsh-operational-policy + version: 0.0.1 + value: + key: + name: pmsh-operational-policy + version: 0.0.1 + nameSpace: org.onap.policy.apex.onap.pmcontrol + source: DCAE + target: APEX + parameter: + entry: + - key: blueprintName + value: + key: blueprintName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: blueprintVersion + value: + key: blueprintVersion + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: changeType + value: + key: changeType + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: controlLoopName + value: + key: controlLoopName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: ipAddress + value: + key: ipAddress + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: measurementGroupName + value: + key: measurementGroupName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: true + - key: nfName + value: + key: nfName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: operationalPolicyName + value: + key: operationalPolicyName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: false + - key: subscription + value: + key: subscription + fieldSchemaKey: + name: SubscriptionType + version: 0.0.1 + optional: true + - key: subscriptionName + value: + key: subscriptionName + fieldSchemaKey: + name: SimpleStringType + version: 0.0.1 + optional: true + albums: + key: + name: PMControlPolicy_Albums + version: 0.0.1 + albums: + entry: + - key: + name: PMSubscriptionAlbum + version: 0.0.1 + value: + key: + name: PMSubscriptionAlbum + version: 0.0.1 + scope: policy + isWritable: true + itemSchema: + name: PMSubscriptionType + version: 0.0.1 + schemas: + key: + name: PMControlPolicy_Schemas + version: 0.0.1 + schemas: + entry: + - key: + name: CDSActionIdentifiersType + version: 0.0.1 + value: + key: + name: CDSActionIdentifiersType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type": "record", + "name": "ActionIdentifiers_Type", + "namespace": "org.onap.policy.apex.onap.helloworld", + "fields": [ + { + "name": "actionName", + "type": "string" + }, + { + "name": "blueprintName", + "type": "string" + }, + { + "name": "blueprintVersion", + "type": "string" + }, + { + "name": "mode", + "type": "string" + } + ] + } + - key: + name: CDSCreateResponsePayloadType + version: 0.0.1 + value: + key: + name: CDSCreateResponsePayloadType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "name": "CreateResponsePayloadEntry", + "type": "record", + "namespace": "com.acme.avro", + "fields": [ + { + "name": "create_DasH_subscription_DasH_response", + "type": { + "name": "create_DasH_subscription_DasH_response", + "type": "record", + "fields": [ + { + "name": "odl_DasH_response", + "type": { + "name": "odl_DasH_response", + "type": "record", + "fields": [ + { + "name": "status", + "type": "string" + } + ] + } + } + ] + } + } + ] + } + - key: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + value: + key: + name: CDSCreateSubscriptionPayloadType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type":"map", + "values":{ + "type":"record", + "name":"CDSRequestPayloadEntry", + "fields":[ + { + "name":"create_DasH_subscription_DasH_properties", + "type":{ + "name":"create_DasH_subscription_DasH_properties_record", + "type":"record", + "fields":[ + { + "name":"nfName", + "type":"string" + }, + { + "name":"ipAddress", + "type":"string" + }, + { + "name":"subscriptionName", + "type":"string" + }, + { + "name":"fileBasedGP", + "type":"string" + }, + { + "name":"fileLocation", + "type":"string" + }, + { + "name":"measurementGroup", + "type":{ + "name":"Measurement_Group_Type", + "type":"record", + "fields":[ + { + "name":"measurementGroupName", + "type":"string" + }, + { + "name":"measurementTypes", + "type":{ + "type":"array", + "items":{ + "name":"Measurement_Types_Type", + "type":"record", + "fields":[ + { + "name":"measurementType", + "type":"string" + } + ] + } + } + }, + { + "name":"managedObjectDNsBasic", + "type":{ + "type":"array", + "items":{ + "name":"Managed_Object_Dns_Basic_Type", + "type":"record", + "fields":[ + { + "name":"DN", + "type":"string" + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + } + - key: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + value: + key: + name: CDSDeleteResponsePayloadType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "name": "DeleteResponsePayloadEntry", + "type": "record", + "namespace": "com.acme.avro", + "fields": [ + { + "name": "delete_DasH_subscription_DasH_response", + "type": { + "name": "delete_DasH_subscription_DasH_response", + "type": "record", + "fields": [ + { + "name": "odl_DasH_response", + "type": { + "name": "odl_DasH_response", + "type": "record", + "fields": [ + { + "name": "status", + "type": "string" + } + ] + } + } + ] + } + } + ] + } + - key: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + value: + key: + name: CDSDeleteSubscriptionPayloadType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type":"map", + "values":{ + "type":"record", + "name":"CDSRequestPayloadEntry", + "fields":[ + { + "name":"delete_DasH_subscription_DasH_properties", + "type":{ + "name":"delete_DasH_subscription_DasH_properties_record", + "type":"record", + "fields":[ + { + "name":"nfName", + "type":"string" + }, + { + "name":"ipAddress", + "type":"string" + }, + { + "name":"subscriptionName", + "type":"string" + }, + { + "name":"measurementGroupName", + "type":"string" + } + ] + } + } + ] + } + } + - key: + name: CDSRequestCommonHeaderType + version: 0.0.1 + value: + key: + name: CDSRequestCommonHeaderType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type": "record", + "name": "RequestCommonHeader_Type", + "namespace": "org.onap.policy.apex.onap.helloworld", + "fields": [ + { + "name": "originatorId", + "type": "string" + }, + { + "name": "requestId", + "type": "string" + }, + { + "name": "subRequestId", + "type": "string" + } + ] + } + - key: + name: CDSResponseCommonHeaderType + version: 0.0.1 + value: + key: + name: CDSResponseCommonHeaderType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type": "record", + "name": "ResponseCommonHeader_Type", + "namespace": "org.onap.policy.apex.onap.helloworld", + "fields": [ + { + "name": "originatorId", + "type": "string" + }, + { + "name": "requestId", + "type": "string" + }, + { + "name": "subRequestId", + "type": "string" + }, + { + "name": "timestamp", + "type": "string" + }, + { + "name": "flags", + "type": ["null", "string"] + } + ] + } + - key: + name: CDSResponseStatusType + version: 0.0.1 + value: + key: + name: CDSResponseStatusType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type": "record", + "name": "ResponseStatus_Type", + "namespace": "org.onap.policy.apex.onap.helloworld", + "fields": [ + { + "name": "code", + "type": "int" + }, + { + "name": "eventType", + "type": "string" + }, + { + "name": "timestamp", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + } + - key: + name: PMSubscriptionType + version: 0.0.1 + value: + key: + name: PMSubscriptionType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "name": "PMSubscription", + "type": "record", + "namespace": "org.onap.policy.apex.onap.pmcontrol", + "fields": [ + { + "name": "nfName", + "type": "string" + }, + { + "name": "ipAddress", + "type": "string" + }, + { + "name": "changeType", + "type": "string" + }, + { + "name": "controlLoopName", + "type": "string" + }, + { + "name": "operationalPolicyName", + "type": "string" + }, + { + "name": "blueprintName", + "type": "string" + }, + { + "name": "blueprintVersion", + "type": "string" + }, + { + "name": "subscriptionName", + "type": "string" + }, + { + "name": "measurementGroupName", + "type": "string" + }, + { + "name": "subscription", + "type": { + "name": "subscription", + "type": "record", + "fields": [ + { + "name": "subscriptionName", + "type": "string" + }, + { + "name": "fileBasedGP", + "type": "int" + }, + { + "name": "fileLocation", + "type": "string" + }, + { + "name": "measurementGroup", + "type": { + "name": "Measurement_Group_Type", + "type": "record", + "fields": [ + { + "name": "measurementGroupName", + "type": "string" + }, + { + "name": "measurementTypes", + "type": { + "type": "array", + "items": { + "name": "Measurement_Types_Type", + "type": "record", + "fields": [ + { + "name": "measurementType", + "type": "string" + } + ] + } + } + }, + { + "name": "managedObjectDNsBasic", + "type": { + "type": "array", + "items": { + "name": "Managed_Object_Dns_Basic_Type", + "type": "record", + "fields": [ + { + "name": "DN", + "type": "string" + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + - key: + name: SimpleIntType + version: 0.0.1 + value: + key: + name: SimpleIntType + version: 0.0.1 + schemaFlavour: Java + schemaDefinition: java.lang.Integer + - key: + name: SimpleStringType + version: 0.0.1 + value: + key: + name: SimpleStringType + version: 0.0.1 + schemaFlavour: Java + schemaDefinition: java.lang.String + - key: + name: SubscriptionStatusType + version: 0.0.1 + value: + key: + name: SubscriptionStatusType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "type": "record", + "name": "ActivateSubscriptionStatus_Type", + "namespace": "org.onap.policy.apex.onap.helloworld", + "fields": [ + { + "name": "subscriptionName", + "type": "string" + }, + { + "name": "measurementGroupName", + "type": "string" + }, + { + "name": "nfName", + "type": "string" + }, + { + "name": "changeType", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + } + - key: + name: SubscriptionType + version: 0.0.1 + value: + key: + name: SubscriptionType + version: 0.0.1 + schemaFlavour: Avro + schemaDefinition: |- + { + "name": "subscription", + "type": "record", + "default": "null", + "fields": [ + { + "name": "subscriptionName", + "type": "string" + }, + { + "name": "fileBasedGP", + "type": "int" + }, + { + "name": "fileLocation", + "type": "string" + }, + { + "name": "measurementGroup", + "type": { + "name": "Measurement_Group_Type", + "type": "record", + "fields": [ + { + "name": "measurementGroupName", + "type": "string" + }, + { + "name": "measurementTypes", + "type": { + "type": "array", + "items": { + "name": "Measurement_Types_Type", + "type": "record", + "fields": [ + { + "name": "measurementType", + "type": "string" + } + ] + } + } + }, + { + "name": "managedObjectDNsBasic", + "type": { + "type": "array", + "items": { + "name": "Managed_Object_Dns_Basic_Type", + "type": "record", + "fields": [ + { + "name": "DN", + "type": "string" + } + ] + } + } + } + ] + } + } + ] + } + - key: + name: UUIDType + version: 0.0.1 + value: + key: + name: UUIDType + version: 0.0.1 + schemaFlavour: Java + schemaDefinition: java.util.UUID + eventInputParameters: + DCAEConsumer: + carrierTechnologyParameters: + carrierTechnology: RESTCLIENT + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters + parameters: + consumerPollTime: '50' + url: https://message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT/cg1/sg1 + eventProtocolParameters: + eventProtocol: JSON + parameters: + nameAlias: operationalPolicyName + eventName: pmsh-operational-policy + eventNameFilter: pmsh-operational-policy + CDSRequestConsumer: + carrierTechnologyParameters: + carrierTechnology: RESTREQUESTOR + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters + parameters: + url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process + httpMethod: POST + restRequestTimeout: 2000 + httpHeaders: + - - Authorization + - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== + eventProtocolParameters: + eventProtocol: JSON + eventName: CDSCreateResponseEvent + eventNameFilter: CDSCreateResponseEvent + requestorMode: true + requestorPeer: CDSRequestProducer + requestorTimeout: 500 + CDSDeleteRequestConsumer: + carrierTechnologyParameters: + carrierTechnology: RESTREQUESTOR + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters + parameters: + url: http://cds-blueprints-processor-http:8080/api/v1/execution-service/process + httpMethod: POST + restRequestTimeout: 2000 + httpHeaders: + - - Authorization + - Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== + eventProtocolParameters: + eventProtocol: JSON + eventName: CDSDeleteResponseEvent + eventNameFilter: CDSDeleteResponseEvent + requestorMode: true + requestorPeer: CDSDeleteRequestProducer + requestorTimeout: 500 + eventOutputParameters: + logOutputter: + carrierTechnologyParameters: + carrierTechnology: FILE + parameters: + standardIo: true + eventProtocolParameters: + eventProtocol: JSON + StdOutOutputter: + carrierTechnologyParameters: + carrierTechnology: FILE + parameters: + standardIo: true + eventProtocolParameters: + eventProtocol: JSON + CDSRequestProducer: + carrierTechnologyParameters: + carrierTechnology: RESTREQUESTOR + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters + eventProtocolParameters: + eventProtocol: JSON + eventNameFilter: CDSCreateSubscriptionRequestEvent + requestorMode: true + requestorPeer: CDSRequestConsumer + requestorTimeout: 500 + CDSDeleteRequestProducer: + carrierTechnologyParameters: + carrierTechnology: RESTREQUESTOR + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters + eventProtocolParameters: + eventProtocol: JSON + eventNameFilter: CDSDeleteSubscriptionRequestEvent + requestorMode: true + requestorPeer: CDSDeleteRequestConsumer + requestorTimeout: 500 + CDSReplyProducer: + carrierTechnologyParameters: + carrierTechnology: RESTCLIENT + parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters + parameters: + url: https://message-router:3905/events/unauthenticated.PMSH_CL_INPUT + httpMethod: POST + restRequestTimeout: 2000 + eventProtocolParameters: + eventProtocol: JSON + eventNameFilter: CDSResponseStatusEvent diff --git a/csit/resources/tests/data/http-usecase.yaml b/csit/resources/tests/data/http-usecase.yaml new file mode 100644 index 00000000..cea74ab4 --- /dev/null +++ b/csit/resources/tests/data/http-usecase.yaml @@ -0,0 +1,312 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +tosca_definitions_version: tosca_simple_yaml_1_3 +data_types: + onap.datatypes.ToscaConceptIdentifier: + derived_from: tosca.datatypes.Root + properties: + name: + type: string + required: true + version: + type: string + required: true + + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + restRequestId: + type: onap.datatypes.ToscaConceptIdentifier + required: true + description: The name and version of a REST request to be sent to a REST endpoint + httpMethod: + type: string + required: true + constraints: + - valid_values: + - POST + - PUT + - GET + - DELETE + description: The REST method to use + path: + type: string + required: true + description: The path of the REST request relative to the base URL + body: + type: string + required: false + description: The body of the REST request for PUT and POST requests + expectedResponse: + type: integer + required: true + constraints: [] + description: THe expected HTTP status code for the REST request + org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity: + version: 1.0.0 + derived_from: tosca.datatypes.Root + properties: + configurationEntityId: + type: onap.datatypes.ToscaConceptIdentifier + required: true + description: The name and version of a Configuration Entity to be handled + by the HTTP Automation Composition Element + restSequence: + type: list + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest + type_version: 1.0.0 + description: A sequence of REST commands to send to the REST endpoint + +node_types: + org.onap.policy.clamp.acm.Participant: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + org.onap.policy.clamp.acm.AutomationCompositionElement: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: Specifies the organization that provides the automation composition element + participant_id: + type: onap.datatypes.ToscaConceptIdentifier + required: true + metadata: + common: true + participantType: + type: onap.datatypes.ToscaConceptIdentifier + required: true + metadata: + common: true + description: The identity of the participant type that hosts this type of Automation Composition Element + startPhase: + type: integer + required: false + constraints: + - greater_or_equal: 0 + metadata: + common: true + description: A value indicating the start phase in which this automation composition element will be started, the + first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped + in reverse start phase order. Automation Composition Elements with the same start phase are started and + stopped simultaneously + uninitializedToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from uninitialized to passive + passiveToRunningTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from passive to running + runningToPassiveTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from running to passive + passiveToUninitializedTimeout: + type: integer + required: false + constraints: + - greater_or_equal: 0 + default: 60 + metadata: + common: true + description: The maximum time in seconds to wait for a state chage from passive to uninitialized + org.onap.policy.clamp.acm.AutomationComposition: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + required: false + metadata: + common: true + description: Specifies the organization that provides the automation composition element + elements: + type: list + required: true + metadata: + common: true + entry_schema: + type: onap.datatypes.ToscaConceptIdentifier + description: Specifies a list of automation composition element definitions that make up this automation composition definition + org.onap.policy.clamp.acm.HttpAutomationCompositionElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement + properties: + baseUrl: + type: string + required: true + description: The base URL to be prepended to each path, identifies the host for the REST endpoints. + httpHeaders: + type: map + required: false + entry_schema: + type: string + description: HTTP headers to send on REST requests + configurationEntities: + type: map + required: true + entry_schema: + type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity + type_version: 1.0.0 + description: The connfiguration entities the Automation Composition Element is managing and their associated REST requests + +topology_template: + node_templates: + org.onap.policy.clamp.acm.HttpParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.acm.Participant + type_version: 1.0.1 + description: Participant for Http requests + properties: + provider: ONAP + onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement: + # Http config for AC Element Starter. + version: 1.2.3 + type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the http requests of AC Element Starter microservice + properties: + provider: ONAP + participant_id: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + startPhase: 0 + baseUrl: http://acelement-starter:8084 + httpHeaders: + Content-Type: application/json + Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' + configurationEntities: + - configurationEntityId: + name: onap.policy.clamp.ac.starter + version: 1.0.0 + restSequence: + - restRequestId: + name: request1 + version: 1.0.1 + httpMethod: POST + path: /activate + body: '{ "receiverId": { "name": "onap.policy.clamp.ac.bridge", "version": "1.0.0" }, "timerMs": 4000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' + expectedResponse: 201 + onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement: + # Http config for AC Element Bridge. + version: 1.2.3 + type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the http requests of AC Element Bridge microservice + properties: + provider: ONAP + participant_id: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + startPhase: 0 + baseUrl: http://acelement-bridge:8084 + httpHeaders: + Content-Type: application/json + Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' + configurationEntities: + - configurationEntityId: + name: onap.policy.clamp.ac.bridge + version: 1.0.0 + restSequence: + - restRequestId: + name: request2 + version: 1.0.1 + httpMethod: POST + path: /activate + body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "BRIDGE", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' + expectedResponse: 201 + onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement: + # Http config for AC Element Sink. + version: 1.2.3 + type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + type_version: 1.0.1 + description: Automation composition element for the http requests of AC Element Sink microservice + properties: + provider: ONAP + participant_id: + name: HttpParticipant0 + version: 1.0.0 + participantType: + name: org.onap.policy.clamp.acm.HttpParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + startPhase: 0 + baseUrl: http://acelement-sink:8084 + httpHeaders: + Content-Type: application/json + Authorization: 'Basic cnVudGltZVVzZXI6emIhWHp0RzM0' + configurationEntities: + - configurationEntityId: + name: onap.policy.clamp.ac.sink + version: 1.0.0 + restSequence: + - restRequestId: + name: request3 + version: 1.0.1 + httpMethod: POST + path: /activate + body: '{ "receiverId": { "name": "onap.policy.clamp.ac.sink", "version": "1.0.0" }, "timerMs": 4000, "elementType": "SINK", "topicParameterGroup": { "server": "message-router", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "POLICY_UPDATE_MSG", "fetchTimeout": 15000, "topicCommInfrastructure": "dmaap" } }' + expectedResponse: 201 + + onap.policy.clamp.ac.element.AutomationCompositionDefinition: + version: 1.2.3 + type: org.onap.policy.clamp.acm.AutomationComposition + type_version: 1.0.1 + description: Automation composition for Demp + properties: + provider: ONAP + elements: + - name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement + version: 1.2.3 + - name: onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement + version: 1.2.3 + - name: onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement + version: 1.2.3 diff --git a/csit/resources/tests/data/make_topic.sh b/csit/resources/tests/data/make_topic.sh new file mode 100755 index 00000000..c8af564e --- /dev/null +++ b/csit/resources/tests/data/make_topic.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# + +# +# 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 + +topic="${1}" + +curl -s -k "http://${DMAAP_IP}/events/${topic}/script/1?limit=1&timeout=0" +echo diff --git a/csit/resources/tests/data/onap.pnf.metadataSet.Test.json b/csit/resources/tests/data/onap.pnf.metadataSet.Test.json new file mode 100644 index 00000000..b59efc0a --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policies.apex.pnf.Test.json b/csit/resources/tests/data/onap.policies.apex.pnf.Test.json new file mode 100644 index 00000000..05522936 --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json b/csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json new file mode 100644 index 00000000..20338fff --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policies.apex.vnf.Test.json b/csit/resources/tests/data/onap.policies.apex.vnf.Test.json new file mode 100644 index 00000000..7886f84b --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json b/csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json new file mode 100644 index 00000000..d90ae08d --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.guard.decision.request.json b/csit/resources/tests/data/onap.policy.guard.decision.request.json new file mode 100644 index 00000000..ee90feaa --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.monitoring.decision.request.json b/csit/resources/tests/data/onap.policy.monitoring.decision.request.json new file mode 100644 index 00000000..053fa36d --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json new file mode 100644 index 00000000..a2e2ddc9 --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json new file mode 100644 index 00000000..d86749ef --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json b/csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json new file mode 100644 index 00000000..1767c508 --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.naming.decision.request.json b/csit/resources/tests/data/onap.policy.naming.decision.request.json new file mode 100644 index 00000000..3833a241 --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onap.policy.optimization.decision.request.json b/csit/resources/tests/data/onap.policy.optimization.decision.request.json new file mode 100644 index 00000000..d997099c --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/onset.sh b/csit/resources/tests/data/onset.sh new file mode 100755 index 00000000..42b0cdec --- /dev/null +++ b/csit/resources/tests/data/onset.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END===================================================== +# + +# +# Injects an ONSET event on the DCAE_CL_OUTPUT topic. +# + +if [ $# -ne 1 ] +then + echo "arg(s): json-message-file-name" >&2 + exit 1 +fi + +curl -k -H "Content-type: application/json" --data-binary @$1 \ + http://${DMAAP_IP}/events/unauthenticated.DCAE_CL_OUTPUT +echo diff --git a/csit/resources/tests/data/policy_deploy.json b/csit/resources/tests/data/policy_deploy.json new file mode 100644 index 00000000..e13f06ad --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json b/csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json new file mode 100644 index 00000000..7ace047b --- /dev/null +++ b/csit/resources/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/csit/resources/tests/data/vcpeOnset.json b/csit/resources/tests/data/vcpeOnset.json new file mode 100644 index 00000000..7dd9d5a0 --- /dev/null +++ b/csit/resources/tests/data/vcpeOnset.json @@ -0,0 +1,16 @@ +{ + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "closedLoopEventStatus": "ONSET", + "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "target_type": "VNF", + "target": "generic-vnf.vnf-id", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "from": "DCAE", + "version": "1.0.2" +} diff --git a/csit/resources/tests/data/vdnsOnset.json b/csit/resources/tests/data/vdnsOnset.json new file mode 100644 index 00000000..13f69095 --- /dev/null +++ b/csit/resources/tests/data/vdnsOnset.json @@ -0,0 +1,16 @@ +{ + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", + "closedLoopEventStatus": "ONSET", + "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "target_type": "VNF", + "target": "vserver.vserver-name", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "vserver.vserver-name": "OzVServer" + }, + "from": "DCAE", + "version": "1.0.2" +} diff --git a/csit/resources/tests/data/vfwOnset.json b/csit/resources/tests/data/vfwOnset.json new file mode 100644 index 00000000..7782867a --- /dev/null +++ b/csit/resources/tests/data/vfwOnset.json @@ -0,0 +1,17 @@ +{ + "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", + "closedLoopEventStatus": "ONSET", + "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "target_type": "VNF", + "target": "generic-vnf.vnf-name", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-name": "fw0002vm002fw002", + "vserver.vserver-name": "OzVServer" + }, + "from": "DCAE", + "version": "1.0.2" +} diff --git a/csit/resources/tests/data/wait_topic.sh b/csit/resources/tests/data/wait_topic.sh new file mode 100755 index 00000000..a632ee83 --- /dev/null +++ b/csit/resources/tests/data/wait_topic.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# ============================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============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://${DMAAP_IP}/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/csit/resources/tests/distribution-test.robot b/csit/resources/tests/distribution-test.robot new file mode 100644 index 00000000..b79b362b --- /dev/null +++ b/csit/resources/tests/distribution-test.robot @@ -0,0 +1,58 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ${CURDIR}/common-library.robot + +*** Test Cases *** + +Healthcheck + [Documentation] Verify policy distribution health check + ${hcauth}= HealthCheckAuth + ${resp}= PerformGetRequest ${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 ${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 ${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 ${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 ${CURDIR}/data/csar/csar_temp.csar ${CURDIR}/data/csar/temp.csar + Move File ${CURDIR}/data/csar/temp.csar ${TEMP_FOLDER}/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_EVENTS_IP} 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 ${CURDIR}/data/temp/sample_csar_with_apex_policy.csar + Remove Files ${CURDIR}/data/csar/csar_temp.csar diff --git a/csit/resources/tests/drools-applications-test.robot b/csit/resources/tests/drools-applications-test.robot new file mode 100644 index 00000000..9c25d622 --- /dev/null +++ b/csit/resources/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_2} 200 + Should Be Equal As Strings ${resp.json()['alive']} True + +Metrics + [Documentation] Verify drools-apps is exporting metrics + ${resp}= PeformGetRequest /metrics ${DROOLS_IP_2} 200 + Should Contain ${resp.text} jvm_threads_current + +Healthcheck + [Documentation] Runs Policy PDP-D Health check + ${resp}= PeformGetRequest /healthcheck ${DROOLS_IP} 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 ${CURDIR}/data/make_topic.sh POLICY-PDP-PAP + Should Be Equal As Integers ${result.rc} 0 + ${result}= Run Process ${CURDIR}/data/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 ${POLICY_API_IP} vCPE.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 + +CreateVcpeDroolsPolicy + [Documentation] Create VCPE Policy for Drools + PerformPostRequest /policy/api/v1/policies null ${POLICY_API_IP} vCPE.policy.operational.input.tosca.yaml ${DATA} yaml 200 + +CreateVdnsXacmlPolicy + [Documentation] Create VDNS Policy for Xacml + PerformPostRequest /policy/api/v1/policies null ${POLICY_API_IP} vDNS.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 + +CreateVdnsDroolsPolicy + [Documentation] Create VDNS Policy for Drools + PerformPostRequest /policy/api/v1/policies null ${POLICY_API_IP} vDNS.policy.operational.input.tosca.json ${DATA} json 200 + +CreateVfwXacmlPolicy + [Documentation] Create VFW Policy for Xacml + PerformPostRequest /policy/api/v1/policies null ${POLICY_API_IP} vFirewall.policy.monitoring.input.tosca.yaml ${DATA} yaml 200 + +CreateVfwDroolsPolicy + [Documentation] Create VFW Policy for Drools + PerformPostRequest /policy/api/v1/policies null ${POLICY_API_IP} vFirewall.policy.operational.input.tosca.json ${DATA} json 200 + +DeployXacmlPolicies + [Documentation] Deploys the Policies to Xacml + PerformPostRequest /policy/pap/v1/pdps/deployments/batch null ${POLICY_PAP_IP} deploy.xacml.policies.json ${CURDIR}/data json 202 + ${result}= Run Process ${CURDIR}/data/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 ${POLICY_PAP_IP} deploy.drools.policies.json ${CURDIR}/data json 202 + ${result}= Run Process ${CURDIR}/data/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 ${CURDIR}/data/onset.sh ${CURDIR}/data/vcpeOnset.json + Should Be Equal As Integers ${result.rc} 0 + ${result}= Run Process ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/onset.sh ${CURDIR}/data/vdnsOnset.json + Should Be Equal As Integers ${result.rc} 0 + ${result}= Run Process ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/onset.sh ${CURDIR}/data/vfwOnset.json + Should Be Equal As Integers ${result.rc} 0 + ${result}= Run Process ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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 ${CURDIR}/data/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_2} 200 + Should Be Equal As Strings ${resp.json()['usecases']} 1 + +PeformGetRequest + [Arguments] ${url} ${domain} ${expectedstatus} + ${auth}= Create List demo@people.osaaf.org demo123456! + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus} + Log Received response from policy ${resp.text} + [return] ${resp} + +PerformPostRequest + [Arguments] ${url} ${params} ${domain} ${jsonfile} ${filepath} ${contenttype} ${expectedstatus} + ${auth}= Create List policyadmin zb!XztG34 + ${postjson}= Get file ${filepath}/${jsonfile} + Log Creating session http://${domain} + ${session}= Create Session policy http://${domain} 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/csit/resources/tests/drools-pdp-test.robot b/csit/resources/tests/drools-pdp-test.robot new file mode 100644 index 00000000..a4db51e8 --- /dev/null +++ b/csit/resources/tests/drools-pdp-test.robot @@ -0,0 +1,26 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** +Alive + [Documentation] Runs Policy PDP Alive Check + ${auth}= Create List demo@people.osaaf.org demo123456! + Log Creating session http://${POLICY_DROOLS_IP} + ${session}= Create Session policy http://${POLICY_DROOLS_IP} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= GET On Session policy /policy/pdp/engine headers=${headers} expected_status=200 + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.json()['alive']} True + +Metrics + [Documentation] Verify drools-pdp is exporting metrics + ${auth}= Create List demo@people.osaaf.org demo123456! + Log Creating session http://${POLICY_DROOLS_IP} + ${session}= Create Session policy http://${POLICY_DROOLS_IP} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= GET On Session policy /metrics headers=${headers} expected_status=200 + Log Received response from policy ${resp.text} + Should Contain ${resp.text} jvm_threads_current diff --git a/csit/resources/tests/pap-slas.robot b/csit/resources/tests/pap-slas.robot new file mode 100644 index 00000000..1fa19627 --- /dev/null +++ b/csit/resources/tests/pap-slas.robot @@ -0,0 +1,60 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ${CURDIR}/common-library.robot + +*** Keywords *** +ValidateResponseTimeForPap + [Arguments] ${uri} ${method} + [Documentation] Check if uri response is under the 500ms required time for pap metrics + ValidateResponseTime pap-metrics ${uri} ${method} 500 + +*** Test Cases *** +WaitForPrometheusServer + [Documentation] Wait for Prometheus server to gather all metrics + Sleep 1 minute + +ValidateResponseTimeForHealthcheck + [Documentation] Validate component healthcheck response time + ValidateResponseTimeForPap /healthcheck GET + +ValidateResponseTimeForSystemHealthcheck + [Documentation] Validate if system healthcheck response time is under 1000ms + ValidateResponseTime pap-metrics /components/healthcheck GET 10000 + +ValidateResponseTimeForStatistics + [Documentation] Validate statistics response time + ValidateResponseTimeForPap /statistics GET + +# TODO: includes notification, so always over 500ms +# ValidateResponseTimeCreateGroup +# [Documentation] Validate create group response time +# ValidateResponseTimeForPap /pdps/groups/batch POST + +ValidateResponseTimeQueryPolicyAudit + [Documentation] Validate query audits response time + ValidateResponseTimeForPap /policies/audit GET + +ValidateResponseTimeUpdateGroup + [Documentation] Validate pdps/group response time + ValidateResponseTimeForPap /pdps/groups/{name} PUT + +ValidatePolicyDeploymentTime + [Documentation] Check if deployment of policy is under 2000ms + ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="deploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="deploy",status="SUCCESS"} + ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} + ${actualTime}= Set Variable ${rawNumber * ${1000}} + Should Be True ${actualTime} <= ${2000} + +ValidateResponseTimeDeletePolicy + [Documentation] Check if undeployment of policy is under 2000ms + ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="undeploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="undeploy",status="SUCCESS"} + ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} + ${actualTime}= Set Variable ${rawNumber * ${1000}} + Should Be True ${actualTime} <= ${2000} + +ValidateResponseTimeDeleteGroup + [Documentation] Validate delete group response time + ValidateResponseTimeForPap /pdps/groups/{name} DELETE diff --git a/csit/resources/tests/pap-test.robot b/csit/resources/tests/pap-test.robot new file mode 100644 index 00000000..ccc16a4d --- /dev/null +++ b/csit/resources/tests/pap-test.robot @@ -0,0 +1,153 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ${CURDIR}/common-library.robot + +*** Keywords *** +GetReq + [Arguments] ${url} + ${auth}= PolicyAdminAuth + ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} 200 null ${auth} + [return] ${resp} + +ValidateResponseTimeForPap + [Arguments] ${uri} ${method} + [Documentation] Check if uri response is under the required time for pap metrics + ValidateResponseTime pap-metrics ${uri} ${method} 500 + +ValidateDeploymentTime + [Documentation] Check if deployment of policy is under 2000ms + ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="deploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="deploy",status="SUCCESS"} + ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]} + ${actualTime}= Set Variable ${rawNumber * ${1000}} + Should Be True ${actualTime} <= ${2000} + +*** 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="/healthcheck",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/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 20 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 + +# ValidateSlaForPap +# [Documentation] Run checks against Prometheus server to check response time +# Sleep 30s +# ValidateDeploymentTime +# ValidateResponseTime pap-metrics /components/healthcheck GET 10000 +# ValidateResponseTimeForPap /healthcheck GET +# ValidateResponseTimeForPap /statistics GET +# ValidateResponseTimeForPap /policies/audit GET +# ValidateResponseTimeForPap /pdps/groups/{name} PUT +# ValidateResponseTimeForPap /pdps/policies/{name} DELETE +# ValidateResponseTimeForPap /pdps/groups/{name} DELETE +# ValidateResponseTimeForPap /pdps/groups/batch POST diff --git a/csit/resources/tests/policy-clamp-test.robot b/csit/resources/tests/policy-clamp-test.robot new file mode 100644 index 00000000..5fa48af2 --- /dev/null +++ b/csit/resources/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} + ${session}= Create Session ACM http://${POLICY_RUNTIME_ACM_IP} 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} +# ${postyaml}= Get file ${CURDIR}/data/functional-pmsh-usecase.yaml +# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} 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} +# ${postjson}= Get file ${CURDIR}/data/AutomationComposition.json +# ${updatedpostjson}= Replace String ${postjson} COMPOSITIONIDPLACEHOLDER ${compositionId} +# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} 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} +# ${postjson}= Get file ${CURDIR}/data/PassiveCommand.json +# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} 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} +# ${session}= Create Session policy http://${POLICY_API_IP} auth=${auth} +# ${headers}= Create Dictionary Accept=application/json Content-Type=application/json +# ${resp}= GET On Session policy /policy/api/v1/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} 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} +# ${postjson}= Get file ${CURDIR}/data/RunningCommand.json +# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} 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} +# ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} 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/csit/resources/tests/xacml-pdp-test.robot b/csit/resources/tests/xacml-pdp-test.robot new file mode 100644 index 00000000..1ba01531 --- /dev/null +++ b/csit/resources/tests/xacml-pdp-test.robot @@ -0,0 +1,150 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library Process +Library json +Resource ${CURDIR}/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 ${CURDIR}/data/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 ${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 + +CreateOptimizationPolicy + [Documentation] Create an Optimization policy + ${postjson}= Get file ${DATA}/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 ${CURDIR}/data/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/csit/run-project-csit.sh b/csit/run-project-csit.sh index 0f15c75b..47ad3b15 100755 --- a/csit/run-project-csit.sh +++ b/csit/run-project-csit.sh @@ -30,22 +30,15 @@ function on_exit(){ # Record list of active docker containers docker ps --format "table {{ .Names }}\t{{ .Status }}" - # Show the logs from all containers - docker-compose -f "${WORKSPACE}/csit/docker-compose-all.yml" logs > docker_compose.log - # show memory consumption after all docker instances initialized docker_stats + source_safely ${WORKSPACE}/compose/stop-compose.sh + if [[ ${WORKDIR} ]]; then rsync -av "${WORKDIR}/" "${WORKSPACE}/csit/archives/${PROJECT}" fi - fi - # Run teardown script plan if it exists - cd "${TESTPLANDIR}/plans/" - TEARDOWN="${TESTPLANDIR}/plans/teardown.sh" - if [ -f "${TEARDOWN}" ]; then - echo "Running teardown script ${TEARDOWN}" - source_safely "${TEARDOWN}" + rm -rf ${WORKSPACE}/models fi # TODO: do something with the output exit $rc @@ -126,18 +119,6 @@ function source_safely() { # main # -if $(docker images | grep -q "onap\/policy-api") -then - export CONTAINER_LOCATION=$( - docker images | - grep onap/policy-api | - head -1 | - sed 's/onap\/policy-api.*$//' - ) -else - export CONTAINER_LOCATION="nexus3.onap.org:10001/" -fi - # set and save options for quick failure harden_set && save_set @@ -152,33 +133,31 @@ then fi if [ -z "${WORKSPACE}" ]; then - export WORKSPACE=$(git rev-parse --show-toplevel) + WORKSPACE=$(git rev-parse --show-toplevel) + export WORKSPACE fi # Add csit scripts to PATH export PATH="${PATH}:${WORKSPACE}/csit:${WORKSPACE}/scripts:${ROBOT_VENV}/bin" -export SCRIPTS="${WORKSPACE}/csit" +export SCRIPTS="${WORKSPACE}/csit/resources/scripts" export ROBOT_VARIABLES= -# get the plan from git clone -source "${SCRIPTS}"/get-branch.sh - export PROJECT="${1}" -cd ${WORKSPACE} - -export TESTPLANDIR="${WORKSPACE}/csit/${PROJECT}" -export TESTOPTIONS="${2}" +cd "${WORKSPACE}" rm -rf "${WORKSPACE}/csit/archives/${PROJECT}" mkdir -p "${WORKSPACE}/csit/archives/${PROJECT}" -# Run installation of prerequired libraries +# Run installation of pre-required libraries source_safely "${SCRIPTS}/prepare-robot-env.sh" # Activate the virtualenv containing all the required libraries installed by prepare-robot-env.sh source_safely "${ROBOT_VENV}/bin/activate" +export TEST_PLAN_DIR="${WORKSPACE}/csit/resources/tests" +export TEST_OPTIONS="${2}" + WORKDIR=$(mktemp -d) cd "${WORKDIR}" @@ -186,8 +165,7 @@ cd "${WORKDIR}" docker login -u docker -p docker nexus3.onap.org:10001 # Run setup script plan if it exists -cd "${TESTPLANDIR}/plans/" -SETUP="${TESTPLANDIR}/plans/setup.sh" +SETUP="${SCRIPTS}/setup-${PROJECT}.sh" if [ -f "${SETUP}" ]; then echo "Running setup script ${SETUP}" source_safely "${SETUP}" @@ -199,14 +177,14 @@ docker_stats | tee "${WORKSPACE}/csit/archives/${PROJECT}/_sysinfo-1-after-setup # Run test plan cd "${WORKDIR}" echo "Reading the testplan:" -cat "${TESTPLANDIR}/plans/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TESTPLANDIR}/tests/|" > testplan.txt +echo "${SUITES}" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TEST_PLAN_DIR}/|" > testplan.txt cat testplan.txt SUITES=$( xargs < testplan.txt ) echo ROBOT_VARIABLES="${ROBOT_VARIABLES}" echo "Starting Robot test suites ${SUITES} ..." relax_set -python3 -m robot.run -N ${PROJECT} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES} +python3 -m robot.run -N "${PROJECT}" -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES} RESULT=$? load_set echo "RESULT: ${RESULT}" diff --git a/csit/start-all.sh b/csit/start-all.sh deleted file mode 100755 index 15210aab..00000000 --- a/csit/start-all.sh +++ /dev/null @@ -1,25 +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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== -SCRIPTS=$(git rev-parse --show-toplevel) -export SCRIPTS="${SCRIPTS}"/csit - -source "${SCRIPTS}"/get-versions.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-gui - -echo "Clamp GUI: https://localhost:2445/clamp" diff --git a/csit/start-containter.sh b/csit/start-containter.sh deleted file mode 100755 index 3b1b167d..00000000 --- a/csit/start-containter.sh +++ /dev/null @@ -1,47 +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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - - -if [ "$#" -ne 1 ] -then - echo "Usage: $0 " - exit 1 -fi - -export PROJECT=$1 - -if $(docker images | grep -q "onap\/policy-api") -then - export CONTAINER_LOCATION=$( - docker images | - grep onap/policy-api | - head -1 | - sed 's/onap\/policy-api.*$//' - ) -else - export CONTAINER_LOCATION="nexus3.onap.org:10001/" -fi - -SCRIPTS=$(git rev-parse --show-toplevel) -export SCRIPTS="${SCRIPTS}"/csit - -source "${SCRIPTS}"/get-versions.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up $* - -echo "Clamp GUI: https://localhost:2445/clamp" diff --git a/csit/start-grafana.sh b/csit/start-grafana.sh deleted file mode 100755 index 646b6f6d..00000000 --- a/csit/start-grafana.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START==================================================== -# Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - -SCRIPTS=$(git rev-parse --show-toplevel) -export SCRIPTS="${SCRIPTS}"/csit -export CONTAINER_LOCATION="nexus3.onap.org:10001/" - -source "${SCRIPTS}"/get-versions.sh - -export PROJECT="${1}" - -if [ -z "${PROJECT}" ]; then - echo "Starting all components..." - docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d -else - echo "Starting ${PROJECT} application..." - docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d "${PROJECT}" grafana -fi - -echo "Prometheus server: http://localhost:30259" -echo "Grafana server: http://localhost:30269" diff --git a/csit/stop-all.sh b/csit/stop-all.sh deleted file mode 100755 index 9adfcf3c..00000000 --- a/csit/stop-all.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START==================================================== -# Copyright (C) 2022 Nordix Foundation. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - -SCRIPTS=$(git rev-parse --show-toplevel) -export SCRIPTS="${SCRIPTS}"/csit - -source "${SCRIPTS}"/get-versions.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml down -v diff --git a/csit/wait_for_port.sh b/csit/wait_for_port.sh deleted file mode 100755 index 6dcb3cab..00000000 --- a/csit/wait_for_port.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# ============LICENSE_START==================================================== -# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END====================================================== - -usage() { - echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2 - exit 1 -} - -tmout=300 -cmd= -while getopts c:t: opt -do - case "$opt" in - c) - cmd="$OPTARG" - ;; - - t) - tmout="$OPTARG" - ;; - - *) - usage - ;; - esac -done - -nargs=$((OPTIND-1)) -shift "$nargs" - -even_args=$(($#%2)) -if [ $# -lt 2 ] || [ "$even_args" -ne 0 ] -then - usage -fi - -while [ $# -ge 2 ] -do - export host="$1" - export port="$2" - shift - shift - - echo "Waiting for $host port $port..." - - while [ "$tmout" -gt 0 ] - do - if command -v docker > /dev/null 2>&1 - then - docker ps --format "table {{ .Names }}\t{{ .Status }}" - fi - - nc -vz "$host" "$port" - rc=$? - - if [ $rc -eq 0 ] - then - break - else - tmout=$((tmout-1)) - sleep 1 - fi - done - - if [ $rc -ne 0 ] - then - echo "$host port $port cannot be reached" - exit $rc - fi -done - -$cmd - -exit 0 diff --git a/csit/wait_for_rest.sh b/csit/wait_for_rest.sh deleted file mode 100755 index a64c3063..00000000 --- a/csit/wait_for_rest.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# ============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====================================================== -usage() { - echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2 - exit 1 -} -tmout=300 -cmd= -while getopts c:t: opt -do - case "$opt" in - c) - cmd="$OPTARG" - ;; - t) - tmout="$OPTARG" - ;; - *) - usage - ;; - esac -done -nargs=$((OPTIND-1)) -shift "$nargs" -even_args=$(($#%2)) -if [ $# -lt 2 ] || [ "$even_args" -ne 0 ] -then - usage -fi -while [ $# -ge 2 ] -do - export host="$1" - export port="$2" - shift - shift - echo "Waiting for REST to come up on $host port $port..." - while [ "$tmout" -gt 0 ] - do - if command -v docker > /dev/null 2>&1 - then - docker ps --format "table {{ .Names }}\t{{ .Status }}" - fi - curl "http://$host:$port" > /dev/null 2>&1 - rc=$? - if [ $rc -eq 0 ] - then - break - else - tmout=$((tmout-1)) - sleep 1 - fi - done - if [ $rc -ne 0 ] - then - echo "$host port $port REST cannot be detected" - exit $rc - fi -done -$cmd -exit 0 - diff --git a/csit/wait_topic.sh b/csit/wait_topic.sh deleted file mode 100755 index c72b728f..00000000 --- a/csit/wait_topic.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. -# ============================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============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://localhost:30227/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/csit/xacml-pdp/plans/setup.sh b/csit/xacml-pdp/plans/setup.sh deleted file mode 100755 index 646605ff..00000000 --- a/csit/xacml-pdp/plans/setup.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2020-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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -echo "Uninstall docker-py and reinstall docker." -python3 -m pip uninstall -y docker-py -python3 -m pip uninstall -y docker -python3 -m pip install -U docker - -sudo apt-get -y install libxml2-utils - -source "${SCRIPTS}"/get-versions.sh -bash "${SCRIPTS}"/get-models-examples.sh - -docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d xacml-pdp - -unset http_proxy https_proxy - -POLICY_API_IP=$(get-instance-ip.sh policy-api) -POLICY_API_PORT=30440 -MARIADB_IP=$(get-instance-ip.sh mariadb) -POLICY_PDPX_IP=$(get-instance-ip.sh policy-xacml-pdp) -POLICY_PDPX_PORT=30441 -SIM_IP=$(get-instance-ip.sh simulator) -POLICY_PAP_IP=$(get-instance-ip.sh policy-pap) -POLICY_PAP_PORT=30442 - -export SIM_IP - -echo XACML-PDP IP IS "${POLICY_PDPX_IP}" -echo API IP IS "${POLICY_API_IP}" -echo PAP IP IS "${POLICY_PAP_IP}" -echo MARIADB IP IS "${MARIADB_IP}" -echo SIM_IP IS "${SIM_IP}" - -# wait for the app to start up -"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PDPX_PORT}" - -DATA2=${WORKSPACE}/models/models-examples/src/main/resources/policies - -ROBOT_VARIABLES="" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCRIPTS}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_PORT:${POLICY_PDPX_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}" -ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}" diff --git a/csit/xacml-pdp/plans/teardown.sh b/csit/xacml-pdp/plans/teardown.sh deleted file mode 100755 index 6f77caa4..00000000 --- a/csit/xacml-pdp/plans/teardown.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# ============LICENSE_START======================================================= -# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. -# Modifications copyright (c) 2022 Nordix Foundation. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v diff --git a/csit/xacml-pdp/plans/testplan.txt b/csit/xacml-pdp/plans/testplan.txt deleted file mode 100644 index c8ffa39f..00000000 --- a/csit/xacml-pdp/plans/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests. -# Place the suites in run order. -xacml-pdp-test.robot diff --git a/csit/xacml-pdp/tests/data/onap.policy.guard.decision.request.json b/csit/xacml-pdp/tests/data/onap.policy.guard.decision.request.json deleted file mode 100644 index ee90feaa..00000000 --- a/csit/xacml-pdp/tests/data/onap.policy.guard.decision.request.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "ONAPName": "Guard", - "ONAPComponent": "Guard-component", - "ONAPInstance": "Guard-component-instance", - "requestId": "unique-request-guard-1", - "action": "guard", - "resource": { - "guard": { - "actor": "APPC", - "operation": "ModifyConfig", - "target": "f17face5-69cb-4c88-9e0b-7426db7edddd", - "requestId": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", - "clname": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a" - } - } -} diff --git a/csit/xacml-pdp/tests/data/onap.policy.monitoring.decision.request.json b/csit/xacml-pdp/tests/data/onap.policy.monitoring.decision.request.json deleted file mode 100644 index 053fa36d..00000000 --- a/csit/xacml-pdp/tests/data/onap.policy.monitoring.decision.request.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ONAPName": "DCAE", - "ONAPComponent": "PolicyHandler", - "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64", - "action": "configure", - "resource": { - "policy-id": "onap.restart.tca" - } -} diff --git a/csit/xacml-pdp/tests/data/onap.policy.naming.decision.request.json b/csit/xacml-pdp/tests/data/onap.policy.naming.decision.request.json deleted file mode 100644 index 3833a241..00000000 --- a/csit/xacml-pdp/tests/data/onap.policy.naming.decision.request.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ONAPName": "SDNC", - "ONAPComponent": "SDNC-component", - "ONAPInstance": "SDNC-component-instance", - "requestId": "unique-request-sdnc-1", - "action": "naming", - "resource": { - "nfRole": [], - "naming-type": [], - "property-name": [], - "policy-type": ["onap.policies.Naming"] - } -} diff --git a/csit/xacml-pdp/tests/data/onap.policy.optimization.decision.request.json b/csit/xacml-pdp/tests/data/onap.policy.optimization.decision.request.json deleted file mode 100644 index d997099c..00000000 --- a/csit/xacml-pdp/tests/data/onap.policy.optimization.decision.request.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "ONAPName": "OOF", - "ONAPComponent": "OOF-component", - "ONAPInstance": "OOF-component-instance", - "context" : { - "subscriberName": [] - }, - "action": "optimize", - "resource": { - "scope": [], - "services": [], - "resources": [], - "geography": [] - } -} diff --git a/csit/xacml-pdp/tests/data/vCPE.policy.input.tosca.deploy.json b/csit/xacml-pdp/tests/data/vCPE.policy.input.tosca.deploy.json deleted file mode 100644 index 7ace047b..00000000 --- a/csit/xacml-pdp/tests/data/vCPE.policy.input.tosca.deploy.json +++ /dev/null @@ -1,5 +0,0 @@ -{"policies":[ - {"policy-id":"onap.restart.tca"}, - {"policy-id":"OSDF_CASABLANCA.Affinity_Default"} - ] -} diff --git a/csit/xacml-pdp/tests/xacml-pdp-test.robot b/csit/xacml-pdp/tests/xacml-pdp-test.robot deleted file mode 100644 index e29200ac..00000000 --- a/csit/xacml-pdp/tests/xacml-pdp-test.robot +++ /dev/null @@ -1,150 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library Process -Library json -Resource ${CURDIR}/../../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_PORT} /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_PORT} /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_PORT} ${url} 200 null ${hcauth} - [return] ${resp} - -DecisionPostReq - [Arguments] ${postjson} ${abbr} - ${hcauth}= HealthCheckAuth - ${resp}= PerformPostRequest ${POLICY_PDPX_PORT} /policy/pdpx/v1/decision 200 ${postjson} ${abbr} ${hcauth} - [return] ${resp} -- cgit 1.2.3-korg