HTTPS Proxy support for A1 adapter southbound
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyType.json
1 [
2     {
3         "id": "c57a85a7.6d9e28",
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": 184,
12         "y": 217,
13         "z": "6b10bb22.27b454",
14         "wires": [
15             [
16                 "7f8f754.1d44a8c"
17             ]
18         ]
19     },
20     {
21         "id": "7f8f754.1d44a8c",
22         "type": "method",
23         "name": "method getA1PolicyType",
24         "xml": "<method rpc='getA1PolicyType' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 247.00000762939453,
28         "y": 340.00000953674316,
29         "z": "6b10bb22.27b454",
30         "wires": [
31             [
32                 "84af22f.906a3e"
33             ]
34         ]
35     },
36     {
37         "id": "ed70783e.27b828",
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 Policy Type:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-type-input.near-rt-ric-url`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 712.0000267028809,
44         "y": 152.99999904632568,
45         "z": "6b10bb22.27b454",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "84af22f.906a3e",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 450,
59         "y": 291,
60         "z": "6b10bb22.27b454",
61         "wires": [
62             [
63                 "ed70783e.27b828",
64                 "28381478.4110ac",
65                 "37a94c09.766b94",
66                 "87dae598.c09b78",
67                 "5b5bbe8a.3a76a"
68             ]
69         ]
70     },
71     {
72         "id": "1bc64bfe.dda094",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 117,
77         "y": 153,
78         "z": "6b10bb22.27b454",
79         "wires": [
80             [
81                 "c57a85a7.6d9e28"
82             ]
83         ]
84     },
85     {
86         "id": "28381478.4110ac",
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='getA1PolicyType executed successfully' />",
90         "comments": "",
91         "x": 749.0001068115234,
92         "y": 205.99999809265137,
93         "z": "6b10bb22.27b454",
94         "wires": []
95     },
96     {
97         "id": "37a94c09.766b94",
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": 749,
104         "y": 259,
105         "z": "6b10bb22.27b454",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "5b5bbe8a.3a76a",
112         "type": "block",
113         "name": "A1 Mediator RestAPI Invocation",
114         "xml": "<block atomic='true'>",
115         "atomic": "true",
116         "comments": "",
117         "outputs": 1,
118         "x": 773.0001525878906,
119         "y": 344.99999380111694,
120         "z": "6b10bb22.27b454",
121         "wires": [
122             [
123                 "80c7ebd8.e99678",
124                 "c14dac35.e1db6",
125                 "410d2f2e.d71a4",
126                 "d12e5095.54989"
127             ]
128         ]
129     },
130     {
131         "id": "80c7ebd8.e99678",
132         "type": "set",
133         "name": "set tmp variables for A1 Mediator REST API call",
134         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$get-a1-policy-type-input.near-rt-ric-url`\"/>",
135         "comments": "",
136         "x": 1163.00146484375,
137         "y": 147.88912963867188,
138         "z": "6b10bb22.27b454",
139         "wires": []
140     },
141     {
142         "id": "c14dac35.e1db6",
143         "type": "execute",
144         "name": "Get Policy Types",
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\"/>",
146         "comments": "",
147         "outputs": 1,
148         "x": 1059.0006103515625,
149         "y": 519.0103759765625,
150         "z": "6b10bb22.27b454",
151         "wires": [
152             [
153                 "c5fcaf09.27937",
154                 "855add04.525dc"
155             ]
156         ]
157     },
158     {
159         "id": "c5fcaf09.27937",
160         "type": "failure",
161         "name": "failure",
162         "xml": "<outcome value='failure'>\n",
163         "comments": "",
164         "outputs": 1,
165         "x": 1240.0000610351562,
166         "y": 577.0001187324524,
167         "z": "6b10bb22.27b454",
168         "wires": [
169             [
170                 "ddd5d6a3.da1298"
171             ]
172         ]
173     },
174     {
175         "id": "855add04.525dc",
176         "type": "success",
177         "name": "success",
178         "xml": "<outcome value='success'>\n",
179         "comments": "",
180         "outputs": 1,
181         "x": 1241.0002136230469,
182         "y": 473.000018119812,
183         "z": "6b10bb22.27b454",
184         "wires": [
185             [
186                 "c1626bc6.876598"
187             ]
188         ]
189     },
190     {
191         "id": "a71cc3cf.ce06a",
192         "type": "returnFailure",
193         "name": "return failure",
194         "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 Getting A1 Policy Type. Aborting\" />",
195         "comments": "",
196         "x": 1529.0006103515625,
197         "y": 611.0001220703125,
198         "z": "6b10bb22.27b454",
199         "wires": []
200     },
201     {
202         "id": "c1626bc6.876598",
203         "type": "block",
204         "name": "block",
205         "xml": "<block>\n",
206         "atomic": "false",
207         "comments": "",
208         "outputs": 1,
209         "x": 1404.9998779296875,
210         "y": 447.00006103515625,
211         "z": "6b10bb22.27b454",
212         "wires": [
213             [
214                 "471d2243.80555c",
215                 "622289fe.925988",
216                 "5eab9cfb.a9aba4"
217             ]
218         ]
219     },
220     {
221         "id": "471d2243.80555c",
222         "type": "record",
223         "name": "record",
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`\"/>",
225         "comments": "",
226         "outputs": 1,
227         "x": 1576.9999694824219,
228         "y": 450.9999780654907,
229         "z": "6b10bb22.27b454",
230         "wires": [
231             []
232         ]
233     },
234     {
235         "id": "ce3d916.2cc397",
236         "type": "set",
237         "name": "set",
238         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
239         "comments": "",
240         "x": 1511.75390625,
241         "y": 551.0039367675781,
242         "z": "6b10bb22.27b454",
243         "wires": []
244     },
245     {
246         "id": "87dae598.c09b78",
247         "type": "block",
248         "name": "block",
249         "xml": "<block>\n",
250         "atomic": "false",
251         "comments": "",
252         "outputs": 1,
253         "x": 696.7539367675781,
254         "y": 612.0039978027344,
255         "z": "6b10bb22.27b454",
256         "wires": [
257             [
258                 "bd48102.d01bdf"
259             ]
260         ]
261     },
262     {
263         "id": "bd48102.d01bdf",
264         "type": "returnSuccess",
265         "name": "return success",
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",
267         "comments": "",
268         "x": 911.7540283203125,
269         "y": 612.0039367675781,
270         "z": "6b10bb22.27b454",
271         "wires": []
272     },
273     {
274         "id": "ddd5d6a3.da1298",
275         "type": "block",
276         "name": "block",
277         "xml": "<block>\n",
278         "atomic": "false",
279         "comments": "",
280         "outputs": 1,
281         "x": 1368.0039367675781,
282         "y": 579.003918170929,
283         "z": "6b10bb22.27b454",
284         "wires": [
285             [
286                 "a71cc3cf.ce06a",
287                 "ce3d916.2cc397"
288             ]
289         ]
290     },
291     {
292         "id": "410d2f2e.d71a4",
293         "type": "record",
294         "name": "record",
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`\"/>",
296         "comments": "",
297         "outputs": 1,
298         "x": 1034.9998779296875,
299         "y": 455,
300         "z": "6b10bb22.27b454",
301         "wires": [
302             []
303         ]
304     },
305     {
306         "id": "622289fe.925988",
307         "type": "execute",
308         "name": "set",
309         "xml": "<set>\n<parameter name='responseBody' value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>",
310         "comments": "",
311         "outputs": 1,
312         "x": 1578.0000915527344,
313         "y": 505.9999885559082,
314         "z": "6b10bb22.27b454",
315         "wires": [
316             []
317         ]
318     },
319     {
320         "id": "5eab9cfb.a9aba4",
321         "type": "execute",
322         "name": "execute",
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=\"\"/>",
324         "comments": "",
325         "outputs": 1,
326         "x": 1579.9999694824219,
327         "y": 401.9999780654907,
328         "z": "6b10bb22.27b454",
329         "wires": [
330             []
331         ]
332     },
333     {
334         "id": "3646f816.699f88",
335         "type": "execute",
336         "name": "split near-rt-ric URL",
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\"/>",
338         "comments": "",
339         "outputs": 1,
340         "x": 2114,
341         "y": 245,
342         "z": "6b10bb22.27b454",
343         "wires": [
344             []
345         ]
346     },
347     {
348         "id": "6556f21c.11ee1c",
349         "type": "for",
350         "name": "for",
351         "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",
352         "comments": "",
353         "outputs": 1,
354         "x": 2080,
355         "y": 315,
356         "z": "6b10bb22.27b454",
357         "wires": [
358             [
359                 "afa1cbf9.b42ef8"
360             ]
361         ]
362     },
363     {
364         "id": "afa1cbf9.b42ef8",
365         "type": "execute",
366         "name": "set concat url",
367         "xml": "<set>\n<parameter name='tmp.proxy-url' value=\"`$tmp.proxy-url +'/' + $tmp.near-rt-ric-url-splitList[$idx] `\" />\n\n\n",
368         "comments": "",
369         "outputs": 1,
370         "x": 2258,
371         "y": 315,
372         "z": "6b10bb22.27b454",
373         "wires": [
374             []
375         ]
376     },
377     {
378         "id": "1214c3b2.b5293c",
379         "type": "record",
380         "name": "record",
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",
382         "comments": "",
383         "outputs": 1,
384         "x": 2080,
385         "y": 372,
386         "z": "6b10bb22.27b454",
387         "wires": [
388             []
389         ]
390     },
391     {
392         "id": "ae139c27.9f81c",
393         "type": "record",
394         "name": "record",
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",
396         "comments": "",
397         "outputs": 1,
398         "x": 1884,
399         "y": 281,
400         "z": "6b10bb22.27b454",
401         "wires": [
402             []
403         ]
404     },
405     {
406         "id": "a9cf882b.e74398",
407         "type": "block",
408         "name": "block",
409         "xml": "<block>\n",
410         "atomic": "false",
411         "comments": "",
412         "outputs": 1,
413         "x": 1876,
414         "y": 349,
415         "z": "6b10bb22.27b454",
416         "wires": [
417             [
418                 "3646f816.699f88",
419                 "6556f21c.11ee1c",
420                 "1214c3b2.b5293c",
421                 "e7cb17c0.4634f8"
422             ]
423         ]
424     },
425     {
426         "id": "e7cb17c0.4634f8",
427         "type": "set",
428         "name": "set variables for A1 Mediator with proxy url",
429         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$tmp.proxy-url`\"/>",
430         "comments": "",
431         "x": 2190,
432         "y": 428,
433         "z": "6b10bb22.27b454",
434         "wires": []
435     },
436     {
437         "id": "96f3e7b2.57cad8",
438         "type": "outcome",
439         "name": "No proxy URL",
440         "xml": "<outcome value=''>\n",
441         "comments": "",
442         "outputs": 1,
443         "x": 1716,
444         "y": 281,
445         "z": "6b10bb22.27b454",
446         "wires": [
447             [
448                 "ae139c27.9f81c"
449             ]
450         ]
451     },
452     {
453         "id": "d9949951.7f0e98",
454         "type": "outcome",
455         "name": "Otherwise",
456         "xml": "<outcome value='Other'>\n",
457         "comments": "",
458         "outputs": 1,
459         "x": 1712,
460         "y": 349,
461         "z": "6b10bb22.27b454",
462         "wires": [
463             [
464                 "a9cf882b.e74398"
465             ]
466         ]
467     },
468     {
469         "id": "bb63dde8.4da53",
470         "type": "switchNode",
471         "name": "switch",
472         "xml": "<switch test='`$tmp.proxy-url`'>\n",
473         "comments": "",
474         "outputs": 1,
475         "x": 1537,
476         "y": 315,
477         "z": "6b10bb22.27b454",
478         "wires": [
479             [
480                 "96f3e7b2.57cad8",
481                 "d9949951.7f0e98"
482             ]
483         ]
484     },
485     {
486         "id": "4600604a.a82ae",
487         "type": "record",
488         "name": "record",
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",
490         "comments": "",
491         "outputs": 1,
492         "x": 1538,
493         "y": 232,
494         "z": "6b10bb22.27b454",
495         "wires": [
496             []
497         ]
498     },
499     {
500         "id": "ddbc9e41.e0fde",
501         "type": "set",
502         "name": "set tmp url variables with proxy information",
503         "xml": "<set>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",
504         "comments": "",
505         "x": 1655,
506         "y": 157,
507         "z": "6b10bb22.27b454",
508         "wires": []
509     },
510     {
511         "id": "d12e5095.54989",
512         "type": "block",
513         "name": "block Substitute proxy address if available",
514         "xml": "<block>\n",
515         "atomic": "false",
516         "comments": "",
517         "outputs": 1,
518         "x": 1142,
519         "y": 307,
520         "z": "6b10bb22.27b454",
521         "wires": [
522             [
523                 "ddbc9e41.e0fde",
524                 "4600604a.a82ae",
525                 "bb63dde8.4da53"
526             ]
527         ]
528     }
529 ]