01081e1fa890465c571575f1f501f476e42432ff
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_site-vnf-topology-operation-delete.json
1 [
2   {
3     "id": "a7726866.c82328",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 195,
8     "y": 120.41365623474121,
9     "z": "3abedd3.792ad22",
10     "wires": [
11       [
12         "3384c619.e1dafa"
13       ]
14     ]
15   },
16   {
17     "id": "3384c619.e1dafa",
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": 270.28570556640625,
26     "y": 160.6517677307129,
27     "z": "3abedd3.792ad22",
28     "wires": [
29       [
30         "ca099e7c.f45ae"
31       ]
32     ]
33   },
34   {
35     "id": "ca099e7c.f45ae",
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": 250.42861938476562,
42     "y": 296.4136562347412,
43     "z": "3abedd3.792ad22",
44     "wires": [
45       [
46         "cdd2879.5989078"
47       ]
48     ]
49   },
50   {
51     "id": "965a63f9.a0196",
52     "type": "comment",
53     "name": "site-vnf-topology-operation-delete",
54     "info": "",
55     "comments": "",
56     "x": 644.3449172973633,
57     "y": 194.00005531311035,
58     "z": "3abedd3.792ad22",
59     "wires": []
60   },
61   {
62     "id": "cdd2879.5989078",
63     "type": "block",
64     "name": "block : atomic",
65     "xml": "<block atomic=\"true\">",
66     "atomic": "true",
67     "outputs": 1,
68     "x": 271.66666412353516,
69     "y": 422.0803279876709,
70     "z": "3abedd3.792ad22",
71     "wires": [
72       [
73         "e74f18c4.f49f98",
74         "e52597d4.97d0a8",
75         "6a942976.e989d8",
76         "6ffb0bce.7eb574",
77         "ba634d70.518cb",
78         "52c3ad0c.e6f634",
79         "26f755dc.77218a",
80         "ea9d888e.357438",
81         "a4fc2f21.bb9f6"
82       ]
83     ]
84   },
85   {
86     "id": "26f755dc.77218a",
87     "type": "switchNode",
88     "name": "switch service-data.vnfs.vnf_length",
89     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
90     "comments": "",
91     "outputs": 1,
92     "x": 733.0947036743164,
93     "y": 355.6748266220093,
94     "z": "3abedd3.792ad22",
95     "wires": [
96       [
97         "41237296.cb603c",
98         "1b9b9bc6.ffabe4"
99       ]
100     ]
101   },
102   {
103     "id": "41237296.cb603c",
104     "type": "other",
105     "name": "outcome Null",
106     "xml": "<outcome value=''>\n",
107     "comments": "",
108     "outputs": 1,
109     "x": 997.8170166015625,
110     "y": 338.23044872283936,
111     "z": "3abedd3.792ad22",
112     "wires": [
113       [
114         "37a1ebd3.c0d944"
115       ]
116     ]
117   },
118   {
119     "id": "37a1ebd3.c0d944",
120     "type": "returnFailure",
121     "name": "return failure",
122     "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",
123     "comments": "",
124     "x": 1178.8168869018555,
125     "y": 333.23032665252686,
126     "z": "3abedd3.792ad22",
127     "wires": []
128   },
129   {
130     "id": "1b9b9bc6.ffabe4",
131     "type": "other",
132     "name": "other",
133     "xml": "<outcome value='Other'>\n",
134     "comments": "",
135     "outputs": 1,
136     "x": 983.3170166015625,
137     "y": 390.230411529541,
138     "z": "3abedd3.792ad22",
139     "wires": [
140       [
141         "af3a8c66.5e3d1"
142       ]
143     ]
144   },
145   {
146     "id": "af3a8c66.5e3d1",
147     "type": "block",
148     "name": "block : atomic",
149     "xml": "<block atomic=\"true\">",
150     "atomic": "true",
151     "outputs": 1,
152     "x": 1155.316722869873,
153     "y": 390.2304096221924,
154     "z": "3abedd3.792ad22",
155     "wires": [
156       [
157         "2540b8b2.d6e138",
158         "8b080a11.ba38d8"
159       ]
160     ]
161   },
162   {
163     "id": "8b080a11.ba38d8",
164     "type": "switchNode",
165     "name": "switch tmp.nidx ",
166     "xml": "<switch test=\"`$tmp.nidx`\">\n\n",
167     "comments": "",
168     "outputs": 1,
169     "x": 1330.31689453125,
170     "y": 409.23033142089844,
171     "z": "3abedd3.792ad22",
172     "wires": [
173       [
174         "29f38b0a.335fc4"
175       ]
176     ]
177   },
178   {
179     "id": "52c3ad0c.e6f634",
180     "type": "switchNode",
181     "name": "switch vnf-level-oper-status",
182     "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
183     "comments": "",
184     "outputs": 1,
185     "x": 703.4837036132812,
186     "y": 430.1192903518677,
187     "z": "3abedd3.792ad22",
188     "wires": [
189       [
190         "80dde12f.593ab",
191         "95f83539.1330d8"
192       ]
193     ]
194   },
195   {
196     "id": "80dde12f.593ab",
197     "type": "outcome",
198     "name": "outcome PendingDelete",
199     "xml": "<outcome value='PendingDelete'>\n",
200     "comments": "",
201     "outputs": 1,
202     "x": 994.3169708251953,
203     "y": 434.23041343688965,
204     "z": "3abedd3.792ad22",
205     "wires": [
206       [
207         "c271a18f.ad7ae"
208       ]
209     ]
210   },
211   {
212     "id": "95f83539.1330d8",
213     "type": "other",
214     "name": "other",
215     "xml": "<outcome value='Other'>\n",
216     "comments": "",
217     "outputs": 1,
218     "x": 940.3170318603516,
219     "y": 481.2304172515869,
220     "z": "3abedd3.792ad22",
221     "wires": [
222       [
223         "c4d6206d.a0bea"
224       ]
225     ]
226   },
227   {
228     "id": "c4d6206d.a0bea",
229     "type": "returnFailure",
230     "name": "return failure",
231     "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 is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
232     "comments": "",
233     "x": 1099.8167991638184,
234     "y": 484.2304162979126,
235     "z": "3abedd3.792ad22",
236     "wires": []
237   },
238   {
239     "id": "ea9d888e.357438",
240     "type": "switchNode",
241     "name": "switch vnf-id",
242     "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
243     "comments": "",
244     "outputs": 1,
245     "x": 669.3170204162598,
246     "y": 311.23042011260986,
247     "z": "3abedd3.792ad22",
248     "wires": [
249       [
250         "62e62064.0111a"
251       ]
252     ]
253   },
254   {
255     "id": "62e62064.0111a",
256     "type": "outcome",
257     "name": "NULL",
258     "xml": "<outcome value=''>",
259     "comments": "",
260     "outputs": 1,
261     "x": 867.3170852661133,
262     "y": 301.230432510376,
263     "z": "3abedd3.792ad22",
264     "wires": [
265       [
266         "583791bd.81172"
267       ]
268     ]
269   },
270   {
271     "id": "583791bd.81172",
272     "type": "returnFailure",
273     "name": "return failure",
274     "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-request-input.vnf-input-parameters.name is a required input\" />\n",
275     "comments": "",
276     "x": 1033.8169708251953,
277     "y": 298.2304267883301,
278     "z": "3abedd3.792ad22",
279     "wires": []
280   },
281   {
282     "id": "a4fc2f21.bb9f6",
283     "type": "execute",
284     "name": "execute requiredParameters",
285     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
286     "comments": "",
287     "outputs": 1,
288     "x": 726.8170776367188,
289     "y": 251.23041915893555,
290     "z": "3abedd3.792ad22",
291     "wires": [
292       []
293     ]
294   },
295   {
296     "id": "2540b8b2.d6e138",
297     "type": "for",
298     "name": "for nidx..service-data.vnfs.vnf[]",
299     "xml": "<for index='nidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
300     "comments": "",
301     "outputs": 1,
302     "x": 1390.8168983459473,
303     "y": 345.2303276062012,
304     "z": "3abedd3.792ad22",
305     "wires": [
306       [
307         "58bd02b1.41b51c"
308       ]
309     ]
310   },
311   {
312     "id": "58bd02b1.41b51c",
313     "type": "switchNode",
314     "name": "switch vnf-id found",
315     "xml": "<switch test=\"`$service-data.vnfs.vnf[$nidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
316     "comments": "",
317     "outputs": 1,
318     "x": 1646.8169174194336,
319     "y": 345.2303276062012,
320     "z": "3abedd3.792ad22",
321     "wires": [
322       [
323         "c5d4dadf.96bed8"
324       ]
325     ]
326   },
327   {
328     "id": "c5d4dadf.96bed8",
329     "type": "outcomeTrue",
330     "name": "true",
331     "xml": "<outcome value='true'>\n",
332     "comments": "",
333     "outputs": 1,
334     "x": 1823.3169708251953,
335     "y": 348.2303276062012,
336     "z": "3abedd3.792ad22",
337     "wires": [
338       [
339         "fef684cd.0b0aa8"
340       ]
341     ]
342   },
343   {
344     "id": "fef684cd.0b0aa8",
345     "type": "set",
346     "name": "set tmp.nidx and ctx.vnf-data",
347     "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$nidx].vnf-data.`' />\n",
348     "comments": "",
349     "x": 1990.3169860839844,
350     "y": 409.2303276062012,
351     "z": "3abedd3.792ad22",
352     "wires": []
353   },
354   {
355     "id": "a5b8b731.dc3498",
356     "type": "returnFailure",
357     "name": "return failure",
358     "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",
359     "comments": "",
360     "x": 1635.816909790039,
361     "y": 409.23033142089844,
362     "z": "3abedd3.792ad22",
363     "wires": []
364   },
365   {
366     "id": "29f38b0a.335fc4",
367     "type": "outcome",
368     "name": "NULL",
369     "xml": "<outcome value=''>\n",
370     "comments": "",
371     "outputs": 1,
372     "x": 1498.316909790039,
373     "y": 409.23033142089844,
374     "z": "3abedd3.792ad22",
375     "wires": [
376       [
377         "a5b8b731.dc3498"
378       ]
379     ]
380   },
381   {
382     "id": "6ffb0bce.7eb574",
383     "type": "set",
384     "name": "set vnfId and vnf-object-path",
385     "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='vnf-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />",
386     "comments": "",
387     "x": 681.3334350585938,
388     "y": 605.747073173523,
389     "z": "3abedd3.792ad22",
390     "wires": []
391   },
392   {
393     "id": "ba634d70.518cb",
394     "type": "returnSuccess",
395     "name": "return success",
396     "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",
397     "comments": "",
398     "x": 630.4445953369141,
399     "y": 731.3025035858154,
400     "z": "3abedd3.792ad22",
401     "wires": []
402   },
403   {
404     "id": "e52597d4.97d0a8",
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": 661.9660186767578,
410     "y": 503.2179307937622,
411     "z": "3abedd3.792ad22",
412     "wires": []
413   },
414   {
415     "id": "6a942976.e989d8",
416     "type": "set",
417     "name": "Remove vnf from ServiceData",
418     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.nidx].\" value=\"\"/>\n\n",
419     "comments": "",
420     "x": 697.5902099609375,
421     "y": 547.1858978271484,
422     "z": "3abedd3.792ad22",
423     "wires": []
424   },
425   {
426     "id": "e74f18c4.f49f98",
427     "type": "delete",
428     "name": "delete site instance configuration in AAI",
429     "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='site-resource' \n        key='site-resource.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n",
430     "comments": "",
431     "outputs": 1,
432     "x": 707.8549957275391,
433     "y": 674.5513019561768,
434     "z": "3abedd3.792ad22",
435     "wires": [
436       []
437     ]
438   },
439   {
440     "id": "c271a18f.ad7ae",
441     "type": "block",
442     "name": "block : atomic",
443     "xml": "<block atomic=\"true\">",
444     "atomic": "true",
445     "outputs": 1,
446     "x": 1191.6233711242676,
447     "y": 444.55556774139404,
448     "z": "3abedd3.792ad22",
449     "wires": [
450       []
451     ]
452   }
453 ]