72538cfc9292850787df36a0b5b74652d388d8f3
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-device-delete.json
1 [
2   {
3     "id": "7735fc30.841634",
4     "type": "switchNode",
5     "name": "switch service-data.vnfs.vnf_length",
6     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 757.03125,
10     "y": 380.03125,
11     "z": "f20d2d3a.d3597",
12     "wires": [
13       [
14         "8fd37aa5.017ed8",
15         "9c974a8d.2ebbc8"
16       ]
17     ]
18   },
19   {
20     "id": "44891278.d01ccc",
21     "type": "dgstart",
22     "name": "DGSTART",
23     "outputs": 1,
24     "x": 218.9365463256836,
25     "y": 144.77007961273193,
26     "z": "f20d2d3a.d3597",
27     "wires": [
28       [
29         "cf34b9f3.a217e8"
30       ]
31     ]
32   },
33   {
34     "id": "cf34b9f3.a217e8",
35     "type": "service-logic",
36     "name": "GENERIC-RESOURCE-API ${project.version}",
37     "module": "GENERIC-RESOURCE-API",
38     "version": "${project.version}",
39     "comments": "",
40     "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}'>",
41     "outputs": 1,
42     "x": 294.22225189208984,
43     "y": 185.0081911087036,
44     "z": "f20d2d3a.d3597",
45     "wires": [
46       [
47         "f275038d.034f"
48       ]
49     ]
50   },
51   {
52     "id": "9fb20f9.a2934f",
53     "type": "comment",
54     "name": "wan port-vnf-topology-operation-delete",
55     "info": "",
56     "comments": "",
57     "x": 668.2814636230469,
58     "y": 218.35647869110107,
59     "z": "f20d2d3a.d3597",
60     "wires": []
61   },
62   {
63     "id": "47c2021d.e2c7fc",
64     "type": "block",
65     "name": "block : atomic",
66     "xml": "<block atomic=\"true\">",
67     "atomic": "true",
68     "outputs": 1,
69     "x": 295.60321044921875,
70     "y": 446.4367513656616,
71     "z": "f20d2d3a.d3597",
72     "wires": [
73       [
74         "e3e2bc88.e9b0d",
75         "6dbec876.fc0328",
76         "750850d5.2167c",
77         "3731bfbc.74cda",
78         "25ec4ecb.412e22",
79         "7735fc30.841634",
80         "e6700fc6.f20b6",
81         "6f81e67.c77e818",
82         "3b4d6073.21879"
83       ]
84     ]
85   },
86   {
87     "id": "8fd37aa5.017ed8",
88     "type": "other",
89     "name": "outcome Null",
90     "xml": "<outcome value=''>\n",
91     "comments": "",
92     "outputs": 1,
93     "x": 1021.7535629272461,
94     "y": 362.5868721008301,
95     "z": "f20d2d3a.d3597",
96     "wires": [
97       [
98         "847c658a.4062c8"
99       ]
100     ]
101   },
102   {
103     "id": "847c658a.4062c8",
104     "type": "returnFailure",
105     "name": "return failure",
106     "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",
107     "comments": "",
108     "x": 1202.753433227539,
109     "y": 357.5867500305176,
110     "z": "f20d2d3a.d3597",
111     "wires": []
112   },
113   {
114     "id": "9c974a8d.2ebbc8",
115     "type": "other",
116     "name": "other",
117     "xml": "<outcome value='Other'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 1007.2535629272461,
121     "y": 414.58683490753174,
122     "z": "f20d2d3a.d3597",
123     "wires": [
124       [
125         "a54560d4.0ba6d"
126       ]
127     ]
128   },
129   {
130     "id": "a54560d4.0ba6d",
131     "type": "block",
132     "name": "block : atomic",
133     "xml": "<block atomic=\"true\">",
134     "atomic": "true",
135     "outputs": 1,
136     "x": 1179.2532691955566,
137     "y": 414.5868330001831,
138     "z": "f20d2d3a.d3597",
139     "wires": [
140       [
141         "77ddf34.4623e0c",
142         "6b40a8cd.dcd938",
143         "7e832033.e29c9"
144       ]
145     ]
146   },
147   {
148     "id": "6b40a8cd.dcd938",
149     "type": "switchNode",
150     "name": "switch tmp.vidx ",
151     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
152     "comments": "",
153     "outputs": 1,
154     "x": 1354.2534408569336,
155     "y": 433.58675479888916,
156     "z": "f20d2d3a.d3597",
157     "wires": [
158       [
159         "5d6c7481.ef0eac"
160       ]
161     ]
162   },
163   {
164     "id": "25ec4ecb.412e22",
165     "type": "switchNode",
166     "name": "switch vnf-level-oper-status",
167     "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
168     "comments": "",
169     "outputs": 1,
170     "x": 727.4202499389648,
171     "y": 454.4757137298584,
172     "z": "f20d2d3a.d3597",
173     "wires": [
174       [
175         "6e834974.d9b6b8",
176         "8930f777.246948"
177       ]
178     ]
179   },
180   {
181     "id": "6e834974.d9b6b8",
182     "type": "outcome",
183     "name": "outcome PendingDelete",
184     "xml": "<outcome value='PendingDelete'>\n",
185     "comments": "",
186     "outputs": 1,
187     "x": 1018.2535171508789,
188     "y": 458.58683681488037,
189     "z": "f20d2d3a.d3597",
190     "wires": [
191       [
192         "9d8ec192.cf786"
193       ]
194     ]
195   },
196   {
197     "id": "8930f777.246948",
198     "type": "other",
199     "name": "other",
200     "xml": "<outcome value='Other'>\n",
201     "comments": "",
202     "outputs": 1,
203     "x": 964.2535781860352,
204     "y": 505.58684062957764,
205     "z": "f20d2d3a.d3597",
206     "wires": [
207       [
208         "8989bed6.5ee81"
209       ]
210     ]
211   },
212   {
213     "id": "8989bed6.5ee81",
214     "type": "returnFailure",
215     "name": "return failure",
216     "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`\" />",
217     "comments": "",
218     "x": 1123.753345489502,
219     "y": 508.5868396759033,
220     "z": "f20d2d3a.d3597",
221     "wires": []
222   },
223   {
224     "id": "e6700fc6.f20b6",
225     "type": "switchNode",
226     "name": "switch vnf-id",
227     "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
228     "comments": "",
229     "outputs": 1,
230     "x": 693.2535667419434,
231     "y": 335.5868434906006,
232     "z": "f20d2d3a.d3597",
233     "wires": [
234       [
235         "73ae75a9.e85c8c"
236       ]
237     ]
238   },
239   {
240     "id": "73ae75a9.e85c8c",
241     "type": "outcome",
242     "name": "NULL",
243     "xml": "<outcome value=''>",
244     "comments": "",
245     "outputs": 1,
246     "x": 891.2536315917969,
247     "y": 325.5868558883667,
248     "z": "f20d2d3a.d3597",
249     "wires": [
250       [
251         "dd6eb157.d89e"
252       ]
253     ]
254   },
255   {
256     "id": "dd6eb157.d89e",
257     "type": "returnFailure",
258     "name": "return failure",
259     "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",
260     "comments": "",
261     "x": 1057.753517150879,
262     "y": 322.5868501663208,
263     "z": "f20d2d3a.d3597",
264     "wires": []
265   },
266   {
267     "id": "77ddf34.4623e0c",
268     "type": "for",
269     "name": "for vidx..service-data.vnfs.vnf[]",
270     "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
271     "comments": "",
272     "outputs": 1,
273     "x": 1414.7534446716309,
274     "y": 369.5867509841919,
275     "z": "f20d2d3a.d3597",
276     "wires": [
277       [
278         "cd627687.735828"
279       ]
280     ]
281   },
282   {
283     "id": "cd627687.735828",
284     "type": "switchNode",
285     "name": "switch vnf-id found",
286     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
287     "comments": "",
288     "outputs": 1,
289     "x": 1670.7534637451172,
290     "y": 369.5867509841919,
291     "z": "f20d2d3a.d3597",
292     "wires": [
293       [
294         "4efba8ed.463c18"
295       ]
296     ]
297   },
298   {
299     "id": "4efba8ed.463c18",
300     "type": "outcomeTrue",
301     "name": "true",
302     "xml": "<outcome value='true'>\n",
303     "comments": "",
304     "outputs": 1,
305     "x": 1847.253517150879,
306     "y": 372.5867509841919,
307     "z": "f20d2d3a.d3597",
308     "wires": [
309       [
310         "ae933ccf.17812"
311       ]
312     ]
313   },
314   {
315     "id": "1bcea5bb.85368a",
316     "type": "set",
317     "name": "set tmp.vidx and ctx.vnf-data",
318     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
319     "comments": "",
320     "x": 2264.253730773926,
321     "y": 451.58680295944214,
322     "z": "f20d2d3a.d3597",
323     "wires": []
324   },
325   {
326     "id": "3be2d098.9a5d7",
327     "type": "returnFailure",
328     "name": "return failure",
329     "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",
330     "comments": "",
331     "x": 1659.7534561157227,
332     "y": 433.58675479888916,
333     "z": "f20d2d3a.d3597",
334     "wires": []
335   },
336   {
337     "id": "5d6c7481.ef0eac",
338     "type": "outcome",
339     "name": "NULL",
340     "xml": "<outcome value=''>\n",
341     "comments": "",
342     "outputs": 1,
343     "x": 1522.2534561157227,
344     "y": 433.58675479888916,
345     "z": "f20d2d3a.d3597",
346     "wires": [
347       [
348         "3be2d098.9a5d7"
349       ]
350     ]
351   },
352   {
353     "id": "750850d5.2167c",
354     "type": "set",
355     "name": "set vnfId and vnf-object-path",
356     "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/'` \" />",
357     "comments": "",
358     "x": 705.2699813842773,
359     "y": 630.1034965515137,
360     "z": "f20d2d3a.d3597",
361     "wires": []
362   },
363   {
364     "id": "3731bfbc.74cda",
365     "type": "returnSuccess",
366     "name": "return success",
367     "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",
368     "comments": "",
369     "x": 654.3811416625977,
370     "y": 755.6589269638062,
371     "z": "f20d2d3a.d3597",
372     "wires": []
373   },
374   {
375     "id": "e3e2bc88.e9b0d",
376     "type": "set",
377     "name": "set new vnf length",
378     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
379     "comments": "",
380     "x": 685.9025650024414,
381     "y": 527.5743541717529,
382     "z": "f20d2d3a.d3597",
383     "wires": []
384   },
385   {
386     "id": "6dbec876.fc0328",
387     "type": "set",
388     "name": "Remove vnf from ServiceData",
389     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.vidx].\" value=\"\"/>\n\n",
390     "comments": "",
391     "x": 721.5267562866211,
392     "y": 571.5423212051392,
393     "z": "f20d2d3a.d3597",
394     "wires": []
395   },
396   {
397     "id": "9d8ec192.cf786",
398     "type": "block",
399     "name": "block : atomic",
400     "xml": "<block atomic=\"true\">",
401     "atomic": "true",
402     "outputs": 1,
403     "x": 1215.5599174499512,
404     "y": 468.91199111938477,
405     "z": "f20d2d3a.d3597",
406     "wires": [
407       []
408     ]
409   },
410   {
411     "id": "f275038d.034f",
412     "type": "method",
413     "name": "method sdwan-vnf-topology-operation-device-delete",
414     "xml": "<method rpc='sdwan-vnf-topology-operation-device-delete' mode='sync'>\n",
415     "comments": "",
416     "outputs": 1,
417     "x": 299.4677963256836,
418     "y": 301.03125,
419     "z": "f20d2d3a.d3597",
420     "wires": [
421       [
422         "47c2021d.e2c7fc"
423       ]
424     ]
425   },
426   {
427     "id": "6f81e67.c77e818",
428     "type": "execute",
429     "name": "execute requiredParameters",
430     "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",
431     "comments": "",
432     "outputs": 1,
433     "x": 750.7536239624023,
434     "y": 275.58684253692627,
435     "z": "f20d2d3a.d3597",
436     "wires": [
437       []
438     ]
439   },
440   {
441     "id": "9d539b15.274ee8",
442     "type": "delete",
443     "name": "delete wan port instance configuration in AAI",
444     "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='device' \n        key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n",
445     "comments": "",
446     "outputs": 1,
447     "x": 1058.4678955078125,
448     "y": 693.0313606262207,
449     "z": "f20d2d3a.d3597",
450     "wires": [
451       []
452     ]
453   },
454   {
455     "id": "7e832033.e29c9",
456     "type": "record",
457     "name": "record",
458     "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.vidx1234555\"/>\n<parameter name=\"field3\" value='`$tmp.vidx`'/>\n",
459     "comments": "",
460     "outputs": 1,
461     "x": 1403.4679336547852,
462     "y": 488.0312623977661,
463     "z": "f20d2d3a.d3597",
464     "wires": [
465       []
466     ]
467   },
468   {
469     "id": "baf87e05.49718",
470     "type": "call",
471     "name": "call sdwan-get-device-param",
472     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
473     "comments": "",
474     "outputs": 1,
475     "x": 2256.0313110351562,
476     "y": 396.0312566757202,
477     "z": "f20d2d3a.d3597",
478     "wires": [
479       []
480     ]
481   },
482   {
483     "id": "657365d9.06388c",
484     "type": "set",
485     "name": "set vnf-request-input.",
486     "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
487     "comments": "",
488     "x": 2251.3908615112305,
489     "y": 333.5817861557007,
490     "z": "f20d2d3a.d3597",
491     "wires": []
492   },
493   {
494     "id": "2c001ef8.5cd552",
495     "type": "set",
496     "name": "set tmp.vidx and ctx.vnf-data",
497     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
498     "comments": "",
499     "x": 2278.9445724487305,
500     "y": 286.92415046691895,
501     "z": "f20d2d3a.d3597",
502     "wires": []
503   },
504   {
505     "id": "ae933ccf.17812",
506     "type": "block",
507     "name": "block : atomic",
508     "xml": "<block atomic=\"true\">",
509     "atomic": "true",
510     "outputs": 1,
511     "x": 2017.0311279296875,
512     "y": 374.03125,
513     "z": "f20d2d3a.d3597",
514     "wires": [
515       [
516         "1bcea5bb.85368a",
517         "baf87e05.49718",
518         "657365d9.06388c",
519         "2c001ef8.5cd552"
520       ]
521     ]
522   },
523   {
524     "id": "3b4d6073.21879",
525     "type": "switchNode",
526     "name": "switch prop.device.sdncCreate",
527     "xml": "<switch test=\"`$prop.device.sdncCreate`\">\n",
528     "comments": "",
529     "outputs": 1,
530     "x": 649.0314254760742,
531     "y": 691.0313444137573,
532     "z": "f20d2d3a.d3597",
533     "wires": [
534       [
535         "749e7d0b.8542b4"
536       ]
537     ]
538   },
539   {
540     "id": "749e7d0b.8542b4",
541     "type": "outcomeTrue",
542     "name": "true",
543     "xml": "<outcome value='true'>\n",
544     "comments": "",
545     "outputs": 1,
546     "x": 803.0312919616699,
547     "y": 692.031268119812,
548     "z": "f20d2d3a.d3597",
549     "wires": [
550       [
551         "9d539b15.274ee8"
552       ]
553     ]
554   }
555 ]