diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2020-09-02 17:19:26 +0100 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@bell.ca> | 2020-09-09 10:18:02 +0100 |
commit | 4c5c31eb9a2513af080d60d0f537b8339856150d (patch) | |
tree | 79aaf0d50cc261f57ce77f2eeae927c3c264478f /services/services-engine/src/test/resources | |
parent | d350fd659d716ca0b1678029230cc799cead2056 (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 'services/services-engine/src/test/resources')
59 files changed, 3957 insertions, 2130 deletions
diff --git a/services/services-engine/src/test/resources/parameters/badParams.json b/services/services-engine/src/test/resources/parameters/badParams.json index c3b96c7ba..33aaed4f3 100644 --- a/services/services-engine/src/test/resources/parameters/badParams.json +++ b/services/services-engine/src/test/resources/parameters/badParams.json @@ -1,31 +1,48 @@ { - "engineServiceParameters": { - "name": "hello there", - "version": "PA1", - "id": -45, - "instanceCount": -345, - "deploymentPort": 65536, - "policyModelFileName": "/some/file/name.xml" - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE" + "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": "hello there", + "version": "PA1", + "id": -45, + "instanceCount": -345, + "deploymentPort": 65536, + "policy_type_impl": { + "apexPolicyModel": {} + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE" + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE" + }, + "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/badParamsModelNotFile.json b/services/services-engine/src/test/resources/parameters/badParamsModelNotFile.json deleted file mode 100644 index 8dec995be..000000000 --- a/services/services-engine/src/test/resources/parameters/badParamsModelNotFile.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test", - "engineParameters": { - "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" - } - }, - "MyOtherProducer": { - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/bbb.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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/blankParams.json b/services/services-engine/src/test/resources/parameters/blankParams.json index d874ae98b..ca3b39026 100644 --- a/services/services-engine/src/test/resources/parameters/blankParams.json +++ b/services/services-engine/src/test/resources/parameters/blankParams.json @@ -1,11 +1,20 @@ { - "engineServiceParameters": { - - }, - "eventInputParameters": { - - }, - "eventOutputParameters": { - - } -} + "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": {}, + "eventInputParameters": {}, + "eventOutputParameters": {} + } + } + } + ] + } +}
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/correctParams.json b/services/services-engine/src/test/resources/parameters/correctParams.json index 90f5fa15b..43fef1cbe 100644 --- a/services/services-engine/src/test/resources/parameters/correctParams.json +++ b/services/services-engine/src/test/resources/parameters/correctParams.json @@ -1,43 +1,512 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 2, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 2, + "deploymentPort": 65522, + "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": "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": "BasicPolicy", + "version": "0.0.1" + }, + "value": { + "policyKey": { + "name": "BasicPolicy", + "version": "0.0.1" + }, + "template": "FREEFORM", + "state": { + "entry": [ + { + "key": "OnlyState", + "value": { + "stateKey": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "NULL", + "localName": "OnlyState" + }, + "trigger": { + "name": "BasicEvent", + "version": "0.0.1" + }, + "stateOutputs": { + "entry": [ + { + "key": "OnlyOutput", + "value": { + "key": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "OnlyOutput" + }, + "outgoingEvent": { + "name": "BasicEvent", + "version": "0.0.1" + }, + "nextState": { + "parentKeyName": "NULL", + "parentKeyVersion": "0.0.0", + "parentLocalName": "NULL", + "localName": "NULL" + } + } + } + ] + }, + "contextAlbumReference": [ + { + "name": "BasicContextAlbum", + "version": "0.0.1" + } + ], + "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": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "BasicTask" + }, + "outputType": "DIRECT", + "output": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "OnlyOutput" + } + } + } + ] + } + } + } + ] + }, + "firstState": "OnlyState" + } + } + ] + } + }, + "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.id);\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;" + } + } + } + ] + } + }, + "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 + } + } + ] + } + } + } + ] + } + }, + "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.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "src/test/resources/events/TestPojoEvent.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "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 index e92254655..8c1f99903 100644 --- a/services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json +++ b/services/services-engine/src/test/resources/parameters/correctParamsJavaProperties.json @@ -1,47 +1,522 @@ { - "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": { + "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": [ + [ + "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, + "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": "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": "BasicPolicy", + "version": "0.0.1" + }, + "value": { + "policyKey": { + "name": "BasicPolicy", + "version": "0.0.1" + }, + "template": "FREEFORM", + "state": { + "entry": [ + { + "key": "OnlyState", + "value": { + "stateKey": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "NULL", + "localName": "OnlyState" + }, + "trigger": { + "name": "BasicEvent", + "version": "0.0.1" + }, + "stateOutputs": { + "entry": [ + { + "key": "OnlyOutput", + "value": { + "key": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "OnlyOutput" + }, + "outgoingEvent": { + "name": "BasicEvent", + "version": "0.0.1" + }, + "nextState": { + "parentKeyName": "NULL", + "parentKeyVersion": "0.0.0", + "parentLocalName": "NULL", + "localName": "NULL" + } + } + } + ] + }, + "contextAlbumReference": [ + { + "name": "BasicContextAlbum", + "version": "0.0.1" + } + ], + "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": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "BasicTask" + }, + "outputType": "DIRECT", + "output": { + "parentKeyName": "BasicPolicy", + "parentKeyVersion": "0.0.1", + "parentLocalName": "OnlyState", + "localName": "OnlyOutput" + } + } + } + ] + } + } + } + ] + }, + "firstState": "OnlyState" + } + } + ] + } + }, + "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.id);\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;" + } + } + } + ] + } + }, + "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 + } + } + ] + } + } + } + ] + } + }, + "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.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "standardIo": true + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "src/test/resources/events/TestPojoEvent.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/factoryGoodParams.json b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json index 87448f5e7..c83b4e984 100644 --- a/services/services-engine/src/test/resources/parameters/factoryGoodParams.json +++ b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json @@ -1,64 +1,81 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "MyOtherProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + }, + "MyOtherProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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" + }, + "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/goodParams.json b/services/services-engine/src/test/resources/parameters/goodParams.json index f323b0b51..af075c023 100644 --- a/services/services-engine/src/test/resources/parameters/goodParams.json +++ b/services/services-engine/src/test/resources/parameters/goodParams.json @@ -1,64 +1,81 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "MyOtherProducer": { - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + }, + "MyOtherProducer": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } } - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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" + }, + "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/goodParamsRelative.json b/services/services-engine/src/test/resources/parameters/goodParamsRelative.json index b3d193111..937034ce7 100644 --- a/services/services-engine/src/test/resources/parameters/goodParamsRelative.json +++ b/services/services-engine/src/test/resources/parameters/goodParamsRelative.json @@ -1,64 +1,80 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "MyOtherProducer": { - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + }, + "MyOtherProducer": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "aaa.json" + } } - } - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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" + }, + "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/javaPropertiesBad.json b/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json index dc663bd56..f9de6c76f 100644 --- a/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesBad.json @@ -1,53 +1,82 @@ { - "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": { + "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" + ], + [ + "property1", + "property1Value", + "propertyExtraValue" + ], + [], + [ + null, + "proeprtyValue" + ], + null, + [ + "propertyname", + null + ] + ], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "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": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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 index aca972302..2e94dc9a8 100644 --- a/services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesEmpty.json @@ -1,46 +1,63 @@ { - "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": { + "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": [], + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "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": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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 index 74b967f74..c3168ebdd 100644 --- a/services/services-engine/src/test/resources/parameters/javaPropertiesOK.json +++ b/services/services-engine/src/test/resources/parameters/javaPropertiesOK.json @@ -1,49 +1,72 @@ { - "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": { + "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": {} + }, + "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": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/noParams.json b/services/services-engine/src/test/resources/parameters/noParams.json index 7a73a41bf..15ed425a5 100644 --- a/services/services-engine/src/test/resources/parameters/noParams.json +++ b/services/services-engine/src/test/resources/parameters/noParams.json @@ -1,2 +1,16 @@ { + "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": {} + } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json index 48c2dc905..5b3292651 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" + }, + "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/prodConsBadEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json index 51e9c3972..2f9348388 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "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.event.impl.jsonprotocolplugin.JsonEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "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.event.impl.jsonprotocolplugin.JsonEventProtocolParameters" + } + } } + } } - } -}
\ No newline at end of file + } + ] + } +} diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json index 38fba4480..fbe210ff8 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": null + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "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" + "eventInputParameters": { + "aConsumer": { + "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/prodConsMismatchCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json index 42c3e69ee..8e0629dc6 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_LOOPER", - "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" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_LOOPER", + "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/prodConsMismatchEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json index 1bb893218..5f5047e2f 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_BEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_BEL", + "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/prodConsNoCT.json b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json index e94f05a5b..63367f805 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoCT.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" + }, + "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/prodConsNoCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json index 07d50b30f..bd927b2bc 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json @@ -1,41 +1,58 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER" + }, + "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/prodConsNoEP.json b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json index bdb780f4a..55bc30e41 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoEP.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventParameters": { + "eventProtocol": "JSON" } + } }, - "eventParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters" + }, + "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/prodConsNoEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json index f39173ff8..f85532718 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json @@ -1,41 +1,58 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json index 938c318a7..cad5c82c3 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json +++ b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "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" + "eventInputParameters": { + "aConsumer": { + "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/prodConsWrongTypeCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json index adbda5c13..3a4c80ea5 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + "eventInputParameters": { + "aConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + }, + "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/prodConsWrongTypeEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json index bbc50bde6..b7c31b033 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json @@ -1,42 +1,59 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "aProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "aProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - } - }, - "eventInputParameters": { - "aConsumer": { - "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.SuperDooperCarrierTechnologyParameters" + "eventInputParameters": { + "aConsumer": { + "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.SuperDooperCarrierTechnologyParameters" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json index 12f22c1eb..d25f81702 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json @@ -1,23 +1,40 @@ { - "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", - "distributorParameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "distributorParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" - } - }, - "executorParameters": { - "MVEL": { + } + }, + "executorParameters": { + "MVEL": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json index 00e6ca64a..b0f326346 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json @@ -1,23 +1,40 @@ { - "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", - "lockManagerParameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "lockManagerParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" - } - }, - "executorParameters": { - "JAVASCRIPT": { + } + }, + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json index c10172d23..94713fe70 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json @@ -1,15 +1,32 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "contextParameters": { - "parameterClassName": "java.lang.Integer" + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "java.lang.Integer" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json index 8c2331e32..239023aff 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json @@ -1,23 +1,40 @@ { - "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", - "persistorParameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "persistorParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" - } - }, - "executorParameters": { - "JAVASCRIPT": { + } + }, + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json index abb6b18cf..f5157bbcd 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json @@ -1,15 +1,32 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "contextParameters": { - "parameterClassName": "hello" + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "hello" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json index 1083f18b1..5dc96a4e0 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json @@ -1,15 +1,32 @@ { - "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.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json index 7d9d8900c..350d54feb 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json @@ -1,15 +1,32 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "contextParameters": { - "parameterClassNamelooby": "" + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassNamelooby": "" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json index 44c53bb29..28bf1aec5 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json @@ -1,15 +1,30 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "contextParameters": { - + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": {} + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json index f4fee9fa9..16328ff67 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json @@ -1,45 +1,62 @@ { - "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": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "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": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/serviceContextOKDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json index 5aff80d94..6509fde6c 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json @@ -1,48 +1,65 @@ { - "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", + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.DistributorParameters" - } - }, - "executorParameters": { - "JAVASCRIPT": { + } + }, + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/serviceContextOKFlushParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json index 8bae50523..0b1b1e7c0 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json @@ -1,49 +1,66 @@ { - "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", - "persistorParameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "persistorParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.PersistorParameters", "flushPeriod": 123456 - } - }, - "executorParameters": { - "JAVASCRIPT": { + } + }, + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/serviceContextOKFullParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json index 24544d2ab..00be15d79 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json @@ -1,59 +1,76 @@ { - "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", - "distributorParameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "contextParameters": { + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", + "distributorParameters": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters", "configFile": "my/lovely/configFile.xml", "jgroupsFile": "holy/stone.xml", "preferIPv4Stack": false, "jgroupsBindAddress": "fatherted" - }, - "lockManagerParameters": { + }, + "lockManagerParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.LockManagerParameters" - }, - "persistorParameters": { + }, + "persistorParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.PersistorParameters", "flushPeriod": 123456 - } - }, - "executorParameters": { - "JAVASCRIPT": { + } + }, + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/serviceExecutorBadParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json index f9f50ee07..84a882977 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json @@ -1,18 +1,35 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": "hello" + }, + "ZOOBY": "hello" + } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json index 4a28d58aa..df53f5d63 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json @@ -1,23 +1,40 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": { + }, + "ZOOBY": { "parameterClassNamelooby": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "LOOBY": { + }, + "LOOBY": { "parameterClassNamelooby": "" + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json index 7dd74ea34..78e1bfff5 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json @@ -1,23 +1,40 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": { + }, + "ZOOBY": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "LOOBY": { + }, + "LOOBY": { "parameterClassName": " " + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json index 2f7219f46..da3ab9552 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json @@ -1,25 +1,40 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": { + }, + "ZOOBY": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "LOOBY": { - "parameterClassName": { - - } + }, + "LOOBY": { + "parameterClassName": {} + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json index 39618055f..116276fb4 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json @@ -1,23 +1,40 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": { + }, + "ZOOBY": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "LOOBY": { + }, + "LOOBY": { "parameterClassName": "helloworld" + } } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json index 3927740e3..1a4c30934 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json @@ -1,20 +1,35 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" - }, - "ZOOBY": { - + }, + "ZOOBY": {} } + } } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json index 0c6618f2e..d5c540191 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json @@ -1,13 +1,30 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "someParameter": "someValue" + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "someParameter": "someValue" + } + } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json index 4eb6fe024..db6b7e0b9 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json @@ -1,40 +1,55 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", - "engineParameters": { - "executorParameters": { - - } - } - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": {} + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "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" + "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/superDooperParams.json b/services/services-engine/src/test/resources/parameters/superDooperParams.json index 75820ebaf..ff06f4688 100644 --- a/services/services-engine/src/test/resources/parameters/superDooperParams.json +++ b/services/services-engine/src/test/resources/parameters/superDooperParams.json @@ -1,17 +1,30 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 345, - "deploymentPort": 65522 - }, - "eventOutputParameters": { - "FirstProducer": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters", - "parameters": { + "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": 345, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters", + "parameters": { "bootstrapServers": "somehost:12345", "acks": 0, "retries": 25, @@ -25,31 +38,36 @@ "producerTopic": "producer-out", "consumerPollTime": 101, "consumerTopicList": [ - "consumer-out-0", - "consumer-out-1", - "consumer-out-2" + "consumer-out-0", + "consumer-out-1", + "consumer-out-2" ], "keySerializer": "some.key.serailizer", "valueSerializer": "some.value.serailizer", "keyDeserializer": "some.key.deserailizer", "valueDeserializer": "some.value.deserailizer" + } + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" } + } }, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" - } - } - }, - "eventInputParameters": { - "MySuperDooperConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + "eventInputParameters": { + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } } + } } - } -} + } + ] + } +}
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json index 355531417..06cfd1f5c 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json @@ -1,72 +1,89 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer1" - }, - "SyncProducer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer1" + }, + "SyncProducer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer1" - }, - "SyncConsumer1": { - "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" - }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer1" + }, + "SyncConsumer1": { + "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" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + } + } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json index 7a04a439a..d2e93d2d4 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json @@ -1,65 +1,80 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": "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": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "MyOtherProducer": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } + }, + "MyOtherProducer": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "synchronousTimeout": 12345 + } }, - "synchronousTimeout": 12345 - } - }, - "eventInputParameters": { - "TheFileConsumer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - } - }, - "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" + }, + "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/syncBadParamsInvalidTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json index 6a4270b27..3f95bd912 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json @@ -1,76 +1,93 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousTimeout": -10, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousTimeout": -3, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousTimeout": -10, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousTimeout": -3, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "synchronousTimeout": -1, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "synchronousTimeout": -1, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true, + "synchronousTimeout": -99999999 + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true, - "synchronousTimeout": -99999999 + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json index 8c6910a13..de8df54f4 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json @@ -1,71 +1,88 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0" - }, - "SyncConsumer1": { - "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" - }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer1" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0" + }, + "SyncConsumer1": { + "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" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer1" + } + } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json index e1ed8316a..c8544a680 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json @@ -1,72 +1,89 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } + } }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": false, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": false, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0" - }, - "SyncConsumer1": { - "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" - }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer1" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0" + }, + "SyncConsumer1": { + "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" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer1" + } + } + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json index 9e24926b9..20ff05fed 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json @@ -1,76 +1,93 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousTimeout": 10, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousTimeout": 3, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousTimeout": 10, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousTimeout": 3, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "synchronousTimeout": 1, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "synchronousTimeout": 1, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true, + "synchronousTimeout": 99999999 + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true, - "synchronousTimeout": 99999999 + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParams.json b/services/services-engine/src/test/resources/parameters/syncGoodParams.json index 2a29254de..4b134cc04 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParams.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParams.json @@ -1,72 +1,89 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json index 1988b76bd..4d2ad3205 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json @@ -1,76 +1,93 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "synchronousTimeout": 12345, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousTimeout": 1, - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "synchronousTimeout": 12345, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousTimeout": 1, + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousTimeout": 12345, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousTimeout": 12345, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "synchronousTimeout": 1, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" - }, - "synchronousTimeout": 1, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json index b294a22f7..cc0906ac1 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json @@ -1,74 +1,91 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousTimeout": 12345, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousTimeout": 12345, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "synchronousTimeout": 1, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "carrierTechnologyParameters": { - "carrierTechnology": "SUPER_DOOPER", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" - }, - "synchronousTimeout": 1, - "eventProtocolParameters": { - "eventProtocol": "SUPER_TOK_DEL", - "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json index 824f0f6c2..6d117f7f2 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json @@ -1,74 +1,91 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "synchronousTimeout": 12345, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "synchronousTimeout": 12345, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1", - "synchronousTimeout": 1 - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1", + "synchronousTimeout": 1 + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json index 4ca73fc74..152506a1e 100644 --- a/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json @@ -1,72 +1,89 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer1" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer0" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer1" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer0" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json b/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json index e4f9ea335..c7a784cf6 100644 --- a/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json @@ -1,74 +1,91 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1", - "synchronousTimeout" : 456 - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1", + "synchronousTimeout": 456 + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true, + "synchronousTimeout": 123 + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true, - "synchronousTimeout" : 123 + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json index 3f2c8c555..bcc6245fc 100644 --- a/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json @@ -1,72 +1,87 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": "src/test/resources/policymodels/SmallModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer0" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer0" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer0", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer0", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json index c377ea6fc..001205a1f 100644 --- a/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json @@ -1,72 +1,89 @@ { - "engineServiceParameters": { - "name": "MyApexEngine", - "version": "0.0.1", - "id": 45, - "instanceCount": 19, - "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SmallModel.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": 19, + "deploymentPort": 65522, + "policy_type_impl": { + "apexPolicyModel": {} + }, + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } } - } - } - }, - "eventOutputParameters": { - "SyncProducer0": { - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { - "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncConsumer0" - }, - "SyncProducer1": { - "synchronousMode": true, - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventOutputParameters": { + "SyncProducer0": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/aaa.json" - } - }, - "eventProtocolParameters": { - "eventProtocol": "JSON" - }, - "synchronousPeer": "SyncConsumer1" - } - }, - "eventInputParameters": { - "SyncConsumer0": { - "eventProtocolParameters": { - "eventProtocol": "JSON" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncConsumer0" + }, + "SyncProducer1": { + "synchronousMode": true, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousPeer": "SyncConsumer1" + } }, - "synchronousMode": true, - "synchronousPeer": "SyncProducer1", - "carrierTechnologyParameters": { - "carrierTechnology": "FILE", - "parameters": { + "eventInputParameters": { + "SyncConsumer0": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "synchronousMode": true, + "synchronousPeer": "SyncProducer1", + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { "fileName": "target/bbb.json" + } } + }, + "SyncConsumer1": { + "synchronousPeer": "SyncProducer1", + "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" + }, + "synchronousMode": true + } } - }, - "SyncConsumer1": { - "synchronousPeer": "SyncProducer1", - "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" - }, - "synchronousMode": true + } } - } + } + ] + } }
\ No newline at end of file |