DG's and Templates for A1 Adapter
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getPolicyInstances.json
1 [
2     {
3         "id": "ec032236.b7a57",
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": 179.00390625,
12         "y": 144.00390625,
13         "z": "b909beb3.a3f6a",
14         "wires": [
15             [
16                 "21fb48ea.c20258"
17             ]
18         ]
19     },
20     {
21         "id": "21fb48ea.c20258",
22         "type": "method",
23         "name": "method getPolicyInstances",
24         "xml": "<method rpc='getPolicyInstances' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 240.00390625,
28         "y": 264.00390625,
29         "z": "b909beb3.a3f6a",
30         "wires": [
31             [
32                 "d720c111.6c25c"
33             ]
34         ]
35     },
36     {
37         "id": "7e7a0567.85988c",
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 Instance from Near RT RIC ID and Policy Type ID\"/>\n<parameter name=\"field2\" value=\"`$get-policy-instances-input.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$get-policy-instances-input.policy-type-id`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 704.00390625,
44         "y": 79.00390625,
45         "z": "b909beb3.a3f6a",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "d720c111.6c25c",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 445.00390625,
59         "y": 218.00390625,
60         "z": "b909beb3.a3f6a",
61         "wires": [
62             [
63                 "7e7a0567.85988c",
64                 "75eb8d67.498124",
65                 "f200a52d.0d0588",
66                 "dab8aaba.ccc9c8",
67                 "2d112420.4bbb3c"
68             ]
69         ]
70     },
71     {
72         "id": "11949972.8a7e97",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 112.00390625,
77         "y": 80.00390625,
78         "z": "b909beb3.a3f6a",
79         "wires": [
80             [
81                 "ec032236.b7a57"
82             ]
83         ]
84     },
85     {
86         "id": "75eb8d67.498124",
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='getPolicyInstances executed successfully' />",
90         "comments": "",
91         "x": 744.0039520263672,
92         "y": 133.00390720367432,
93         "z": "b909beb3.a3f6a",
94         "wires": []
95     },
96     {
97         "id": "f200a52d.0d0588",
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": 744.00390625,
104         "y": 186.00390625,
105         "z": "b909beb3.a3f6a",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "dab8aaba.ccc9c8",
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": 694.00390625,
118         "y": 242.00390625,
119         "z": "b909beb3.a3f6a",
120         "wires": [
121             [
122                 "fd41c325.2c9ea",
123                 "f27633b5.a9da6"
124             ]
125         ]
126     },
127     {
128         "id": "f27633b5.a9da6",
129         "type": "outcome",
130         "name": "Deployed",
131         "xml": "<outcome value='true'>\n",
132         "comments": "",
133         "outputs": 1,
134         "x": 978.0039520263672,
135         "y": 102.00397157669067,
136         "z": "b909beb3.a3f6a",
137         "wires": [
138             [
139                 "9da3376b.3dd138"
140             ]
141         ]
142     },
143     {
144         "id": "9da3376b.3dd138",
145         "type": "block",
146         "name": "block : atomic",
147         "xml": "<block atomic='true'>",
148         "atomic": "true",
149         "comments": "",
150         "outputs": 1,
151         "x": 955.0040016174316,
152         "y": 248.00392389297485,
153         "z": "b909beb3.a3f6a",
154         "wires": [
155             [
156                 "a8185ff4.a81ee"
157             ]
158         ]
159     },
160     {
161         "id": "fd41c325.2c9ea",
162         "type": "outcome",
163         "name": "Not Deployed",
164         "xml": "<outcome value='false'>\n",
165         "comments": "",
166         "outputs": 1,
167         "x": 931.0039749145508,
168         "y": 537.0039677619934,
169         "z": "b909beb3.a3f6a",
170         "wires": [
171             [
172                 "6e9eb61d.8a4578"
173             ]
174         ]
175     },
176     {
177         "id": "6e9eb61d.8a4578",
178         "type": "block",
179         "name": "block",
180         "xml": "<block>\n",
181         "atomic": "false",
182         "comments": "",
183         "outputs": 1,
184         "x": 1146.0040130615234,
185         "y": 666.0039205551147,
186         "z": "b909beb3.a3f6a",
187         "wires": [
188             [
189                 "3caedb5f.a72044",
190                 "441fe2c0.e1e7fc",
191                 "c00c107b.52f55"
192             ]
193         ]
194     },
195     {
196         "id": "3caedb5f.a72044",
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 Instances. Aborting\" />",
200         "comments": "",
201         "x": 1271.0037689208984,
202         "y": 747.0039050579071,
203         "z": "b909beb3.a3f6a",
204         "wires": []
205     },
206     {
207         "id": "a8185ff4.a81ee",
208         "type": "block",
209         "name": "A1 Mediator RestAPI Invocation",
210         "xml": "<block atomic='true'>",
211         "atomic": "true",
212         "comments": "",
213         "outputs": 1,
214         "x": 1149.0040130615234,
215         "y": 359.00391072034836,
216         "z": "b909beb3.a3f6a",
217         "wires": [
218             [
219                 "6ea37614.a6ad08",
220                 "c6d4b2d.c900a5",
221                 "f32ead23.ce141",
222                 "e6186f85.a2b5f",
223                 "aa8f25a3.941fd8"
224             ]
225         ]
226     },
227     {
228         "id": "c6d4b2d.c900a5",
229         "type": "set",
230         "name": "set tmp variables for A1 Mediator REST API call",
231         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-id\" value=\"`$get-policy-instances-input.near-rt-ric-id`\"/>\n<parameter name=\"tmp.policy-type-id\" value=\"`$get-policy-instances-input.policy-type-id`\"/>",
232         "comments": "",
233         "x": 1486.0053405761719,
234         "y": 185.89303493499756,
235         "z": "b909beb3.a3f6a",
236         "wires": []
237     },
238     {
239         "id": "6ea37614.a6ad08",
240         "type": "record",
241         "name": "record",
242         "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 Instances.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>",
243         "comments": "",
244         "outputs": 1,
245         "x": 1412.0039978027344,
246         "y": 233.0039005279541,
247         "z": "b909beb3.a3f6a",
248         "wires": [
249             []
250         ]
251     },
252     {
253         "id": "f32ead23.ce141",
254         "type": "execute",
255         "name": "Get Policy Instances",
256         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstances-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\"/>",
257         "comments": "",
258         "outputs": 1,
259         "x": 1426.0045166015625,
260         "y": 413.0143041610718,
261         "z": "b909beb3.a3f6a",
262         "wires": [
263             [
264                 "81763a3a.75e9a8",
265                 "548c624e.550c4c"
266             ]
267         ]
268     },
269     {
270         "id": "81763a3a.75e9a8",
271         "type": "failure",
272         "name": "failure",
273         "xml": "<outcome value='failure'>\n",
274         "comments": "",
275         "outputs": 1,
276         "x": 1402.0039367675781,
277         "y": 510.00401973724365,
278         "z": "b909beb3.a3f6a",
279         "wires": [
280             [
281                 "9d082013.fde13"
282             ]
283         ]
284     },
285     {
286         "id": "548c624e.550c4c",
287         "type": "success",
288         "name": "success",
289         "xml": "<outcome value='success'>\n",
290         "comments": "",
291         "outputs": 1,
292         "x": 1646.0041809082031,
293         "y": 381.0039281845093,
294         "z": "b909beb3.a3f6a",
295         "wires": [
296             [
297                 "f1293484.0bc0b8"
298             ]
299         ]
300     },
301     {
302         "id": "e45b7a63.5e3678",
303         "type": "returnFailure",
304         "name": "return failure",
305         "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 Instances. Aborting\" />",
306         "comments": "",
307         "x": 1562.0045166015625,
308         "y": 617.0039892196655,
309         "z": "b909beb3.a3f6a",
310         "wires": []
311     },
312     {
313         "id": "f1293484.0bc0b8",
314         "type": "block",
315         "name": "block",
316         "xml": "<block>\n",
317         "atomic": "false",
318         "comments": "",
319         "outputs": 1,
320         "x": 1796.0037860870361,
321         "y": 345.00395822525024,
322         "z": "b909beb3.a3f6a",
323         "wires": [
324             [
325                 "d525c780.d9e1f8"
326             ]
327         ]
328     },
329     {
330         "id": "d525c780.d9e1f8",
331         "type": "record",
332         "name": "record",
333         "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 Instances: \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp`\"/>",
334         "comments": "",
335         "outputs": 1,
336         "x": 1976.0039100646973,
337         "y": 319.00390911102295,
338         "z": "b909beb3.a3f6a",
339         "wires": [
340             []
341         ]
342     },
343     {
344         "id": "441fe2c0.e1e7fc",
345         "type": "block",
346         "name": "DMAAP Reponse Publish",
347         "xml": "<block atomic='true'>",
348         "atomic": "true",
349         "comments": "",
350         "outputs": 1,
351         "x": 1932.0040283203125,
352         "y": 714.0040578842163,
353         "z": "b909beb3.a3f6a",
354         "wires": [
355             [
356                 "98e62a34.70f008",
357                 "c6fd62af.c7216",
358                 "bec3e985.6b96c8"
359             ]
360         ]
361     },
362     {
363         "id": "c6fd62af.c7216",
364         "type": "execute",
365         "name": "execute DmaapMsg",
366         "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' />",
367         "comments": "",
368         "outputs": 1,
369         "x": 2281.0042266845703,
370         "y": 892.0034625530243,
371         "z": "b909beb3.a3f6a",
372         "wires": [
373             [
374                 "18ca6a8e.895005",
375                 "5c7201b9.5f902"
376             ]
377         ]
378     },
379     {
380         "id": "98e62a34.70f008",
381         "type": "set",
382         "name": "set",
383         "xml": "<set>\n<parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstances'/>\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=\"Working On it\" />",
384         "comments": "",
385         "x": 2270.670944213867,
386         "y": 683.0040187835693,
387         "z": "b909beb3.a3f6a",
388         "wires": []
389     },
390     {
391         "id": "18ca6a8e.895005",
392         "type": "failure",
393         "name": "failure",
394         "xml": "<outcome value='failure'>\n",
395         "comments": "",
396         "outputs": 1,
397         "x": 2496.5041122436523,
398         "y": 814.9207663536072,
399         "z": "b909beb3.a3f6a",
400         "wires": [
401             [
402                 "32a11aed.000606"
403             ]
404         ]
405     },
406     {
407         "id": "5c7201b9.5f902",
408         "type": "success",
409         "name": "success",
410         "xml": "<outcome value='success'>\n",
411         "comments": "",
412         "outputs": 1,
413         "x": 2500.5040321350098,
414         "y": 953.920608997345,
415         "z": "b909beb3.a3f6a",
416         "wires": [
417             [
418                 "3f10fd46.bde0e2"
419             ]
420         ]
421     },
422     {
423         "id": "32a11aed.000606",
424         "type": "block",
425         "name": "block",
426         "xml": "<block>\n",
427         "atomic": "false",
428         "comments": "",
429         "outputs": 1,
430         "x": 2656.5039463043213,
431         "y": 816.9207673072815,
432         "z": "b909beb3.a3f6a",
433         "wires": [
434             [
435                 "af4fd183.8aab9"
436             ]
437         ]
438     },
439     {
440         "id": "af4fd183.8aab9",
441         "type": "returnFailure",
442         "name": "return failure",
443         "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. \" />",
444         "comments": "",
445         "x": 2838.503677368164,
446         "y": 807.9208431243896,
447         "z": "b909beb3.a3f6a",
448         "wires": []
449     },
450     {
451         "id": "3f10fd46.bde0e2",
452         "type": "block",
453         "name": "block",
454         "xml": "<block>\n",
455         "atomic": "false",
456         "comments": "",
457         "outputs": 1,
458         "x": 2683.5036754608154,
459         "y": 946.920717716217,
460         "z": "b909beb3.a3f6a",
461         "wires": [
462             [
463                 "434607a6.ef8078"
464             ]
465         ]
466     },
467     {
468         "id": "434607a6.ef8078",
469         "type": "record",
470         "name": "record",
471         "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 \"/>",
472         "comments": "",
473         "outputs": 1,
474         "x": 2869.5038299560547,
475         "y": 934.9210414886475,
476         "z": "b909beb3.a3f6a",
477         "wires": [
478             []
479         ]
480     },
481     {
482         "id": "bec3e985.6b96c8",
483         "type": "record",
484         "name": "record",
485         "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`\" />",
486         "comments": "",
487         "outputs": 1,
488         "x": 2279.504165649414,
489         "y": 774.4589986801147,
490         "z": "b909beb3.a3f6a",
491         "wires": [
492             []
493         ]
494     },
495     {
496         "id": "c00c107b.52f55",
497         "type": "set",
498         "name": "set",
499         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='A1 Mediator Not Deployed'/>\n",
500         "comments": "",
501         "x": 1347.0040588378906,
502         "y": 599.0039277076721,
503         "z": "b909beb3.a3f6a",
504         "wires": []
505     },
506     {
507         "id": "e2a14338.fa69e",
508         "type": "set",
509         "name": "set",
510         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
511         "comments": "",
512         "x": 1721.757869720459,
513         "y": 446.00780391693115,
514         "z": "b909beb3.a3f6a",
515         "wires": []
516     },
517     {
518         "id": "2d112420.4bbb3c",
519         "type": "block",
520         "name": "block",
521         "xml": "<block>\n",
522         "atomic": "false",
523         "comments": "",
524         "outputs": 1,
525         "x": 687.7578010559082,
526         "y": 856.0078420639038,
527         "z": "b909beb3.a3f6a",
528         "wires": [
529             [
530                 "b9d43aed.0e9ff8",
531                 "441fe2c0.e1e7fc"
532             ]
533         ]
534     },
535     {
536         "id": "b9d43aed.0e9ff8",
537         "type": "returnSuccess",
538         "name": "return success",
539         "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='getPolicyInstances executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n",
540         "comments": "",
541         "x": 837.7578449249268,
542         "y": 938.0078115463257,
543         "z": "b909beb3.a3f6a",
544         "wires": []
545     },
546     {
547         "id": "9d082013.fde13",
548         "type": "block",
549         "name": "block",
550         "xml": "<block>\n",
551         "atomic": "false",
552         "comments": "",
553         "outputs": 1,
554         "x": 1548.0077781677246,
555         "y": 513.0078344345093,
556         "z": "b909beb3.a3f6a",
557         "wires": [
558             [
559                 "e2a14338.fa69e",
560                 "441fe2c0.e1e7fc",
561                 "e45b7a63.5e3678"
562             ]
563         ]
564     },
565     {
566         "id": "e6186f85.a2b5f",
567         "type": "execute",
568         "name": "generate A1 Mediator URL",
569         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.policies`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.restapi.policyinstances-url\"/>\n    <parameter name=\"target\" value=\"{policy_type_id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.policy-type-id`\"/>\n",
570         "comments": "",
571         "outputs": 1,
572         "x": 1475.0041198730469,
573         "y": 289.00391244888306,
574         "z": "b909beb3.a3f6a",
575         "wires": [
576             []
577         ]
578     },
579     {
580         "id": "aa8f25a3.941fd8",
581         "type": "record",
582         "name": "record",
583         "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 Instances.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-id`\"/>\n<parameter name=\"field3\" value=\"`$tmp.policy-type-id`\"/>\n<parameter name=\"field4\" value=\"`$tmp.restapi.policyinstances-url`\"/>",
584         "comments": "",
585         "outputs": 1,
586         "x": 1424.0046348571777,
587         "y": 349.88250637054443,
588         "z": "b909beb3.a3f6a",
589         "wires": [
590             []
591         ]
592     }
593 ]

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use