b134c19d5b3a5a8f835359911d11f3a9f1735c6c
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getPolicyTypes.json
1 [
2     {
3         "id": "59c2dfd4.8abe9",
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": 180.00390625,
12         "y": 101.00390625,
13         "z": "4c7efb80.7cead4",
14         "wires": [
15             [
16                 "7af1d8df.20fb98"
17             ]
18         ]
19     },
20     {
21         "id": "7af1d8df.20fb98",
22         "type": "method",
23         "name": "method getPolicyTypes",
24         "xml": "<method rpc='getPolicyTypes' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 241.00390625,
28         "y": 221.00390625,
29         "z": "4c7efb80.7cead4",
30         "wires": [
31             [
32                 "b15010d5.15696"
33             ]
34         ]
35     },
36     {
37         "id": "a1c2f906.421c18",
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=\"Get All Policy Types from Near RT RIC ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-types-input.near-rt-ric-id`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 705.00390625,
44         "y": 36.00390625,
45         "z": "4c7efb80.7cead4",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "b15010d5.15696",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 446.00390625,
59         "y": 175.00390625,
60         "z": "4c7efb80.7cead4",
61         "wires": [
62             [
63                 "a1c2f906.421c18",
64                 "da9b1969.ac6b58",
65                 "2640d848.80bbb8",
66                 "2b968baf.6ed334",
67                 "78f940aa.11fce"
68             ]
69         ]
70     },
71     {
72         "id": "df08bd9f.55af9",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 113.00390625,
77         "y": 37.00390625,
78         "z": "4c7efb80.7cead4",
79         "wires": [
80             [
81                 "59c2dfd4.8abe9"
82             ]
83         ]
84     },
85     {
86         "id": "da9b1969.ac6b58",
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='getPolicyTypes executed successfully' />",
90         "comments": "",
91         "x": 745.0039520263672,
92         "y": 90.00390720367432,
93         "z": "4c7efb80.7cead4",
94         "wires": []
95     },
96     {
97         "id": "2640d848.80bbb8",
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": 745.00390625,
104         "y": 143.00390625,
105         "z": "4c7efb80.7cead4",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "2b968baf.6ed334",
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": 695.00390625,
118         "y": 199.00390625,
119         "z": "4c7efb80.7cead4",
120         "wires": [
121             [
122                 "3ce1cda5.28ff92",
123                 "787a0ceb.e039b4"
124             ]
125         ]
126     },
127     {
128         "id": "787a0ceb.e039b4",
129         "type": "outcome",
130         "name": "Deployed",
131         "xml": "<outcome value='true'>\n",
132         "comments": "",
133         "outputs": 1,
134         "x": 979.0039520263672,
135         "y": 59.003971576690674,
136         "z": "4c7efb80.7cead4",
137         "wires": [
138             [
139                 "f952e955.833d08"
140             ]
141         ]
142     },
143     {
144         "id": "f952e955.833d08",
145         "type": "block",
146         "name": "block : atomic",
147         "xml": "<block atomic='true'>",
148         "atomic": "true",
149         "comments": "",
150         "outputs": 1,
151         "x": 956.0040016174316,
152         "y": 205.00392389297485,
153         "z": "4c7efb80.7cead4",
154         "wires": [
155             [
156                 "cbd67155.db51b"
157             ]
158         ]
159     },
160     {
161         "id": "3ce1cda5.28ff92",
162         "type": "outcome",
163         "name": "Not Deployed",
164         "xml": "<outcome value='false'>\n",
165         "comments": "",
166         "outputs": 1,
167         "x": 932.0039749145508,
168         "y": 494.0039677619934,
169         "z": "4c7efb80.7cead4",
170         "wires": [
171             [
172                 "e8dd7987.9127e8"
173             ]
174         ]
175     },
176     {
177         "id": "e8dd7987.9127e8",
178         "type": "block",
179         "name": "block",
180         "xml": "<block>\n",
181         "atomic": "false",
182         "comments": "",
183         "outputs": 1,
184         "x": 1147.0040130615234,
185         "y": 623.0039205551147,
186         "z": "4c7efb80.7cead4",
187         "wires": [
188             [
189                 "a7a142e7.93988",
190                 "5e2ec2ff.98aacc",
191                 "9143fd0a.5fd1f"
192             ]
193         ]
194     },
195     {
196         "id": "a7a142e7.93988",
197         "type": "returnFailure",
198         "name": "return failure",
199         "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 in Getting A1 Policy Types. Aborting\" />",
200         "comments": "",
201         "x": 1272.0037689208984,
202         "y": 704.0039050579071,
203         "z": "4c7efb80.7cead4",
204         "wires": []
205     },
206     {
207         "id": "cbd67155.db51b",
208         "type": "block",
209         "name": "A1 Mediator RestAPI Invocation",
210         "xml": "<block atomic='true'>",
211         "atomic": "true",
212         "comments": "",
213         "outputs": 1,
214         "x": 1150.0040130615234,
215         "y": 316.00391072034836,
216         "z": "4c7efb80.7cead4",
217         "wires": [
218             [
219                 "40b30f7a.5851c",
220                 "37a98276.7f1bee",
221                 "8ae6d3fc.6de4"
222             ]
223         ]
224     },
225     {
226         "id": "37a98276.7f1bee",
227         "type": "set",
228         "name": "set tmp variables for A1 Mediator REST API call",
229         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-types-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.restapi.getPolicyTypes-url\" value=\"`$prop.restapi.policytypes`\"/>",
230         "comments": "",
231         "x": 1520.005283355713,
232         "y": 250.89303016662598,
233         "z": "4c7efb80.7cead4",
234         "wires": []
235     },
236     {
237         "id": "40b30f7a.5851c",
238         "type": "record",
239         "name": "record",
240         "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 Get Policy Types.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.restapi.getPolicyTypes-url`\"/>",
241         "comments": "",
242         "outputs": 1,
243         "x": 1409.0039367675781,
244         "y": 304.00390911102295,
245         "z": "4c7efb80.7cead4",
246         "wires": [
247             []
248         ]
249     },
250     {
251         "id": "8ae6d3fc.6de4",
252         "type": "execute",
253         "name": "Get Policy Types",
254         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.getPolicyTypes-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=\"true\"/>",
255         "comments": "",
256         "outputs": 1,
257         "x": 1445.0045471191406,
258         "y": 387.0142889022827,
259         "z": "4c7efb80.7cead4",
260         "wires": [
261             [
262                 "f0fde675.5fc208",
263                 "ea57a120.aefb9"
264             ]
265         ]
266     },
267     {
268         "id": "f0fde675.5fc208",
269         "type": "failure",
270         "name": "failure",
271         "xml": "<outcome value='failure'>\n",
272         "comments": "",
273         "outputs": 1,
274         "x": 1403.0039367675781,
275         "y": 467.00401973724365,
276         "z": "4c7efb80.7cead4",
277         "wires": [
278             [
279                 "47280ee8.91324"
280             ]
281         ]
282     },
283     {
284         "id": "ea57a120.aefb9",
285         "type": "success",
286         "name": "success",
287         "xml": "<outcome value='success'>\n",
288         "comments": "",
289         "outputs": 1,
290         "x": 1647.0041809082031,
291         "y": 338.0039281845093,
292         "z": "4c7efb80.7cead4",
293         "wires": [
294             [
295                 "91c7cc22.f50fa"
296             ]
297         ]
298     },
299     {
300         "id": "6ad346e1.874668",
301         "type": "returnFailure",
302         "name": "return failure",
303         "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 in Getting A1 Policy Types. Aborting\" />",
304         "comments": "",
305         "x": 1563.0045166015625,
306         "y": 574.0039892196655,
307         "z": "4c7efb80.7cead4",
308         "wires": []
309     },
310     {
311         "id": "91c7cc22.f50fa",
312         "type": "block",
313         "name": "block",
314         "xml": "<block>\n",
315         "atomic": "false",
316         "comments": "",
317         "outputs": 1,
318         "x": 1797.0037860870361,
319         "y": 302.00395822525024,
320         "z": "4c7efb80.7cead4",
321         "wires": [
322             [
323                 "b0927297.5c798"
324             ]
325         ]
326     },
327     {
328         "id": "b0927297.5c798",
329         "type": "record",
330         "name": "record",
331         "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=\"List of A1 Policy Types: \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>",
332         "comments": "",
333         "outputs": 1,
334         "x": 1977.0039100646973,
335         "y": 276.00390911102295,
336         "z": "4c7efb80.7cead4",
337         "wires": [
338             []
339         ]
340     },
341     {
342         "id": "5e2ec2ff.98aacc",
343         "type": "block",
344         "name": "DMAAP Reponse Publish",
345         "xml": "<block atomic='true'>",
346         "atomic": "true",
347         "comments": "",
348         "outputs": 1,
349         "x": 1933.0040283203125,
350         "y": 671.0040578842163,
351         "z": "4c7efb80.7cead4",
352         "wires": [
353             [
354                 "19f09b1f.ef68a5",
355                 "c85abe4e.04981",
356                 "6e7b36c6.941d68"
357             ]
358         ]
359     },
360     {
361         "id": "c85abe4e.04981",
362         "type": "execute",
363         "name": "execute DmaapMsg",
364         "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' />",
365         "comments": "",
366         "outputs": 1,
367         "x": 2282.0042266845703,
368         "y": 849.0034625530243,
369         "z": "4c7efb80.7cead4",
370         "wires": [
371             [
372                 "778c6b4c.d4c124",
373                 "4e9a9c42.7e1bc4"
374             ]
375         ]
376     },
377     {
378         "id": "19f09b1f.ef68a5",
379         "type": "set",
380         "name": "set",
381         "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyTypes'/>\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=\"`$a1MediatorRsp`\" />",
382         "comments": "",
383         "x": 2271.670944213867,
384         "y": 640.0040187835693,
385         "z": "4c7efb80.7cead4",
386         "wires": []
387     },
388     {
389         "id": "778c6b4c.d4c124",
390         "type": "failure",
391         "name": "failure",
392         "xml": "<outcome value='failure'>\n",
393         "comments": "",
394         "outputs": 1,
395         "x": 2497.5041122436523,
396         "y": 771.9207663536072,
397         "z": "4c7efb80.7cead4",
398         "wires": [
399             [
400                 "63bc20b5.f1da2"
401             ]
402         ]
403     },
404     {
405         "id": "4e9a9c42.7e1bc4",
406         "type": "success",
407         "name": "success",
408         "xml": "<outcome value='success'>\n",
409         "comments": "",
410         "outputs": 1,
411         "x": 2501.5040321350098,
412         "y": 910.920608997345,
413         "z": "4c7efb80.7cead4",
414         "wires": [
415             [
416                 "76ba37c0.8c4108"
417             ]
418         ]
419     },
420     {
421         "id": "63bc20b5.f1da2",
422         "type": "block",
423         "name": "block",
424         "xml": "<block>\n",
425         "atomic": "false",
426         "comments": "",
427         "outputs": 1,
428         "x": 2657.5039463043213,
429         "y": 773.9207673072815,
430         "z": "4c7efb80.7cead4",
431         "wires": [
432             [
433                 "f50721b0.4e107"
434             ]
435         ]
436     },
437     {
438         "id": "f50721b0.4e107",
439         "type": "returnFailure",
440         "name": "return failure",
441         "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. \" />",
442         "comments": "",
443         "x": 2839.503677368164,
444         "y": 764.9208431243896,
445         "z": "4c7efb80.7cead4",
446         "wires": []
447     },
448     {
449         "id": "76ba37c0.8c4108",
450         "type": "block",
451         "name": "block",
452         "xml": "<block>\n",
453         "atomic": "false",
454         "comments": "",
455         "outputs": 1,
456         "x": 2684.5036754608154,
457         "y": 903.920717716217,
458         "z": "4c7efb80.7cead4",
459         "wires": [
460             [
461                 "7bc04bf1.7e7834"
462             ]
463         ]
464     },
465     {
466         "id": "7bc04bf1.7e7834",
467         "type": "record",
468         "name": "record",
469         "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 \"/>",
470         "comments": "",
471         "outputs": 1,
472         "x": 2870.5038299560547,
473         "y": 891.9210414886475,
474         "z": "4c7efb80.7cead4",
475         "wires": [
476             []
477         ]
478     },
479     {
480         "id": "6e7b36c6.941d68",
481         "type": "record",
482         "name": "record",
483         "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\" />\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`\" />",
484         "comments": "",
485         "outputs": 1,
486         "x": 2280.504165649414,
487         "y": 731.4589986801147,
488         "z": "4c7efb80.7cead4",
489         "wires": [
490             []
491         ]
492     },
493     {
494         "id": "9143fd0a.5fd1f",
495         "type": "set",
496         "name": "set",
497         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n",
498         "comments": "",
499         "x": 1348.0040588378906,
500         "y": 556.0039277076721,
501         "z": "4c7efb80.7cead4",
502         "wires": []
503     },
504     {
505         "id": "bd7fd084.d14a1",
506         "type": "set",
507         "name": "set",
508         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
509         "comments": "",
510         "x": 1722.757869720459,
511         "y": 403.00780391693115,
512         "z": "4c7efb80.7cead4",
513         "wires": []
514     },
515     {
516         "id": "78f940aa.11fce",
517         "type": "block",
518         "name": "block",
519         "xml": "<block>\n",
520         "atomic": "false",
521         "comments": "",
522         "outputs": 1,
523         "x": 688.7578010559082,
524         "y": 813.0078420639038,
525         "z": "4c7efb80.7cead4",
526         "wires": [
527             [
528                 "4c3d7914.2ada48",
529                 "5e2ec2ff.98aacc"
530             ]
531         ]
532     },
533     {
534         "id": "4c3d7914.2ada48",
535         "type": "returnSuccess",
536         "name": "return success",
537         "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",
538         "comments": "",
539         "x": 838.7578449249268,
540         "y": 895.0078115463257,
541         "z": "4c7efb80.7cead4",
542         "wires": []
543     },
544     {
545         "id": "47280ee8.91324",
546         "type": "block",
547         "name": "block",
548         "xml": "<block>\n",
549         "atomic": "false",
550         "comments": "",
551         "outputs": 1,
552         "x": 1549.0077781677246,
553         "y": 470.0078344345093,
554         "z": "4c7efb80.7cead4",
555         "wires": [
556             [
557                 "bd7fd084.d14a1",
558                 "5e2ec2ff.98aacc",
559                 "6ad346e1.874668"
560             ]
561         ]
562     }
563 ]