Added Policy Type DG For A1 Mediation
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1PolicyType.json
1 [
2     {
3         "id": "c219d1cd.b24c6",
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": 160,
12         "y": 193.0000033378601,
13         "z": "db67b85c.6b1fb8",
14         "wires": [
15             [
16                 "9062821.e79448"
17             ]
18         ]
19     },
20     {
21         "id": "9062821.e79448",
22         "type": "method",
23         "name": "method getA1PolicyType",
24         "xml": "<method rpc='getA1PolicyType' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 223.00000762939453,
28         "y": 316.00001287460327,
29         "z": "db67b85c.6b1fb8",
30         "wires": [
31             [
32                 "b06c71a4.a1c38"
33             ]
34         ]
35     },
36     {
37         "id": "6b437f41.4e82c",
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": 688.0000267028809,
44         "y": 129.0000023841858,
45         "z": "db67b85c.6b1fb8",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "b06c71a4.a1c38",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 426,
59         "y": 267.0000033378601,
60         "z": "db67b85c.6b1fb8",
61         "wires": [
62             [
63                 "6b437f41.4e82c",
64                 "b3ae1bd6.d9e298",
65                 "5e269c0a.ba2164",
66                 "10718683.4eee19",
67                 "7cdd0fec.392c7"
68             ]
69         ]
70     },
71     {
72         "id": "e8848e67.6f55e",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 93,
77         "y": 129.0000033378601,
78         "z": "db67b85c.6b1fb8",
79         "wires": [
80             [
81                 "c219d1cd.b24c6"
82             ]
83         ]
84     },
85     {
86         "id": "b3ae1bd6.d9e298",
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": 725.0001068115234,
92         "y": 182.00000143051147,
93         "z": "db67b85c.6b1fb8",
94         "wires": []
95     },
96     {
97         "id": "5e269c0a.ba2164",
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": 725,
104         "y": 235.0000033378601,
105         "z": "db67b85c.6b1fb8",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "7cdd0fec.392c7",
112         "type": "block",
113         "name": "A1 Mediator RestAPI Invocation",
114         "xml": "<block atomic='true'>",
115         "atomic": "true",
116         "comments": "",
117         "outputs": 1,
118         "x": 749.0001525878906,
119         "y": 320.99999713897705,
120         "z": "db67b85c.6b1fb8",
121         "wires": [
122             [
123                 "b1799881.cfcac8",
124                 "b226a8f0.348128",
125                 "8754f00.41fc21"
126             ]
127         ]
128     },
129     {
130         "id": "b1799881.cfcac8",
131         "type": "set",
132         "name": "set tmp variables for A1 Mediator REST API call",
133         "xml": "<set>\n<parameter name=\"tmp.near-rt-ric-url\" value=\"`$get-a1-policy-type-input.near-rt-ric-url`\"/>",
134         "comments": "",
135         "x": 1199.00146484375,
136         "y": 253.88914489746094,
137         "z": "db67b85c.6b1fb8",
138         "wires": []
139     },
140     {
141         "id": "b226a8f0.348128",
142         "type": "execute",
143         "name": "Get Policy Types",
144         "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\"/>",
145         "comments": "",
146         "outputs": 1,
147         "x": 1006.000602722168,
148         "y": 382.01037979125977,
149         "z": "db67b85c.6b1fb8",
150         "wires": [
151             [
152                 "37dbc1e3.6a3a5e",
153                 "debfb4b6.a67ed8"
154             ]
155         ]
156     },
157     {
158         "id": "37dbc1e3.6a3a5e",
159         "type": "failure",
160         "name": "failure",
161         "xml": "<outcome value='failure'>\n",
162         "comments": "",
163         "outputs": 1,
164         "x": 1110.0000610351562,
165         "y": 467.0001220703125,
166         "z": "db67b85c.6b1fb8",
167         "wires": [
168             [
169                 "4eefe752.1c7e88"
170             ]
171         ]
172     },
173     {
174         "id": "debfb4b6.a67ed8",
175         "type": "success",
176         "name": "success",
177         "xml": "<outcome value='success'>\n",
178         "comments": "",
179         "outputs": 1,
180         "x": 1286.000244140625,
181         "y": 378.0000305175781,
182         "z": "db67b85c.6b1fb8",
183         "wires": [
184             [
185                 "9ab3dc21.fe41a"
186             ]
187         ]
188     },
189     {
190         "id": "54c0577b.f3ecf8",
191         "type": "returnFailure",
192         "name": "return failure",
193         "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\" />",
194         "comments": "",
195         "x": 1382.0006103515625,
196         "y": 520.0001220703125,
197         "z": "db67b85c.6b1fb8",
198         "wires": []
199     },
200     {
201         "id": "9ab3dc21.fe41a",
202         "type": "block",
203         "name": "block",
204         "xml": "<block>\n",
205         "atomic": "false",
206         "comments": "",
207         "outputs": 1,
208         "x": 1405.9999084472656,
209         "y": 340.00007581710815,
210         "z": "db67b85c.6b1fb8",
211         "wires": [
212             [
213                 "a9c5eacf.c24728",
214                 "82bcac96.18a1",
215                 "c00428bd.5a7f58"
216             ]
217         ]
218     },
219     {
220         "id": "a9c5eacf.c24728",
221         "type": "record",
222         "name": "record",
223         "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=\"`$a1MediatorRsp.httpResponse`\"/>",
224         "comments": "",
225         "outputs": 1,
226         "x": 1644,
227         "y": 249.00000524520874,
228         "z": "db67b85c.6b1fb8",
229         "wires": [
230             []
231         ]
232     },
233     {
234         "id": "1ba71083.247e6f",
235         "type": "set",
236         "name": "set",
237         "xml": "<set>\n<parameter name='response-code' value='500'/>\n<parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>\n",
238         "comments": "",
239         "x": 1364.7539672851562,
240         "y": 418.0039367675781,
241         "z": "db67b85c.6b1fb8",
242         "wires": []
243     },
244     {
245         "id": "10718683.4eee19",
246         "type": "block",
247         "name": "block",
248         "xml": "<block>\n",
249         "atomic": "false",
250         "comments": "",
251         "outputs": 1,
252         "x": 686.7539405822754,
253         "y": 443.0039978027344,
254         "z": "db67b85c.6b1fb8",
255         "wires": [
256             [
257                 "f62ba5fc.044078"
258             ]
259         ]
260     },
261     {
262         "id": "f62ba5fc.044078",
263         "type": "returnSuccess",
264         "name": "return success",
265         "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",
266         "comments": "",
267         "x": 901.7540321350098,
268         "y": 443.0039367675781,
269         "z": "db67b85c.6b1fb8",
270         "wires": []
271     },
272     {
273         "id": "4eefe752.1c7e88",
274         "type": "block",
275         "name": "block",
276         "xml": "<block>\n",
277         "atomic": "false",
278         "comments": "",
279         "outputs": 1,
280         "x": 1238.0039367675781,
281         "y": 469.00392150878906,
282         "z": "db67b85c.6b1fb8",
283         "wires": [
284             [
285                 "54c0577b.f3ecf8",
286                 "1ba71083.247e6f"
287             ]
288         ]
289     },
290     {
291         "id": "8754f00.41fc21",
292         "type": "record",
293         "name": "record",
294         "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`\"/>",
295         "comments": "",
296         "outputs": 1,
297         "x": 1129.9999351501465,
298         "y": 304.0000157356262,
299         "z": "db67b85c.6b1fb8",
300         "wires": [
301             []
302         ]
303     },
304     {
305         "id": "c00428bd.5a7f58",
306         "type": "execute",
307         "name": "Object to string - ctxSetAttribute",
308         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxSetAttribute'>\n\t<parameter name='object' value=\t\"`$a1MediatorRsp.httpResponse`\" />\n\t<parameter name='key' value='a1PolicyTypeResponse' />",
309         "comments": "",
310         "outputs": 1,
311         "x": 1718.0001220703125,
312         "y": 366.00001287460327,
313         "z": "db67b85c.6b1fb8",
314         "wires": [
315             []
316         ]
317     },
318     {
319         "id": "82bcac96.18a1",
320         "type": "execute",
321         "name": "printContext",
322         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/opt/opendaylight/current/data/log/A1-Adapter-getPolicytype-specific-context.log' />\n\n\n",
323         "comments": "",
324         "outputs": 1,
325         "x": 1672.0000038146973,
326         "y": 425.00000524520874,
327         "z": "db67b85c.6b1fb8",
328         "wires": [
329             []
330         ]
331     },
332     {
333         "id": "c2524ba6.93b3f8",
334         "type": "execute",
335         "name": "execute jsonStringToCtx",
336         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>\n\t<parameter name='source' value='a1MediatorRsp.httpResponse' />\n\t<parameter name='outputPath' value='a1MediatorgetPolicyType' />\n\t<parameter name='isEscaped' value='false' />",
337         "comments": "",
338         "outputs": 1,
339         "x": 1694.0001220703125,
340         "y": 318.00001287460327,
341         "z": "db67b85c.6b1fb8",
342         "wires": [
343             []
344         ]
345     },
346     {
347         "id": "4d5a07cf.0a3ee8",
348         "type": "execute",
349         "name": "remove new lines",
350         "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.payload\"/>\n    <parameter name=\"target\" value=\"\\n\"/>\n    <parameter name=\"replacement\" value=\"\"/>\n",
351         "comments": "",
352         "outputs": 1,
353         "x": 2497.0001525878906,
354         "y": 457.0000305175781,
355         "z": "db67b85c.6b1fb8",
356         "wires": [
357             [
358                 "4a30bb8b.273024",
359                 "8c2e4d0d.9cbb2"
360             ]
361         ]
362     },
363     {
364         "id": "4a30bb8b.273024",
365         "type": "success",
366         "name": "success",
367         "xml": "<outcome value='success'>\n",
368         "comments": "",
369         "outputs": 1,
370         "x": 2804.5001831054688,
371         "y": 418.00004386901855,
372         "z": "db67b85c.6b1fb8",
373         "wires": [
374             [
375                 "3483ac68.9da354"
376             ]
377         ]
378     },
379     {
380         "id": "3483ac68.9da354",
381         "type": "block",
382         "name": "block : atomic",
383         "xml": "<block atomic='true'>",
384         "atomic": "true",
385         "comments": "",
386         "outputs": 1,
387         "x": 2939.5003356933594,
388         "y": 488.0000762939453,
389         "z": "db67b85c.6b1fb8",
390         "wires": [
391             [
392                 "3e399081.d736e"
393             ]
394         ]
395     },
396     {
397         "id": "3e399081.d736e",
398         "type": "record",
399         "name": "record",
400         "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=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Redndred template with lines removed \\r\"/>\n<parameter name='field3' value='`$tmp.a1-mediator-restapi.payload`' />",
401         "comments": "",
402         "outputs": 1,
403         "x": 3122.500473022461,
404         "y": 491.0000686645508,
405         "z": "db67b85c.6b1fb8",
406         "wires": [
407             []
408         ]
409     },
410     {
411         "id": "8c2e4d0d.9cbb2",
412         "type": "failure",
413         "name": "failure",
414         "xml": "<outcome value='failure'>\n",
415         "comments": "",
416         "outputs": 1,
417         "x": 2814.5001525878906,
418         "y": 578.0000788271427,
419         "z": "db67b85c.6b1fb8",
420         "wires": [
421             [
422                 "ee8be8b9.4a4c48"
423             ]
424         ]
425     },
426     {
427         "id": "ee8be8b9.4a4c48",
428         "type": "block",
429         "name": "block",
430         "xml": "<block>\n",
431         "atomic": "false",
432         "comments": "",
433         "outputs": 1,
434         "x": 2967.5,
435         "y": 554.0000715255737,
436         "z": "db67b85c.6b1fb8",
437         "wires": [
438             []
439         ]
440     },
441     {
442         "id": "22994ac1.2145d6",
443         "type": "execute",
444         "name": "Unescape http response",
445         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='unescapeJsonString'>\n\t<parameter name='source' value=\t\"`$a1MediatorRsp.httpResponse`\" />\n\t<parameter name='target' value='a1MediatorRsp.unescaped.httpResponse' />",
446         "comments": "",
447         "outputs": 1,
448         "x": 2517,
449         "y": 393.0000023841858,
450         "z": "db67b85c.6b1fb8",
451         "wires": [
452             []
453         ]
454     }
455 ]