293d09c61b473e6130133746344a443d7092fbf0
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_putA1Policy.json
1 [
2     {
3         "id": "f0b343f7.2be9e",
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": 171,
12         "y": 158.11090087890625,
13         "z": "4a7b9942.c07f28",
14         "wires": [
15             [
16                 "2678a73a.39c8f8"
17             ]
18         ]
19     },
20     {
21         "id": "2678a73a.39c8f8",
22         "type": "method",
23         "name": "method putA1Policy",
24         "xml": "<method rpc='putA1Policy' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 158,
28         "y": 227.11090087890625,
29         "z": "4a7b9942.c07f28",
30         "wires": [
31             [
32                 "d272b5cc.a1b7f8"
33             ]
34         ]
35     },
36     {
37         "id": "12301d8a.e4f432",
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=\"Put A1 Policy :\"/>\n<parameter name=\"field2\" value=\"`$put-a1-policy-input.near-rt-ric-url`\"/>\n<parameter name=\"field3\" value=\"`$put-a1-policy-input.body`\"/>\n",
41         "comments": "",
42         "outputs": 1,
43         "x": 472,
44         "y": 195.11090087890625,
45         "z": "4a7b9942.c07f28",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "d272b5cc.a1b7f8",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 222,
59         "y": 294.11090087890625,
60         "z": "4a7b9942.c07f28",
61         "wires": [
62             [
63                 "12301d8a.e4f432",
64                 "bc37eadd.393f78",
65                 "f048e341.89262",
66                 "71eb89dc.50c988"
67             ]
68         ]
69     },
70     {
71         "id": "3f8d81.fa4c128",
72         "type": "dgstart",
73         "name": "DGSTART",
74         "outputs": 1,
75         "x": 99,
76         "y": 96.11090087890625,
77         "z": "4a7b9942.c07f28",
78         "wires": [
79             [
80                 "f0b343f7.2be9e"
81             ]
82         ]
83     },
84     {
85         "id": "bc37eadd.393f78",
86         "type": "execute",
87         "name": "execute Properties",
88         "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",
89         "comments": "",
90         "outputs": 1,
91         "x": 506,
92         "y": 293.11090087890625,
93         "z": "4a7b9942.c07f28",
94         "wires": [
95             []
96         ]
97     },
98     {
99         "id": "7ab1678d.f80c88",
100         "type": "failure",
101         "name": "failure",
102         "xml": "<outcome value='failure'>\n",
103         "comments": "",
104         "outputs": 1,
105         "x": 988.0001220703125,
106         "y": 371.1109619140625,
107         "z": "4a7b9942.c07f28",
108         "wires": [
109             [
110                 "3fb495cc.83461a"
111             ]
112         ]
113     },
114     {
115         "id": "95b564a6.d15fe8",
116         "type": "success",
117         "name": "success",
118         "xml": "<outcome value='success'>\n",
119         "comments": "",
120         "outputs": 1,
121         "x": 995.0003051757812,
122         "y": 461.11094665527344,
123         "z": "4a7b9942.c07f28",
124         "wires": [
125             [
126                 "433e6f59.30f93"
127             ]
128         ]
129     },
130     {
131         "id": "433e6f59.30f93",
132         "type": "block",
133         "name": "block",
134         "xml": "<block>\n",
135         "atomic": "false",
136         "comments": "",
137         "outputs": 1,
138         "x": 1136.9999389648438,
139         "y": 457.1109619140625,
140         "z": "4a7b9942.c07f28",
141         "wires": [
142             [
143                 "7ae91a72.664794",
144                 "913c45bf.182ef8"
145             ]
146         ]
147     },
148     {
149         "id": "a42156e5.b04b38",
150         "type": "set",
151         "name": "set tmp variables for input RPC parms",
152         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$put-a1-policy-input.near-rt-ric-url`\"/>\n<parameter name=\"tmp.body\" value=\"`$put-a1-policy-input.body`\"/>",
153         "comments": "",
154         "x": 890.0010375976562,
155         "y": 20,
156         "z": "4a7b9942.c07f28",
157         "wires": []
158     },
159     {
160         "id": "382bcbbf.30d774",
161         "type": "execute",
162         "name": "Put A1 Policy",
163         "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=\"PUT\"/>\n<parameter name=\"responsePrefix\" value=\"a1MediatorRsp\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='accept' value='application/json' />\n<parameter name=\"requestBody\" value=\"`$tmp.body`\"/>\n<parameter name=\"convertResponse\" value=\"false\"/>\n",
164         "comments": "",
165         "outputs": 1,
166         "x": 811.00048828125,
167         "y": 419.12127685546875,
168         "z": "4a7b9942.c07f28",
169         "wires": [
170             [
171                 "7ab1678d.f80c88",
172                 "95b564a6.d15fe8"
173             ]
174         ]
175     },
176     {
177         "id": "71eb89dc.50c988",
178         "type": "block",
179         "name": "A1 Mediator RestAPI Invocation",
180         "xml": "<block atomic='true'>",
181         "atomic": "true",
182         "comments": "",
183         "outputs": 1,
184         "x": 542.0000305175781,
185         "y": 358.1109619140625,
186         "z": "4a7b9942.c07f28",
187         "wires": [
188             [
189                 "33f22af5.30a6a6",
190                 "a42156e5.b04b38",
191                 "382bcbbf.30d774",
192                 "f58a390e.bb1448"
193             ]
194         ]
195     },
196     {
197         "id": "33f22af5.30a6a6",
198         "type": "record",
199         "name": "record",
200         "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 Put A1 Policy.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>\n<parameter name=\"field3\" value=\"`$tmp.body`\"/>",
201         "comments": "",
202         "outputs": 1,
203         "x": 792.0000610351562,
204         "y": 373.11090087890625,
205         "z": "4a7b9942.c07f28",
206         "wires": [
207             []
208         ]
209     },
210     {
211         "id": "7ae91a72.664794",
212         "type": "record",
213         "name": "record",
214         "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 Instance Created.\"/>\n<parameter name='field2' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='field3' value='`$a1MediatorRsp.response-message`'/>",
215         "comments": "",
216         "outputs": 1,
217         "x": 1293,
218         "y": 456.1109619140625,
219         "z": "4a7b9942.c07f28",
220         "wires": [
221             []
222         ]
223     },
224     {
225         "id": "2a1d66c6.e2c83a",
226         "type": "returnFailure",
227         "name": "return failure",
228         "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`'/>",
229         "comments": "",
230         "x": 1286,
231         "y": 409.11090087890625,
232         "z": "4a7b9942.c07f28",
233         "wires": []
234     },
235     {
236         "id": "f048e341.89262",
237         "type": "set",
238         "name": "set default status value",
239         "xml": "<set>\n<parameter name='response-code' value='200' />\n<parameter name='response-message' value='Put A1 Policy executed successfully' />",
240         "comments": "",
241         "x": 517,
242         "y": 248.11090087890625,
243         "z": "4a7b9942.c07f28",
244         "wires": []
245     },
246     {
247         "id": "3fb495cc.83461a",
248         "type": "block",
249         "name": "block",
250         "xml": "<block>\n",
251         "atomic": "false",
252         "comments": "",
253         "outputs": 1,
254         "x": 1124,
255         "y": 369.11090087890625,
256         "z": "4a7b9942.c07f28",
257         "wires": [
258             [
259                 "2b1ad7ca.a27288",
260                 "2a1d66c6.e2c83a"
261             ]
262         ]
263     },
264     {
265         "id": "2b1ad7ca.a27288",
266         "type": "set",
267         "name": "set",
268         "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>\n",
269         "comments": "",
270         "x": 1268,
271         "y": 315.11090087890625,
272         "z": "4a7b9942.c07f28",
273         "wires": []
274     },
275     {
276         "id": "4e18beb6.1fd51",
277         "type": "execute",
278         "name": "split near-rt-ric URL",
279         "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\"/>",
280         "comments": "",
281         "outputs": 1,
282         "x": 1840,
283         "y": 136.11090087890625,
284         "z": "4a7b9942.c07f28",
285         "wires": [
286             []
287         ]
288     },
289     {
290         "id": "942f87e2.c78888",
291         "type": "for",
292         "name": "for",
293         "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",
294         "comments": "",
295         "outputs": 1,
296         "x": 1806,
297         "y": 206.11090087890625,
298         "z": "4a7b9942.c07f28",
299         "wires": [
300             [
301                 "d1411417.1b3fd8"
302             ]
303         ]
304     },
305     {
306         "id": "d1411417.1b3fd8",
307         "type": "execute",
308         "name": "set concat url",
309         "xml": "<set>\n<parameter name='tmp.proxy-url' value=\"`$tmp.proxy-url +'/' + $tmp.near-rt-ric-url-splitList[$idx] `\" />\n\n\n",
310         "comments": "",
311         "outputs": 1,
312         "x": 1984,
313         "y": 206.11090087890625,
314         "z": "4a7b9942.c07f28",
315         "wires": [
316             []
317         ]
318     },
319     {
320         "id": "71b2d26a.47135c",
321         "type": "record",
322         "name": "record",
323         "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=\"Put A1 Policy: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
324         "comments": "",
325         "outputs": 1,
326         "x": 1806,
327         "y": 263.11090087890625,
328         "z": "4a7b9942.c07f28",
329         "wires": [
330             []
331         ]
332     },
333     {
334         "id": "65d0298a.e1aef8",
335         "type": "record",
336         "name": "record",
337         "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=\"Put A1 Policy: No proxy found on properties file \"/>\n",
338         "comments": "",
339         "outputs": 1,
340         "x": 1610,
341         "y": 172.11090087890625,
342         "z": "4a7b9942.c07f28",
343         "wires": [
344             []
345         ]
346     },
347     {
348         "id": "500c1a89.8dca64",
349         "type": "block",
350         "name": "block",
351         "xml": "<block>\n",
352         "atomic": "false",
353         "comments": "",
354         "outputs": 1,
355         "x": 1602,
356         "y": 240.11090087890625,
357         "z": "4a7b9942.c07f28",
358         "wires": [
359             [
360                 "4e18beb6.1fd51",
361                 "942f87e2.c78888",
362                 "71b2d26a.47135c",
363                 "1970005a.3ee34"
364             ]
365         ]
366     },
367     {
368         "id": "1970005a.3ee34",
369         "type": "set",
370         "name": "set variables for A1 Mediator with proxy url",
371         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$tmp.proxy-url`\"/>",
372         "comments": "",
373         "x": 1916,
374         "y": 319.11090087890625,
375         "z": "4a7b9942.c07f28",
376         "wires": []
377     },
378     {
379         "id": "31a126f2.88900a",
380         "type": "outcome",
381         "name": "No proxy URL",
382         "xml": "<outcome value=''>\n",
383         "comments": "",
384         "outputs": 1,
385         "x": 1442,
386         "y": 172.11090087890625,
387         "z": "4a7b9942.c07f28",
388         "wires": [
389             [
390                 "65d0298a.e1aef8"
391             ]
392         ]
393     },
394     {
395         "id": "3f7e5430.1f4f6c",
396         "type": "outcome",
397         "name": "Otherwise",
398         "xml": "<outcome value='Other'>\n",
399         "comments": "",
400         "outputs": 1,
401         "x": 1438,
402         "y": 240.11090087890625,
403         "z": "4a7b9942.c07f28",
404         "wires": [
405             [
406                 "500c1a89.8dca64"
407             ]
408         ]
409     },
410     {
411         "id": "7ec42ee0.b7f28",
412         "type": "set",
413         "name": "set tmp url variables with proxy information",
414         "xml": "<set>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",
415         "comments": "",
416         "x": 1381,
417         "y": 48.11090087890625,
418         "z": "4a7b9942.c07f28",
419         "wires": []
420     },
421     {
422         "id": "c930a111.4cc59",
423         "type": "record",
424         "name": "record",
425         "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=\"Put A1 Policy: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
426         "comments": "",
427         "outputs": 1,
428         "x": 1264,
429         "y": 123.11090087890625,
430         "z": "4a7b9942.c07f28",
431         "wires": [
432             []
433         ]
434     },
435     {
436         "id": "bbe2ee18.70915",
437         "type": "switchNode",
438         "name": "switch",
439         "xml": "<switch test='`$tmp.proxy-url`'>\n",
440         "comments": "",
441         "outputs": 1,
442         "x": 1263,
443         "y": 206.11090087890625,
444         "z": "4a7b9942.c07f28",
445         "wires": [
446             [
447                 "31a126f2.88900a",
448                 "3f7e5430.1f4f6c"
449             ]
450         ]
451     },
452     {
453         "id": "f58a390e.bb1448",
454         "type": "block",
455         "name": "block Substitute proxy address if available",
456         "xml": "<block>\n",
457         "atomic": "false",
458         "comments": "",
459         "outputs": 1,
460         "x": 926,
461         "y": 205.11090087890625,
462         "z": "4a7b9942.c07f28",
463         "wires": [
464             [
465                 "7ec42ee0.b7f28",
466                 "c930a111.4cc59",
467                 "bbe2ee18.70915"
468             ]
469         ]
470     },
471     {
472         "id": "913c45bf.182ef8",
473         "type": "set",
474         "name": "set",
475         "xml": "<set>\n<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>\n<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>",
476         "comments": "",
477         "x": 1308,
478         "y": 514,
479         "z": "4a7b9942.c07f28",
480         "wires": []
481     }
482 ]