144a1b7ba828e7f9f520cefe81b4c89981eaf337
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyType.json
1 [\r
2     {\r
3         "id": "8c265fc3.6b9c2",\r
4         "type": "service-logic",\r
5         "name": "A1-ADAPTER-API ${project.version}",\r
6         "module": "A1-ADAPTER-API",\r
7         "version": "${project.version}",\r
8         "comments": "",\r
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}'>",\r
10         "outputs": 1,\r
11         "x": 150,\r
12         "y": 146.11087036132812,\r
13         "z": "6e7c5307.c398cc",\r
14         "wires": [\r
15             [\r
16                 "6e5c6f18.9dc93"\r
17             ]\r
18         ]\r
19     },\r
20     {\r
21         "id": "6e5c6f18.9dc93",\r
22         "type": "method",\r
23         "name": "method getA1PolicyType",\r
24         "xml": "<method rpc='getA1PolicyType' mode='sync'>\n",\r
25         "comments": "",\r
26         "outputs": 1,\r
27         "x": 213.00000762939453,\r
28         "y": 269.1108798980713,\r
29         "z": "6e7c5307.c398cc",\r
30         "wires": [\r
31             [\r
32                 "de58383c.7e1718"\r
33             ]\r
34         ]\r
35     },\r
36     {\r
37         "id": "ae2a0098.f258c",\r
38         "type": "record",\r
39         "name": "record",\r
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 Policy Type:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-type-input.near-rt-ric-url`\"/>",\r
41         "comments": "",\r
42         "outputs": 1,\r
43         "x": 678.0000267028809,\r
44         "y": 82.11086940765381,\r
45         "z": "6e7c5307.c398cc",\r
46         "wires": [\r
47             []\r
48         ]\r
49     },\r
50     {\r
51         "id": "de58383c.7e1718",\r
52         "type": "block",\r
53         "name": "block : atomic",\r
54         "xml": "<block atomic='true'>",\r
55         "atomic": "true",\r
56         "comments": "",\r
57         "outputs": 1,\r
58         "x": 416,\r
59         "y": 220.11087036132812,\r
60         "z": "6e7c5307.c398cc",\r
61         "wires": [\r
62             [\r
63                 "ae2a0098.f258c",\r
64                 "53b03c05.963dc4",\r
65                 "fa97dc4d.7c138",\r
66                 "746426a9.66e6a8",\r
67                 "da98d4e7.a42728"\r
68             ]\r
69         ]\r
70     },\r
71     {\r
72         "id": "8f9cdc00.4e19c8",\r
73         "type": "dgstart",\r
74         "name": "DGSTART",\r
75         "outputs": 1,\r
76         "x": 83,\r
77         "y": 82.11087036132812,\r
78         "z": "6e7c5307.c398cc",\r
79         "wires": [\r
80             [\r
81                 "8c265fc3.6b9c2"\r
82             ]\r
83         ]\r
84     },\r
85     {\r
86         "id": "53b03c05.963dc4",\r
87         "type": "set",\r
88         "name": "set default status value",\r
89         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='getA1PolicyType executed successfully' />",\r
90         "comments": "",\r
91         "x": 715.0001068115234,\r
92         "y": 135.1108684539795,\r
93         "z": "6e7c5307.c398cc",\r
94         "wires": []\r
95     },\r
96     {\r
97         "id": "fa97dc4d.7c138",\r
98         "type": "execute",\r
99         "name": "execute Properties",\r
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",\r
101         "comments": "",\r
102         "outputs": 1,\r
103         "x": 715,\r
104         "y": 188.11087036132812,\r
105         "z": "6e7c5307.c398cc",\r
106         "wires": [\r
107             []\r
108         ]\r
109     },\r
110     {\r
111         "id": "da98d4e7.a42728",\r
112         "type": "block",\r
113         "name": "A1 Mediator RestAPI Invocation",\r
114         "xml": "<block atomic='true'>",\r
115         "atomic": "true",\r
116         "comments": "",\r
117         "outputs": 1,\r
118         "x": 739.0001525878906,\r
119         "y": 274.11086416244507,\r
120         "z": "6e7c5307.c398cc",\r
121         "wires": [\r
122             [\r
123                 "9c119178.a1023",\r
124                 "41a9420e.fea09c",\r
125                 "26bb74a4.cb368c",\r
126                 "8c9e0855.a2d458"\r
127             ]\r
128         ]\r
129     },\r
130     {\r
131         "id": "9c119178.a1023",\r
132         "type": "set",\r
133         "name": "set tmp variables for A1 Mediator REST API call",\r
134         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$get-a1-policy-type-input.near-rt-ric-url`\"/>",\r
135         "comments": "",\r
136         "x": 1129.00146484375,\r
137         "y": 77,\r
138         "z": "6e7c5307.c398cc",\r
139         "wires": []\r
140     },\r
141     {\r
142         "id": "41a9420e.fea09c",\r
143         "type": "execute",\r
144         "name": "Get Policy Types",\r
145         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$tmp.near-rt-ric-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\"/>",\r
146         "comments": "",\r
147         "outputs": 1,\r
148         "x": 1025.0006103515625,\r
149         "y": 448.1212463378906,\r
150         "z": "6e7c5307.c398cc",\r
151         "wires": [\r
152             [\r
153                 "e1975678.7e4028",\r
154                 "5c4ab5f9.8d989c"\r
155             ]\r
156         ]\r
157     },\r
158     {\r
159         "id": "e1975678.7e4028",\r
160         "type": "failure",\r
161         "name": "failure",\r
162         "xml": "<outcome value='failure'>\n",\r
163         "comments": "",\r
164         "outputs": 1,\r
165         "x": 1206.0000610351562,\r
166         "y": 506.1109890937805,\r
167         "z": "6e7c5307.c398cc",\r
168         "wires": [\r
169             [\r
170                 "1085e0df.71c62f"\r
171             ]\r
172         ]\r
173     },\r
174     {\r
175         "id": "5c4ab5f9.8d989c",\r
176         "type": "success",\r
177         "name": "success",\r
178         "xml": "<outcome value='success'>\n",\r
179         "comments": "",\r
180         "outputs": 1,\r
181         "x": 1207.0002136230469,\r
182         "y": 402.11088848114014,\r
183         "z": "6e7c5307.c398cc",\r
184         "wires": [\r
185             [\r
186                 "1dcf580c.db4cb8"\r
187             ]\r
188         ]\r
189     },\r
190     {\r
191         "id": "44796ff4.052ba",\r
192         "type": "returnFailure",\r
193         "name": "return failure",\r
194         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>",\r
195         "comments": "",\r
196         "x": 1495.0006103515625,\r
197         "y": 540.1109924316406,\r
198         "z": "6e7c5307.c398cc",\r
199         "wires": []\r
200     },\r
201     {\r
202         "id": "1dcf580c.db4cb8",\r
203         "type": "block",\r
204         "name": "block",\r
205         "xml": "<block>\n",\r
206         "atomic": "false",\r
207         "comments": "",\r
208         "outputs": 1,\r
209         "x": 1370.9998779296875,\r
210         "y": 376.1109313964844,\r
211         "z": "6e7c5307.c398cc",\r
212         "wires": [\r
213             [\r
214                 "93fea594.fd7eb8",\r
215                 "bae47d21.8afde",\r
216                 "e3f3a0ff.75db5"\r
217             ]\r
218         ]\r
219     },\r
220     {\r
221         "id": "93fea594.fd7eb8",\r
222         "type": "record",\r
223         "name": "record",\r
224         "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 Policy Type Information \"/>\n<parameter name=\"field2\" value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>\n<parameter name='field3' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='field4' value='`$a1MediatorRsp.response-message`'/>",\r
225         "comments": "",\r
226         "outputs": 1,\r
227         "x": 1542.9999694824219,\r
228         "y": 380.11084842681885,\r
229         "z": "6e7c5307.c398cc",\r
230         "wires": [\r
231             []\r
232         ]\r
233     },\r
234     {\r
235         "id": "b3f7367b.d92278",\r
236         "type": "set",\r
237         "name": "set",\r
238         "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>\n",\r
239         "comments": "",\r
240         "x": 1477.75390625,\r
241         "y": 480.11480712890625,\r
242         "z": "6e7c5307.c398cc",\r
243         "wires": []\r
244     },\r
245     {\r
246         "id": "746426a9.66e6a8",\r
247         "type": "block",\r
248         "name": "block",\r
249         "xml": "<block>\n",\r
250         "atomic": "false",\r
251         "comments": "",\r
252         "outputs": 1,\r
253         "x": 662.7539367675781,\r
254         "y": 541.1148681640625,\r
255         "z": "6e7c5307.c398cc",\r
256         "wires": [\r
257             [\r
258                 "ba0df99.5bb8508"\r
259             ]\r
260         ]\r
261     },\r
262     {\r
263         "id": "ba0df99.5bb8508",\r
264         "type": "returnSuccess",\r
265         "name": "return success",\r
266         "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",\r
267         "comments": "",\r
268         "x": 877.7540283203125,\r
269         "y": 541.1148071289062,\r
270         "z": "6e7c5307.c398cc",\r
271         "wires": []\r
272     },\r
273     {\r
274         "id": "1085e0df.71c62f",\r
275         "type": "block",\r
276         "name": "block",\r
277         "xml": "<block>\n",\r
278         "atomic": "false",\r
279         "comments": "",\r
280         "outputs": 1,\r
281         "x": 1334.0039367675781,\r
282         "y": 508.1147885322571,\r
283         "z": "6e7c5307.c398cc",\r
284         "wires": [\r
285             [\r
286                 "44796ff4.052ba",\r
287                 "b3f7367b.d92278"\r
288             ]\r
289         ]\r
290     },\r
291     {\r
292         "id": "26bb74a4.cb368c",\r
293         "type": "record",\r
294         "name": "record",\r
295         "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 Type.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>",\r
296         "comments": "",\r
297         "outputs": 1,\r
298         "x": 1000.9998779296875,\r
299         "y": 384.1108703613281,\r
300         "z": "6e7c5307.c398cc",\r
301         "wires": [\r
302             []\r
303         ]\r
304     },\r
305     {\r
306         "id": "bae47d21.8afde",\r
307         "type": "execute",\r
308         "name": "set",\r
309         "xml": "<set>\n<parameter name='responseBody' value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>",\r
310         "comments": "",\r
311         "outputs": 1,\r
312         "x": 1544.0000915527344,\r
313         "y": 435.1108589172363,\r
314         "z": "6e7c5307.c398cc",\r
315         "wires": [\r
316             []\r
317         ]\r
318     },\r
319     {\r
320         "id": "e3f3a0ff.75db5",\r
321         "type": "execute",\r
322         "name": "execute",\r
323         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >\n    <parameter name=\"source\" value=\"`$a1MediatorRsp.httpResponse`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.a1-mediator-restapi.httpResponse\"/>\n    <parameter name=\"target\" value=\"\\n\"/>\n    <parameter name=\"replacement\" value=\"\"/>",\r
324         "comments": "",\r
325         "outputs": 1,\r
326         "x": 1545.9999694824219,\r
327         "y": 331.11084842681885,\r
328         "z": "6e7c5307.c398cc",\r
329         "wires": [\r
330             []\r
331         ]\r
332     },\r
333     {\r
334         "id": "649cc87b.b1d558",\r
335         "type": "execute",\r
336         "name": "split near-rt-ric URL",\r
337         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n    <parameter name=\"original_string\" value=\"`$tmp.near-rt-ric-url`\" />\n    <parameter name=\"regex\" value=\"/\"/>\n    <parameter name=\"ctx_memory_result_key\" value=\"tmp.near-rt-ric-url-splitList\"/>",\r
338         "comments": "",\r
339         "outputs": 1,\r
340         "x": 2080,\r
341         "y": 174.11087036132812,\r
342         "z": "6e7c5307.c398cc",\r
343         "wires": [\r
344             []\r
345         ]\r
346     },\r
347     {\r
348         "id": "ff7f26f0.209c88",\r
349         "type": "for",\r
350         "name": "for",\r
351         "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",\r
352         "comments": "",\r
353         "outputs": 1,\r
354         "x": 2046,\r
355         "y": 244.11087036132812,\r
356         "z": "6e7c5307.c398cc",\r
357         "wires": [\r
358             [\r
359                 "9714621a.586e5"\r
360             ]\r
361         ]\r
362     },\r
363     {\r
364         "id": "9714621a.586e5",\r
365         "type": "execute",\r
366         "name": "set concat url",\r
367         "xml": "<set>\n<parameter name='tmp.proxy-url' value=\"`$tmp.proxy-url +'/' + $tmp.near-rt-ric-url-splitList[$idx] `\" />\n\n\n",\r
368         "comments": "",\r
369         "outputs": 1,\r
370         "x": 2224,\r
371         "y": 244.11087036132812,\r
372         "z": "6e7c5307.c398cc",\r
373         "wires": [\r
374             []\r
375         ]\r
376     },\r
377     {\r
378         "id": "40760e50.fa874",\r
379         "type": "record",\r
380         "name": "record",\r
381         "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 Policy Type: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",\r
382         "comments": "",\r
383         "outputs": 1,\r
384         "x": 2046,\r
385         "y": 301.1108703613281,\r
386         "z": "6e7c5307.c398cc",\r
387         "wires": [\r
388             []\r
389         ]\r
390     },\r
391     {\r
392         "id": "25cac3e6.2bbd4c",\r
393         "type": "record",\r
394         "name": "record",\r
395         "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 Policy Type: No proxy found on properties file \"/>\n",\r
396         "comments": "",\r
397         "outputs": 1,\r
398         "x": 1850,\r
399         "y": 210.11087036132812,\r
400         "z": "6e7c5307.c398cc",\r
401         "wires": [\r
402             []\r
403         ]\r
404     },\r
405     {\r
406         "id": "f41d0523.4fd778",\r
407         "type": "block",\r
408         "name": "block",\r
409         "xml": "<block>\n",\r
410         "atomic": "false",\r
411         "comments": "",\r
412         "outputs": 1,\r
413         "x": 1842,\r
414         "y": 278.1108703613281,\r
415         "z": "6e7c5307.c398cc",\r
416         "wires": [\r
417             [\r
418                 "649cc87b.b1d558",\r
419                 "ff7f26f0.209c88",\r
420                 "40760e50.fa874",\r
421                 "b59bb4c8.e299f8"\r
422             ]\r
423         ]\r
424     },\r
425     {\r
426         "id": "b59bb4c8.e299f8",\r
427         "type": "set",\r
428         "name": "set variables for A1 Mediator with proxy url",\r
429         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$tmp.proxy-url`\"/>",\r
430         "comments": "",\r
431         "x": 2156,\r
432         "y": 357.1108703613281,\r
433         "z": "6e7c5307.c398cc",\r
434         "wires": []\r
435     },\r
436     {\r
437         "id": "7dffc679.74af28",\r
438         "type": "outcome",\r
439         "name": "No proxy URL",\r
440         "xml": "<outcome value=''>\n",\r
441         "comments": "",\r
442         "outputs": 1,\r
443         "x": 1682,\r
444         "y": 210.11087036132812,\r
445         "z": "6e7c5307.c398cc",\r
446         "wires": [\r
447             [\r
448                 "25cac3e6.2bbd4c"\r
449             ]\r
450         ]\r
451     },\r
452     {\r
453         "id": "900e04b1.441648",\r
454         "type": "outcome",\r
455         "name": "Otherwise",\r
456         "xml": "<outcome value='Other'>\n",\r
457         "comments": "",\r
458         "outputs": 1,\r
459         "x": 1678,\r
460         "y": 278.1108703613281,\r
461         "z": "6e7c5307.c398cc",\r
462         "wires": [\r
463             [\r
464                 "f41d0523.4fd778"\r
465             ]\r
466         ]\r
467     },\r
468     {\r
469         "id": "9b05f4ee.4d7bf8",\r
470         "type": "switchNode",\r
471         "name": "switch",\r
472         "xml": "<switch test='`$tmp.proxy-url`'>\n",\r
473         "comments": "",\r
474         "outputs": 1,\r
475         "x": 1503,\r
476         "y": 244.11087036132812,\r
477         "z": "6e7c5307.c398cc",\r
478         "wires": [\r
479             [\r
480                 "7dffc679.74af28",\r
481                 "900e04b1.441648"\r
482             ]\r
483         ]\r
484     },\r
485     {\r
486         "id": "105ce637.9dcaaa",\r
487         "type": "record",\r
488         "name": "record",\r
489         "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 Policy Type: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",\r
490         "comments": "",\r
491         "outputs": 1,\r
492         "x": 1504,\r
493         "y": 161.11087036132812,\r
494         "z": "6e7c5307.c398cc",\r
495         "wires": [\r
496             []\r
497         ]\r
498     },\r
499     {\r
500         "id": "b655047a.625108",\r
501         "type": "set",\r
502         "name": "set tmp url variables with proxy information",\r
503         "xml": "<set>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",\r
504         "comments": "",\r
505         "x": 1621,\r
506         "y": 86.11087036132812,\r
507         "z": "6e7c5307.c398cc",\r
508         "wires": []\r
509     },\r
510     {\r
511         "id": "8c9e0855.a2d458",\r
512         "type": "block",\r
513         "name": "block Substitute proxy address if available",\r
514         "xml": "<block>\n",\r
515         "atomic": "false",\r
516         "comments": "",\r
517         "outputs": 1,\r
518         "x": 1108,\r
519         "y": 236.11087036132812,\r
520         "z": "6e7c5307.c398cc",\r
521         "wires": [\r
522             [\r
523                 "b655047a.625108",\r
524                 "105ce637.9dcaaa",\r
525                 "9b05f4ee.4d7bf8"\r
526             ]\r
527         ]\r
528     }\r
529 ]