[SDNGC-5859] copy local change to onap
[sdnc/oam.git] / platform-logic / vnfapi / src / main / json / VNF-API_vf-module-topology-assign.json
1 [
2     {
3         "id": "c16263f6.6c033",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 122.85714721679688,
8         "y": 48.57143020629883,
9         "z": "350dd502.49698a",
10         "wires": [
11             [
12                 "37a9d0a8.5ccc7"
13             ]
14         ]
15     },
16     {
17         "id": "37a9d0a8.5ccc7",
18         "type": "service-logic",
19         "name": "VNF-API ${project.version}",
20         "module": "VNF-API",
21         "version": "${project.version}",
22         "comments": "",
23         "xml": "<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='VNF-API' version='${project.version}'>",
24         "outputs": 1,
25         "x": 288.0238037109375,
26         "y": 48.738101959228516,
27         "z": "350dd502.49698a",
28         "wires": [
29             [
30                 "588951bd.cad18"
31             ]
32         ]
33     },
34     {
35         "id": "588951bd.cad18",
36         "type": "method",
37         "name": "method vf-module-topology-assign",
38         "xml": "<method rpc='vf-module-topology-assign' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 247.4524040222168,
42         "y": 104.30952453613281,
43         "z": "350dd502.49698a",
44         "wires": [
45             [
46                 "23232616.dc87ba"
47             ]
48         ]
49     },
50     {
51         "id": "23232616.dc87ba",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 234.78572463989258,
59         "y": 159.14286041259766,
60         "z": "350dd502.49698a",
61         "wires": [
62             [
63                 "f8edc82.b3e8938",
64                 "2ec63c84.2fdfa4",
65                 "6f2046b4.9e38b8",
66                 "70b11385.26396c",
67                 "83b4e560.3deac8",
68                 "ec42a08c.2f911",
69                 "3fb1f49d.968cac",
70                 "70c2e0fb.98281"
71             ]
72         ]
73     },
74     {
75         "id": "f8edc82.b3e8938",
76         "type": "set",
77         "name": "set: order-status = PendingCreate",
78         "xml": "<set>\n\t<parameter name=\"vf-module-service-data.oper-status.order-status\" value=\"PendingCreate\"/>",
79         "comments": "",
80         "outputs": 1,
81         "x": 502.67656326293945,
82         "y": 581.3350772857666,
83         "z": "350dd502.49698a",
84         "wires": [
85             []
86         ]
87     },
88     {
89         "id": "2ec63c84.2fdfa4",
90         "type": "returnSuccess",
91         "name": "return success",
92         "xml": "<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />",
93         "comments": "",
94         "x": 441.8194007873535,
95         "y": 667.0397090911865,
96         "z": "350dd502.49698a",
97         "wires": []
98     },
99     {
100         "id": "2e373aaa.eea7e6",
101         "type": "comment",
102         "name": "request-action = VNFActivateRequest",
103         "info": "",
104         "comments": "",
105         "x": 681.4523811340332,
106         "y": 77.25397491455078,
107         "z": "350dd502.49698a",
108         "wires": []
109     },
110     {
111         "id": "2f391c5c.812e84",
112         "type": "failure",
113         "name": "failure",
114         "xml": "<outcome value='failure'>\n",
115         "comments": "",
116         "outputs": 1,
117         "x": 799.7263221740723,
118         "y": 532.3576011657715,
119         "z": "350dd502.49698a",
120         "wires": [
121             [
122                 "47e9fdf3.2b1f24"
123             ]
124         ]
125     },
126     {
127         "id": "ccece92b.253528",
128         "type": "returnFailure",
129         "name": "return failure",
130         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"An error occurred while updating vf-module orchestration-status in AnAI\"/>",
131         "comments": "",
132         "x": 1183.8692512512207,
133         "y": 532.3576717376709,
134         "z": "350dd502.49698a",
135         "wires": []
136     },
137     {
138         "id": "a9a15235.6b621",
139         "type": "save",
140         "name": "save relationship: l3-network",
141         "xml": "<save plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />",
142         "comments": "",
143         "outputs": 1,
144         "x": 802.031810760498,
145         "y": 375.2578191757202,
146         "z": "350dd502.49698a",
147         "wires": [
148             [
149                 "7bf5e0bd.bd877"
150             ]
151         ]
152     },
153     {
154         "id": "7bf5e0bd.bd877",
155         "type": "failure",
156         "name": "failure",
157         "xml": "<outcome value='failure'>\n",
158         "comments": "",
159         "outputs": 1,
160         "x": 1014.676082611084,
161         "y": 375.3048334121704,
162         "z": "350dd502.49698a",
163         "wires": [
164             [
165                 "6b0b8d97.a1d2c4"
166             ]
167         ]
168     },
169     {
170         "id": "6f2046b4.9e38b8",
171         "type": "for",
172         "name": "for i : SERVICE_DATA vnf-networks",
173         "xml": "<for index=\"i\" start=\"0\" end=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">",
174         "comments": "",
175         "outputs": 1,
176         "x": 507.67861557006836,
177         "y": 375.226300239563,
178         "z": "350dd502.49698a",
179         "wires": [
180             [
181                 "a9a15235.6b621"
182             ]
183         ]
184     },
185     {
186         "id": "9195333e.3c5b3",
187         "type": "returnFailure",
188         "name": "return failure",
189         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while saving vf-module l3-network relationship in AnAI with network-id = ' + $vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>",
190         "comments": "",
191         "x": 1183.726146697998,
192         "y": 485.3211603164673,
193         "z": "350dd502.49698a",
194         "wires": []
195     },
196     {
197         "id": "6b0b8d97.a1d2c4",
198         "type": "block",
199         "name": "block : atomic",
200         "xml": "<block atomic='true'>",
201         "atomic": "true",
202         "comments": "",
203         "outputs": 1,
204         "x": 973.4405326843262,
205         "y": 437.6070137023926,
206         "z": "350dd502.49698a",
207         "wires": [
208             [
209                 "2266e1a7.71fbbe",
210                 "9195333e.3c5b3"
211             ]
212         ]
213     },
214     {
215         "id": "2266e1a7.71fbbe",
216         "type": "save",
217         "name": "delete vf-module: l3-network relationship",
218         "xml": "<delete plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tAND generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id \n\t\t\tAND related-to = l3-network\" >",
219         "comments": "",
220         "outputs": 1,
221         "x": 1266.8691291809082,
222         "y": 438.0357599258423,
223         "z": "350dd502.49698a",
224         "wires": [
225             []
226         ]
227     },
228     {
229         "id": "70b11385.26396c",
230         "type": "save",
231         "name": "update AnAI - vf-module.orchestration-status",
232         "xml": "<update plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" >\n<parameter name=\"orchestration-status\" value=\"pending-create\" />",
233         "comments": "",
234         "outputs": 1,
235         "x": 535.202465057373,
236         "y": 532.3690986633301,
237         "z": "350dd502.49698a",
238         "wires": [
239             [
240                 "2f391c5c.812e84"
241             ]
242         ]
243     },
244     {
245         "id": "47e9fdf3.2b1f24",
246         "type": "block",
247         "name": "block: atomic",
248         "xml": "<block atomic=\"true\">\n",
249         "atomic": "false",
250         "comments": "",
251         "outputs": 1,
252         "x": 958.1548957824707,
253         "y": 532.4643602371216,
254         "z": "350dd502.49698a",
255         "wires": [
256             [
257                 "ccece92b.253528",
258                 "2266e1a7.71fbbe"
259             ]
260         ]
261     },
262     {
263         "id": "83b4e560.3deac8",
264         "type": "call",
265         "name": "call: vf-module-topology-assign-vnf-networks",
266         "xml": "<call module='VNF-API' rpc='vf-module-topology-assign-vnf-networks' mode='sync' >",
267         "comments": "",
268         "outputs": 1,
269         "x": 534.9524040222168,
270         "y": 264.8928756713867,
271         "z": "350dd502.49698a",
272         "wires": [
273             []
274         ]
275     },
276     {
277         "id": "ec42a08c.2f911",
278         "type": "set",
279         "name": "Set final indicator to Y",
280         "xml": "<set>\n<parameter name=\"ack-final\" value=\"Y\"/>",
281         "comments": "",
282         "outputs": 1,
283         "x": 465.8572120666504,
284         "y": 626.4642963409424,
285         "z": "350dd502.49698a",
286         "wires": [
287             []
288         ]
289     },
290     {
291         "id": "3fb1f49d.968cac",
292         "type": "switchNode",
293         "name": "switch ...SERVICE-DATA vnf-networks[]",
294         "xml": "<switch test=\"`$vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length`\">",
295         "comments": "",
296         "outputs": 1,
297         "x": 520.0357627868652,
298         "y": 315.46430587768555,
299         "z": "350dd502.49698a",
300         "wires": [
301             [
302                 "66fc8dde.364c84"
303             ]
304         ]
305     },
306     {
307         "id": "66fc8dde.364c84",
308         "type": "outcome",
309         "name": "NULL",
310         "xml": "<outcome value=''>",
311         "outputs": 1,
312         "x": 760.4802360534668,
313         "y": 314.99201583862305,
314         "z": "350dd502.49698a",
315         "wires": [
316             [
317                 "5163a821.a1b9a8"
318             ]
319         ]
320     },
321     {
322         "id": "5163a821.a1b9a8",
323         "type": "set",
324         "name": "set SERVICE-DATA vnf-networks[] = 0",
325         "xml": "<set>\n<parameter name='vf-module-service-data.vf-module-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n",
326         "comments": "",
327         "outputs": 1,
328         "x": 982.0358450147842,
329         "y": 314.9920365015664,
330         "z": "350dd502.49698a",
331         "wires": [
332             []
333         ]
334     },
335     {
336         "id": "70c2e0fb.98281",
337         "type": "save",
338         "name": "GET AnAI - vf-module",
339         "xml": "<get-resource plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vf-module-topology-operation-input.vf-module-request-information.vf-module-id \n\t\t\tand generic-vnf.vnf-id = $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >",
340         "comments": "",
341         "outputs": 1,
342         "x": 465.5357322692871,
343         "y": 159.64287090301514,
344         "z": "350dd502.49698a",
345         "wires": [
346             [
347                 "5093485a.9aea88",
348                 "ef352420.3d6798"
349             ]
350         ]
351     },
352     {
353         "id": "5093485a.9aea88",
354         "type": "failure",
355         "name": "failure",
356         "xml": "<outcome value='failure'>\n",
357         "comments": "",
358         "outputs": 1,
359         "x": 659.5357322692871,
360         "y": 159.39287090301514,
361         "z": "350dd502.49698a",
362         "wires": [
363             [
364                 "2a95d52a.bc0f4a"
365             ]
366         ]
367     },
368     {
369         "id": "ef352420.3d6798",
370         "type": "not-found",
371         "name": "not-found",
372         "xml": "<outcome value='not-found'>\n",
373         "comments": "",
374         "outputs": 1,
375         "x": 667.0357475280762,
376         "y": 199.39288139343262,
377         "z": "350dd502.49698a",
378         "wires": [
379             [
380                 "a7a735d3.c7fd48"
381             ]
382         ]
383     },
384     {
385         "id": "2a95d52a.bc0f4a",
386         "type": "returnFailure",
387         "name": "return failure",
388         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'An error occurred while querying vf-module from AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>",
389         "comments": "",
390         "x": 813.7857322692871,
391         "y": 159.14287090301514,
392         "z": "350dd502.49698a",
393         "wires": []
394     },
395     {
396         "id": "a7a735d3.c7fd48",
397         "type": "returnFailure",
398         "name": "return failure",
399         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'vf-module not found in AnAI with vf-module-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vf-module-id + ' and vnf-instance-id = ' + $vf-module-topology-operation-input.vf-module-request-information.vnf-instance-id`\"/>",
400         "comments": "",
401         "x": 834.2857322692871,
402         "y": 199.64287090301514,
403         "z": "350dd502.49698a",
404         "wires": []
405     }
406 ]