diff options
author | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-24 17:36:53 +0100 |
---|---|---|
committer | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-25 11:47:15 +0100 |
commit | d524cedc578ae1bfa3bae895b3170f87463cbed9 (patch) | |
tree | 0740644e356534f770d59ff34f16e5d9ca601276 /examples/examples-onap-vcpe/src/test/resources/config | |
parent | 41ecf036b7f1b3bdd56311a0bc706407b242faca (diff) |
Adding more examples to apex-pdp
- Adding more examples (DecisionMaker, Periodic & ONAPvCPE) to apex-pdp.
- Fixed CORS issue in plugin-event-carrier-restserver module.
Added a ContainerResponseFilter to intercept every request/response coming to
REST server and add the required headers to support CORS.
Change-Id: Ic3e36c683f2a78992ce1417d2c00233b34066f2f
Issue-ID: POLICY-861
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'examples/examples-onap-vcpe/src/test/resources/config')
4 files changed, 141 insertions, 0 deletions
diff --git a/examples/examples-onap-vcpe/src/test/resources/config/ApexConfigFileOnly.json b/examples/examples-onap-vcpe/src/test/resources/config/ApexConfigFileOnly.json new file mode 100644 index 000000000..f2ffdf079 --- /dev/null +++ b/examples/examples-onap-vcpe/src/test/resources/config/ApexConfigFileOnly.json @@ -0,0 +1,88 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 4, + "deploymentPort": 12561, + "policyModelFileName": "policy/ONAPTLGoalPolicyModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + }, + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "schemaParameters": { + "Avro": { + "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters" + } + } + } + } + }, + "eventInputParameters": { + "VCPEInitConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "src/main/resources/config/VCPEInitiationEvents.txt" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON", + "parameters": { + "nameAlias": "closedLoopControlName", + "versionAlias": "version", + "sourceAlias": "from" + } + } + }, + "GuardRequestorConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RESTRequestorCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:54321/AAIAndGuardSim/sim/pdp/api/getDecision", + "httpMethod": "POST", + "restRequestTimeout": 2000 + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventName": "GuardResponseEvent", + "eventNameFilter": "GuardResponseEvent", + "requestorMode": true, + "requestorPeer": "GuardRequestorProducer", + "requestorTimeout": 500 + } + }, + "eventOutputParameters": { + "GuardRequestorProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RESTRequestorCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "GuardRequestEvent", + "requestorMode": true, + "requestorPeer": "GuardRequestorConsumer", + "requestorTimeout": 500 + }, + "logProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "/tmp/VCPEEventsOut.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + } +} diff --git a/examples/examples-onap-vcpe/src/test/resources/config/appc.lcm.success.json b/examples/examples-onap-vcpe/src/test/resources/config/appc.lcm.success.json new file mode 100644 index 000000000..2d2005d98 --- /dev/null +++ b/examples/examples-onap-vcpe/src/test/resources/config/appc.lcm.success.json @@ -0,0 +1,22 @@ +{ + "body": { + "output": { + "common-header": { + "timestamp": "2017-08-25T21:06:23.037Z", + "api-ver": "5.00", + "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "sub-request-id": "1", + "flags": {} + }, + "status": { + "code": 400, + "message": "Restart Successful" + } + } + }, + "version": "2.0", + "rpc-name": "restart", + "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1", + "type": "response" +}
\ No newline at end of file diff --git a/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.abatement.json b/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.abatement.json new file mode 100644 index 000000000..729451191 --- /dev/null +++ b/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.abatement.json @@ -0,0 +1,16 @@ +{ + "closedLoopControlName": "${closedLoopControlName}", + "closedLoopAlarmStart": 1463679805324, + "closedLoopAlarmEnd": 1463699805324, + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "closedLoopEventStatus": "ABATED", + "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "target_type": "VNF", + "target": "generic-vnf.vnf-id", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "from": "DCAE", + "version": "1.0.2" +} diff --git a/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.onset.json b/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.onset.json new file mode 100644 index 000000000..feb15c153 --- /dev/null +++ b/examples/examples-onap-vcpe/src/test/resources/config/dcae.vcpe.onset.json @@ -0,0 +1,15 @@ +{ + "closedLoopControlName": "${closedLoopControlName}", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "closedLoopEventStatus": "ONSET", + "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "target_type": "VNF", + "target": "generic-vnf.vnf-id", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "from": "DCAE", + "version": "1.0.2" +} |