From 11b9b225ed916b907445f662d60d95ca03e3d251 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 18 Dec 2018 17:18:45 +0000 Subject: Add Java property parameters for HTTPS Issue-ID: POLICY-1222 Change-Id: I4a683cf2f52e7f1d28164954f84d0744b5ca7e9c Signed-off-by: liamfallon --- .../test/resources/parameters/correctParams.json | 43 ++++++++++++++++++ .../parameters/correctParamsJavaProperties.json | 47 +++++++++++++++++++ .../resources/parameters/javaPropertiesBad.json | 53 ++++++++++++++++++++++ .../resources/parameters/javaPropertiesEmpty.json | 46 +++++++++++++++++++ .../resources/parameters/javaPropertiesOK.json | 49 ++++++++++++++++++++ 5 files changed, 238 insertions(+) create mode 100644 services/services-engine/src/test/resources/parameters/correctParams.json create mode 100644 services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json create mode 100644 services/services-engine/src/test/resources/parameters/javaPropertiesBad.json create mode 100644 services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json create mode 100644 services/services-engine/src/test/resources/parameters/javaPropertiesOK.json (limited to 'services/services-engine/src/test/resources/parameters') diff --git a/services/services-engine/src/test/resources/parameters/correctParams.json b/services/services-engine/src/test/resources/parameters/correctParams.json new file mode 100644 index 000000000..2265134d4 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/correctParams.json @@ -0,0 +1,43 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 2, + "deploymentPort": 65522, + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + } +} \ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json b/services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json new file mode 100644 index 000000000..0a599d701 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json @@ -0,0 +1,47 @@ +{ + "javaProperties" : [ + ["javax.net.ssl.trustStore", "trust-store-file"], + ["javax.net.ssl.trustStorePassword", "UG9sMWN5XzBuYXA="] + ], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 2, + "deploymentPort": 65522, + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + } +} \ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json b/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json new file mode 100644 index 000000000..dc663bd56 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json @@ -0,0 +1,53 @@ +{ + "javaProperties" : [ + ["property0"], + ["property1", "property1Value", "propertyExtraValue"], + [], + [null, "proeprtyValue"], + null, + ["propertyname", null] + ], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 345, + "deploymentPort": 65522, + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" + }, + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + }, + "eventInputParameters": { + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + } + } + } +} \ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json b/services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json new file mode 100644 index 000000000..aca972302 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json @@ -0,0 +1,46 @@ +{ + "javaProperties" : [], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 345, + "deploymentPort": 65522, + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" + }, + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + }, + "eventInputParameters": { + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + } + } + } +} \ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/javaPropertiesOK.json b/services/services-engine/src/test/resources/parameters/javaPropertiesOK.json new file mode 100644 index 000000000..74b967f74 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesOK.json @@ -0,0 +1,49 @@ +{ + "javaProperties" : [ + ["property0", "property0Value"], + ["property1", "property1Value"] + ], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 345, + "deploymentPort": 65522, + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" + }, + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + }, + "eventInputParameters": { + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + } + } + } +} \ No newline at end of file -- cgit 1.2.3-korg