diff options
author | 2018-11-06 12:02:46 +0000 | |
---|---|---|
committer | 2018-11-07 12:41:09 +0000 | |
commit | 53d8916cc60d97e2ce7ae345f8cc25f5602567da (patch) | |
tree | ee2f3a8e543c31993c51a58257354ccffb648dfe /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons | |
parent | 9dc414a0cabc9074e87a7c9cd5c3e5ceee733e5a (diff) |
Refactor unit test data
There were many copies of test policies and examples
strewn through the Apex unit tests. This change cleans
up the unit tests so that a single version of all example
policies is used in all tests.
Also added a new relative file root command line parameter
to Apex to allow the root of relative paths in configuration
files to be set.
Apologies for the size of this review but unfortunately
all of this must be done in one shot.
Issue-ID: POLICY-1252
Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons')
7 files changed, 540 insertions, 540 deletions
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 46da3970a..77079c63e 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,75 +1,75 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer", - "requestorTimeout": 500 - }, - "FileProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "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": { + "fileName": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } 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 3c1d314fe..09cf0f051 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,75 +1,75 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer", - "requestorTimeout": 500 - }, - "FileProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "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": { + "fileName": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } 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 9ebe89df5..f9c916d4b 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,71 +1,71 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "FileProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "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": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } 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 424d2b454..b7b9a44d9 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,129 +1,129 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsInMulti.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer0", - "requestorTimeout": 500 - }, - "FileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsInMulti.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer1", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer0", - "requestorTimeout": 500 - }, - "FileProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOutMulti0.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - }, - "RestRequestorProducer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer1", - "requestorTimeout": 500 - }, - "FileProducer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOutMulti1.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsInMulti.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "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" + } + }, + "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", + "restRequestTimeout": 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 + }, + "FileProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/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": { + "fileName": "src/test/resources/events/EventsOutMulti1.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } 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 4fcbf59d9..b50b8bd20 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,54 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.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": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.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": { + "fileName": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "Event0104" + } + } } 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 fe5af67ee..8d6d4ca4a 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,75 +1,75 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer", - "requestorTimeout": 500 - }, - "FileProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "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": { + "fileName": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } 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 e78446447..ac418e623 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,75 +1,75 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 4, - "deploymentPort": 12561, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", - "engineParameters": { - "executorParameters": { - "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" - } - } - } - }, - "eventInputParameters": { - "FileConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsIn.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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", - "restRequestTimeout": 2000 - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0100", - "requestorMode": true, - "requestorPeer": "RestRequestorProducer", - "requestorTimeout": 500 - } - }, - "eventOutputParameters": { - "RestRequestorProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "RESTREQUESTOR", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0004", - "requestorMode": true, - "requestorPeer": "RestRequestorConsumer", - "requestorTimeout": 500 - }, - "FileProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "src/test/resources/events/EventsOut.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "eventNameFilter": "Event0104" - } - } + "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": { + "FileConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/test/resources/events/EventsIn.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "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", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "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": { + "fileName": "src/test/resources/events/EventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "BasicEvent" + } + } } |