Fixed the host Address
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getHealthCheck.json
1 [
2     {
3         "id": "8e7ebfe0.72ff08",
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": 313.33331298828125,
12         "y": 173.33334350585938,
13         "z": "863e4485.36834",
14         "wires": [
15             [
16                 "c7c9e9f7.d04ec8"
17             ]
18         ]
19     },
20     {
21         "id": "c7c9e9f7.d04ec8",
22         "type": "method",
23         "name": "method getHealthCheck",
24         "xml": "<method rpc='getHealthCheck' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 374.33331298828125,
28         "y": 293.3333435058594,
29         "z": "863e4485.36834",
30         "wires": [
31             [
32                 "957adfb6.ddf508"
33             ]
34         ]
35     },
36     {
37         "id": "4933972c.609698",
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": 838.3333129882812,
44         "y": 108.33334350585938,
45         "z": "863e4485.36834",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "957adfb6.ddf508",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 579.3333129882812,
59         "y": 247.33334350585938,
60         "z": "863e4485.36834",
61         "wires": [
62             [
63                 "4933972c.609698",
64                 "ecffa919.3560a",
65                 "211ee71f.5d59e",
66                 "a018bb23.9e0ca",
67                 "8850d349.ceeb4"
68             ]
69         ]
70     },
71     {
72         "id": "9f0c6496.1b93b8",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 246.33331298828125,
77         "y": 109.33334350585938,
78         "z": "863e4485.36834",
79         "wires": [
80             [
81                 "8e7ebfe0.72ff08"
82             ]
83         ]
84     },
85     {
86         "id": "ecffa919.3560a",
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": 889.3333129882812,
92         "y": 174.33334350585938,
93         "z": "863e4485.36834",
94         "wires": []
95     },
96     {
97         "id": "211ee71f.5d59e",
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": 878.3333129882812,
104         "y": 215.33334350585938,
105         "z": "863e4485.36834",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "a018bb23.9e0ca",
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": 828.3333129882812,
118         "y": 271.3333435058594,
119         "z": "863e4485.36834",
120         "wires": [
121             [
122                 "70f1a125.1f0a4",
123                 "ec705860.7bcea"
124             ]
125         ]
126     },
127     {
128         "id": "ec705860.7bcea",
129         "type": "outcome",
130         "name": "Deployed",
131         "xml": "<outcome value='true'>\n",
132         "comments": "",
133         "outputs": 1,
134         "x": 1112.3333587646484,
135         "y": 131.33340883255005,
136         "z": "863e4485.36834",
137         "wires": [
138             [
139                 "de3ed957.5c052"
140             ]
141         ]
142     },
143     {
144         "id": "de3ed957.5c052",
145         "type": "block",
146         "name": "block : atomic",
147         "xml": "<block atomic='true'>",
148         "atomic": "true",
149         "comments": "",
150         "outputs": 1,
151         "x": 1115.3333282470703,
152         "y": 321.33335304260254,
153         "z": "863e4485.36834",
154         "wires": [
155             [
156                 "2dcdc91.9c6f936"
157             ]
158         ]
159     },
160     {
161         "id": "2dcdc91.9c6f936",
162         "type": "block",
163         "name": "A1 Mediator RestAPI Invocation",
164         "xml": "<block atomic='true'>",
165         "atomic": "true",
166         "comments": "",
167         "outputs": 1,
168         "x": 1291.3333435058594,
169         "y": 241.33334589004517,
170         "z": "863e4485.36834",
171         "wires": [
172             [
173                 "378d063c.6c5492"
174             ]
175         ]
176     },
177     {
178         "id": "70f1a125.1f0a4",
179         "type": "outcome",
180         "name": "Not Deployed",
181         "xml": "<outcome value='false'>\n",
182         "comments": "",
183         "outputs": 1,
184         "x": 1065.333381652832,
185         "y": 566.3334050178528,
186         "z": "863e4485.36834",
187         "wires": [
188             [
189                 "470d338e.212154"
190             ]
191         ]
192     },
193     {
194         "id": "470d338e.212154",
195         "type": "block",
196         "name": "block",
197         "xml": "<block>\n",
198         "atomic": "false",
199         "comments": "",
200         "outputs": 1,
201         "x": 1280.3334197998047,
202         "y": 695.3333578109741,
203         "z": "863e4485.36834",
204         "wires": [
205             [
206                 "438edf7e.a454",
207                 "5da1b590.6d16c4",
208                 "3b9faa0f.cad236"
209             ]
210         ]
211     },
212     {
213         "id": "438edf7e.a454",
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": 1405.3331756591797,
219         "y": 776.3333423137665,
220         "z": "863e4485.36834",
221         "wires": []
222     },
223     {
224         "id": "b80804b5.6bd018",
225         "type": "comment",
226         "name": "No DMAAP Response Payload",
227         "info": "",
228         "comments": "",
229         "x": 1583.3333129882812,
230         "y": 182.33334350585938,
231         "z": "863e4485.36834",
232         "wires": []
233     },
234     {
235         "id": "378d063c.6c5492",
236         "type": "block",
237         "name": "A1 Mediator RestAPI Invocation",
238         "xml": "<block atomic='true'>",
239         "atomic": "true",
240         "comments": "",
241         "outputs": 1,
242         "x": 1262.3333129882812,
243         "y": 411.3333574831486,
244         "z": "863e4485.36834",
245         "wires": [
246             [
247                 "7bef8064.cd04a",
248                 "13dfae39.e04c3a",
249                 "47770c6c.1f130c"
250             ]
251         ]
252     },
253     {
254         "id": "13dfae39.e04c3a",
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=\"`'http://' + $get-health-check-input.host-ip-address + ':' + $prop.nearric.port + '/' + $prop.restapi.healthcheck`\"/>",
258         "comments": "",
259         "x": 1650.3343811035156,
260         "y": 317.2224413752556,
261         "z": "863e4485.36834",
262         "wires": []
263     },
264     {
265         "id": "7bef8064.cd04a",
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": 1542.3333435058594,
272         "y": 376.3333463668823,
273         "z": "863e4485.36834",
274         "wires": [
275             []
276         ]
277     },
278     {
279         "id": "47770c6c.1f130c",
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=\"`$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": 1575.3338012695312,
286         "y": 456.34373331069946,
287         "z": "863e4485.36834",
288         "wires": [
289             [
290                 "17b8a3a8.316fdc",
291                 "7e32c0b0.5e187"
292             ]
293         ]
294     },
295     {
296         "id": "17b8a3a8.316fdc",
297         "type": "failure",
298         "name": "failure",
299         "xml": "<outcome value='failure'>\n",
300         "comments": "",
301         "outputs": 1,
302         "x": 1536.3333435058594,
303         "y": 539.333456993103,
304         "z": "863e4485.36834",
305         "wires": [
306             [
307                 "6bad57a1.4e0058"
308             ]
309         ]
310     },
311     {
312         "id": "7e32c0b0.5e187",
313         "type": "success",
314         "name": "success",
315         "xml": "<outcome value='success'>\n",
316         "comments": "",
317         "outputs": 1,
318         "x": 1780.3335876464844,
319         "y": 410.33336544036865,
320         "z": "863e4485.36834",
321         "wires": [
322             [
323                 "8ba7cacf.63acd"
324             ]
325         ]
326     },
327     {
328         "id": "940040d7.e1c9e8",
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": 1696.3339233398438,
334         "y": 646.3334264755249,
335         "z": "863e4485.36834",
336         "wires": []
337     },
338     {
339         "id": "8ba7cacf.63acd",
340         "type": "block",
341         "name": "block",
342         "xml": "<block>\n",
343         "atomic": "false",
344         "comments": "",
345         "outputs": 1,
346         "x": 1930.3331928253174,
347         "y": 374.3333954811096,
348         "z": "863e4485.36834",
349         "wires": [
350             [
351                 "62890421.6f075c"
352             ]
353         ]
354     },
355     {
356         "id": "62890421.6f075c",
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": 2107.3333435058594,
363         "y": 347.33334255218506,
364         "z": "863e4485.36834",
365         "wires": [
366             []
367         ]
368     },
369     {
370         "id": "5da1b590.6d16c4",
371         "type": "block",
372         "name": "DMAAP Reponse Publish",
373         "xml": "<block atomic='true'>",
374         "atomic": "true",
375         "comments": "",
376         "outputs": 1,
377         "x": 2066.3334350585938,
378         "y": 743.3334951400757,
379         "z": "863e4485.36834",
380         "wires": [
381             [
382                 "15f0f687.0ed609",
383                 "acc0fdd3.1ae4e",
384                 "76df102e.4d504"
385             ]
386         ]
387     },
388     {
389         "id": "acc0fdd3.1ae4e",
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": 2415.3336334228516,
396         "y": 921.3328998088837,
397         "z": "863e4485.36834",
398         "wires": [
399             [
400                 "7e5d132d.992734",
401                 "2b9cd050.e0a3f"
402             ]
403         ]
404     },
405     {
406         "id": "15f0f687.0ed609",
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": 2404.00040435791,
412         "y": 711.3334798812866,
413         "z": "863e4485.36834",
414         "wires": []
415     },
416     {
417         "id": "7e5d132d.992734",
418         "type": "failure",
419         "name": "failure",
420         "xml": "<outcome value='failure'>\n",
421         "comments": "",
422         "outputs": 1,
423         "x": 2630.8335189819336,
424         "y": 844.2502036094666,
425         "z": "863e4485.36834",
426         "wires": [
427             [
428                 "42b7c211.c51e7c"
429             ]
430         ]
431     },
432     {
433         "id": "2b9cd050.e0a3f",
434         "type": "success",
435         "name": "success",
436         "xml": "<outcome value='success'>\n",
437         "comments": "",
438         "outputs": 1,
439         "x": 2634.833438873291,
440         "y": 983.2500462532043,
441         "z": "863e4485.36834",
442         "wires": [
443             [
444                 "b3c45cc1.212db"
445             ]
446         ]
447     },
448     {
449         "id": "42b7c211.c51e7c",
450         "type": "block",
451         "name": "block",
452         "xml": "<block>\n",
453         "atomic": "false",
454         "comments": "",
455         "outputs": 1,
456         "x": 2790.8333530426025,
457         "y": 846.2502045631409,
458         "z": "863e4485.36834",
459         "wires": [
460             [
461                 "ec8b878d.8d17b"
462             ]
463         ]
464     },
465     {
466         "id": "ec8b878d.8d17b",
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": 2972.8330841064453,
472         "y": 837.250280380249,
473         "z": "863e4485.36834",
474         "wires": []
475     },
476     {
477         "id": "b3c45cc1.212db",
478         "type": "block",
479         "name": "block",
480         "xml": "<block>\n",
481         "atomic": "false",
482         "comments": "",
483         "outputs": 1,
484         "x": 2817.8330821990967,
485         "y": 976.2501549720764,
486         "z": "863e4485.36834",
487         "wires": [
488             [
489                 "8bde839d.15fa48"
490             ]
491         ]
492     },
493     {
494         "id": "8bde839d.15fa48",
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": 3003.833236694336,
501         "y": 964.2504787445068,
502         "z": "863e4485.36834",
503         "wires": [
504             []
505         ]
506     },
507     {
508         "id": "76df102e.4d504",
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": 2411.833564758301,
515         "y": 797.7884044647217,
516         "z": "863e4485.36834",
517         "wires": [
518             []
519         ]
520     },
521     {
522         "id": "3b9faa0f.cad236",
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": 1481.3334655761719,
528         "y": 628.3333649635315,
529         "z": "863e4485.36834",
530         "wires": []
531     },
532     {
533         "id": "2db79f9b.99031",
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": 1856.0872764587402,
539         "y": 475.3372411727905,
540         "z": "863e4485.36834",
541         "wires": []
542     },
543     {
544         "id": "8850d349.ceeb4",
545         "type": "block",
546         "name": "block",
547         "xml": "<block>\n",
548         "atomic": "false",
549         "comments": "",
550         "outputs": 1,
551         "x": 822.0872077941895,
552         "y": 885.3372793197632,
553         "z": "863e4485.36834",
554         "wires": [
555             [
556                 "8983f326.7db1b8",
557                 "5da1b590.6d16c4"
558             ]
559         ]
560     },
561     {
562         "id": "8983f326.7db1b8",
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": 972.087251663208,
568         "y": 967.3372488021851,
569         "z": "863e4485.36834",
570         "wires": []
571     },
572     {
573         "id": "6bad57a1.4e0058",
574         "type": "block",
575         "name": "block",
576         "xml": "<block>\n",
577         "atomic": "false",
578         "comments": "",
579         "outputs": 1,
580         "x": 1682.3371849060059,
581         "y": 542.3372716903687,
582         "z": "863e4485.36834",
583         "wires": [
584             [
585                 "2db79f9b.99031",
586                 "5da1b590.6d16c4",
587                 "940040d7.e1c9e8"
588             ]
589         ]
590     }
591 ]