aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/model-generator/pom.xml9
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java4
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java5
-rw-r--r--tools/model-generator/src/test/resources/vpnsla.json4056
4 files changed, 4058 insertions, 16 deletions
diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml
index 47c611c80..c2814dfe0 100644
--- a/tools/model-generator/pom.xml
+++ b/tools/model-generator/pom.xml
@@ -114,15 +114,6 @@
</artifactItem>
<artifactItem>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
- <artifactId>examples-pcvs</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}</outputDirectory>
- <includes>examples/**/*</includes>
- </artifactItem>
- <artifactItem>
- <groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples-myfirstpolicy</artifactId>
<version>${project.version}</version>
<type>jar</type>
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java
index 6af2959ed..a195411f3 100644
--- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java
@@ -68,14 +68,14 @@ public class SchemaUtilsTest {
*/
@BeforeClass
public static void readSimpleModel() throws IOException, ApexModelException {
- String avroModelString = TextFileUtils.getTextFileAsString("target/examples/models/pcvs/vpnsla/vpnsla.json");
+ String avroModelString = TextFileUtils.getTextFileAsString("src/test/resources/vpnsla.json");
final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class);
avroModel = modelReader.read(new ByteArrayInputStream(avroModelString.getBytes()));
}
@Test
- public void testSchemaUtilsErrors() throws ApexEventException {
+ public void testSchemaUtilsErrors() {
AxEvent event = avroModel.getEvents().get("CustomerContextEventIn");
assertThatThrownBy(() -> SchemaUtils.getEventSchema(event))
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
index 82c7a24f8..b27c16842 100644
--- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
@@ -80,11 +80,6 @@ public class Model2CliTest {
}
@Test
- public void testModel2CliAvro() throws IOException {
- testModel2CliModel("target/examples/models/pcvs/vpnsla", "vpnsla");
- }
-
- @Test
public void testModel2CliAadm() throws IOException {
testModel2CliModel("target/examples/models/AADM", "AADMPolicyModel");
}
diff --git a/tools/model-generator/src/test/resources/vpnsla.json b/tools/model-generator/src/test/resources/vpnsla.json
new file mode 100644
index 000000000..468eb8aeb
--- /dev/null
+++ b/tools/model-generator/src/test/resources/vpnsla.json
@@ -0,0 +1,4056 @@
+{
+ "policies": {
+ "key": {
+ "name": "PCVS-VpnSla_Policies",
+ "version": "1.0.0"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "CustomerContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "policyKey": {
+ "name": "CustomerContextPolicy",
+ "version": "1.0.0"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "CustomerContextState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "CustomerContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "CustomerContextState"
+ },
+ "trigger": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "CustomerContextState_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "CustomerContextState",
+ "localName": "CustomerContextState_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "CustomerContextState",
+ "localName": "doContext"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "CustomerContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "CustomerContextState",
+ "localName": "CustomerContextState_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "CustomerContextState"
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "policyKey": {
+ "name": "EdgeContextPolicy",
+ "version": "1.0.0"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "EdgeContextState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "EdgeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "EdgeContextState"
+ },
+ "trigger": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "EdgeContextState_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "EdgeContextState",
+ "localName": "EdgeContextState_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "EdgeContextState",
+ "localName": "doContext"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "EdgeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "EdgeContextState",
+ "localName": "EdgeContextState_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "EdgeContextState"
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "policyKey": {
+ "name": "NodeContextPolicy",
+ "version": "1.0.0"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "NodeContextState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "NodeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NodeContextState"
+ },
+ "trigger": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "NodeContextState_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NodeContextState",
+ "localName": "NodeContextState_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NodeContextState",
+ "localName": "doContext"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "NodeContextPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NodeContextState",
+ "localName": "NodeContextState_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "NodeContextState"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "policyKey": {
+ "name": "VpnSlaPolicy",
+ "version": "1.0.0"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "VpmSlaPolicyEstablishState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpmSlaPolicyEstablishState"
+ },
+ "trigger": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "VpnSlaPolicyEstablish_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpmSlaPolicyEstablishState",
+ "localName": "VpnSlaPolicyEstablish_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpnSlaPolicyDecideState"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpmSlaPolicyEstablishState",
+ "localName": "establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpmSlaPolicyEstablishState",
+ "localName": "VpnSlaPolicyEstablish_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "VpnSlaPolicyActState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpnSlaPolicyActState"
+ },
+ "trigger": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "SlaPolicyAct_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyActState",
+ "localName": "SlaPolicyAct_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyActState",
+ "localName": "act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyActState",
+ "localName": "SlaPolicyAct_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "VpnSlaPolicyDecideState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpnSlaPolicyDecideState"
+ },
+ "trigger": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "VpnSlaPolicyDecide_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "VpnSlaPolicyDecide_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpnSlaPolicyActState"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "TaskSelectionLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id + \" - TSL\");\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nvar returnValue \u003d true;\nif (ifSituation.get(\"problemID\") \u003d\u003d \"NONE\") {\n logger.trace(\"-- situation has no problem, selecting \u003cVpnSlaPolicyDecideNoneTask\u003e\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideNoneTask\").copyTo(executor.selectedTask);\n} else if (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") \u003d\u003d \"SOLVED\") {\n logger.trace(\"-- situation is solved, selecting \u003cVpnSlaPolicyDecideSolvedTask\u003e\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideSolvedTask\").copyTo(executor.selectedTask);\n} else if (ifSituation.get(\"violatedSLAs\") !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003e 0) {\n logger.trace(\"-- situation is problem with violations, selecting \u003cVpnSlaPolicyDecidePriorityTask\u003e\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecidePriorityTask\").copyTo(executor.selectedTask);\n} else if (ifSituation.get(\"violatedSLAs\") !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003d\u003d 0) {\n logger.trace(\"-- situation is problem without violations, selecting \u003cVpnSlaPolicyDecideSlaTask\u003e\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideSlaTask\").copyTo(executor.selectedTask);\n} else {\n logger.error(\"-- detected unknown decision for situation \u003c\" + ifSituation.get(\"problemID\") + \"\u003e\");\n rootLogger.error(executor.subject.id + \" \" + \"-- detected unknown decision for situation \u003c\"\n + ifSituation.get(\"problemID\") + \"\u003e\");\n returnValue \u003d false;\n}\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-tsl\");\n\nreturnValue;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideNoneTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "decideNone"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecidePriorityTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "decidePriority"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "decideSla"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSolvedTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "decideNone"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyDecideState",
+ "localName": "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "VpnSlaPolicyMatchState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpnSlaPolicyMatchState"
+ },
+ "trigger": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "VpnSlaPolicyMatch_Output_Direct",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyMatchState",
+ "localName": "VpnSlaPolicyMatch_Output_Direct"
+ },
+ "outgoingEvent": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "outgoingEventReference": [
+ {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ }
+ ],
+ "nextState": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "VpmSlaPolicyEstablishState"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ },
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyMatchState",
+ "localName": "match"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "VpnSlaPolicy",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "VpnSlaPolicyMatchState",
+ "localName": "VpnSlaPolicyMatch_Output_Direct"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "VpnSlaPolicyMatchState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "PCVS-VpnSla_Tasks",
+ "version": "1.0.0"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "customerName",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "customerName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "dtSLA",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "dtSLA"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "dtYTD",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "dtYTD"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "links",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "links"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "priority",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "priority"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "satisfaction",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "satisfaction"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "ReportOut",
+ "value": {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "APEX",
+ "target": "CtxtManagement",
+ "parameter": {
+ "entry": [
+ {
+ "key": "report",
+ "value": {
+ "key": {
+ "parentKeyName": "ReportOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "report"
+ },
+ "fieldSchemaKey": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "CustomerContextTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifCustomerName \u003d executor.inFields[\"customerName\"];\nvar ifLinks \u003d executor.inFields[\"links\"];\n\nlogger.trace(\"-- got infields, testing existing customer\");\nvar ctxtCustomer \u003d executor.getContextAlbum(\"albumCustomerMap\").get(ifCustomerName);\nif (ctxtCustomer !\u003d null) {\n executor.getContextAlbum(\"albumCustomerMap\").remove(ifCustomerName);\n logger.trace(\"-- removed customer: \u003c\" + ifCustomerName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating customer: \u003c\" + ifCustomerName + \"\u003e\");\nvar links \u003d new Array();\nfor (var i \u003d 0; i \u003c ifLinks.split(\" \").length; i++) {\n var link \u003d executor.getContextAlbum(\"albumTopoEdges\").get(ifLinks.split(\" \")[i]);\n if (link !\u003d null) {\n logger.trace(\"-- link: \u003c\" + ifLinks.split(\" \")[i] + \"\u003e\");\n links.push(ifLinks.split(\" \")[i]);\n } else {\n logger.trace(\"-- unknown link: \u003c\" + ifLinks.split(\" \")[i] + \"\u003e for customer \u003c\" + ifCustomerName + \"\u003e\");\n }\n}\nlogger.trace(\"-- links: \u003c\" + links + \"\u003e\");\nctxtCustomer \u003d \"{customerName:\" + ifCustomerName + \", dtSLA:\" + executor.inFields[\"dtSLA\"] + \", dtYTD:\"\n + executor.inFields[\"dtYTD\"] + \", priority:\" + executor.inFields[\"priority\"] + \", satisfaction:\"\n + executor.inFields[\"satisfaction\"] + \", links:[\" + links + \"]}\";\n\nexecutor.getContextAlbum(\"albumCustomerMap\").put(ifCustomerName, ctxtCustomer);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" \u003e\u003e *** Customers ***\");\n if (executor.getContextAlbum(\"albumCustomerMap\") !\u003d null) {\n for (var i \u003d 0; i \u003c executor.getContextAlbum(\"albumCustomerMap\").values().size(); i++) {\n logger.trace(\" \u003e\u003e \u003e\u003e \" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"customerName\")\n + \" : \" + \"dtSLA\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtSLA\")\n + \" : \" + \"dtYTD\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtYTD\")\n + \" : \" + \"links\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"links\")\n + \" : \" + \"priority\u003d\"\n + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"priority\") + \" : \"\n + \"satisfaction\u003d\"\n + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"satisfaction\"));\n }\n } else {\n logger.trace(\" \u003e\u003e \u003e\u003e customer album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] \u003d \"customer ctxt :: added customer: \" + ifCustomerName;\n\nlogger.info(\"vpnsla: ctxt added customer \" + ifCustomerName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "end",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "end"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "start",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "start"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "ReportOut",
+ "value": {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "APEX",
+ "target": "CtxtManagement",
+ "parameter": {
+ "entry": [
+ {
+ "key": "report",
+ "value": {
+ "key": {
+ "parentKeyName": "ReportOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "report"
+ },
+ "fieldSchemaKey": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "EdgeContextTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifEdgeStatus \u003d executor.inFields[\"status\"];\n\nvar albumTopoEdges \u003d executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, testing existing edge\");\n\nvar ctxtEdge \u003d albumTopoEdges.get(ifEdgeName);\nif (ctxtEdge !\u003d null) {\n albumTopoEdges.remove(ifEdgeName);\n logger.trace(\"-- removed edge: \u003c\" + ifEdgeName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating edge: \u003c\" + ifEdgeName + \"\u003e\");\nctxtEdge \u003d \"{name:\" + ifEdgeName + \", start:\" + executor.inFields[\"start\"] + \", end:\" + executor.inFields[\"end\"]\n + \", active:\" + ifEdgeStatus + \"}\";\nalbumTopoEdges.put(ifEdgeName, ctxtEdge);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" \u003e\u003e *** Edges ***\");\n if (albumTopoEdges !\u003d null) {\n for (var i \u003d 0; i \u003c albumTopoEdges.values().size(); i++) {\n logger.trace(\" \u003e\u003e \u003e\u003e \" + albumTopoEdges.values().get(i).get(\"name\") + \" \\t \"\n + albumTopoEdges.values().get(i).get(\"start\") + \" --\u003e \" + albumTopoEdges.values().get(i).get(\"end\")\n + \" \\t \" + albumTopoEdges.values().get(i).get(\"active\"));\n }\n } else {\n logger.trace(\" \u003e\u003e \u003e\u003e edge album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] \u003d \"edge ctxt :: added edge \" + ifEdgeName;\n\nlogger.info(\"vpnsla: ctxt added edge \" + ifEdgeName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "mininetName",
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "mininetName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "nodeName",
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "nodeName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "ReportOut",
+ "value": {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "APEX",
+ "target": "CtxtManagement",
+ "parameter": {
+ "entry": [
+ {
+ "key": "report",
+ "value": {
+ "key": {
+ "parentKeyName": "ReportOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "report"
+ },
+ "fieldSchemaKey": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumTopoNodes",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "NodeContextTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifNodeName \u003d executor.inFields[\"nodeName\"];\nvar ifMininetName \u003d executor.inFields[\"mininetName\"];\n\nvar albumTopoNodes \u003d executor.getContextAlbum(\"albumTopoNodes\");\n\nlogger.trace(\"-- got infields, testing existing node\");\n\nvar ctxtNode \u003d albumTopoNodes.get(ifNodeName);\nif (ctxtNode !\u003d null) {\n albumTopoNodes.remove(ifNodeName);\n logger.trace(\"-- removed node: \u003c\" + ifNodeName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating node: \u003c\" + ifNodeName + \"\u003e\");\nctxtNode \u003d \"{name:\" + ifNodeName + \", mnname:\" + ifMininetName + \"}\";\nalbumTopoNodes.put(ifNodeName, ctxtNode);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" \u003e\u003e *** Nodes ***\");\n if (albumTopoNodes !\u003d null) {\n for (var i \u003d 0; i \u003c albumTopoNodes.values().size(); i++) {\n logger.trace(\" \u003e\u003e \u003e\u003e \" + albumTopoNodes.values().get(i).get(\"name\") + \" : \"\n + albumTopoNodes.values().get(i).get(\"mnname\"));\n }\n } else {\n logger.trace(\" \u003e\u003e \u003e\u003e node album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] \u003d \"node ctxt :: added node \" + ifNodeName;\n\nlogger.info(\"vpnsla: ctxt added node \" + ifNodeName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaActOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaAct",
+ "target": "ActioningSystem",
+ "parameter": {
+ "entry": [
+ {
+ "key": "action",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaActOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "action"
+ },
+ "fieldSchemaKey": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaActOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyActTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifDecision \u003d executor.inFields[\"decision\"];\nvar ifMatchStart \u003d executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nswitch (ifDecision.get(\"decision\").toString()) {\ncase \"NONE\":\n executor.outFields[\"edgeName\"] \u003d \"\";\n executor.outFields[\"action\"] \u003d \"\";\n break;\ncase \"IMPEDE\":\n for (var i \u003d 0; i \u003c ifDecision.get(\"customers\").size(); i++) {\n customer \u003d albumCustomerMap.get(ifDecision.get(\"customers\").get(i).toString());\n executor.outFields[\"edgeName\"] \u003d customer.get(\"links\").get(0);\n executor.outFields[\"action\"] \u003d \"firewall\";\n }\n break;\ncase \"REBUILD\":\n // finally solved, remove problem\n albumProblemMap.remove(ifDecision.get(\"problemID\"));\n executor.outFields[\"edgeName\"] \u003d \"L10\"; // this is ###static###\n executor.outFields[\"action\"] \u003d \"rebuild\"; // this is ###static###\n break;\ndefault:\n\n}\n\nif (executor.outFields[\"action\"] !\u003d \"\") {\n logger.info(\"vpnsla: action is to \" + executor.outFields[\"action\"] + \" \" + executor.outFields[\"edgeName\"]);\n} else {\n logger.info(\"vpnsla: no action required\");\n}\n\nlogger.trace(\"-- outfields: \" + executor.outFields);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".a\");\n\nvar now \u003d new Date().getTime();\nlogger.info(\"VPN SLA finished in \" + (now - ifMatchStart) + \" ms\");\n\ntrue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideNoneTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideNoneTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaDecideOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyDecideNoneTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"NONE\");\ndecision.put(\"customers\", new ArrayList());\n\nvar returnValue \u003d true;\nif (ifSituation.get(\"problemID\") \u003d\u003d \"NONE\") {\n logger.trace(\"-- no problem, everything ok\");\n} else {\n logger.trace(\"-- wrong problemID \u003c\" + problemID + \"\u003e for NONE task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + problemID\n + \"\u003e for NONE task, we should not be here\");\n returnValue \u003d false;\n}\n\nexecutor.outFields[\"decision\"] \u003d decision;\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");\n\nreturnValue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecidePriorityTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecidePriorityTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaDecideOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyDecidePriorityTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem \u003d albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValue \u003d true;\nif (problem !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003e 0) {\n logger.trace(\"-- impede by priority\");\n for (var i \u003d 0; i \u003c problem.get(\"edgeUsedBy\").size(); i++) {\n customerCtxt \u003d albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n if (customerCtxt.get(\"priority\") \u003d\u003d false) {\n decision.get(\"customers\").add(customerCtxt.get(\"customerName\"));\n }\n }\n} else {\n logger.trace(\"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\") + \"\u003e for PRIORITY task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\")\n + \"\u003e for PRIORITY task, we should not be here\");\n returnValue \u003d false;\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] \u003d decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: priority, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-pri\");\n\nreturnValue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaDecideOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyDecideSlaTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"Impede given customers selected based on maximum SLA delta\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem \u003d albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValue \u003d true;\nif (problem !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003d\u003d 0) {\n logger.trace(\"-- impede by maximum SLA\");\n var customer \u003d \"\";\n var customerSla \u003d 0;\n for (var i \u003d 0; i \u003c problem.get(\"edgeUsedBy\").size(); i++) {\n customerCtxt \u003d albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n if (customerSla \u003d\u003d 0) {\n customerSla \u003d customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\");\n }\n if ((customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\")) \u003e\u003d customerSla) {\n customer \u003d customerCtxt.get(\"customerName\");\n customerSla \u003d (customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\"));\n }\n }\n decision.get(\"customers\").add(customer);\n} else {\n logger.trace(\"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\") + \"\u003e for SLA task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\")\n + \"\u003e for SLA task, we should not be here\");\n returnValue \u003d false;\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] \u003d decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: sla balance, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-sla\");\n\nreturnValue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSolvedTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideSolvedTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaDecideOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyDecideSolvedTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"REBUILD\");\ndecision.put(\"customers\", new ArrayList());\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\n\nvar returnValue \u003d true;\nif (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") \u003d\u003d \"SOLVED\") {\n logger.trace(\"-- problem solved\");\n} else {\n logger.trace(\"-- wrong problemID \u003c\" + problemID + \"\u003e for SOLVED task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + problemID\n + \"\u003e for SOLVED task, we should not be here\");\n returnValue \u003d false;\n}\n\nexecutor.outFields[\"decision\"] \u003d decision;\n\nlogger.info(\"vpnsla: sla solved, problem solved\");\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");\n\nreturnValue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "VpnSlaMatch",
+ "target": "VpnSlaEstablish",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "hasChanged",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "hasChanged"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaEstablishOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyEstablishTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifEdgeStatus \u003d executor.inFields[\"status\"].toString();\nvar ifhasChanged \u003d executor.inFields[\"hasChanged\"];\nvar ifMatchStart \u003d executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nvar linkProblem \u003d albumProblemMap.get(ifEdgeName);\n\n// create outfiled for situation\nvar situation \u003d executor.subject.getOutFieldSchemaHelper(\"situation\").createNewInstance();\nsituation.put(\"violatedSLAs\", new ArrayList());\n\n// create a string as states+hasChanged+linkProblem and switch over it\nvar switchTest \u003d ifEdgeStatus + \":\" + ifhasChanged + \":\" + (linkProblem \u003d\u003d null ? \"no\" : \"yes\");\nswitch (switchTest) {\ncase \"UP:false:no\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:false:no \u003d\u003e everything ok\");\n logger.info(\"vpnsla: everything ok\");\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"UP:false:yes\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:false:yes \u003d\u003d\u003e did we miss earlier up?, removing problem\");\n albumProblemMap.remove(ifEdgeName);\n linkProblem \u003d null;\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"UP:true:no\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:true:no \u003d\u003d\u003e did we miss the earlier down?, creating new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"UP:true:yes\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:true:yes \u003d\u003d\u003e detected solution, link up again\");\n logger.info(\"vpnsla: problem solved\");\n linkProblem.put(\"endTime\", ifMatchStart);\n linkProblem.put(\"status\", \"SOLVED\");\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"DOWN:false:no\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:false:no \u003d\u003d\u003e did we miss an earlier down?, creating new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:false:yes\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:false:yes \u003d\u003d\u003e problem STILL exists\");\n logger.info(\"vpnsla: problem still exists\");\n linkProblem.put(\"status\", \"STILL\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:true:no\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:true:no \u003d\u003d\u003e found NEW problem\");\n logger.info(\"vpnsla: this is a new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:true:yes\":\n logger.trace(\"-- edge \u003c\" + ifEdgeName\n + \"\u003e DOWN:true:yes \u003d\u003d\u003e did we miss to remove an earlier problem?, remove and create new problem\");\n linkProblem \u003d null;\n situation.put(\"problemID\", ifEdgeName);\n break;\n\ndefault:\n logger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status \u003c\" + ifEdgeStatus\n + \"\u003e unknown or null on hasChanged \u003c\" + ifhasChanged + \"\u003e\");\n rootLogger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status \u003c\" + ifEdgeStatus\n + \"\u003e unknown or null on hasChanged \u003c\" + ifhasChanged + \"\u003e\");\n}\n\n// create new problem if situation requires it\nif (situation.get(\"problemID\").equals(ifEdgeName) \u0026\u0026 linkProblem \u003d\u003d null) {\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e creating new problem\");\n linkProblem \u003d albumProblemMap.getSchemaHelper().createNewInstance();\n linkProblem.put(\"edge\", ifEdgeName);\n linkProblem.put(\"startTime\", ifMatchStart);\n linkProblem.put(\"lastUpdate\", ifMatchStart);\n linkProblem.put(\"endTime\", 0);\n linkProblem.put(\"status\", \"NEW\");\n linkProblem.put(\"edgeUsedBy\", new ArrayList());\n linkProblem.put(\"impededLast\", new ArrayList());\n\n for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n var customer \u003d albumCustomerMap.values().get(i);\n var customerLinks \u003d albumCustomerMap.values().get(i).get(\"links\");\n for (var k \u003d 0; k \u003c customerLinks.size(); k++) {\n if (customerLinks.get(k) \u003d\u003d ifEdgeName) {\n linkProblem.get(\"edgeUsedBy\").add(customer.get(\"customerName\"));\n }\n }\n }\n albumProblemMap.put(ifEdgeName, linkProblem);\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e problem created as \u003c\" + linkProblem + \"\u003e\");\n}\n\n// set dtYTD if situation requires it\nif (linkProblem !\u003d null \u0026\u0026 (linkProblem.get(\"status\") \u003d\u003d \"STILL\" || linkProblem.get(\"status\") \u003d\u003d \"SOLVED\")) {\n var linkDownTimeinSecs \u003d (ifMatchStart - linkProblem.get(\"lastUpdate\")) / 1000;\n logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e down time: \" + linkDownTimeinSecs + \" s\");\n for (var k \u003d 0; k \u003c linkProblem.get(\"impededLast\").size(); k++) {\n for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n var customer \u003d albumCustomerMap.values().get(i);\n if (customer.get(\"customerName\").equals(linkProblem.get(\"impededLast\").get(k))) {\n logger.info(\"-- vpnsla: customer \" + customer.get(\"customerName\") + \" YDT downtime increased from \"\n + customer.get(\"dtYTD\") + \" to \" + (customer.get(\"dtYTD\") + linkDownTimeinSecs));\n customer.put(\"dtYTD\", (customer.get(\"dtYTD\") + linkDownTimeinSecs))\n }\n }\n }\n // set lastUpdate to this policy execution for next execution calculation\n linkProblem.put(\"lastUpdate\", ifMatchStart);\n}\n\n// check SLA violations if situation requires it\nif (linkProblem !\u003d null \u0026\u0026 linkProblem.get(\"status\") !\u003d \"SOLVED\") {\n logger.info(\"\u003ee\u003e customer\\tDT SLA\\tDT YTD\\tviolation\");\n for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n var customer \u003d albumCustomerMap.values().get(i);\n if (customer.get(\"dtYTD\") \u003e customer.get(\"dtSLA\")) {\n situation.get(\"violatedSLAs\").add(customer.get(\"customerName\"));\n logger.info(\"\u003ee\u003e \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n + customer.get(\"dtYTD\") + \"s\\t\" + \"!!\");\n } else {\n logger.info(\"\u003ee\u003e \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n + customer.get(\"dtYTD\") + \"s\");\n }\n }\n}\n\nexecutor.outFields[\"situation\"] \u003d situation;\n\nlogger.trace(\"-- out fields \u003c\" + executor.outFields + \"\u003e\");\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".e\");\n\ntrue;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "inputEvent": {
+ "key": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "TriggerSys",
+ "target": "VpnSlaMatch",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaTrigger",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaTrigger",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ },
+ "outputEvents": {
+ "entry": [
+ {
+ "key": "VpnSlaMatchOut",
+ "value": {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "VpnSlaMatch",
+ "target": "VpnSlaEstablish",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "hasChanged",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "hasChanged"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": {
+ "parentKeyName": "VpnSlaPolicyMatchTask",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "TaskLogic"
+ },
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\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 * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar now \u003d new Date().getTime();\nexecutor.outFields[\"matchStart\"] \u003d now;\n\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifLinkStatus \u003d executor.inFields[\"status\"];\n\nvar albumTopoEdges \u003d executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, checking albumTopoEdges changes\");\n\nvar active \u003d false;\nswitch (ifLinkStatus.toString()) {\ncase \"UP\":\n active \u003d true;\n break;\ncase \"DOWN\":\n active \u003d false;\n break;\ndefault:\n active \u003d false;\n logger.error(\"-- trigger sent unknown link status \u003c\" + ifLinkStatus + \"\u003e for link \u003c\" + ifEdgeName + \"\u003e\");\n rootLogger.error(executor.subject.id + \" \" + \"-- trigger sent unknown link status \u003c\" + ifLinkStatus\n + \"\u003e for link \u003c\" + ifEdgeName + \"\u003e\");\n}\n\nvar link \u003d albumTopoEdges.get(ifEdgeName);\nif (link \u003d\u003d null) {\n logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e not in albumTopoEdges\");\n} else {\n logger.trace(\"-- found link \u003c\" + link + \"\u003e in albumTopoEdges\");\n logger.trace(\"-- active \u003c\" + active + \"\u003e : link.active \u003c\" + link.get(\"active\") + \"\u003e\");\n if (active !\u003d link.get(\"active\")) {\n link.put(\"active\", active);\n logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e status changed to \u003cactive:\" + link.get(\"active\") + \"\u003e\");\n executor.outFields[\"hasChanged\"] \u003d true;\n } else {\n logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e status not changed \u003cactive:\" + link.get(\"active\") + \"\u003e\");\n executor.outFields[\"hasChanged\"] \u003d false;\n }\n}\n\nexecutor.outFields[\"edgeName\"] \u003d ifEdgeName;\nexecutor.outFields[\"status\"] \u003d ifLinkStatus;\n\nlogger.info(\"vpnsla: detected \" + ifEdgeName + \" as \" + ifLinkStatus);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".m\");\n\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "PCVS-VpnSla_Events",
+ "version": "1.0.0"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "customerName",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "customerName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "dtSLA",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "dtSLA"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "dtYTD",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "dtYTD"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "links",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "links"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "priority",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "priority"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "satisfaction",
+ "value": {
+ "key": {
+ "parentKeyName": "CustomerContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "satisfaction"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "end",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "end"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "start",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "start"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "EdgeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "CtxtManagement",
+ "target": "APEX",
+ "parameter": {
+ "entry": [
+ {
+ "key": "mininetName",
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "mininetName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "nodeName",
+ "value": {
+ "key": {
+ "parentKeyName": "NodeContextEventIn",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "nodeName"
+ },
+ "fieldSchemaKey": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "APEX",
+ "target": "CtxtManagement",
+ "parameter": {
+ "entry": [
+ {
+ "key": "report",
+ "value": {
+ "key": {
+ "parentKeyName": "ReportOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "report"
+ },
+ "fieldSchemaKey": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaAct",
+ "target": "ActioningSystem",
+ "parameter": {
+ "entry": [
+ {
+ "key": "action",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaActOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "action"
+ },
+ "fieldSchemaKey": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaActOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaDecide",
+ "target": "SlaAct",
+ "parameter": {
+ "entry": [
+ {
+ "key": "decision",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "decision"
+ },
+ "fieldSchemaKey": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaDecideOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "SlaEstablish",
+ "target": "SlaDecide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "situation",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaEstablishOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "situation"
+ },
+ "fieldSchemaKey": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "VpnSlaMatch",
+ "target": "VpnSlaEstablish",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "hasChanged",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "hasChanged"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "matchStart",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "matchStart"
+ },
+ "fieldSchemaKey": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaMatchOut",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source": "TriggerSys",
+ "target": "VpnSlaMatch",
+ "parameter": {
+ "entry": [
+ {
+ "key": "edgeName",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaTrigger",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "edgeName"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "status",
+ "value": {
+ "key": {
+ "parentKeyName": "VpnSlaTrigger",
+ "parentKeyVersion": "1.0.0",
+ "parentLocalName": "NULL",
+ "localName": "status"
+ },
+ "fieldSchemaKey": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "toscaPolicyState": ""
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "PCVS-VpnSla_Albums",
+ "version": "1.0.0"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ "scope": "global",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "ctxtCustomerMapDecl",
+ "version": "1.0.0"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ },
+ "scope": "global",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "problemMapDecl",
+ "version": "1.0.0"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ },
+ "scope": "global",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "ctxtTopologyEdgesDecl",
+ "version": "1.0.0"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "albumTopoNodes",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumTopoNodes",
+ "version": "0.0.1"
+ },
+ "scope": "global",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "ctxtTopologyNodesDecl",
+ "version": "1.0.0"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "PCVS-VpnSla_Schemas",
+ "version": "1.0.0"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerMapDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerMapDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"Customer\",\n \"fields\" : [\n {\"name\" : \"customerName\", \"type\" : \"string\"},\n {\"name\" : \"dtSLA\" , \"type\" : \"int\"},\n {\"name\" : \"dtYTD\" , \"type\" : \"int\"},\n {\"name\" : \"priority\" , \"type\" : \"boolean\"},\n {\"name\" : \"satisfaction\", \"type\" : \"int\"},\n {\n \"name\": \"links\",\n \"doc\": \"Links used by this customer\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n }\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Boolean"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Boolean"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtTopologyEdgesDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtTopologyEdgesDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"TopologyEdges\",\n \"fields\" : [\n {\"name\": \"name\", \"type\": \"string\", \"doc\": \"Name of the Edge, typically a link name\"},\n {\"name\": \"start\", \"type\": \"string\", \"doc\": \"Edge endpoint: start - a node name\"},\n {\"name\": \"end\", \"type\": \"string\", \"doc\": \"Edge endpoint: end - a node name\"},\n {\"name\": \"active\", \"type\": \"boolean\", \"doc\": \"Flag for active/inactive edges, inactive means a link is down\"}\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtTopologyNodesDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtTopologyNodesDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"TopologyNodes\",\n \"fields\" : [\n {\"name\" : \"name\", \"type\" : \"string\", \"doc\": \"The name of the node\"},\n {\"name\" : \"mnname\", \"type\" : \"string\", \"doc\": \"The name of the node in Mininet\"}\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"Situation\",\n \"fields\" : [\n {\"name\": \"description\", \"type\": \"string\", \"doc\": \"Description of the taken decision\"},\n {\n \"name\": \"decision\",\n \"doc\": \"taken decision\",\n \"type\": {\n \"type\": \"enum\",\n \"name\": \"decisionEnum\",\n \"symbols\" : [\n \"IMPEDE\",\n \"REBUILD\",\n \"NONE\"\n ]\n }\n },\n {\"name\": \"customers\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers affected by the decision\"},\n {\"name\": \"problemID\", \"type\": \"string\", \"doc\": \"Identifier of the problem for lookup in problemMap\"}\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Boolean"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\": \"enum\",\n \"name\": \"Status\",\n \"symbols\" : [\n \"UP\",\n \"DOWN\"\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"Situation\",\n \"fields\" : [\n {\"name\": \"problemID\", \"type\": \"string\", \"doc\": \"Identifier of the problem for lookup in problemMap\"},\n {\"name\": \"violatedSLAs\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers with SLA violations\"}\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "problemMapDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "problemMapDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Avro",
+ "schemaDefinition": "{\n \"type\" : \"record\",\n \"name\" : \"Problem\",\n \"fields\" : [\n {\"name\": \"edge\", \"type\": \"string\"},\n {\"name\": \"startTime\", \"type\": \"long\"},\n {\"name\": \"lastUpdate\", \"type\": \"long\"},\n {\"name\": \"endTime\", \"type\": \"long\"},\n {\n \"name\": \"status\",\n \"doc\": \"problem status\",\n \"type\": {\n \"type\": \"enum\",\n \"name\": \"statusEnum\",\n \"symbols\" : [\n \"NONE\",\n \"STILL\",\n \"SOLVED\",\n \"NEW\"\n ]\n }\n },\n {\n \"name\": \"edgeUsedBy\",\n \"doc\": \"customers using the edge\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n },\n {\n \"name\": \"impededLast\",\n \"doc\": \"customers last impeded\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n }\n ]\n}"
+ }
+ },
+ {
+ "key": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Long"
+ }
+ }
+ ]
+ }
+ },
+ "key": {
+ "name": "PCVS-VpnSla",
+ "version": "1.0.0"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "PCVS-VpnSla_KeyInfo",
+ "version": "1.0.0"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "CustomerContextEventIn",
+ "version": "1.0.0"
+ },
+ "UUID": "1ce15f63-7c90-3a13-96d9-e3964f76aa0e",
+ "description": "Event to add Customers to engine Context"
+ }
+ },
+ {
+ "key": {
+ "name": "CustomerContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "CustomerContextPolicy",
+ "version": "1.0.0"
+ },
+ "UUID": "91854e6d-868b-3d1a-aff1-a9390173f144",
+ "description": "Policy that adds Customer information to engine context"
+ }
+ },
+ {
+ "key": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "CustomerContextTask",
+ "version": "1.0.0"
+ },
+ "UUID": "c43c4cdc-71ef-3e0e-90a2-e36f4f355e3e",
+ "description": "This task adds event context to customer context"
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "EdgeContextEventIn",
+ "version": "1.0.0"
+ },
+ "UUID": "1817ee7e-d91a-33cb-b9e3-fa60e5c2f340",
+ "description": "Event to add an Edge to engine Context"
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "EdgeContextPolicy",
+ "version": "1.0.0"
+ },
+ "UUID": "652dc1e9-1030-3fe1-8e6e-f7758c68959f",
+ "description": "Policy that adds an edge to context"
+ }
+ },
+ {
+ "key": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "EdgeContextTask",
+ "version": "1.0.0"
+ },
+ "UUID": "bb3dd70d-ab5c-3ea4-81ca-92f578e9808b",
+ "description": "This task adds event context to edge context"
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "NodeContextEventIn",
+ "version": "1.0.0"
+ },
+ "UUID": "38bb48b4-07fd-3e53-976d-651fd0bbf5e1",
+ "description": "Event to add Node to engine Context"
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "NodeContextPolicy",
+ "version": "1.0.0"
+ },
+ "UUID": "6dd58709-d4b7-31d6-8230-ab91e548985a",
+ "description": "Policy that adds an node to context"
+ }
+ },
+ {
+ "key": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "NodeContextTask",
+ "version": "1.0.0"
+ },
+ "UUID": "32ffcbca-fee6-3cb4-b311-fa3ba6a3b9b7",
+ "description": "This task adds event context to node context"
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla",
+ "version": "1.0.0"
+ },
+ "UUID": "fc0d1be0-fc4f-3758-b530-6435d279951e",
+ "description": "Policies-Controlled Video Streaming, VPN SLA Policy Model"
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_Albums",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_Albums",
+ "version": "1.0.0"
+ },
+ "UUID": "2e34f18e-37e6-35d2-ba11-e20f96e113d5",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Albums:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_Events",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_Events",
+ "version": "1.0.0"
+ },
+ "UUID": "0c04d3b3-86aa-39c2-938e-b44224cb0798",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Events:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_KeyInfo",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_KeyInfo",
+ "version": "1.0.0"
+ },
+ "UUID": "6f257a91-576d-3e49-92ca-9c9a92994cff",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_KeyInfo:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_Policies",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_Policies",
+ "version": "1.0.0"
+ },
+ "UUID": "af00d5d2-f584-37eb-a539-db10284828d8",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Policies:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_Schemas",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_Schemas",
+ "version": "1.0.0"
+ },
+ "UUID": "390c3e62-0455-330c-8bdc-c835322cca9c",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Schemas:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "PCVS-VpnSla_Tasks",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "PCVS-VpnSla_Tasks",
+ "version": "1.0.0"
+ },
+ "UUID": "5834101d-d5e7-323e-8bd2-595ed4618f07",
+ "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Tasks:1.0.0\""
+ }
+ },
+ {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ReportOut",
+ "version": "1.0.0"
+ },
+ "UUID": "29b332dc-e8b6-390e-8b41-3edbba45da44",
+ "description": "Report of a policy (issued by a task)"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaActOut",
+ "version": "1.0.0"
+ },
+ "UUID": "37d5dfba-d6e0-35a5-958b-21f77cb78a0c",
+ "description": "Event action"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaDecideOut",
+ "version": "1.0.0"
+ },
+ "UUID": "8d4ea7ed-ed7a-3f34-8ecc-56f6f192357c",
+ "description": "Event with a decision for the SLA policy"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaEstablishOut",
+ "version": "1.0.0"
+ },
+ "UUID": "e3fde4f3-338a-3759-a2d8-f23c6fd390ac",
+ "description": "Event with situation for the SLA policy"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaMatchOut",
+ "version": "1.0.0"
+ },
+ "UUID": "40aa223f-4689-3de1-bfb5-7889a07f6045",
+ "description": "Event with matched trigger for the VPN SLA policy"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicy",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicy",
+ "version": "1.0.0"
+ },
+ "UUID": "cd75105c-4cdb-312d-9372-aa508f4c400c",
+ "description": "Policy deciding customer treatment based on SLAs as MEDA policy"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyActTask",
+ "version": "1.0.0"
+ },
+ "UUID": "c6ff32e6-261b-35cc-a8e8-ba87ecf555e6",
+ "description": "Task issueing an action for taken decision"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideNoneTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideNoneTask",
+ "version": "1.0.0"
+ },
+ "UUID": "360c7f52-0930-38e5-ab54-59e4f3930c1e",
+ "description": "Decide task for a \u0027none\u0027 problem"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecidePriorityTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecidePriorityTask",
+ "version": "1.0.0"
+ },
+ "UUID": "f5226370-98b2-322d-9eb9-a17dfd834104",
+ "description": "Decide task solving the problem by using customer priorities"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideSlaTask",
+ "version": "1.0.0"
+ },
+ "UUID": "c231c338-fda7-3cc3-b282-382c0ace4015",
+ "description": "Decide task solving the problem by balancing SLAs"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyDecideSolvedTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyDecideSolvedTask",
+ "version": "1.0.0"
+ },
+ "UUID": "5e5b3951-a4c3-387d-9b75-ad1197372695",
+ "description": "Decide task solving the problem by using customer priorities"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyEstablishTask",
+ "version": "1.0.0"
+ },
+ "UUID": "83774c6c-73dd-3ce6-98ed-6c9295da9562",
+ "description": "Task taking a match event and establishing a situation"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaPolicyMatchTask",
+ "version": "1.0.0"
+ },
+ "UUID": "bb6c7e85-b5de-3f02-96c6-34c85ae174e3",
+ "description": "Pre-process an edge event"
+ }
+ },
+ {
+ "key": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "VpnSlaTrigger",
+ "version": "1.0.0"
+ },
+ "UUID": "7224a6d5-02cf-3fa0-803e-f930120c14d3",
+ "description": "Event triggering the VPN SLA policy"
+ }
+ },
+ {
+ "key": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "actionDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "9818146b-f42c-378b-8818-519d5e16ea2b",
+ "description": "An action for the actioning system"
+ }
+ },
+ {
+ "key": {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumCustomerMap",
+ "version": "0.0.1"
+ },
+ "UUID": "dde24214-9a5b-3995-a942-81e5c509af7d",
+ "description": "Generated description for concept referred to by key \"albumCustomerMap:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumProblemMap",
+ "version": "0.0.1"
+ },
+ "UUID": "681ed388-d70e-3a87-a322-a11813fb4cd5",
+ "description": "Generated description for concept referred to by key \"albumProblemMap:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumTopoEdges",
+ "version": "0.0.1"
+ },
+ "UUID": "4ac38510-3a01-33cc-9015-334408041b53",
+ "description": "Generated description for concept referred to by key \"albumTopoEdges:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "albumTopoNodes",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "albumTopoNodes",
+ "version": "0.0.1"
+ },
+ "UUID": "0ca9d9c1-073f-3183-af0c-c5f02cbdb26b",
+ "description": "Generated description for concept referred to by key \"albumTopoNodes:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerDowntimeSLADecl",
+ "version": "1.0.0"
+ },
+ "UUID": "dd0d2302-58f2-3904-a5b2-60e950c7db9f",
+ "description": "Customer Context: contracted downtime as per SLA"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerDowntimeYTDDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "dc75514e-19dc-307e-9de9-c07317197b17",
+ "description": "Customer Context: year-to-date downtime experienced"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerLinksDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "49c6b6e3-d987-3612-a846-9305fc5369f2",
+ "description": "Customer Context: links a customer uses (for events/task)"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerMapDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerMapDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "a32fe8e8-f626-3ad6-a979-6dc0897d0435",
+ "description": "Map of customers with all known information"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerNameDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "38151d46-be2d-354b-8142-994d880314a0",
+ "description": "Customer Context: customer name"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerPriorityDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "8c4d86b6-58fa-38a8-a86c-1498701a08fa",
+ "description": "Customer Context: priority flag"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtCustomerSatisfactionDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "5d995fbe-f60a-3e6a-b60e-ed46dba0fc28",
+ "description": "Customer Context: satisfaction in percent"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeEndDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "a68eab04-4297-369b-85ac-2968e418fcbd",
+ "description": "Topology Edges: edge endpoint (end)"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeNameDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "7688d4e1-bb1f-30f3-92a6-f3eef9816236",
+ "description": "Topology Edges: edge (link) name"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeStartDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "c20605f1-5b90-38a5-8782-d2d23309007a",
+ "description": "Topology Edges: edge endpoint (start)"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtEdgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "785e1b75-5389-35b6-b4a1-e9ec49891155",
+ "description": "Topology Edges: edge status as up (true) or down (false)"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtNodeMininetNameDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "ecfd3326-1425-3793-b4fb-54d5ca58324c",
+ "description": "Topology Nodes: node name in Mininet"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtNodeNameDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "80654d36-82eb-3dc6-b411-1442341946fb",
+ "description": "Topology Nodes: node name"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtTopologyEdgesDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtTopologyEdgesDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "d2561824-0bf1-3923-b779-89d2e527c507",
+ "description": "Topology Edges Context Map"
+ }
+ },
+ {
+ "key": {
+ "name": "ctxtTopologyNodesDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "ctxtTopologyNodesDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "0ee08c50-b09e-36d5-8fb0-ec97c5be8b20",
+ "description": "Topology Nodes Context Map"
+ }
+ },
+ {
+ "key": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "decideDecisionDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "8f9a3a78-1807-3be5-b70a-e084d638f1f2",
+ "description": "Decide: the taken decision"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeChangedDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "d21f8db2-1ac0-345a-b328-9227b47628fd",
+ "description": "Status Change (true:change, false:no change)"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeNameDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "bd8f33d8-b7a5-3fae-82b8-783b84bc7e17",
+ "description": "Edge name"
+ }
+ },
+ {
+ "key": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "edgeStatusDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "ba935212-80f1-3ac1-96d9-6e2519773b9c",
+ "description": "Statuf of the edge (UP, DOWN)"
+ }
+ },
+ {
+ "key": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "establishSituationDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "206ffbd0-cb07-329a-93fe-990961e3f92c",
+ "description": "Establish: the situation that was established"
+ }
+ },
+ {
+ "key": {
+ "name": "problemMapDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "problemMapDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "260c46a5-4e27-3575-9076-0ff72c9bf32a",
+ "description": "Map of problems with all known Information"
+ }
+ },
+ {
+ "key": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "reportDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "788e86c5-26d6-3af1-b1ab-2d530a0a45fb",
+ "description": "Report of activities of a policy/task"
+ }
+ },
+ {
+ "key": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "value": {
+ "key": {
+ "name": "timestampDecl",
+ "version": "1.0.0"
+ },
+ "UUID": "4d385841-1db1-3ddc-bb7b-8b67b3c701ad",
+ "description": "Timestamp"
+ }
+ }
+ ]
+ }
+ }
+}