787d0bdb3a5e58c200df0d9489f154708b0606d1
[policy/apex-pdp.git] /
1 {
2   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
3   "topology_template": {
4     "policies": [
5       {
6         "onap.policies.apex.Test": {
7           "type": "onap.policies.native.Apex",
8           "type_version": "1.0.0",
9           "name": "onap.policies.apex.Test",
10           "version": "1.0.0",
11           "properties": {
12             "engineServiceParameters": {
13               "name": "MyApexEngine",
14               "version": "0.0.1",
15               "id": 45,
16               "instanceCount": 4,
17               "deploymentPort": 12553,
18               "policy_type_impl": {
19                 "apexPolicyModel": {
20                   "key": {
21                     "name": "JMSTestModel",
22                     "version": "0.0.1"
23                   },
24                   "keyInformation": {
25                     "key": {
26                       "name": "JMSTestModel_KeyInfo",
27                       "version": "0.0.1"
28                     },
29                     "keyInfoMap": {
30                       "entry": [
31                         {
32                           "key": {
33                             "name": "JMSCopyInOutTask",
34                             "version": "0.0.1"
35                           },
36                           "value": {
37                             "key": {
38                               "name": "JMSCopyInOutTask",
39                               "version": "0.0.1"
40                             },
41                             "UUID": "b59815ef-fc5b-4e44-9f6e-2f6212bb7296",
42                             "description": "Generated description for a concept called \"JMSCopyInOutTask\" with version \"null\" and UUID \"b59815ef-fc5b-4e44-9f6e-2f6212bb7296\""
43                           }
44                         },
45                         {
46                           "key": {
47                             "name": "JMSTestModel",
48                             "version": "0.0.1"
49                           },
50                           "value": {
51                             "key": {
52                               "name": "JMSTestModel",
53                               "version": "0.0.1"
54                             },
55                             "UUID": "a731a845-f984-46a9-adf4-c6c7ca0baa0d",
56                             "description": "Generated description for a concept called \"JMSTestModel\" with version \"null\" and UUID \"a731a845-f984-46a9-adf4-c6c7ca0baa0d\""
57                           }
58                         },
59                         {
60                           "key": {
61                             "name": "JMSTestModel_Albums",
62                             "version": "0.0.1"
63                           },
64                           "value": {
65                             "key": {
66                               "name": "JMSTestModel_Albums",
67                               "version": "0.0.1"
68                             },
69                             "UUID": "b580c2e2-067e-452c-8410-d69344fa718c",
70                             "description": "Generated description for concept referred to by key \"JMSTestModel_Albums:0.0.1\""
71                           }
72                         },
73                         {
74                           "key": {
75                             "name": "JMSTestModel_Events",
76                             "version": "0.0.1"
77                           },
78                           "value": {
79                             "key": {
80                               "name": "JMSTestModel_Events",
81                               "version": "0.0.1"
82                             },
83                             "UUID": "463f3fa6-2be3-4ded-a015-1f045ee8991e",
84                             "description": "Generated description for concept referred to by key \"JMSTestModel_Events:0.0.1\""
85                           }
86                         },
87                         {
88                           "key": {
89                             "name": "JMSTestModel_KeyInfo",
90                             "version": "0.0.1"
91                           },
92                           "value": {
93                             "key": {
94                               "name": "JMSTestModel_KeyInfo",
95                               "version": "0.0.1"
96                             },
97                             "UUID": "b14d97fb-f215-4b70-9cd6-cbfb3ed085ee",
98                             "description": "Generated description for concept referred to by key \"JMSTestModel_KeyInfo:0.0.1\""
99                           }
100                         },
101                         {
102                           "key": {
103                             "name": "JMSTestModel_Policies",
104                             "version": "0.0.1"
105                           },
106                           "value": {
107                             "key": {
108                               "name": "JMSTestModel_Policies",
109                               "version": "0.0.1"
110                             },
111                             "UUID": "9ae9047f-e0d8-42c4-b3a6-e32954ace3b6",
112                             "description": "Generated description for concept referred to by key \"JMSTestModel_Policies:0.0.1\""
113                           }
114                         },
115                         {
116                           "key": {
117                             "name": "JMSTestModel_Schemas",
118                             "version": "0.0.1"
119                           },
120                           "value": {
121                             "key": {
122                               "name": "JMSTestModel_Schemas",
123                               "version": "0.0.1"
124                             },
125                             "UUID": "adc30c29-d4b9-4408-9213-6d86b051d59c",
126                             "description": "Generated description for concept referred to by key \"JMSTestModel_Schemas:0.0.1\""
127                           }
128                         },
129                         {
130                           "key": {
131                             "name": "JMSTestModel_Tasks",
132                             "version": "0.0.1"
133                           },
134                           "value": {
135                             "key": {
136                               "name": "JMSTestModel_Tasks",
137                               "version": "0.0.1"
138                             },
139                             "UUID": "c3545f15-710c-4339-9a4e-e0eacffac52e",
140                             "description": "Generated description for concept referred to by key \"JMSTestModel_Tasks:0.0.1\""
141                           }
142                         },
143                         {
144                           "key": {
145                             "name": "JMSTestPolicy",
146                             "version": "0.0.1"
147                           },
148                           "value": {
149                             "key": {
150                               "name": "JMSTestPolicy",
151                               "version": "0.0.1"
152                             },
153                             "UUID": "fdda6a40-6767-45b0-8703-3b5b3bafaf19",
154                             "description": "Generated description for a concept called \"JMSTestPolicy\" with version \"null\" and UUID \"fdda6a40-6767-45b0-8703-3b5b3bafaf19\""
155                           }
156                         },
157                         {
158                           "key": {
159                             "name": "PingTestClassIncomingEvent",
160                             "version": "0.0.1"
161                           },
162                           "value": {
163                             "key": {
164                               "name": "PingTestClassIncomingEvent",
165                               "version": "0.0.1"
166                             },
167                             "UUID": "6cdd11f3-5fe8-4510-81b9-af3be303ebae",
168                             "description": "Generated description for a concept called \"PingTestClassIncomingEvent\" with version \"null\" and UUID \"6cdd11f3-5fe8-4510-81b9-af3be303ebae\""
169                           }
170                         },
171                         {
172                           "key": {
173                             "name": "PingTestClassOutgoingEvent",
174                             "version": "0.0.1"
175                           },
176                           "value": {
177                             "key": {
178                               "name": "PingTestClassOutgoingEvent",
179                               "version": "0.0.1"
180                             },
181                             "UUID": "dc04de01-2284-4461-9fe2-da58a2122a73",
182                             "description": "Generated description for a concept called \"PingTestClassOutgoingEvent\" with version \"0.0.1\" and UUID \"dc04de01-2284-4461-9fe2-da58a2122a73\""
183                           }
184                         },
185                         {
186                           "key": {
187                             "name": "PingTestClassType",
188                             "version": "0.0.1"
189                           },
190                           "value": {
191                             "key": {
192                               "name": "PingTestClassType",
193                               "version": "0.0.1"
194                             },
195                             "UUID": "bdc2f70a-de52-4127-8012-b9593657da3c",
196                             "description": "Generated description for a concept called \"PingTestClassType\" with version \"null\" and UUID \"bdc2f70a-de52-4127-8012-b9593657da3c\""
197                           }
198                         }
199                       ]
200                     }
201                   },
202                   "policies": {
203                     "key": {
204                       "name": "JMSTestModel_Policies",
205                       "version": "0.0.1"
206                     },
207                     "policyMap": {
208                       "entry": [
209                         {
210                           "key": {
211                             "name": "JMSTestPolicy",
212                             "version": "0.0.1"
213                           },
214                           "value": {
215                             "policyKey": {
216                               "name": "JMSTestPolicy",
217                               "version": "0.0.1"
218                             },
219                             "template": "FREEFORM",
220                             "state": {
221                               "entry": [
222                                 {
223                                   "key": "TestJMSState",
224                                   "value": {
225                                     "stateKey": {
226                                       "parentKeyName": "JMSTestPolicy",
227                                       "parentKeyVersion": "0.0.1",
228                                       "parentLocalName": "NULL",
229                                       "localName": "TestJMSState"
230                                     },
231                                     "trigger": {
232                                       "name": "PingTestClassIncomingEvent",
233                                       "version": "0.0.1"
234                                     },
235                                     "stateOutputs": {
236                                       "entry": [
237                                         {
238                                           "key": "InOutOutputMapping",
239                                           "value": {
240                                             "key": {
241                                               "parentKeyName": "JMSTestPolicy",
242                                               "parentKeyVersion": "0.0.1",
243                                               "parentLocalName": "TestJMSState",
244                                               "localName": "InOutOutputMapping"
245                                             },
246                                             "outgoingEvent": {
247                                               "name": "PingTestClassOutgoingEvent",
248                                               "version": "0.0.1"
249                                             },
250                                             "nextState": {
251                                               "parentKeyName": "NULL",
252                                               "parentKeyVersion": "0.0.0",
253                                               "parentLocalName": "NULL",
254                                               "localName": "NULL"
255                                             }
256                                           }
257                                         }
258                                       ]
259                                     },
260                                     "contextAlbumReference": [],
261                                     "taskSelectionLogic": {
262                                       "key": "NULL",
263                                       "logicFlavour": "UNDEFINED",
264                                       "logic": ""
265                                     },
266                                     "stateFinalizerLogicMap": {
267                                       "entry": []
268                                     },
269                                     "defaultTask": {
270                                       "name": "JMSCopyInOutTask",
271                                       "version": "0.0.1"
272                                     },
273                                     "taskReferences": {
274                                       "entry": [
275                                         {
276                                           "key": {
277                                             "name": "JMSCopyInOutTask",
278                                             "version": "0.0.1"
279                                           },
280                                           "value": {
281                                             "key": {
282                                               "parentKeyName": "JMSTestPolicy",
283                                               "parentKeyVersion": "0.0.1",
284                                               "parentLocalName": "TestJMSState",
285                                               "localName": "InOutTask"
286                                             },
287                                             "outputType": "DIRECT",
288                                             "output": {
289                                               "parentKeyName": "JMSTestPolicy",
290                                               "parentKeyVersion": "0.0.1",
291                                               "parentLocalName": "TestJMSState",
292                                               "localName": "InOutOutputMapping"
293                                             }
294                                           }
295                                         }
296                                       ]
297                                     }
298                                   }
299                                 }
300                               ]
301                             },
302                             "firstState": "TestJMSState"
303                           }
304                         }
305                       ]
306                     }
307                   },
308                   "tasks": {
309                     "key": {
310                       "name": "JMSTestModel_Tasks",
311                       "version": "0.0.1"
312                     },
313                     "taskMap": {
314                       "entry": [
315                         {
316                           "key": {
317                             "name": "JMSCopyInOutTask",
318                             "version": "0.0.1"
319                           },
320                           "value": {
321                             "key": {
322                               "name": "JMSCopyInOutTask",
323                               "version": "0.0.1"
324                             },
325                             "inputFields": {
326                               "entry": [
327                                 {
328                                   "key": "PingTestClass",
329                                   "value": {
330                                     "key": "PingTestClass",
331                                     "fieldSchemaKey": {
332                                       "name": "PingTestClassType",
333                                       "version": "0.0.1"
334                                     },
335                                     "optional": false
336                                   }
337                                 }
338                               ]
339                             },
340                             "outputFields": {
341                               "entry": [
342                                 {
343                                   "key": "PingTestClass",
344                                   "value": {
345                                     "key": "PingTestClass",
346                                     "fieldSchemaKey": {
347                                       "name": "PingTestClassType",
348                                       "version": "0.0.1"
349                                     },
350                                     "optional": false
351                                   }
352                                 }
353                               ]
354                             },
355                             "taskParameters": {
356                               "entry": []
357                             },
358                             "contextAlbumReference": [],
359                             "taskLogic": {
360                               "key": "TaskLogic",
361                               "logicFlavour": "JAVASCRIPT",
362                               "logic": "var outFieldType = org.onap.policy.apex.testsuites.integration.common.testclasses.PingTestClass;\nvar outValue = new outFieldType();\n\nvar inValue = executor.inFields.get(\"PingTestClass\");\n\nexecutor.logger.debug(inValue.toString());\n\noutValue.setPingTime(inValue.getPingTime());\noutValue.setPongTime(new Date().getTime());\noutValue.setName(inValue.getName() + \"_out\");\n\noutValue.setDescription(\ninValue.getDescription() +\n\". So Romeo would, were he not Romeo call'd,\" +\n\" retain that dear perfection which he owes, without that title.\");\n\nexecutor.logger.debug(outValue.toString());\nexecutor.outFields.put(\"PingTestClass\", outValue)\n\ntrue;"
363                             }
364                           }
365                         }
366                       ]
367                     }
368                   },
369                   "events": {
370                     "key": {
371                       "name": "JMSTestModel_Events",
372                       "version": "0.0.1"
373                     },
374                     "eventMap": {
375                       "entry": [
376                         {
377                           "key": {
378                             "name": "PingTestClassIncomingEvent",
379                             "version": "0.0.1"
380                           },
381                           "value": {
382                             "key": {
383                               "name": "PingTestClassIncomingEvent",
384                               "version": "0.0.1"
385                             },
386                             "nameSpace": "org.onap.policy.apex.testsuites.integration.uservice.adapt.jms",
387                             "source": "JMS",
388                             "target": "Apex",
389                             "parameter": {
390                               "entry": [
391                                 {
392                                   "key": "PingTestClass",
393                                   "value": {
394                                     "key": "PingTestClass",
395                                     "fieldSchemaKey": {
396                                       "name": "PingTestClassType",
397                                       "version": "0.0.1"
398                                     },
399                                     "optional": false
400                                   }
401                                 }
402                               ]
403                             }
404                           }
405                         },
406                         {
407                           "key": {
408                             "name": "PingTestClassOutgoingEvent",
409                             "version": "0.0.1"
410                           },
411                           "value": {
412                             "key": {
413                               "name": "PingTestClassOutgoingEvent",
414                               "version": "0.0.1"
415                             },
416                             "nameSpace": "org.onap.policy.apex.testsuites.integration.uservice.adapt.jms",
417                             "source": "Apex",
418                             "target": "JMS",
419                             "parameter": {
420                               "entry": [
421                                 {
422                                   "key": "PingTestClass",
423                                   "value": {
424                                     "key": "PingTestClass",
425                                     "fieldSchemaKey": {
426                                       "name": "PingTestClassType",
427                                       "version": "0.0.1"
428                                     },
429                                     "optional": false
430                                   }
431                                 }
432                               ]
433                             }
434                           }
435                         }
436                       ]
437                     }
438                   },
439                   "albums": {
440                     "key": {
441                       "name": "JMSTestModel_Albums",
442                       "version": "0.0.1"
443                     },
444                     "albums": {
445                       "entry": []
446                     }
447                   },
448                   "schemas": {
449                     "key": {
450                       "name": "JMSTestModel_Schemas",
451                       "version": "0.0.1"
452                     },
453                     "schemas": {
454                       "entry": [
455                         {
456                           "key": {
457                             "name": "PingTestClassType",
458                             "version": "0.0.1"
459                           },
460                           "value": {
461                             "key": {
462                               "name": "PingTestClassType",
463                               "version": "0.0.1"
464                             },
465                             "schemaFlavour": "Java",
466                             "schemaDefinition": "org.onap.policy.apex.testsuites.integration.common.testclasses.PingTestClass"
467                           }
468                         }
469                       ]
470                     }
471                   }
472                 }
473               },
474               "engineParameters": {
475                 "executorParameters": {
476                   "JAVASCRIPT": {
477                     "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
478                   }
479                 }
480               }
481             },
482             "eventOutputParameters": {
483               "aProducer": {
484                 "carrierTechnologyParameters": {
485                   "carrierTechnology": "JMS",
486                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.jms.JmsCarrierTechnologyParameters",
487                   "parameters": {
488                     "initialContextFactory": "org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestInitialContextFactory",
489                     "connectionFactory": "ConnectionFactory",
490                     "providerURL": "remote://localhost:5445",
491                     "securityPrincipal": "guest",
492                     "securityCredentials": "IAmAGuest",
493                     "producerTopic": "jms/topic/apexOut"
494                   }
495                 },
496                 "eventProtocolParameters": {
497                   "eventProtocol": "JMSOBJECT",
498                   "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.jms.JmsObjectEventProtocolParameters"
499                 }
500               }
501             },
502             "eventInputParameters": {
503               "aConsumer": {
504                 "carrierTechnologyParameters": {
505                   "carrierTechnology": "JMS",
506                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.jms.JmsCarrierTechnologyParameters",
507                   "parameters": {
508                     "initialContextFactory": "org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestInitialContextFactory",
509                     "connectionFactory": "ConnectionFactory",
510                     "providerURL": "remote://localhost:5445",
511                     "securityPrincipal": "guest",
512                     "securityCredentials": "IAmAGuest",
513                     "consumerTopic": "jms/topic/apexIn"
514                   }
515                 },
516                 "eventProtocolParameters": {
517                   "eventProtocol": "JMSOBJECT",
518                   "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.jms.JmsObjectEventProtocolParameters"
519                 }
520               }
521             }
522           }
523         }
524       }
525     ]
526   }
527 }