HTTPS Proxy support for A1 adapter southbound
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_deleteA1Policy.json
1 [
2     {
3         "id": "40b94c2a.1d5be4",
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": 194,
12         "y": 237,
13         "z": "5421e0da.e98ea",
14         "wires": [
15             [
16                 "c8e7631.2112ba"
17             ]
18         ]
19     },
20     {
21         "id": "c8e7631.2112ba",
22         "type": "method",
23         "name": "method deleteA1Policy",
24         "xml": "<method rpc='deleteA1Policy' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 254,
28         "y": 357,
29         "z": "5421e0da.e98ea",
30         "wires": [
31             [
32                 "4faf22ab.4c738c"
33             ]
34         ]
35     },
36     {
37         "id": "166f48b5.9a3a17",
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=\"Delete A1 Policy:\"/>\n<parameter name=\"field2\" value=\"`$delete-a1-policy-input.near-rt-ric-url`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 718,
44         "y": 171,
45         "z": "5421e0da.e98ea",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "4faf22ab.4c738c",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 459,
59         "y": 311,
60         "z": "5421e0da.e98ea",
61         "wires": [
62             [
63                 "166f48b5.9a3a17",
64                 "b2679b68.1462c8",
65                 "4148a57a.c7efcc",
66                 "f504796c.262f88",
67                 "aba0ccb1.73758"
68             ]
69         ]
70     },
71     {
72         "id": "4e2bdc30.8909a4",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 126,
77         "y": 173,
78         "z": "5421e0da.e98ea",
79         "wires": [
80             [
81                 "40b94c2a.1d5be4"
82             ]
83         ]
84     },
85     {
86         "id": "b2679b68.1462c8",
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='deletePolicy executed successfully' />",
90         "comments": "",
91         "x": 759.0000610351562,
92         "y": 226,
93         "z": "5421e0da.e98ea",
94         "wires": []
95     },
96     {
97         "id": "4148a57a.c7efcc",
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": 758,
104         "y": 279,
105         "z": "5421e0da.e98ea",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "aba0ccb1.73758",
112         "type": "block",
113         "name": "A1 Mediator RestAPI Invocation",
114         "xml": "<block atomic='true'>",
115         "atomic": "true",
116         "comments": "",
117         "outputs": 1,
118         "x": 788.0001220703125,
119         "y": 363,
120         "z": "5421e0da.e98ea",
121         "wires": [
122             [
123                 "c6ab5263.f678d",
124                 "5cd5776d.1e0278",
125                 "628e7bf2.7d9964",
126                 "793b4300.b8738c"
127             ]
128         ]
129     },
130     {
131         "id": "5cd5776d.1e0278",
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=\"`$delete-a1-policy-input.near-rt-ric-url`\"/>",
135         "comments": "",
136         "x": 1161.00146484375,
137         "y": 136.88912963867188,
138         "z": "5421e0da.e98ea",
139         "wires": []
140     },
141     {
142         "id": "c6ab5263.f678d",
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 Delete Policy Instance.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>",
146         "comments": "",
147         "outputs": 1,
148         "x": 1056.0001220703125,
149         "y": 461,
150         "z": "5421e0da.e98ea",
151         "wires": [
152             []
153         ]
154     },
155     {
156         "id": "628e7bf2.7d9964",
157         "type": "execute",
158         "name": "Delete Policy Instance",
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=\"DELETE\"/>\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=\"false\"/>",
160         "comments": "",
161         "outputs": 1,
162         "x": 1096.0006103515625,
163         "y": 536.0104064941406,
164         "z": "5421e0da.e98ea",
165         "wires": [
166             [
167                 "2eaa9315.f1267c",
168                 "1b5b58af.e3d147"
169             ]
170         ]
171     },
172     {
173         "id": "2eaa9315.f1267c",
174         "type": "failure",
175         "name": "failure",
176         "xml": "<outcome value='failure'>\n",
177         "comments": "",
178         "outputs": 1,
179         "x": 1325,
180         "y": 625.0001220703125,
181         "z": "5421e0da.e98ea",
182         "wires": [
183             [
184                 "8fd194ab.4d6f48"
185             ]
186         ]
187     },
188     {
189         "id": "1b5b58af.e3d147",
190         "type": "success",
191         "name": "success",
192         "xml": "<outcome value='success'>\n",
193         "comments": "",
194         "outputs": 1,
195         "x": 1315.000244140625,
196         "y": 470.0000305175781,
197         "z": "5421e0da.e98ea",
198         "wires": [
199             [
200                 "4ca53b3d.e09944"
201             ]
202         ]
203     },
204     {
205         "id": "c96895f9.6920d8",
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 Deleting A1 Policy Instance. Aborting\" />",
209         "comments": "",
210         "x": 1648.0006103515625,
211         "y": 680.0000610351562,
212         "z": "5421e0da.e98ea",
213         "wires": []
214     },
215     {
216         "id": "4ca53b3d.e09944",
217         "type": "block",
218         "name": "block",
219         "xml": "<block>\n",
220         "atomic": "false",
221         "comments": "",
222         "outputs": 1,
223         "x": 1488.9998779296875,
224         "y": 470.00006103515625,
225         "z": "5421e0da.e98ea",
226         "wires": [
227             [
228                 "e8211cdb.f1c0b",
229                 "4e8c89de.7e4e78"
230             ]
231         ]
232     },
233     {
234         "id": "e8211cdb.f1c0b",
235         "type": "record",
236         "name": "record",
237         "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 Delete Policy Information \"/>\n<parameter name=\"field2\" value=\"`$a1MediatorRsp.httpResponse`\"/>",
238         "comments": "",
239         "outputs": 1,
240         "x": 1646,
241         "y": 416,
242         "z": "5421e0da.e98ea",
243         "wires": [
244             []
245         ]
246     },
247     {
248         "id": "ab28de1f.ae2e2",
249         "type": "set",
250         "name": "set",
251         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
252         "comments": "",
253         "x": 1621.75390625,
254         "y": 573.00390625,
255         "z": "5421e0da.e98ea",
256         "wires": []
257     },
258     {
259         "id": "f504796c.262f88",
260         "type": "block",
261         "name": "block",
262         "xml": "<block>\n",
263         "atomic": "false",
264         "comments": "",
265         "outputs": 1,
266         "x": 697.75390625,
267         "y": 545.00390625,
268         "z": "5421e0da.e98ea",
269         "wires": [
270             [
271                 "2fbb20e3.ff965"
272             ]
273         ]
274     },
275     {
276         "id": "2fbb20e3.ff965",
277         "type": "returnSuccess",
278         "name": "return success",
279         "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='deletePolicyInstance executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n",
280         "comments": "",
281         "x": 858.7539672851562,
282         "y": 545.0039672851562,
283         "z": "5421e0da.e98ea",
284         "wires": []
285     },
286     {
287         "id": "8fd194ab.4d6f48",
288         "type": "block",
289         "name": "block",
290         "xml": "<block>\n",
291         "atomic": "false",
292         "comments": "",
293         "outputs": 1,
294         "x": 1480.00390625,
295         "y": 624.0039367675781,
296         "z": "5421e0da.e98ea",
297         "wires": [
298             [
299                 "ab28de1f.ae2e2",
300                 "c96895f9.6920d8"
301             ]
302         ]
303     },
304     {
305         "id": "4e8c89de.7e4e78",
306         "type": "execute",
307         "name": "set",
308         "xml": "<set>\n<parameter name='body' value='`$a1MediatorRsp.httpResponse`'/>",
309         "comments": "",
310         "outputs": 1,
311         "x": 1652,
312         "y": 520,
313         "z": "5421e0da.e98ea",
314         "wires": [
315             []
316         ]
317     },
318     {
319         "id": "19e9382.863dfc8",
320         "type": "execute",
321         "name": "split near-rt-ric URL",
322         "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\"/>",
323         "comments": "",
324         "outputs": 1,
325         "x": 2055,
326         "y": 252,
327         "z": "5421e0da.e98ea",
328         "wires": [
329             []
330         ]
331     },
332     {
333         "id": "df43d920.c48608",
334         "type": "for",
335         "name": "for",
336         "xml": "<for index='idx' start='3' end=\"`$tmp.near-rt-ric-url-splitList_length`\" >",
337         "comments": "",
338         "outputs": 1,
339         "x": 2021,
340         "y": 322,
341         "z": "5421e0da.e98ea",
342         "wires": [
343             [
344                 "e32aea7c.0c7418"
345             ]
346         ]
347     },
348     {
349         "id": "e32aea7c.0c7418",
350         "type": "execute",
351         "name": "set concat url",
352         "xml": "<set>\n<parameter name='tmp.proxy-url' value=\"`$tmp.proxy-url +'/' + $tmp.near-rt-ric-url-splitList[$idx] `\" />\n\n\n",
353         "comments": "",
354         "outputs": 1,
355         "x": 2199,
356         "y": 322,
357         "z": "5421e0da.e98ea",
358         "wires": [
359             []
360         ]
361     },
362     {
363         "id": "695b0eaa.faece",
364         "type": "record",
365         "name": "record",
366         "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=\"Delete A1 Policy: Url with proxy: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
367         "comments": "",
368         "outputs": 1,
369         "x": 2021,
370         "y": 376,
371         "z": "5421e0da.e98ea",
372         "wires": [
373             []
374         ]
375     },
376     {
377         "id": "c793909b.fccf4",
378         "type": "record",
379         "name": "record",
380         "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=\"Delete A1 Policy: No proxy found on properties file \"/>\n",
381         "comments": "",
382         "outputs": 1,
383         "x": 1825,
384         "y": 288,
385         "z": "5421e0da.e98ea",
386         "wires": [
387             []
388         ]
389     },
390     {
391         "id": "dbb430eb.1e3ee",
392         "type": "block",
393         "name": "block",
394         "xml": "<block>\n",
395         "atomic": "false",
396         "comments": "",
397         "outputs": 1,
398         "x": 1817,
399         "y": 356,
400         "z": "5421e0da.e98ea",
401         "wires": [
402             [
403                 "19e9382.863dfc8",
404                 "df43d920.c48608",
405                 "695b0eaa.faece",
406                 "cb7535ae.d9c2b8"
407             ]
408         ]
409     },
410     {
411         "id": "cb7535ae.d9c2b8",
412         "type": "set",
413         "name": "set variables for A1 Mediator with proxy url",
414         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$tmp.proxy-url`\"/>",
415         "comments": "",
416         "x": 2131,
417         "y": 435,
418         "z": "5421e0da.e98ea",
419         "wires": []
420     },
421     {
422         "id": "3bf50c57.2c0d74",
423         "type": "outcome",
424         "name": "No proxy URL",
425         "xml": "<outcome value=''>\n",
426         "comments": "",
427         "outputs": 1,
428         "x": 1657,
429         "y": 288,
430         "z": "5421e0da.e98ea",
431         "wires": [
432             [
433                 "c793909b.fccf4"
434             ]
435         ]
436     },
437     {
438         "id": "719dd702.c98f88",
439         "type": "outcome",
440         "name": "Otherwise",
441         "xml": "<outcome value='Other'>\n",
442         "comments": "",
443         "outputs": 1,
444         "x": 1653,
445         "y": 356,
446         "z": "5421e0da.e98ea",
447         "wires": [
448             [
449                 "dbb430eb.1e3ee"
450             ]
451         ]
452     },
453     {
454         "id": "77200c7b.1ac3f4",
455         "type": "set",
456         "name": "set tmp url variables with proxy information",
457         "xml": "<set>\n<parameter name=\"tmp.proxy-url\" value=\"`$prop.a1Mediator.proxy.url`\"/>",
458         "comments": "",
459         "x": 1596,
460         "y": 164,
461         "z": "5421e0da.e98ea",
462         "wires": []
463     },
464     {
465         "id": "f471f3e5.a3e5c",
466         "type": "record",
467         "name": "record",
468         "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=\"Delete A1 Policy: Check for proxy url: \"/>\n<parameter name=\"field2\" value=\"`$tmp.proxy-url`\"/>\n\n",
469         "comments": "",
470         "outputs": 1,
471         "x": 1479,
472         "y": 239,
473         "z": "5421e0da.e98ea",
474         "wires": [
475             []
476         ]
477     },
478     {
479         "id": "d521b1c.f9f805",
480         "type": "switchNode",
481         "name": "switch",
482         "xml": "<switch test='`$tmp.proxy-url`'>\n",
483         "comments": "",
484         "outputs": 1,
485         "x": 1478,
486         "y": 322,
487         "z": "5421e0da.e98ea",
488         "wires": [
489             [
490                 "3bf50c57.2c0d74",
491                 "719dd702.c98f88"
492             ]
493         ]
494     },
495     {
496         "id": "793b4300.b8738c",
497         "type": "block",
498         "name": "block Substitute proxy address if available",
499         "xml": "<block>\n",
500         "atomic": "false",
501         "comments": "",
502         "outputs": 1,
503         "x": 1141,
504         "y": 321,
505         "z": "5421e0da.e98ea",
506         "wires": [
507             [
508                 "77200c7b.1ac3f4",
509                 "f471f3e5.a3e5c",
510                 "d521b1c.f9f805"
511             ]
512         ]
513     }
514 ]