fix odl patches
[ccsdk/distribution.git] / platform-logic / a1Adapter-api / src / main / json / A1-ADAPTER-API_getA1Policy.json
1 [
2     {
3         "id": "9623ac21.784518",
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": 168,
12         "y": 142,
13         "z": "e064bcd1.68ce88",
14         "wires": [
15             [
16                 "ccd84436.04e408"
17             ]
18         ]
19     },
20     {
21         "id": "ccd84436.04e408",
22         "type": "method",
23         "name": "method getA1Policy",
24         "xml": "<method rpc='getA1Policy' mode='sync'>\n",
25         "comments": "",
26         "outputs": 1,
27         "x": 227,
28         "y": 263,
29         "z": "e064bcd1.68ce88",
30         "wires": [
31             [
32                 "c915f152.8fae9"
33             ]
34         ]
35     },
36     {
37         "id": "7b756479.f5b4c4",
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:\"/>\n<parameter name=\"field2\" value=\"`$get-a1-policy-input.near-rt-ric-url`\"/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 691,
44         "y": 77,
45         "z": "e064bcd1.68ce88",
46         "wires": [
47             []
48         ]
49     },
50     {
51         "id": "c915f152.8fae9",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic='true'>",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 432,
59         "y": 217,
60         "z": "e064bcd1.68ce88",
61         "wires": [
62             [
63                 "7b756479.f5b4c4",
64                 "ecf93800.1c6098",
65                 "50c242ff.949c04",
66                 "91f0150f.12ce4",
67                 "63a848d9.da34b"
68             ]
69         ]
70     },
71     {
72         "id": "9209420.b905c4",
73         "type": "dgstart",
74         "name": "DGSTART",
75         "outputs": 1,
76         "x": 99,
77         "y": 79,
78         "z": "e064bcd1.68ce88",
79         "wires": [
80             [
81                 "9623ac21.784518"
82             ]
83         ]
84     },
85     {
86         "id": "ecf93800.1c6098",
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": 732.0000610351562,
92         "y": 132,
93         "z": "e064bcd1.68ce88",
94         "wires": []
95     },
96     {
97         "id": "50c242ff.949c04",
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": 731,
104         "y": 185,
105         "z": "e064bcd1.68ce88",
106         "wires": [
107             []
108         ]
109     },
110     {
111         "id": "63a848d9.da34b",
112         "type": "block",
113         "name": "A1 Mediator RestAPI Invocation",
114         "xml": "<block atomic='true'>",
115         "atomic": "true",
116         "comments": "",
117         "outputs": 1,
118         "x": 761.0001220703125,
119         "y": 269,
120         "z": "e064bcd1.68ce88",
121         "wires": [
122             [
123                 "291f2c44.cafa94",
124                 "91d29dbf.a6a538",
125                 "81af0899.ed949"
126             ]
127         ]
128     },
129     {
130         "id": "91d29dbf.a6a538",
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-input.near-rt-ric-url`\"/>",
134         "comments": "",
135         "x": 1123.00146484375,
136         "y": 161.88912963867188,
137         "z": "e064bcd1.68ce88",
138         "wires": []
139     },
140     {
141         "id": "291f2c44.cafa94",
142         "type": "record",
143         "name": "record",
144         "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 Instance.\"/>\n<parameter name=\"field2\" value=\"`$tmp.near-rt-ric-url`\"/>",
145         "comments": "",
146         "outputs": 1,
147         "x": 1011.0001220703125,
148         "y": 251,
149         "z": "e064bcd1.68ce88",
150         "wires": [
151             []
152         ]
153     },
154     {
155         "id": "81af0899.ed949",
156         "type": "execute",
157         "name": "Get Policy Instance",
158         "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=\"false\"/>",
159         "comments": "",
160         "outputs": 1,
161         "x": 1056.0006103515625,
162         "y": 333.0104064941406,
163         "z": "e064bcd1.68ce88",
164         "wires": [
165             [
166                 "13d8386c.8ddea8",
167                 "af0b89cf.ac16e8"
168             ]
169         ]
170     },
171     {
172         "id": "13d8386c.8ddea8",
173         "type": "failure",
174         "name": "failure",
175         "xml": "<outcome value='failure'>\n",
176         "comments": "",
177         "outputs": 1,
178         "x": 1283,
179         "y": 402.0001220703125,
180         "z": "e064bcd1.68ce88",
181         "wires": [
182             [
183                 "bf13d67e.e0cbb"
184             ]
185         ]
186     },
187     {
188         "id": "af0b89cf.ac16e8",
189         "type": "success",
190         "name": "success",
191         "xml": "<outcome value='success'>\n",
192         "comments": "",
193         "outputs": 1,
194         "x": 1274.000244140625,
195         "y": 246.00003051757812,
196         "z": "e064bcd1.68ce88",
197         "wires": [
198             [
199                 "98798a19.a969a"
200             ]
201         ]
202     },
203     {
204         "id": "508b9b05.e13d4c",
205         "type": "returnFailure",
206         "name": "return failure",
207         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"response-code\" value=\"500\" />\n<parameter name=\"response-message\" value=\"Error in Getting A1 Policy Instance. Aborting\" />",
208         "comments": "",
209         "x": 1606.0006103515625,
210         "y": 456.00006103515625,
211         "z": "e064bcd1.68ce88",
212         "wires": []
213     },
214     {
215         "id": "98798a19.a969a",
216         "type": "block",
217         "name": "block",
218         "xml": "<block>\n",
219         "atomic": "false",
220         "comments": "",
221         "outputs": 1,
222         "x": 1446.9998779296875,
223         "y": 247.00006103515625,
224         "z": "e064bcd1.68ce88",
225         "wires": [
226             [
227                 "c4d70fbd.f8a89",
228                 "efe59c04.f94ff",
229                 "7d3fa61b.39674"
230             ]
231         ]
232     },
233     {
234         "id": "c4d70fbd.f8a89",
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 Get Policy Information \"/>\n<parameter name=\"field2\" value=\"`$tmp.a1-mediator-restapi.httpResponse`\"/>",
238         "comments": "",
239         "outputs": 1,
240         "x": 1615,
241         "y": 219,
242         "z": "e064bcd1.68ce88",
243         "wires": [
244             []
245         ]
246     },
247     {
248         "id": "3864588e.e52d2",
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": 1579.75390625,
254         "y": 349.00390625,
255         "z": "e064bcd1.68ce88",
256         "wires": []
257     },
258     {
259         "id": "91f0150f.12ce4",
260         "type": "block",
261         "name": "block",
262         "xml": "<block>\n",
263         "atomic": "false",
264         "comments": "",
265         "outputs": 1,
266         "x": 694.75390625,
267         "y": 441.00390625,
268         "z": "e064bcd1.68ce88",
269         "wires": [
270             [
271                 "a170f7d2.fa1e18"
272             ]
273         ]
274     },
275     {
276         "id": "a170f7d2.fa1e18",
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='Get PolicyInstance executed successfully'/>\n<parameter name='ack-final' value='Y'/>\n",
280         "comments": "",
281         "x": 855.7539672851562,
282         "y": 441.00396728515625,
283         "z": "e064bcd1.68ce88",
284         "wires": []
285     },
286     {
287         "id": "bf13d67e.e0cbb",
288         "type": "block",
289         "name": "block",
290         "xml": "<block>\n",
291         "atomic": "false",
292         "comments": "",
293         "outputs": 1,
294         "x": 1438.00390625,
295         "y": 401.0039367675781,
296         "z": "e064bcd1.68ce88",
297         "wires": [
298             [
299                 "3864588e.e52d2",
300                 "508b9b05.e13d4c"
301             ]
302         ]
303     },
304     {
305         "id": "efe59c04.f94ff",
306         "type": "execute",
307         "name": "set",
308         "xml": "<set>\n<parameter name='responseBody' value='`$tmp.a1-mediator-restapi.httpResponse`'/>",
309         "comments": "",
310         "outputs": 1,
311         "x": 1611,
312         "y": 297,
313         "z": "e064bcd1.68ce88",
314         "wires": [
315             []
316         ]
317     },
318     {
319         "id": "7d3fa61b.39674",
320         "type": "execute",
321         "name": "execute",
322         "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=\"\"/>",
323         "comments": "",
324         "outputs": 1,
325         "x": 1614,
326         "y": 152,
327         "z": "e064bcd1.68ce88",
328         "wires": [
329             []
330         ]
331     }
332 ]