DG's and Templates for A1 Adapter
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getHealthCheck.json
1 [
2     {
3         "id": "f70577cd.2332b8",
4         "type": "service-logic",
5         "name": "A1-ADAPTER-API ${project.version}",
6         "module": "A1-ADAPTER-API",
7         "version": "${project.version}",
8         "comments": "",
9         "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='A1-ADAPTER-API' version='${project.version}'>",
10         "outputs": 1,
11         "x": 166,
12         "y": 89,
13         "z": "71073541.7e954c",
14         "wires": [
15             [
16                 "51320529.8c13fc"
17             ]
18         ]
19     },
20     {
21         "id": "51320529.8c13fc",
22         "type": "method",
23         "name": "method getHealthCheck",
24         "xml": "<method rpc='getHealthCheck' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 227,
28         "y": 209,
29         "z": "71073541.7e954c",
30         "wires": [
31             [
32                 "50c04d9d.eb06a4"
33             ]
34         ]
35     },
36     {
37         "id": "cf6fe4d2.e21a88",
38         "type": "record",
39         "name": "record",
40         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"A1 Adapter Health Check. Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$get-health-check-input.near-rt-ric-id`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 691,
44         "y": 24,
45         "z": "71073541.7e954c",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "50c04d9d.eb06a4",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 432,
59         "y": 163,
60         "z": "71073541.7e954c",
61         "wires": [
62             [
63                 "cf6fe4d2.e21a88",
64                 "9b09eba5.e4dfa8",
65                 "fad38a44.2dff58",
66                 "da55f177.44ea9",
67                 "fe7bfe5c.0b58a"
68             ]
69         ]
70     },
71     {
72         "id": "fdb9f2a9.d1099",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 99,
77         "y": 25,
78         "z": "71073541.7e954c",
79         "wires": [
80             [
81                 "f70577cd.2332b8"
82             ]
83         ]
84     },
85     {
86         "id": "9b09eba5.e4dfa8",
87         "type": "set",
88         "name": "set default status value",
89         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='A1 is Healthy' />",
90         "comments": "",
91         "x": 742,
92         "y": 90,
93         "z": "71073541.7e954c",
94         "wires": []
95     },
96     {
97         "id": "fad38a44.2dff58",
98         "type": "execute",
99         "name": "execute Properties",
100         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
101         "comments": "",
102         "outputs": 1,
103         "x": 731,
104         "y": 131,
105         "z": "71073541.7e954c",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "da55f177.44ea9",
112         "type": "switchNode",
113         "name": "A1 Mediator Deployed",
114         "xml": "<switch test='`$prop.ric-plt-A1Mediator-deployed`'>\n",
115         "comments": "",
116         "outputs": 1,
117         "x": 681,
118         "y": 187,
119         "z": "71073541.7e954c",
120         "wires": [
121             [
122                 "1b90a5eb.8a64ea",
123                 "df3dcdff.980fa"
124             ]
125         ]
126     },
127     {
128         "id": "df3dcdff.980fa",
129         "type": "outcome",
130         "name": "Deployed",
131         "xml": "<outcome value='true'>\n",
132         "comments": "",
133         "outputs": 1,
134         "x": 965.0000457763672,
135         "y": 47.000065326690674,
136         "z": "71073541.7e954c",
137         "wires": [
138             [
139                 "d65603a6.a6255"
140             ]
141         ]
142     },
143     {
144         "id": "d65603a6.a6255",
145         "type": "block",
146         "name": "block : atomic",
147         "xml": "<block atomic='true'>",
148         "atomic": "true",
149         "comments": "",
150         "outputs": 1,
151         "x": 968.0000152587891,
152         "y": 237.00000953674316,
153         "z": "71073541.7e954c",
154         "wires": [
155             [
156                 "fad8a7e7.6c01c8"
157             ]
158         ]
159     },
160     {
161         "id": "fad8a7e7.6c01c8",
162         "type": "block",
163         "name": "A1 Mediator RestAPI Invocation",
164         "xml": "<block atomic='true'>",
165         "atomic": "true",
166         "comments": "",
167         "outputs": 1,
168         "x": 1144.0000305175781,
169         "y": 157.0000023841858,
170         "z": "71073541.7e954c",
171         "wires": [
172             [
173                 "239aaf9f.539e4"
174             ]
175         ]
176     },
177     {
178         "id": "1b90a5eb.8a64ea",
179         "type": "outcome",
180         "name": "Not Deployed",
181         "xml": "<outcome value='false'>\n",
182         "comments": "",
183         "outputs": 1,
184         "x": 918.0000686645508,
185         "y": 482.0000615119934,
186         "z": "71073541.7e954c",
187         "wires": [
188             [
189                 "d91da8b7.4c9cd8"
190             ]
191         ]
192     },
193     {
194         "id": "d91da8b7.4c9cd8",
195         "type": "block",
196         "name": "block",
197         "xml": "<block>\n",
198         "atomic": "false",
199         "comments": "",
200         "outputs": 1,
201         "x": 1133.0001068115234,
202         "y": 611.0000143051147,
203         "z": "71073541.7e954c",
204         "wires": [
205             [
206                 "373e75ec.2ef50a",
207                 "ad639178.ea45b",
208                 "1d8bf60c.0ab74a"
209             ]
210         ]
211     },
212     {
213         "id": "373e75ec.2ef50a",
214         "type": "returnFailure",
215         "name": "return failure",
216         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"A1 Mediator Not Deployed. Aborting Health Check\" />",
217         "comments": "",
218         "x": 1257.9998626708984,
219         "y": 691.9999988079071,
220         "z": "71073541.7e954c",
221         "wires": []
222     },
223     {
224         "id": "db9f306b.9d952",
225         "type": "comment",
226         "name": "No DMAAP Response Payload",
227         "info": "",
228         "comments": "",
229         "x": 1436,
230         "y": 98,
231         "z": "71073541.7e954c",
232         "wires": []
233     },
234     {
235         "id": "239aaf9f.539e4",
236         "type": "block",
237         "name": "A1 Mediator RestAPI Invocation",
238         "xml": "<block atomic='true'>",
239         "atomic": "true",
240         "comments": "",
241         "outputs": 1,
242         "x": 1115,
243         "y": 327.0000139772892,
244         "z": "71073541.7e954c",
245         "wires": [
246             [
247                 "a401c326.c2be8",
248                 "34de0f9a.82fab",
249                 "742ba549.33a0fc"
250             ]
251         ]
252     },
253     {
254         "id": "34de0f9a.82fab",
255         "type": "set",
256         "name": "set tmp variables for A1 Mediator REST API call",
257         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-health-check-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.restapi.healthcheck-url\" value=\"`$prop.restapi.healthcheck`\"/>",
258         "comments": "",
259         "x": 1503.0010681152344,
260         "y": 232.8890978693962,
261         "z": "71073541.7e954c",
262         "wires": []
263     },
264     {
265         "id": "a401c326.c2be8",
266         "type": "record",
267         "name": "record",
268         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Setting variables for A1 Adapter Health Check.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.healthcheck-url`\"/>",
269         "comments": "",
270         "outputs": 1,
271         "x": 1395.0000305175781,
272         "y": 292.00000286102295,
273         "z": "71073541.7e954c",
274         "wires": [
275             []
276         ]
277     },
278     {
279         "id": "742ba549.33a0fc",
280         "type": "execute",
281         "name": "Check A1 Mediator Health",
282         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.healthcheck-url`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"GET\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"convertResponse\" value=\"false\"/>\n",
283         "comments": "",
284         "outputs": 1,
285         "x": 1428.00048828125,
286         "y": 372.0103898048401,
287         "z": "71073541.7e954c",
288         "wires": [
289             [
290                 "54a96509.b22d6c",
291                 "5a29f4f5.fc1fcc"
292             ]
293         ]
294     },
295     {
296         "id": "54a96509.b22d6c",
297         "type": "failure",
298         "name": "failure",
299         "xml": "<outcome value='failure'>\n",
300         "comments": "",
301         "outputs": 1,
302         "x": 1389.0000305175781,
303         "y": 455.00011348724365,
304         "z": "71073541.7e954c",
305         "wires": [
306             [
307                 "fc4e3c1b.c7139"
308             ]
309         ]
310     },
311     {
312         "id": "5a29f4f5.fc1fcc",
313         "type": "success",
314         "name": "success",
315         "xml": "<outcome value='success'>\n",
316         "comments": "",
317         "outputs": 1,
318         "x": 1633.0002746582031,
319         "y": 326.0000219345093,
320         "z": "71073541.7e954c",
321         "wires": [
322             [
323                 "10397796.f90e08"
324             ]
325         ]
326     },
327     {
328         "id": "81144d1f.a8a31",
329         "type": "returnFailure",
330         "name": "return failure",
331         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"404\" />\n<parameter name=\"response-message\" value=\"Error in A1 Mediator Health Check. Aborting A1 Health Check\" />",
332         "comments": "",
333         "x": 1549.0006103515625,
334         "y": 562.0000829696655,
335         "z": "71073541.7e954c",
336         "wires": []
337     },
338     {
339         "id": "10397796.f90e08",
340         "type": "block",
341         "name": "block",
342         "xml": "<block>\n",
343         "atomic": "false",
344         "comments": "",
345         "outputs": 1,
346         "x": 1782.9998798370361,
347         "y": 290.00005197525024,
348         "z": "71073541.7e954c",
349         "wires": [
350             [
351                 "acc2e27c.325de"
352             ]
353         ]
354     },
355     {
356         "id": "acc2e27c.325de",
357         "type": "record",
358         "name": "record",
359         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"A1 Mediator is Healthy.\"/>",
360         "comments": "",
361         "outputs": 1,
362         "x": 1960.0000305175781,
363         "y": 262.9999990463257,
364         "z": "71073541.7e954c",
365         "wires": [
366             []
367         ]
368     },
369     {
370         "id": "ad639178.ea45b",
371         "type": "block",
372         "name": "DMAAP Reponse Publish",
373         "xml": "<block atomic='true'>",
374         "atomic": "true",
375         "comments": "",
376         "outputs": 1,
377         "x": 1919.0001220703125,
378         "y": 659.0001516342163,
379         "z": "71073541.7e954c",
380         "wires": [
381             [
382                 "52a8bbd0.8d15e4",
383                 "1824af45.7c4c31",
384                 "d55641b9.0d8a"
385             ]
386         ]
387     },
388     {
389         "id": "1824af45.7c4c31",
390         "type": "execute",
391         "name": "execute DmaapMsg",
392         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' +  $prop.restapi.dmaap-publish-generic-response.template`\" />\n    <parameter name='restapiUrl' value=\"`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`\" />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='POST' />\n    <parameter name='contentType' value='application/json' />\n    <parameter name='responsePrefix' value='dmaap' />",
393         "comments": "",
394         "outputs": 1,
395         "x": 2268.0003204345703,
396         "y": 836.9995563030243,
397         "z": "71073541.7e954c",
398         "wires": [
399             [
400                 "b67eb7fa.2e8d88",
401                 "b7c6de0.48aae2"
402             ]
403         ]
404     },
405     {
406         "id": "52a8bbd0.8d15e4",
407         "type": "set",
408         "name": "set",
409         "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getHealthCheck'/>\n<parameter name='tmp.a1Adapter-dmaap-resp.status-code' value='`$response-code`'/>\n<parameter name='tmp.a1Adapter-dmaap-resp.status-value' value='`$response-message`'/>\n<parameter name='tmp.a1Policy-dmaap-resp.payload' value=\"None\" />",
410         "comments": "",
411         "x": 2256.667091369629,
412         "y": 627.0001363754272,
413         "z": "71073541.7e954c",
414         "wires": []
415     },
416     {
417         "id": "b67eb7fa.2e8d88",
418         "type": "failure",
419         "name": "failure",
420         "xml": "<outcome value='failure'>\n",
421         "comments": "",
422         "outputs": 1,
423         "x": 2483.5002059936523,
424         "y": 759.9168601036072,
425         "z": "71073541.7e954c",
426         "wires": [
427             [
428                 "5004b5da.bc5e3c"
429             ]
430         ]
431     },
432     {
433         "id": "b7c6de0.48aae2",
434         "type": "success",
435         "name": "success",
436         "xml": "<outcome value='success'>\n",
437         "comments": "",
438         "outputs": 1,
439         "x": 2487.5001258850098,
440         "y": 898.916702747345,
441         "z": "71073541.7e954c",
442         "wires": [
443             [
444                 "c46eaf10.81be1"
445             ]
446         ]
447     },
448     {
449         "id": "5004b5da.bc5e3c",
450         "type": "block",
451         "name": "block",
452         "xml": "<block>\n",
453         "atomic": "false",
454         "comments": "",
455         "outputs": 1,
456         "x": 2643.5000400543213,
457         "y": 761.9168610572815,
458         "z": "71073541.7e954c",
459         "wires": [
460             [
461                 "1c492a8f.477515"
462             ]
463         ]
464     },
465     {
466         "id": "1c492a8f.477515",
467         "type": "returnFailure",
468         "name": "return failure",
469         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error publishing DMAAP A1 Policy Response message. \" />",
470         "comments": "",
471         "x": 2825.499771118164,
472         "y": 752.9169368743896,
473         "z": "71073541.7e954c",
474         "wires": []
475     },
476     {
477         "id": "c46eaf10.81be1",
478         "type": "block",
479         "name": "block",
480         "xml": "<block>\n",
481         "atomic": "false",
482         "comments": "",
483         "outputs": 1,
484         "x": 2670.4997692108154,
485         "y": 891.916811466217,
486         "z": "71073541.7e954c",
487         "wires": [
488             [
489                 "cd499a2b.0f9d88"
490             ]
491         ]
492     },
493     {
494         "id": "cd499a2b.0f9d88",
495         "type": "record",
496         "name": "record",
497         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"DMAAP A1Policy message Successfully Published \"/>",
498         "comments": "",
499         "outputs": 1,
500         "x": 2856.4999237060547,
501         "y": 879.9171352386475,
502         "z": "71073541.7e954c",
503         "wires": [
504             []
505         ]
506     },
507     {
508         "id": "d55641b9.0d8a",
509         "type": "record",
510         "name": "record",
511         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/A1-Adapter.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Before DMAAP Event - template file name, restapiURL\"/>\n<parameter name='field3' value=\"`$prop.restapi.templateDir + '/' +  $prop.restapi.dmaap-publish-generic-response.template`\" />\n<parameter name='field4' value=\"`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`\" />\n<parameter name='field5' value=\"Status Code and Status Value to be published\" />\n<parameter name='field6' value=\"`$tmp.a1Adapter-dmaap-resp.status-code`\" />\n<parameter name='field7' value=\"`$tmp.a1Adapter-dmaap-resp.status-value`\" />\n<parameter name='field8' value=\"A1 Adapter DMAAP Response Payload Not Required\" />\n<parameter name='field9' value=\"`$tmp.a1Policy-dmaap-resp.payload`\" />\n<parameter name='field10' value=\"RPC Name\" />\n<parameter name='field11' value=\"`$tmp.a1-adapter-api.rpc-name`\" />",
512         "comments": "",
513         "outputs": 1,
514         "x": 2264.5002517700195,
515         "y": 713.4550609588623,
516         "z": "71073541.7e954c",
517         "wires": [
518             []
519         ]
520     },
521     {
522         "id": "1d8bf60c.0ab74a",
523         "type": "set",
524         "name": "set",
525         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n",
526         "comments": "",
527         "x": 1334.0001525878906,
528         "y": 544.0000214576721,
529         "z": "71073541.7e954c",
530         "wires": []
531     },
532     {
533         "id": "cdf48a0a.84bf18",
534         "type": "set",
535         "name": "set",
536         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Healthy'/>\n",
537         "comments": "",
538         "x": 1708.753963470459,
539         "y": 391.00389766693115,
540         "z": "71073541.7e954c",
541         "wires": []
542     },
543     {
544         "id": "fe7bfe5c.0b58a",
545         "type": "block",
546         "name": "block",
547         "xml": "<block>\n",
548         "atomic": "false",
549         "comments": "",
550         "outputs": 1,
551         "x": 674.7538948059082,
552         "y": 801.0039358139038,
553         "z": "71073541.7e954c",
554         "wires": [
555             [
556                 "fd40a79.a6fb958",
557                 "ad639178.ea45b"
558             ]
559         ]
560     },
561     {
562         "id": "fd40a79.a6fb958",
563         "type": "returnSuccess",
564         "name": "return success",
565         "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='A1 Adapter is healthy'/>\n<parameter name='health-status' value='200'/>\n<parameter name='ack-final' value='Y'/>\n",
566         "comments": "",
567         "x": 824.7539386749268,
568         "y": 883.0039052963257,
569         "z": "71073541.7e954c",
570         "wires": []
571     },
572     {
573         "id": "fc4e3c1b.c7139",
574         "type": "block",
575         "name": "block",
576         "xml": "<block>\n",
577         "atomic": "false",
578         "comments": "",
579         "outputs": 1,
580         "x": 1535.0038719177246,
581         "y": 458.0039281845093,
582         "z": "71073541.7e954c",
583         "wires": [
584             [
585                 "cdf48a0a.84bf18",
586                 "ad639178.ea45b",
587                 "81144d1f.a8a31"
588             ]
589         ]
590     }
591 ]