[SDNGC-5859] copy local change to onap
[sdnc/oam.git] / platform-logic / vnfapi / src / main / json / VNF-API_vnf-topology-assign.json
1 [
2     {
3         "id": "6b847111.14518",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 138,
8         "y": 100,
9         "z": "f6aa4435.0ea2a8",
10         "wires": [
11             [
12                 "e8032bdd.c514c8"
13             ]
14         ]
15     },
16     {
17         "id": "e8032bdd.c514c8",
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": 252,
26         "y": 160,
27         "z": "f6aa4435.0ea2a8",
28         "wires": [
29             [
30                 "efc24499.7db518"
31             ]
32         ]
33     },
34     {
35         "id": "efc24499.7db518",
36         "type": "method",
37         "name": "method vnf-topology-assign",
38         "xml": "<method rpc='vnf-topology-assign' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 254.5,
42         "y": 220,
43         "z": "f6aa4435.0ea2a8",
44         "wires": [
45             [
46                 "291cc045.48f06"
47             ]
48         ]
49     },
50     {
51         "id": "291cc045.48f06",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">",
55         "atomic": "true",
56         "comments": "",
57         "outputs": 1,
58         "x": 292,
59         "y": 280,
60         "z": "f6aa4435.0ea2a8",
61         "wires": [
62             [
63                 "79076789.383708",
64                 "d3435702.674a18",
65                 "53b3c202.b3d34c",
66                 "6511ce13.6b3e7",
67                 "b261bb64.7dc868",
68                 "730a4402.7a9fec",
69                 "cc1eb17.357f85",
70                 "ec4234b5.37aa58",
71                 "e1123f17.441d3"
72             ]
73         ]
74     },
75     {
76         "id": "79076789.383708",
77         "type": "set",
78         "name": "set: order-status = PendingCreate",
79         "xml": "<set>\n\t<parameter name=\"service-data.oper-status.order-status\" value=\"PendingCreate\"/>",
80         "comments": "",
81         "x": 594.5,
82         "y": 640,
83         "z": "f6aa4435.0ea2a8",
84         "wires": []
85     },
86     {
87         "id": "d3435702.674a18",
88         "type": "returnSuccess",
89         "name": "return success",
90         "xml": "<return status='success'>\n\t<parameter name=\"error-code\" value=\"200\" />",
91         "comments": "",
92         "x": 533.5,
93         "y": 720,
94         "z": "f6aa4435.0ea2a8",
95         "wires": []
96     },
97     {
98         "id": "3098b2d1.15998e",
99         "type": "comment",
100         "name": "request-action = VNFActivateRequest",
101         "info": "",
102         "comments": "",
103         "x": 222,
104         "y": 60,
105         "z": "f6aa4435.0ea2a8",
106         "wires": []
107     },
108     {
109         "id": "404b9c45.b090b4",
110         "type": "failure",
111         "name": "failure",
112         "xml": "<outcome value='failure'>\n",
113         "comments": "",
114         "outputs": 1,
115         "x": 890,
116         "y": 600,
117         "z": "f6aa4435.0ea2a8",
118         "wires": [
119             [
120                 "44680508.69c9cc"
121             ]
122         ]
123     },
124     {
125         "id": "76ee352d.d7924c",
126         "type": "returnFailure",
127         "name": "return failure",
128         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"Encountered error while updating vf-module orchestration-status in AnAI\"/>",
129         "comments": "",
130         "x": 1268.5,
131         "y": 600,
132         "z": "f6aa4435.0ea2a8",
133         "wires": []
134     },
135     {
136         "id": "e68cdc52.c407d",
137         "type": "save",
138         "name": "save relationship: l3-network",
139         "xml": "<save plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t\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=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\" />",
140         "comments": "",
141         "outputs": 1,
142         "x": 918,
143         "y": 480,
144         "z": "f6aa4435.0ea2a8",
145         "wires": [
146             [
147                 "37286e8d.29b9f2"
148             ]
149         ]
150     },
151     {
152         "id": "37286e8d.29b9f2",
153         "type": "failure",
154         "name": "failure",
155         "xml": "<outcome value='failure'>\n",
156         "comments": "",
157         "outputs": 1,
158         "x": 890,
159         "y": 520,
160         "z": "f6aa4435.0ea2a8",
161         "wires": [
162             [
163                 "44f17fbc.617ed"
164             ]
165         ]
166     },
167     {
168         "id": "53b3c202.b3d34c",
169         "type": "for",
170         "name": "for i : SERVICE_DATA vnf-networks",
171         "xml": "<for index=\"i\" start=\"0\" end=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">",
172         "comments": "",
173         "outputs": 1,
174         "x": 600,
175         "y": 480,
176         "z": "f6aa4435.0ea2a8",
177         "wires": [
178             [
179                 "e68cdc52.c407d"
180             ]
181         ]
182     },
183     {
184         "id": "749c3a93.be4684",
185         "type": "returnFailure",
186         "name": "return failure",
187         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while saving vf-module l3-network relationship in AnAI with network-id = ' + $service-data.vnf-topology-information.vnf-assignments.vnf-networks[$i].network-id`\"/>",
188         "comments": "",
189         "x": 1268.5,
190         "y": 560,
191         "z": "f6aa4435.0ea2a8",
192         "wires": []
193     },
194     {
195         "id": "44f17fbc.617ed",
196         "type": "block",
197         "name": "block : atomic",
198         "xml": "<block atomic='true'>",
199         "atomic": "true",
200         "comments": "",
201         "outputs": 1,
202         "x": 1052,
203         "y": 520,
204         "z": "f6aa4435.0ea2a8",
205         "wires": [
206             [
207                 "a2a13f6d.2a0c8",
208                 "749c3a93.be4684"
209             ]
210         ]
211     },
212     {
213         "id": "a2a13f6d.2a0c8",
214         "type": "save",
215         "name": "delete vf-module: l3-network relationship",
216         "xml": "<delete plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module:relationship-list\" \n\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\tAND generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id \n\t\tAND related-to = l3-network\" \n\tforce=\"true\" \n\tlocal-only=\"false\">",
217         "comments": "",
218         "outputs": 1,
219         "x": 1355.5,
220         "y": 520,
221         "z": "f6aa4435.0ea2a8",
222         "wires": [
223             []
224         ]
225     },
226     {
227         "id": "6511ce13.6b3e7",
228         "type": "save",
229         "name": "update AnAI - vf-module.orchestration-status",
230         "xml": "<update plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" >\n\t<parameter name=\"orchestration-status\" value=\"pending-create\" />",
231         "comments": "",
232         "outputs": 1,
233         "x": 628.5,
234         "y": 600,
235         "z": "f6aa4435.0ea2a8",
236         "wires": [
237             [
238                 "404b9c45.b090b4"
239             ]
240         ]
241     },
242     {
243         "id": "44680508.69c9cc",
244         "type": "block",
245         "name": "block: atomic",
246         "xml": "<block atomic=\"true\">\n",
247         "atomic": "false",
248         "comments": "",
249         "outputs": 1,
250         "x": 1049.5,
251         "y": 600,
252         "z": "f6aa4435.0ea2a8",
253         "wires": [
254             [
255                 "76ee352d.d7924c",
256                 "a2a13f6d.2a0c8"
257             ]
258         ]
259     },
260     {
261         "id": "b261bb64.7dc868",
262         "type": "call",
263         "name": "call: vnf-topology-assign-vfmodule",
264         "xml": "<call module='VNF-API' rpc='vnf-topology-assign-vfmodule' mode='sync' >",
265         "comments": "",
266         "outputs": 1,
267         "x": 594.5,
268         "y": 400,
269         "z": "f6aa4435.0ea2a8",
270         "wires": [
271             []
272         ]
273     },
274     {
275         "id": "730a4402.7a9fec",
276         "type": "set",
277         "name": "Set final indicator to Y",
278         "xml": "<set>\n<parameter name=\"ack-final\" value=\"Y\"/>",
279         "comments": "",
280         "x": 558.5,
281         "y": 680,
282         "z": "f6aa4435.0ea2a8",
283         "wires": []
284     },
285     {
286         "id": "cc1eb17.357f85",
287         "type": "switchNode",
288         "name": "switch ...SERVICE-DATA vnf-networks[]",
289         "xml": "<switch test=\"`$service-data.vnf-topology-information.vnf-assignments.vnf-networks_length`\">",
290         "comments": "",
291         "outputs": 1,
292         "x": 612.5,
293         "y": 440,
294         "z": "f6aa4435.0ea2a8",
295         "wires": [
296             [
297                 "e9379e9d.985f7"
298             ]
299         ]
300     },
301     {
302         "id": "e9379e9d.985f7",
303         "type": "outcome",
304         "name": "NULL",
305         "xml": "<outcome value=''>",
306         "outputs": 1,
307         "x": 850,
308         "y": 440,
309         "z": "f6aa4435.0ea2a8",
310         "wires": [
311             [
312                 "be746643.61ac78"
313             ]
314         ]
315     },
316     {
317         "id": "be746643.61ac78",
318         "type": "set",
319         "name": "set SERVICE-DATA vnf-networks[] = 0",
320         "xml": "<set>\n<parameter name='service-data.vnf-topology-information.vnf-assignments.vnf-networks_length' value='0' />\n",
321         "comments": "",
322         "x": 1088,
323         "y": 440,
324         "z": "f6aa4435.0ea2a8",
325         "wires": []
326     },
327     {
328         "id": "ec4234b5.37aa58",
329         "type": "save",
330         "name": "GET AnAI - vf-module",
331         "xml": "<get-resource plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\tresource=\"vf-module\" \n\t\tkey=\"vf-module.vf-module-id = $vnf-topology-operation-input.vnf-request-information.vnf-id \n\t\t\tand generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-request-information.generic-vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.vfmodule\" >",
332         "comments": "",
333         "outputs": 1,
334         "x": 557.5,
335         "y": 340,
336         "z": "f6aa4435.0ea2a8",
337         "wires": [
338             [
339                 "1080e2bd.3bc8dd",
340                 "573755d9.256a8c"
341             ]
342         ]
343     },
344     {
345         "id": "1080e2bd.3bc8dd",
346         "type": "failure",
347         "name": "failure",
348         "xml": "<outcome value='failure'>\n",
349         "comments": "",
350         "outputs": 1,
351         "x": 790,
352         "y": 320,
353         "z": "f6aa4435.0ea2a8",
354         "wires": [
355             [
356                 "5f7a62b3.c0435c"
357             ]
358         ]
359     },
360     {
361         "id": "573755d9.256a8c",
362         "type": "not-found",
363         "name": "not-found",
364         "xml": "<outcome value='not-found'>\n",
365         "comments": "",
366         "outputs": 1,
367         "x": 798.5,
368         "y": 360,
369         "z": "f6aa4435.0ea2a8",
370         "wires": [
371             [
372                 "b3b13d2d.da245"
373             ]
374         ]
375     },
376     {
377         "id": "5f7a62b3.c0435c",
378         "type": "returnFailure",
379         "name": "return failure",
380         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Encountered error while querying vf-module from AnAI with vf-module-id = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>",
381         "comments": "",
382         "x": 988.5,
383         "y": 320,
384         "z": "f6aa4435.0ea2a8",
385         "wires": []
386     },
387     {
388         "id": "b3b13d2d.da245",
389         "type": "returnFailure",
390         "name": "return failure",
391         "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 = ' + $vnf-topology-operation-input.vnf-request-information.vnf-id + ' and generic-vnf-id = ' + $vnf-topology-operation-input.vnf-request-information.generic-vnf-id`\"/>",
392         "comments": "",
393         "x": 988.5,
394         "y": 360,
395         "z": "f6aa4435.0ea2a8",
396         "wires": []
397     },
398     {
399         "id": "e1123f17.441d3",
400         "type": "switchNode",
401         "name": "switch:vnf-id | config == input",
402         "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-request-information.vnf-id == $service-data.vnf-id`\">",
403         "comments": "",
404         "outputs": 1,
405         "x": 579.8333129882812,
406         "y": 280.00001335144043,
407         "z": "f6aa4435.0ea2a8",
408         "wires": [
409             [
410                 "3a4715d4.547d2a"
411             ]
412         ]
413     },
414     {
415         "id": "2730cc09.74d084",
416         "type": "returnFailure",
417         "name": "return failure",
418         "xml": "<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value='vnf-id is already present in config-tree'/>",
419         "comments": "",
420         "x": 988.5,
421         "y": 280,
422         "z": "f6aa4435.0ea2a8",
423         "wires": []
424     },
425     {
426         "id": "3a4715d4.547d2a",
427         "type": "outcomeTrue",
428         "name": "true",
429         "xml": "<outcome value='true'>\n",
430         "comments": "",
431         "outputs": 1,
432         "x": 790,
433         "y": 280,
434         "z": "f6aa4435.0ea2a8",
435         "wires": [
436             [
437                 "2730cc09.74d084"
438             ]
439         ]
440     }
441 ]