summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/test/resources')
-rw-r--r--services/services-engine/src/test/resources/parameters/policyModelFromMetadata.json89
-rw-r--r--services/services-engine/src/test/resources/parameters/policyModelFromProperties.json85
-rw-r--r--services/services-engine/src/test/resources/parameters/policyModelMultiple.json105
3 files changed, 279 insertions, 0 deletions
diff --git a/services/services-engine/src/test/resources/parameters/policyModelFromMetadata.json b/services/services-engine/src/test/resources/parameters/policyModelFromMetadata.json
new file mode 100644
index 000000000..d7423bce9
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/policyModelFromMetadata.json
@@ -0,0 +1,89 @@
+{
+ "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",
+ "metadata": {
+ "metadataSetName": "dummyMetadataSet",
+ "metadataSetVersion": "1.0.0",
+ "metadataSet": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "dummy key1 provided in metadata",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "dummy key2 provided in metadata",
+ "version": "0.0.1"
+ }
+ },
+ "threshold": 3.15,
+ "state": "passive"
+ }
+ }
+ },
+ "properties": {
+ "javaProperties": [
+ [
+ "property0",
+ "property0Value"
+ ],
+ [
+ "property1",
+ "property1Value"
+ ]
+ ],
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "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/policyModelFromProperties.json b/services/services-engine/src/test/resources/parameters/policyModelFromProperties.json
new file mode 100644
index 000000000..77f00ac4d
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/policyModelFromProperties.json
@@ -0,0 +1,85 @@
+{
+ "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": {
+ "javaProperties": [
+ [
+ "property0",
+ "property0Value"
+ ],
+ [
+ "property1",
+ "property1Value"
+ ]
+ ],
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "dummy key1 provided in properties",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "dummy key2 provided in properties",
+ "version": "0.0.1"
+ }
+ },
+ "threshold": 3.15,
+ "state": "passive"
+ }
+ },
+ "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/policyModelMultiple.json b/services/services-engine/src/test/resources/parameters/policyModelMultiple.json
new file mode 100644
index 000000000..dc1e2bc91
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/policyModelMultiple.json
@@ -0,0 +1,105 @@
+{
+ "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",
+ "metadata": {
+ "metadataSetName": "dummyMetadataSet",
+ "metadataSetVersion": "1.0.0",
+ "metadataSet": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "dummy key1 provided in metadata",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "dummy key2 provided in metadata",
+ "version": "0.0.1"
+ }
+ },
+ "threshold": 3.15,
+ "state": "passive"
+ }
+ }
+ },
+ "properties": {
+ "javaProperties": [
+ [
+ "property0",
+ "property0Value"
+ ],
+ [
+ "property1",
+ "property1Value"
+ ]
+ ],
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policy_type_impl": {
+ "apexPolicyModel": {
+ "key": {
+ "name": "dummy key1 provided in properties",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "dummy key2 provided in properties",
+ "version": "0.0.1"
+ }
+ },
+ "threshold": 3.15,
+ "state": "passive"
+ }
+ },
+ "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