0c5523424b65544fa20e1bd63ccbec3977f1b22e
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.json
1 [
2   {
3     "id": "a2b91e00.0dacb",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 119,
8     "y": 37,
9     "z": "7bfb2dad.3744a4",
10     "wires": [
11       [
12         "17fbd1a8.a9b4ce"
13       ]
14     ]
15   },
16   {
17     "id": "17fbd1a8.a9b4ce",
18     "type": "service-logic",
19     "name": "GENERIC-RESOURCE-API ${project.version}",
20     "module": "GENERIC-RESOURCE-API",
21     "version": "${project.version}",
22     "comments": "",
23     "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='GENERIC-RESOURCE-API' version='${project.version}'>",
24     "outputs": 1,
25     "x": 194.28570556640625,
26     "y": 77.23811149597168,
27     "z": "7bfb2dad.3744a4",
28     "wires": [
29       [
30         "cd1ac734.4667a8"
31       ]
32     ]
33   },
34   {
35     "id": "cd1ac734.4667a8",
36     "type": "method",
37     "name": "method site-vnf-topology-operation-delete",
38     "xml": "<method rpc='site-vnf-topology-operation-delete' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 215.42861938476562,
42     "y": 167,
43     "z": "7bfb2dad.3744a4",
44     "wires": [
45       [
46         "8f642f93.2a801"
47       ]
48     ]
49   },
50   {
51     "id": "8f642f93.2a801",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 347.6666564941406,
58     "y": 226.66668701171875,
59     "z": "7bfb2dad.3744a4",
60     "wires": [
61       [
62         "76c48b79.d84cf4",
63         "bfaa0886.4026e8",
64         "d0626629.81a8c8",
65         "a00c6468.40dc18",
66         "d6cddc91.15c3a",
67         "1aa89ef4.371e21"
68       ]
69     ]
70   },
71   {
72     "id": "76c48b79.d84cf4",
73     "type": "switchNode",
74     "name": "switch service-data.vnfs.vnf_length",
75     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
76     "comments": "",
77     "outputs": 1,
78     "x": 668.9895935058594,
79     "y": 73.98958587646484,
80     "z": "7bfb2dad.3744a4",
81     "wires": [
82       [
83         "e84dd0b6.bd49f",
84         "6abf3e26.6123e",
85         "cad37430.9a8ae8"
86       ]
87     ]
88   },
89   {
90     "id": "e84dd0b6.bd49f",
91     "type": "other",
92     "name": "Null",
93     "xml": "<outcome value=''>\n",
94     "comments": "",
95     "outputs": 1,
96     "x": 1081.9895935058594,
97     "y": 66.9896469116211,
98     "z": "7bfb2dad.3744a4",
99     "wires": [
100       [
101         "1e4a1529.eacc1b"
102       ]
103     ]
104   },
105   {
106     "id": "1e4a1529.eacc1b",
107     "type": "returnFailure",
108     "name": "return failure",
109     "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
110     "comments": "",
111     "x": 1300.7670593261719,
112     "y": 42.87859344482422,
113     "z": "7bfb2dad.3744a4",
114     "wires": [
115       
116     ]
117   },
118   {
119     "id": "6abf3e26.6123e",
120     "type": "other",
121     "name": "other",
122     "xml": "<outcome value='Other'>\n",
123     "comments": "",
124     "outputs": 1,
125     "x": 993.9899597167969,
126     "y": 120.98966217041016,
127     "z": "7bfb2dad.3744a4",
128     "wires": [
129       [
130         "8e41da85.f0c968"
131       ]
132     ]
133   },
134   {
135     "id": "8e41da85.f0c968",
136     "type": "block",
137     "name": "block : atomic",
138     "xml": "<block atomic=\"true\">",
139     "atomic": "true",
140     "outputs": 1,
141     "x": 1165.2594909667969,
142     "y": 104.54419708251953,
143     "z": "7bfb2dad.3744a4",
144     "wires": [
145       [
146         "40ff91c4.16b8c",
147         "901feb4d.552588"
148       ]
149     ]
150   },
151   {
152     "id": "40ff91c4.16b8c",
153     "type": "for",
154     "name": "for vidx..service-data.vnfs.vnf_length[]",
155     "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
156     "comments": "",
157     "outputs": 1,
158     "x": 1463.2754821777344,
159     "y": 85.41820526123047,
160     "z": "7bfb2dad.3744a4",
161     "wires": [
162       [
163         "21662e74.a22c42"
164       ]
165     ]
166   },
167   {
168     "id": "901feb4d.552588",
169     "type": "switchNode",
170     "name": "switch tmp.vidx ",
171     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
172     "comments": "",
173     "outputs": 1,
174     "x": 1384.5768737792969,
175     "y": 128.4013900756836,
176     "z": "7bfb2dad.3744a4",
177     "wires": [
178       [
179         "ee9e043e.1f4d08"
180       ]
181     ]
182   },
183   {
184     "id": "ee9e043e.1f4d08",
185     "type": "outcome",
186     "name": "NULL",
187     "xml": "<outcome value=''>\n",
188     "comments": "",
189     "outputs": 1,
190     "x": 1585.0054626464844,
191     "y": 133.9728012084961,
192     "z": "7bfb2dad.3744a4",
193     "wires": [
194       [
195         "b08c7bb.174c688"
196       ]
197     ]
198   },
199   {
200     "id": "21662e74.a22c42",
201     "type": "switchNode",
202     "name": "switch vnfid found",
203     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
204     "comments": "",
205     "outputs": 1,
206     "x": 1773.7040710449219,
207     "y": 83.66829681396484,
208     "z": "7bfb2dad.3744a4",
209     "wires": [
210       [
211         "c6e29244.22831"
212       ]
213     ]
214   },
215   {
216     "id": "b08c7bb.174c688",
217     "type": "returnFailure",
218     "name": "return failure",
219     "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
220     "comments": "",
221     "x": 1756.4339294433594,
222     "y": 134.11565399169922,
223     "z": "7bfb2dad.3744a4",
224     "wires": [
225       
226     ]
227   },
228   {
229     "id": "c6e29244.22831",
230     "type": "outcomeTrue",
231     "name": "true",
232     "xml": "<outcome value='true'>\n",
233     "comments": "",
234     "outputs": 1,
235     "x": 1979.6563415527344,
236     "y": 82.56102752685547,
237     "z": "7bfb2dad.3744a4",
238     "wires": [
239       [
240         "34cb4af6.5dade6"
241       ]
242     ]
243   },
244   {
245     "id": "34cb4af6.5dade6",
246     "type": "set",
247     "name": "set tmp.vidx and ctx.vnf-data",
248     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
249     "comments": "",
250     "x": 2218.1880798339844,
251     "y": 78.31102752685547,
252     "z": "7bfb2dad.3744a4",
253     "wires": [
254       
255     ]
256   },
257   {
258     "id": "cad37430.9a8ae8",
259     "type": "outcome",
260     "name": "0",
261     "xml": "<outcome value='0'>\n",
262     "comments": "",
263     "outputs": 1,
264     "x": 1075.9583435058594,
265     "y": 30.958335876464844,
266     "z": "7bfb2dad.3744a4",
267     "wires": [
268       [
269         "1e4a1529.eacc1b"
270       ]
271     ]
272   },
273   {
274     "id": "4dc3e987.9fd4e8",
275     "type": "comment",
276     "name": "TODO: Check validation",
277     "info": "",
278     "comments": "",
279     "x": 625.9895935058594,
280     "y": 25.989585876464844,
281     "z": "7bfb2dad.3744a4",
282     "wires": [
283       
284     ]
285   },
286   {
287     "id": "bfaa0886.4026e8",
288     "type": "returnSuccess",
289     "name": "return success",
290     "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",
291     "comments": "",
292     "x": 590.333251953125,
293     "y": 562.3333740234375,
294     "z": "7bfb2dad.3744a4",
295     "wires": [
296       
297     ]
298   },
299   {
300     "id": "728d2d28.940264",
301     "type": "for",
302     "name": "for each vnf",
303     "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n",
304     "comments": "",
305     "outputs": 1,
306     "x": 1117.7793083190918,
307     "y": 393.66661167144775,
308     "z": "7bfb2dad.3744a4",
309     "wires": [
310       [
311         "7caecd51.491534"
312       ]
313     ]
314   },
315   {
316     "id": "347e4d01.6da902",
317     "type": "comment",
318     "name": "Remove VNF from service data",
319     "info": "",
320     "comments": "",
321     "x": 640.9380798339844,
322     "y": 342.2382507324219,
323     "z": "7bfb2dad.3744a4",
324     "wires": [
325       
326     ]
327   },
328   {
329     "id": "7caecd51.491534",
330     "type": "set",
331     "name": "move vnf to remove one",
332     "xml": "<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n",
333     "comments": "",
334     "x": 1351.3704414367676,
335     "y": 392.6905632019043,
336     "z": "7bfb2dad.3744a4",
337     "wires": [
338       
339     ]
340   },
341   {
342     "id": "d6cddc91.15c3a",
343     "type": "switchNode",
344     "name": "switch vnf_length",
345     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
346     "comments": "",
347     "outputs": 1,
348     "x": 604.0371704101562,
349     "y": 395.2462406158447,
350     "z": "7bfb2dad.3744a4",
351     "wires": [
352       [
353         "f6c22b0f.9c87a8",
354         "3909fa08.1288e6"
355       ]
356     ]
357   },
358   {
359     "id": "f6c22b0f.9c87a8",
360     "type": "outcome",
361     "name": "1",
362     "xml": "<outcome value='1'>\n",
363     "comments": "",
364     "outputs": 1,
365     "x": 781.0372123718262,
366     "y": 355.91282749176025,
367     "z": "7bfb2dad.3744a4",
368     "wires": [
369       [
370         "489f0baa.cc5474"
371       ]
372     ]
373   },
374   {
375     "id": "489f0baa.cc5474",
376     "type": "set",
377     "name": "Remove vnfs",
378     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n",
379     "comments": "",
380     "x": 944.7037086486816,
381     "y": 355.91292667388916,
382     "z": "7bfb2dad.3744a4",
383     "wires": [
384       
385     ]
386   },
387   {
388     "id": "3909fa08.1288e6",
389     "type": "other",
390     "name": "other",
391     "xml": "<outcome value='Other'>\n",
392     "comments": "",
393     "outputs": 1,
394     "x": 779.7039566040039,
395     "y": 439.2461004257202,
396     "z": "7bfb2dad.3744a4",
397     "wires": [
398       [
399         "1459edc6.fe9a92"
400       ]
401     ]
402   },
403   {
404     "id": "e0ce4e15.0694e",
405     "type": "set",
406     "name": "set new vnf length",
407     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
408     "comments": "",
409     "x": 1137.333396911621,
410     "y": 484.2461853027344,
411     "z": "7bfb2dad.3744a4",
412     "wires": [
413       
414     ]
415   },
416   {
417     "id": "1b0c5771.6e6a79",
418     "type": "set",
419     "name": "Remove the last vnf in the list",
420     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n",
421     "comments": "",
422     "x": 1173.037052154541,
423     "y": 439.3572063446045,
424     "z": "7bfb2dad.3744a4",
425     "wires": [
426       
427     ]
428   },
429   {
430     "id": "1459edc6.fe9a92",
431     "type": "block",
432     "name": "block : atomic",
433     "xml": "<block atomic=\"true\">",
434     "atomic": "true",
435     "outputs": 1,
436     "x": 948.3704452514648,
437     "y": 439.9127473831177,
438     "z": "7bfb2dad.3744a4",
439     "wires": [
440       [
441         "728d2d28.940264",
442         "1b0c5771.6e6a79",
443         "e0ce4e15.0694e"
444       ]
445     ]
446   },
447   {
448     "id": "d0626629.81a8c8",
449     "type": "switchNode",
450     "name": "switch current vnf-level-oper-status == PendingDelete",
451     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingDelete'`\">\n",
452     "comments": "",
453     "outputs": 1,
454     "x": 702.9999885559082,
455     "y": 181.00003623962402,
456     "z": "7bfb2dad.3744a4",
457     "wires": [
458       [
459         "aa414c85.4ebad"
460       ]
461     ]
462   },
463   {
464     "id": "350728d2.6ecb38",
465     "type": "returnFailure",
466     "name": "return failure",
467     "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Cannot delete a VNF in a Created state\" />\n",
468     "comments": "",
469     "x": 1165.9999809265137,
470     "y": 180,
471     "z": "7bfb2dad.3744a4",
472     "wires": [
473       
474     ]
475   },
476   {
477     "id": "a00c6468.40dc18",
478     "type": "switchNode",
479     "name": "switch current vf-module_length",
480     "xml": "<switch test=\"`$ctx.vnf-data.vf-modules.vf-module_length`\">\n",
481     "comments": "",
482     "outputs": 1,
483     "x": 653.3333320617676,
484     "y": 267.00000190734863,
485     "z": "7bfb2dad.3744a4",
486     "wires": [
487       [
488         "e2c40a8f.28c2e8",
489         "efcade27.df8a7",
490         "fdf813a0.7dec9"
491       ]
492     ]
493   },
494   {
495     "id": "e2c40a8f.28c2e8",
496     "type": "outcome",
497     "name": "0",
498     "xml": "<outcome value='0'>\n",
499     "comments": "",
500     "outputs": 1,
501     "x": 881.9999732971191,
502     "y": 223.6666431427002,
503     "z": "7bfb2dad.3744a4",
504     "wires": [
505       [
506         "4056136c.450bfc"
507       ]
508     ]
509   },
510   {
511     "id": "efcade27.df8a7",
512     "type": "outcome",
513     "name": "NULL",
514     "xml": "<outcome value=''>",
515     "comments": "",
516     "outputs": 1,
517     "x": 880.5713844299316,
518     "y": 265.0953006744385,
519     "z": "7bfb2dad.3744a4",
520     "wires": [
521       [
522         "4056136c.450bfc"
523       ]
524     ]
525   },
526   {
527     "id": "4056136c.450bfc",
528     "type": "block",
529     "name": "block",
530     "xml": "<block>\n",
531     "atomic": "false",
532     "comments": "",
533     "outputs": 1,
534     "x": 1029.1428985595703,
535     "y": 245.0953016281128,
536     "z": "7bfb2dad.3744a4",
537     "wires": [
538       [
539         
540       ]
541     ]
542   },
543   {
544     "id": "fdf813a0.7dec9",
545     "type": "other",
546     "name": "other",
547     "xml": "<outcome value='Other'>\n",
548     "comments": "",
549     "outputs": 1,
550     "x": 880.5714340209961,
551     "y": 306.52388858795166,
552     "z": "7bfb2dad.3744a4",
553     "wires": [
554       [
555         "dbbd756.2a74488"
556       ]
557     ]
558   },
559   {
560     "id": "dbbd756.2a74488",
561     "type": "returnFailure",
562     "name": "return failure",
563     "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Cannot delete the VNF because there are VFs defined\" />\n",
564     "comments": "",
565     "x": 1047.7143287658691,
566     "y": 306.09527683258057,
567     "z": "7bfb2dad.3744a4",
568     "wires": [
569       
570     ]
571   },
572   {
573     "id": "aa414c85.4ebad",
574     "type": "outcomeTrue",
575     "name": "false",
576     "xml": "<outcome value='false'>\n",
577     "comments": "",
578     "outputs": 1,
579     "x": 1005,
580     "y": 181,
581     "z": "7bfb2dad.3744a4",
582     "wires": [
583       [
584         "350728d2.6ecb38"
585       ]
586     ]
587   },
588   {
589     "id": "1aa89ef4.371e21",
590     "type": "delete",
591     "name": "delete Site in AAI",
592     "xml": "<delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf' \n      key='generic-vnf.vnf-id = $prop.vnf-index' >",
593     "comments": "",
594     "outputs": 1,
595     "x": 604,
596     "y": 510,
597     "z": "7bfb2dad.3744a4",
598     "wires": [
599       [
600         
601       ]
602     ]
603   },
604   {
605     "id": "e61bcb70.9a5e48",
606     "type": "comment",
607     "name": "TODO: AAI",
608     "info": "",
609     "comments": "",
610     "x": 775,
611     "y": 512,
612     "z": "7bfb2dad.3744a4",
613     "wires": [
614       
615     ]
616   }
617 ]