Bug Fix- Updated the http response code/ response message
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyStatus.json
1 [\r
2     {\r
3         "id": "1f03ae12.22b482",\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": 162,\r
12         "y": 133,\r
13         "z": "82264c28.fa865",\r
14         "wires": [\r
15             [\r
16                 "8bd7382e.5951c8"\r
17             ]\r
18         ]\r
19     },\r
20     {\r
21         "id": "8bd7382e.5951c8",\r
22         "type": "method",\r
23         "name": "method getA1PolicyStatus",\r
24         "xml": "<method rpc='getA1PolicyStatus' mode='sync'>\n",\r
25         "comments": "",\r
26         "outputs": 1,\r
27         "x": 221,\r
28         "y": 254,\r
29         "z": "82264c28.fa865",\r
30         "wires": [\r
31             [\r
32                 "79d72e28.bcc54"\r
33             ]\r
34         ]\r
35     },\r
36     {\r
37         "id": "e61b6ee5.b949b",\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 A1 Policy Status:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-status-input.near-rt-ric-url`\"/>",\r
41         "comments": "",\r
42         "outputs": 1,\r
43         "x": 685,\r
44         "y": 68,\r
45         "z": "82264c28.fa865",\r
46         "wires": [\r
47             []\r
48         ]\r
49     },\r
50     {\r
51         "id": "79d72e28.bcc54",\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": 426,\r
59         "y": 208,\r
60         "z": "82264c28.fa865",\r
61         "wires": [\r
62             [\r
63                 "e61b6ee5.b949b",\r
64                 "577dc417.5a651c",\r
65                 "7cb48c00.8ced04",\r
66                 "eee487dc.9ea2f8",\r
67                 "57df804c.8c393"\r
68             ]\r
69         ]\r
70     },\r
71     {\r
72         "id": "bfa9b29.612d95",\r
73         "type": "dgstart",\r
74         "name": "DGSTART",\r
75         "outputs": 1,\r
76         "x": 93,\r
77         "y": 70,\r
78         "z": "82264c28.fa865",\r
79         "wires": [\r
80             [\r
81                 "1f03ae12.22b482"\r
82             ]\r
83         ]\r
84     },\r
85     {\r
86         "id": "57df804c.8c393",\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='Get A1 Policy executed successfully' />",\r
90         "comments": "",\r
91         "x": 726.0000610351562,\r
92         "y": 123,\r
93         "z": "82264c28.fa865",\r
94         "wires": []\r
95     },\r
96     {\r
97         "id": "577dc417.5a651c",\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": 725,\r
104         "y": 176,\r
105         "z": "82264c28.fa865",\r
106         "wires": [\r
107             []\r
108         ]\r
109     },\r
110     {\r
111         "id": "eee487dc.9ea2f8",\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": 755.0001220703125,\r
119         "y": 260,\r
120         "z": "82264c28.fa865",\r
121         "wires": [\r
122             [\r
123                 "95f961b6.beecd",\r
124                 "a037b233.bd226",\r
125                 "64616aa3.fae654",\r
126                 "321db38.935fb4c"\r
127             ]\r
128         ]\r
129     },\r
130     {\r
131         "id": "a037b233.bd226",\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-status-input.near-rt-ric-url`\"/>",\r
135         "comments": "",\r
136         "x": 1128.00146484375,\r
137         "y": 157.88912963867188,\r
138         "z": "82264c28.fa865",\r
139         "wires": []\r
140     },\r
141     {\r
142         "id": "95f961b6.beecd",\r
143         "type": "record",\r
144         "name": "record",\r
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`\"/>",\r
146         "comments": "",\r
147         "outputs": 1,\r
148         "x": 1005.0001220703125,\r
149         "y": 336,\r
150         "z": "82264c28.fa865",\r
151         "wires": [\r
152             []\r
153         ]\r
154     },\r
155     {\r
156         "id": "64616aa3.fae654",\r
157         "type": "execute",\r
158         "name": "Get Policy Instance Status",\r
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\"/>",\r
160         "comments": "",\r
161         "outputs": 1,\r
162         "x": 1069.0006103515625,\r
163         "y": 464.0103759765625,\r
164         "z": "82264c28.fa865",\r
165         "wires": [\r
166             [\r
167                 "c0ddbe62.cabd8",\r
168                 "c22e34cd.633688"\r
169             ]\r
170         ]\r
171     },\r
172     {\r
173         "id": "c0ddbe62.cabd8",\r
174         "type": "failure",\r
175         "name": "failure",\r
176         "xml": "<outcome value='failure'>\n",\r
177         "comments": "",\r
178         "outputs": 1,\r
179         "x": 1293,\r
180         "y": 544.0001220703125,\r
181         "z": "82264c28.fa865",\r
182         "wires": [\r
183             [\r
184                 "4c3581c9.8dd8c"\r
185             ]\r
186         ]\r
187     },\r
188     {\r
189         "id": "c22e34cd.633688",\r
190         "type": "success",\r
191         "name": "success",\r
192         "xml": "<outcome value='success'>\n",\r
193         "comments": "",\r
194         "outputs": 1,\r
195         "x": 1297.000244140625,\r
196         "y": 390.0000305175781,\r
197         "z": "82264c28.fa865",\r
198         "wires": [\r
199             [\r
200                 "731c889.917be78"\r
201             ]\r
202         ]\r
203     },\r
204     {\r
205         "id": "81538b07.beae38",\r
206         "type": "returnFailure",\r
207         "name": "return failure",\r
208         "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
209         "comments": "",\r
210         "x": 1600.0006103515625,\r
211         "y": 599.0000610351562,\r
212         "z": "82264c28.fa865",\r
213         "wires": []\r
214     },\r
215     {\r
216         "id": "731c889.917be78",\r
217         "type": "block",\r
218         "name": "block",\r
219         "xml": "<block>\n",\r
220         "atomic": "false",\r
221         "comments": "",\r
222         "outputs": 1,\r
223         "x": 1440.9998779296875,\r
224         "y": 390.00006103515625,\r
225         "z": "82264c28.fa865",\r
226         "wires": [\r
227             [\r
228                 "ad128057.33ef5",\r
229                 "622953f6.7f580c",\r
230                 "3768e233.b0e54e"\r
231             ]\r
232         ]\r
233     },\r
234     {\r
235         "id": "ad128057.33ef5",\r
236         "type": "record",\r
237         "name": "record",\r
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`\"/>\n<parameter name='field3' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='field4' value='`$a1MediatorRsp.response-message`'/>",\r
239         "comments": "",\r
240         "outputs": 1,\r
241         "x": 1602,\r
242         "y": 389,\r
243         "z": "82264c28.fa865",\r
244         "wires": [\r
245             []\r
246         ]\r
247     },\r
248     {\r
249         "id": "d1a2e2f7.325b4",\r
250         "type": "set",\r
251         "name": "set",\r
252         "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>\n",\r
253         "comments": "",\r
254         "x": 1573.75390625,\r
255         "y": 492.00390625,\r
256         "z": "82264c28.fa865",\r
257         "wires": []\r
258     },\r
259     {\r
260         "id": "7cb48c00.8ced04",\r
261         "type": "block",\r
262         "name": "block",\r
263         "xml": "<block>\n",\r
264         "atomic": "false",\r
265         "comments": "",\r
266         "outputs": 1,\r
267         "x": 688.75390625,\r
268         "y": 480.00390625,\r
269         "z": "82264c28.fa865",\r
270         "wires": [\r
271             [\r
272                 "d4ec5ef4.1fe0c"\r
273             ]\r
274         ]\r
275     },\r
276     {\r
277         "id": "d4ec5ef4.1fe0c",\r
278         "type": "returnSuccess",\r
279         "name": "return success",\r
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",\r
281         "comments": "",\r
282         "x": 849.7539672851562,\r
283         "y": 480.00396728515625,\r
284         "z": "82264c28.fa865",\r
285         "wires": []\r
286     },\r
287     {\r
288         "id": "4c3581c9.8dd8c",\r
289         "type": "block",\r
290         "name": "block",\r
291         "xml": "<block>\n",\r
292         "atomic": "false",\r
293         "comments": "",\r
294         "outputs": 1,\r
295         "x": 1432.00390625,\r
296         "y": 544.0039367675781,\r
297         "z": "82264c28.fa865",\r
298         "wires": [\r
299             [\r
300                 "d1a2e2f7.325b4",\r
301                 "81538b07.beae38"\r
302             ]\r
303         ]\r
304     },\r
305     {\r
306         "id": "622953f6.7f580c",\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": 1604,\r
313         "y": 440,\r
314         "z": "82264c28.fa865",\r
315         "wires": [\r
316             []\r
317         ]\r
318     },\r
319     {\r
320         "id": "3768e233.b0e54e",\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": 1606,\r
327         "y": 346,\r
328         "z": "82264c28.fa865",\r
329         "wires": [\r
330             []\r
331         ]\r
332     },\r
333     {\r
334         "id": "54b03a04.8e9294",\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": 1984,\r
341         "y": 238,\r
342         "z": "82264c28.fa865",\r
343         "wires": [\r
344             []\r
345         ]\r
346     },\r
347     {\r
348         "id": "15d0daec.fa9565",\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": 1950,\r
355         "y": 308,\r
356         "z": "82264c28.fa865",\r
357         "wires": [\r
358             [\r
359                 "b8eadff3.5b547"\r
360             ]\r
361         ]\r
362     },\r
363     {\r
364         "id": "b8eadff3.5b547",\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": 2128,\r
371         "y": 308,\r
372         "z": "82264c28.fa865",\r
373         "wires": [\r
374             []\r
375         ]\r
376     },\r
377     {\r
378         "id": "403fcfda.caf91",\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 A1 Policy Status: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",\r
382         "comments": "",\r
383         "outputs": 1,\r
384         "x": 1950,\r
385         "y": 371,\r
386         "z": "82264c28.fa865",\r
387         "wires": [\r
388             []\r
389         ]\r
390     },\r
391     {\r
392         "id": "b78a829f.08531",\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 A1 Policy Status: No proxy found on properties file \"/>\n",\r
396         "comments": "",\r
397         "outputs": 1,\r
398         "x": 1781,\r
399         "y": 205,\r
400         "z": "82264c28.fa865",\r
401         "wires": [\r
402             []\r
403         ]\r
404     },\r
405     {\r
406         "id": "a39978a8.b502b8",\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": 1773,\r
414         "y": 273,\r
415         "z": "82264c28.fa865",\r
416         "wires": [\r
417             [\r
418                 "54b03a04.8e9294",\r
419                 "15d0daec.fa9565",\r
420                 "403fcfda.caf91",\r
421                 "10e3a2b.3a8635d"\r
422             ]\r
423         ]\r
424     },\r
425     {\r
426         "id": "10e3a2b.3a8635d",\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": 2060,\r
432         "y": 432,\r
433         "z": "82264c28.fa865",\r
434         "wires": []\r
435     },\r
436     {\r
437         "id": "c2e7e2c1.1efa3",\r
438         "type": "outcome",\r
439         "name": "Otherwise",\r
440         "xml": "<outcome value='Other'>\n",\r
441         "comments": "",\r
442         "outputs": 1,\r
443         "x": 1609,\r
444         "y": 273,\r
445         "z": "82264c28.fa865",\r
446         "wires": [\r
447             [\r
448                 "a39978a8.b502b8"\r
449             ]\r
450         ]\r
451     },\r
452     {\r
453         "id": "351e35ee.b9fb4a",\r
454         "type": "outcome",\r
455         "name": "No proxy URL",\r
456         "xml": "<outcome value=''>\n",\r
457         "comments": "",\r
458         "outputs": 1,\r
459         "x": 1613,\r
460         "y": 205,\r
461         "z": "82264c28.fa865",\r
462         "wires": [\r
463             [\r
464                 "b78a829f.08531"\r
465             ]\r
466         ]\r
467     },\r
468     {\r
469         "id": "b187a08d.4a91",\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": 1434,\r
476         "y": 239,\r
477         "z": "82264c28.fa865",\r
478         "wires": [\r
479             [\r
480                 "351e35ee.b9fb4a",\r
481                 "c2e7e2c1.1efa3"\r
482             ]\r
483         ]\r
484     },\r
485     {\r
486         "id": "762e23e5.f9bb9c",\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 A1 Policy Status: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",\r
490         "comments": "",\r
491         "outputs": 1,\r
492         "x": 1435,\r
493         "y": 156,\r
494         "z": "82264c28.fa865",\r
495         "wires": [\r
496             []\r
497         ]\r
498     },\r
499     {\r
500         "id": "eec4f452.eb64e8",\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": 1552,\r
506         "y": 81,\r
507         "z": "82264c28.fa865",\r
508         "wires": []\r
509     },\r
510     {\r
511         "id": "321db38.935fb4c",\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": 1107,\r
519         "y": 246,\r
520         "z": "82264c28.fa865",\r
521         "wires": [\r
522             [\r
523                 "eec4f452.eb64e8",\r
524                 "762e23e5.f9bb9c",\r
525                 "b187a08d.4a91"\r
526             ]\r
527         ]\r
528     }\r
529 ]