aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2020-09-02 17:19:26 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2020-09-09 10:18:02 +0100
commit4c5c31eb9a2513af080d60d0f537b8339856150d (patch)
tree79aaf0d50cc261f57ce77f2eeae927c3c264478f /plugins/plugins-event
parentd350fd659d716ca0b1678029230cc799cead2056 (diff)
APEX standalone support for ToscaPolicy format
Legacy format support is removed, and Tosca format support is added. Change-Id: I3cfc181ccb5471a5d224c0162af18c1fa0fdbc70 Issue-ID: POLICY-2812 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'plugins/plugins-event')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParametersTest.java13
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json149
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json16
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json139
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json148
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json175
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java11
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json804
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json804
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json796
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json804
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json900
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetProducerAlone.json768
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json804
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json816
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json844
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json679
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json838
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json853
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json844
20 files changed, 10083 insertions, 1122 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParametersTest.java
index f704ad3ec..9d4da1cd0 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParametersTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +43,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParametersBadList() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments))
@@ -52,7 +53,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParametersNotKvPairs() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments))
@@ -63,7 +64,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParametersNulls() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> new ApexParameterHandler().getParameters(arguments))
@@ -74,7 +75,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParameterFilterInvalid() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json");
arguments.setRelativeFileRoot(".");
assertThatCode(() -> {
@@ -87,7 +88,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParametersOk() throws ParameterException {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json");
arguments.setRelativeFileRoot(".");
ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
@@ -110,7 +111,7 @@ public class RestClientCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyHttpCodeFilterOk() throws ParameterException {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json");
arguments.setRelativeFileRoot(".");
ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
index 490767186..bc1eeeebd 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
@@ -1,75 +1,102 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestClientConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestClientConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ]
],
- "httpCodeFilter" : "*\\.*"
+ "httpCodeFilter": "*\\.*"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestClientConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ]
],
- "httpCodeFilter" : " "
+ "httpCodeFilter": " "
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- }
- },
- "eventOutputParameters": {
- "RestClientProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ "eventOutputParameters": {
+ "RestClientProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "RestClientProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
}
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
index be0729f6c..4ecc60cf4 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
@@ -1,4 +1,14 @@
{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
"engineServiceParameters": {
"name": "MyApexEngine",
"version": "0.0.1",
@@ -72,3 +82,9 @@
}
}
}
+
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
index c41ff1cb4..d0421261a 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
@@ -1,73 +1,94 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestClientConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestClientConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb", "ccc"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb",
+ "ccc"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestClientConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa"]
+ "httpHeaders": [
+ [
+ "aaa"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- }
- },
- "eventOutputParameters": {
- "RestClientProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ "eventOutputParameters": {
+ "RestClientProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "RestClientProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
}
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
index bc9988633..3641adeae 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
@@ -1,73 +1,103 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestClientConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestClientConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- [null, "bbb"],
- ["ccc", "ddd"]
+ "httpHeaders": [
+ [
+ null,
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
}
- }
- },
- "RestClientConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestClientConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", null],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ null
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- }
- },
- "eventOutputParameters": {
- "RestClientProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ "eventOutputParameters": {
+ "RestClientProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "RestClientProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
}
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
index 3586b4481..aa5ab8493 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
@@ -1,91 +1,124 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {}
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestClientConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestClientConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpHeaders": [],
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestClientConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- }
- },
- "eventOutputParameters": {
- "RestClientProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ "eventOutputParameters": {
+ "RestClientProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpHeaders": [],
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestClientProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTCLIENT",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestClientProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
}
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
index a49b962ac..fdf094f54 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +42,7 @@ public class RestRequestorCarrierTechnologyParametersTest {
@Test
public void testRestRequestorCarrierTechnologyParametersBadList() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> {
@@ -52,7 +53,7 @@ public class RestRequestorCarrierTechnologyParametersTest {
@Test
public void testRestRequestorCarrierTechnologyParametersNotKvPairs() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> {
@@ -63,7 +64,7 @@ public class RestRequestorCarrierTechnologyParametersTest {
@Test
public void testRestRequestorCarrierTechnologyParametersNulls() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> {
@@ -74,7 +75,7 @@ public class RestRequestorCarrierTechnologyParametersTest {
@Test
public void testRestRequestorCarrierTechnologyParametersOk() throws ParameterException {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json");
arguments.setRelativeFileRoot(".");
ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
@@ -94,7 +95,7 @@ public class RestRequestorCarrierTechnologyParametersTest {
@Test
public void testRestClientCarrierTechnologyParameterFilterInvalid() {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
- arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json");
+ arguments.setToscaPolicyFilePath("src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json");
arguments.setRelativeFileRoot(".");
assertThatThrownBy(() -> {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
index d6234cafc..c5ba35e0f 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileDelete.json
@@ -1,74 +1,750 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/DeleteEvent",
"httpMethod": "DELETE"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer",
- "requestorTimeout": 2000
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer",
+ "requestorTimeout": 2000
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
index 4b36b5046..48089fb8e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGet.json
@@ -1,74 +1,750 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer",
- "requestorTimeout": 2000
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer",
+ "requestorTimeout": 2000
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
index 9374d9b85..c0aa4cbc4 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetConsumerAlone.json
@@ -1,70 +1,746 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
- "fileName": "target/EventsOut.json"
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "target/EventsOut.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
index 21e25f0f3..00e9d786a 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetEmpty.json
@@ -1,74 +1,750 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEmptyEvent",
"httpMethod": "GET"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer",
- "requestorTimeout": 2000
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer",
+ "requestorTimeout": 2000
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
index d476a2268..2b5f2beaa 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetMulti.json
@@ -1,127 +1,803 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsInMulti.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer0",
- "requestorTimeout": 2000
- },
- "FileConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "FileConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsInMulti.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer1",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer0",
- "requestorTimeout": 2000
- },
- "FileProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "FileProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOutMulti0.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
- },
- "RestRequestorProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer1",
- "requestorTimeout": 2000
- },
- "FileProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ },
+ "FileProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOutMulti1.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetProducerAlone.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetProducerAlone.json
index f4614d5cd..c78c0e4ea 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetProducerAlone.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FileGetProducerAlone.json
@@ -1,54 +1,730 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "Event0004"
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "Event0004"
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "Event0104"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "Event0104"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
index 2edc2c667..44cd71a17 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePost.json
@@ -1,74 +1,750 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/PostEvent",
"httpMethod": "POST"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer",
- "requestorTimeout": 2000
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer",
+ "requestorTimeout": 2000
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
index 0b53dc686..f57576769 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/File2RESTRequest2FilePut.json
@@ -1,78 +1,760 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "FileConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "FileConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "src/test/resources/events/EventsIn.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
}
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- }
- },
- "RestRequestorConsumer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ },
+ "RestRequestorConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/PutEvent",
"httpMethod": "PUT",
- "httpHeaders" : [
- ["Content-Type", "application/json"],
- ["Date", "Tue, 4 Dec 2018 14:57:12 GMT"]
+ "httpHeaders": [
+ [
+ "Content-Type",
+ "application/json"
+ ],
+ [
+ "Date",
+ "Tue, 4 Dec 2018 14:57:12 GMT"
+ ]
]
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer",
+ "requestorTimeout": 2000
+ }
},
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer",
- "requestorTimeout": 2000
- },
- "FileProducer": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "FILE",
- "parameters": {
+ "eventOutputParameters": {
+ "RestRequestorProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer",
+ "requestorTimeout": 2000
+ },
+ "FileProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
"fileName": "target/EventsOut.json"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "BasicEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "BasicEvent"
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
index d7a076346..33d81bf73 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
@@ -1,90 +1,774 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestRequestorConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ],
- "httpCodeFilter" : "*\\.*"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer0",
- "requestorTimeout": 2000
- },
- "RestRequestorConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ "httpHeaders": [],
+ "httpCodeFilter": "*\\.*"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : " "
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer1",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ "httpCodeFilter": " "
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer0",
- "requestorTimeout": 2000
- },
- "RestRequestorProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer1",
- "requestorTimeout": 2000
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
index 5fbee4404..bce7f8bde 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
@@ -1,11 +1,682 @@
{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
"engineServiceParameters": {
"name": "MyApexEngine",
"version": "0.0.1",
"id": 45,
"instanceCount": 4,
"deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
"engineParameters": {
"executorParameters": {
"JAVASCRIPT": {
@@ -88,3 +759,9 @@
}
}
}
+
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
index f3fbab801..66cfefc8c 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
@@ -1,89 +1,771 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestRequestorConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb", "ccc"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb",
+ "ccc"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer0",
- "requestorTimeout": 2000
- },
- "RestRequestorConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa"]
+ "httpHeaders": [
+ [
+ "aaa"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer1",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer0",
- "requestorTimeout": 2000
- },
- "RestRequestorProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer1",
- "requestorTimeout": 2000
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
index 26059be00..e429a23e1 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
@@ -1,92 +1,783 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestRequestorConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- [null, "bbb"],
- ["ccc", "ddd"]
+ "httpHeaders": [
+ [
+ null,
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer0",
- "requestorTimeout": 2000
- },
- "RestRequestorConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", null],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ null
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer1",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer0",
- "requestorTimeout": 2000
- },
- "RestRequestorProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer1",
- "requestorTimeout": 2000
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
index d1dc7d403..f3f3e3757 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
@@ -1,90 +1,774 @@
{
- "engineServiceParameters": {
- "name": "MyApexEngine",
- "version": "0.0.1",
- "id": 45,
- "instanceCount": 4,
- "deploymentPort": 12561,
- "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
- "engineParameters": {
- "executorParameters": {
- "JAVASCRIPT": {
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.policies.apex.Simplecontrolloop": {
+ "type": "onap.policies.native.Apex",
+ "type_version": "1.0.0",
+ "name": "onap.policies.apex.Simplecontrolloop",
+ "version": "1.0.0",
+ "properties": {
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "fec1b353-b35f-4384-b7d9-69622059c248",
+ "description": "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3",
+ "description": "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043",
+ "description": "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\""
+ }
+ },
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "UUID": "c5651414-fc1c-493b-878d-75f0ce685c36",
+ "description": "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\""
+ }
+ },
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "UUID": "790ff718-8dc0-44e0-89d8-1b3bbe238310",
+ "description": "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "99875c27-6120-4101-9e73-50ac810e322c",
+ "description": "Generated description for a concept called \"RequestEvent\" with version \"0.0.1\" and UUID \"99875c27-6120-4101-9e73-50ac810e322c\""
+ }
+ },
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "0667d905-981e-4249-b572-bc22821c7d29",
+ "description": "Generated description for a concept called \"RequestPolicy\" with version \"0.0.1\" and UUID \"0667d905-981e-4249-b572-bc22821c7d29\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "a5022000-fdd7-491c-af9f-5a36e87c997c",
+ "description": "Generated description for a concept called \"ResponseEvent\" with version \"0.0.1\" and UUID \"a5022000-fdd7-491c-af9f-5a36e87c997c\""
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "e72757c4-d81d-4337-b7ce-5f022f55818d",
+ "description": "Generated description for a concept called \"ResponsePolicy\" with version \"0.0.1\" and UUID \"e72757c4-d81d-4337-b7ce-5f022f55818d\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a1bd1f4e-713b-456b-b1a8-bb48beee28e8",
+ "description": "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22",
+ "description": "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8",
+ "description": "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b4876774-6907-3d27-a2b8-f05737c5ee4a",
+ "description": "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "5bcf946b-67be-3190-a906-f954896f999f",
+ "description": "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "c25bf5c3-7f1e-3667-b8a9-971ba21517bc",
+ "description": "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef",
+ "description": "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "SmallModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "RequestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "RequestState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "RequestState"
+ },
+ "trigger": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "RequestOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ },
+ "outgoingEvent": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "RequestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "RequestState",
+ "localName": "RequestOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "RequestState"
+ }
+ },
+ {
+ "key": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "ResponsePolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "ResponseState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "ResponseState"
+ },
+ "trigger": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "ResponseOutput",
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ },
+ "outgoingEvent": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "ResponsePolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "ResponseState",
+ "localName": "ResponseOutput"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "ResponseState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "SmallModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [
+ {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "executor.logger.debug(executor.subject.getId());\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.getName());\ntrue;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "SmallModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "source",
+ "target": "target",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "RequestEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "apex",
+ "target": "server",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ResponseEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.events",
+ "source": "server",
+ "target": "apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "intPar",
+ "value": {
+ "key": "intPar",
+ "fieldSchemaKey": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "SmallModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "BasicContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "IntType",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "SmallModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "IntType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Integer"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
}
- }
- }
- },
- "eventInputParameters": {
- "RestRequestorConsumer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ }
+ },
+ "eventInputParameters": {
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer0",
- "requestorTimeout": 2000
- },
- "RestRequestorConsumer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
- "parameters": {
+ "httpHeaders": [],
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
- "httpHeaders" : [
- ["aaa", "bbb"],
- ["ccc", "ddd"],
- ["eee", "fff"]
+ "httpHeaders": [
+ [
+ "aaa",
+ "bbb"
+ ],
+ [
+ "ccc",
+ "ddd"
+ ],
+ [
+ "eee",
+ "fff"
+ ]
],
- "httpCodeFilter" : "[1-5][0][0-5]"
- }
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "ResponseEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorProducer1",
- "requestorTimeout": 2000
- }
- },
- "eventOutputParameters": {
- "RestRequestorProducer0": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ "httpCodeFilter": "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
},
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer0",
- "requestorTimeout": 2000
- },
- "RestRequestorProducer1": {
- "carrierTechnologyParameters": {
- "carrierTechnology": "RESTREQUESTOR",
- "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
- },
- "eventProtocolParameters": {
- "eventProtocol": "JSON"
- },
- "eventNameFilter": "RequestEvent",
- "requestorMode": true,
- "requestorPeer": "RestRequestorConsumer1",
- "requestorTimeout": 2000
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ }
+ }
+ }
}
- }
-}
+ }
+ ]
+ }
+} \ No newline at end of file