HTTPS Proxy support for A1 adapter southbound
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyStatus.json
1 [
2     {
3         "id": "7547a4fa.c7bbcc",
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": 172,
12         "y": 213,
13         "z": "ba6f4cc8.60e08",
14         "wires": [
15             [
16                 "1108b3bd.2f6f4c"
17             ]
18         ]
19     },
20     {
21         "id": "1108b3bd.2f6f4c",
22         "type": "method",
23         "name": "method getA1PolicyStatus",
24         "xml": "<method rpc='getA1PolicyStatus' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 231,
28         "y": 334,
29         "z": "ba6f4cc8.60e08",
30         "wires": [
31             [
32                 "423ee9ab.f84d58"
33             ]
34         ]
35     },
36     {
37         "id": "86ab57c6.4239e8",
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 A1 Policy Status:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-status-input.near-rt-ric-url`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 695,
44         "y": 148,
45         "z": "ba6f4cc8.60e08",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "423ee9ab.f84d58",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 436,
59         "y": 288,
60         "z": "ba6f4cc8.60e08",
61         "wires": [
62             [
63                 "86ab57c6.4239e8",
64                 "377e4bc4.cf6254",
65                 "d0dee2e1.f5a44",
66                 "2064dc6c.f4a0b4",
67                 "7b79073a.3842e8"
68             ]
69         ]
70     },
71     {
72         "id": "9743b8a8.158568",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 103,
77         "y": 150,
78         "z": "ba6f4cc8.60e08",
79         "wires": [
80             [
81                 "7547a4fa.c7bbcc"
82             ]
83         ]
84     },
85     {
86         "id": "377e4bc4.cf6254",
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='Get A1 Policy executed successfully' />",
90         "comments": "",
91         "x": 736.0000610351562,
92         "y": 203,
93         "z": "ba6f4cc8.60e08",
94         "wires": []
95     },
96     {
97         "id": "d0dee2e1.f5a44",
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": 735,
104         "y": 256,
105         "z": "ba6f4cc8.60e08",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "7b79073a.3842e8",
112         "type": "block",
113         "name": "A1 Mediator RestAPI Invocation",
114         "xml": "<block atomic='true'>",
115         "atomic": "true",
116         "comments": "",
117         "outputs": 1,
118         "x": 765.0001220703125,
119         "y": 340,
120         "z": "ba6f4cc8.60e08",
121         "wires": [
122             [
123                 "f6e87f8b.c8e97",
124                 "484e89c8.8a2518",
125                 "106aff5e.8841f1",
126                 "7df3b9b5.9298c8"
127             ]
128         ]
129     },
130     {
131         "id": "484e89c8.8a2518",
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-status-input.near-rt-ric-url`\"/>",
135         "comments": "",
136         "x": 1138.00146484375,
137         "y": 237.88912963867188,
138         "z": "ba6f4cc8.60e08",
139         "wires": []
140     },
141     {
142         "id": "f6e87f8b.c8e97",
143         "type": "record",
144         "name": "record",
145         "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 Status.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>",
146         "comments": "",
147         "outputs": 1,
148         "x": 1015.0001220703125,
149         "y": 416,
150         "z": "ba6f4cc8.60e08",
151         "wires": [
152             []
153         ]
154     },
155     {
156         "id": "106aff5e.8841f1",
157         "type": "execute",
158         "name": "Get Policy Instance Status",
159         "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\"/>",
160         "comments": "",
161         "outputs": 1,
162         "x": 1079.0006103515625,
163         "y": 544.0103759765625,
164         "z": "ba6f4cc8.60e08",
165         "wires": [
166             [
167                 "f3f6f62a.f41478",
168                 "969a94ea.773e38"
169             ]
170         ]
171     },
172     {
173         "id": "f3f6f62a.f41478",
174         "type": "failure",
175         "name": "failure",
176         "xml": "<outcome value='failure'>\n",
177         "comments": "",
178         "outputs": 1,
179         "x": 1303,
180         "y": 624.0001220703125,
181         "z": "ba6f4cc8.60e08",
182         "wires": [
183             [
184                 "6fa34f65.cd31e"
185             ]
186         ]
187     },
188     {
189         "id": "969a94ea.773e38",
190         "type": "success",
191         "name": "success",
192         "xml": "<outcome value='success'>\n",
193         "comments": "",
194         "outputs": 1,
195         "x": 1307.000244140625,
196         "y": 470.0000305175781,
197         "z": "ba6f4cc8.60e08",
198         "wires": [
199             [
200                 "bb9a433.67534c"
201             ]
202         ]
203     },
204     {
205         "id": "841abfc3.69c46",
206         "type": "returnFailure",
207         "name": "return failure",
208         "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 Status. Aborting\" />",
209         "comments": "",
210         "x": 1610.0006103515625,
211         "y": 679.0000610351562,
212         "z": "ba6f4cc8.60e08",
213         "wires": []
214     },
215     {
216         "id": "bb9a433.67534c",
217         "type": "block",
218         "name": "block",
219         "xml": "<block>\n",
220         "atomic": "false",
221         "comments": "",
222         "outputs": 1,
223         "x": 1450.9998779296875,
224         "y": 470.00006103515625,
225         "z": "ba6f4cc8.60e08",
226         "wires": [
227             [
228                 "53bf49b8.e46be8",
229                 "23da3b63.1d7a64",
230                 "e316d95e.fbfff8"
231             ]
232         ]
233     },
234     {
235         "id": "53bf49b8.e46be8",
236         "type": "record",
237         "name": "record",
238         "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 Get Policy Status \"/>\n<parameter name=\"field2\" value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>",
239         "comments": "",
240         "outputs": 1,
241         "x": 1612,
242         "y": 469,
243         "z": "ba6f4cc8.60e08",
244         "wires": [
245             []
246         ]
247     },
248     {
249         "id": "45d11c3c.69ea24",
250         "type": "set",
251         "name": "set",
252         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
253         "comments": "",
254         "x": 1583.75390625,
255         "y": 572.00390625,
256         "z": "ba6f4cc8.60e08",
257         "wires": []
258     },
259     {
260         "id": "2064dc6c.f4a0b4",
261         "type": "block",
262         "name": "block",
263         "xml": "<block>\n",
264         "atomic": "false",
265         "comments": "",
266         "outputs": 1,
267         "x": 698.75390625,
268         "y": 560.00390625,
269         "z": "ba6f4cc8.60e08",
270         "wires": [
271             [
272                 "fd599731.db71c8"
273             ]
274         ]
275     },
276     {
277         "id": "fd599731.db71c8",
278         "type": "returnSuccess",
279         "name": "return success",
280         "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='Get Policy Status executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n",
281         "comments": "",
282         "x": 859.7539672851562,
283         "y": 560.0039672851562,
284         "z": "ba6f4cc8.60e08",
285         "wires": []
286     },
287     {
288         "id": "6fa34f65.cd31e",
289         "type": "block",
290         "name": "block",
291         "xml": "<block>\n",
292         "atomic": "false",
293         "comments": "",
294         "outputs": 1,
295         "x": 1442.00390625,
296         "y": 624.0039367675781,
297         "z": "ba6f4cc8.60e08",
298         "wires": [
299             [
300                 "45d11c3c.69ea24",
301                 "841abfc3.69c46"
302             ]
303         ]
304     },
305     {
306         "id": "23da3b63.1d7a64",
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": 1614,
313         "y": 520,
314         "z": "ba6f4cc8.60e08",
315         "wires": [
316             []
317         ]
318     },
319     {
320         "id": "e316d95e.fbfff8",
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": 1616,
327         "y": 426,
328         "z": "ba6f4cc8.60e08",
329         "wires": [
330             []
331         ]
332     },
333     {
334         "id": "b988a0f2.cebc8",
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": 1994,
341         "y": 318,
342         "z": "ba6f4cc8.60e08",
343         "wires": [
344             []
345         ]
346     },
347     {
348         "id": "6e6d1a6a.783024",
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": 1960,
355         "y": 388,
356         "z": "ba6f4cc8.60e08",
357         "wires": [
358             [
359                 "91e4428c.7143b"
360             ]
361         ]
362     },
363     {
364         "id": "91e4428c.7143b",
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": 2138,
371         "y": 388,
372         "z": "ba6f4cc8.60e08",
373         "wires": [
374             []
375         ]
376     },
377     {
378         "id": "5958734e.49501c",
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 A1 Policy Status: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
382         "comments": "",
383         "outputs": 1,
384         "x": 1960,
385         "y": 451,
386         "z": "ba6f4cc8.60e08",
387         "wires": [
388             []
389         ]
390     },
391     {
392         "id": "d87bfe21.b6db5",
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 A1 Policy Status: No proxy found on properties file \"/>\n",
396         "comments": "",
397         "outputs": 1,
398         "x": 1791,
399         "y": 285,
400         "z": "ba6f4cc8.60e08",
401         "wires": [
402             []
403         ]
404     },
405     {
406         "id": "c12bf1b.56d2e1",
407         "type": "block",
408         "name": "block",
409         "xml": "<block>\n",
410         "atomic": "false",
411         "comments": "",
412         "outputs": 1,
413         "x": 1783,
414         "y": 353,
415         "z": "ba6f4cc8.60e08",
416         "wires": [
417             [
418                 "b988a0f2.cebc8",
419                 "6e6d1a6a.783024",
420                 "5958734e.49501c",
421                 "9090a68a.628a58"
422             ]
423         ]
424     },
425     {
426         "id": "9090a68a.628a58",
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": 2070,
432         "y": 512,
433         "z": "ba6f4cc8.60e08",
434         "wires": []
435     },
436     {
437         "id": "768b81d4.9d20c",
438         "type": "outcome",
439         "name": "Otherwise",
440         "xml": "<outcome value='Other'>\n",
441         "comments": "",
442         "outputs": 1,
443         "x": 1619,
444         "y": 353,
445         "z": "ba6f4cc8.60e08",
446         "wires": [
447             [
448                 "c12bf1b.56d2e1"
449             ]
450         ]
451     },
452     {
453         "id": "b3216caa.c1505",
454         "type": "outcome",
455         "name": "No proxy URL",
456         "xml": "<outcome value=''>\n",
457         "comments": "",
458         "outputs": 1,
459         "x": 1623,
460         "y": 285,
461         "z": "ba6f4cc8.60e08",
462         "wires": [
463             [
464                 "d87bfe21.b6db5"
465             ]
466         ]
467     },
468     {
469         "id": "5379ad2e.52cba4",
470         "type": "switchNode",
471         "name": "switch",
472         "xml": "<switch test='`$tmp.proxy-url`'>\n",
473         "comments": "",
474         "outputs": 1,
475         "x": 1444,
476         "y": 319,
477         "z": "ba6f4cc8.60e08",
478         "wires": [
479             [
480                 "b3216caa.c1505",
481                 "768b81d4.9d20c"
482             ]
483         ]
484     },
485     {
486         "id": "2151b182.f0aebe",
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 A1 Policy Status: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
490         "comments": "",
491         "outputs": 1,
492         "x": 1445,
493         "y": 236,
494         "z": "ba6f4cc8.60e08",
495         "wires": [
496             []
497         ]
498     },
499     {
500         "id": "862a1de8.7e469",
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": 1562,
506         "y": 161,
507         "z": "ba6f4cc8.60e08",
508         "wires": []
509     },
510     {
511         "id": "7df3b9b5.9298c8",
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": 1117,
519         "y": 326,
520         "z": "ba6f4cc8.60e08",
521         "wires": [
522             [
523                 "862a1de8.7e469",
524                 "2151b182.f0aebe",
525                 "5379ad2e.52cba4"
526             ]
527         ]
528     }
529 ]