Add generic-resource-api DG seed code
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_service-topology-operation-delete.json
1 [
2     {
3         "id": "708d5adc.4b14a4",
4         "type": "switchNode",
5         "name": "switch request-action",
6         "xml": "<switch test='`$service-topology-operation-input.request-information.request-action`'>\n",
7         "comments": "",
8         "outputs": 1,
9         "x": 485.2381134033203,
10         "y": 314.761923789978,
11         "z": "2b8c09cd.8f7676",
12         "wires": [
13             [
14                 "24de1645.3af2ea",
15                 "d3cb3641.f27678"
16             ]
17         ]
18     },
19     {
20         "id": "24de1645.3af2ea",
21         "type": "outcome",
22         "name": "DeleteServiceInstance",
23         "xml": "<outcome value='DeleteServiceInstance'>\n",
24         "comments": "",
25         "outputs": 1,
26         "x": 722.3809280395508,
27         "y": 289.0476322174072,
28         "z": "2b8c09cd.8f7676",
29         "wires": [
30             [
31                 "e780c482.9646b8"
32             ]
33         ]
34     },
35     {
36         "id": "d3cb3641.f27678",
37         "type": "other",
38         "name": "other",
39         "xml": "<outcome value='Other'>\n",
40         "comments": "",
41         "outputs": 1,
42         "x": 672.3808937072754,
43         "y": 334.76196002960205,
44         "z": "2b8c09cd.8f7676",
45         "wires": [
46             [
47                 "18ac75d0.4e2baa"
48             ]
49         ]
50     },
51     {
52         "id": "e780c482.9646b8",
53         "type": "block",
54         "name": "block",
55         "xml": "<block>\n",
56         "atomic": "false",
57         "comments": "",
58         "outputs": 1,
59         "x": 900.9523849487305,
60         "y": 289.04766750335693,
61         "z": "2b8c09cd.8f7676",
62         "wires": [
63             []
64         ]
65     },
66     {
67         "id": "18ac75d0.4e2baa",
68         "type": "returnFailure",
69         "name": "return failure",
70         "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=\"If svc-action is 'delete' then request-action must be 'DeleteServiceInstance'\" />\n",
71         "comments": "",
72         "x": 918.0952301025391,
73         "y": 334.761923789978,
74         "z": "2b8c09cd.8f7676",
75         "wires": []
76     },
77     {
78         "id": "42440be9.04b654",
79         "type": "block",
80         "name": "block : atomic",
81         "xml": "<block atomic=\"true\">",
82         "atomic": "true",
83         "outputs": 1,
84         "x": 263.80948638916016,
85         "y": 431.90471744537354,
86         "z": "2b8c09cd.8f7676",
87         "wires": [
88             [
89                 "708d5adc.4b14a4",
90                 "c64008cb.372058",
91                 "8cbcdd86.4ea2d",
92                 "9c98677c.c76e58",
93                 "889c05be.733888",
94                 "9f043d1e.49bce",
95                 "d20eaf9b.6a16d",
96                 "c3e8266e.658778"
97             ]
98         ]
99     },
100     {
101         "id": "c64008cb.372058",
102         "type": "switchNode",
103         "name": "switch network_length",
104         "xml": "<switch test='`$service-data.networks.network_length`'>\n",
105         "comments": "",
106         "outputs": 1,
107         "x": 486.66666412353516,
108         "y": 504.7618865966797,
109         "z": "2b8c09cd.8f7676",
110         "wires": [
111             [
112                 "5e24f54a.aadfdc",
113                 "6b934fd0.898a2",
114                 "c530e391.01e37"
115             ]
116         ]
117     },
118     {
119         "id": "5e24f54a.aadfdc",
120         "type": "outcome",
121         "name": "0",
122         "xml": "<outcome value='0'>\n",
123         "comments": "",
124         "outputs": 1,
125         "x": 670.9523239135742,
126         "y": 463.3332452774048,
127         "z": "2b8c09cd.8f7676",
128         "wires": [
129             [
130                 "fa7e1e62.08a81"
131             ]
132         ]
133     },
134     {
135         "id": "6b934fd0.898a2",
136         "type": "outcome",
137         "name": "NULL",
138         "xml": "<outcome value=''>",
139         "comments": "",
140         "outputs": 1,
141         "x": 669.5237350463867,
142         "y": 504.76190280914307,
143         "z": "2b8c09cd.8f7676",
144         "wires": [
145             [
146                 "fa7e1e62.08a81"
147             ]
148         ]
149     },
150     {
151         "id": "fa7e1e62.08a81",
152         "type": "block",
153         "name": "block",
154         "xml": "<block>\n",
155         "atomic": "false",
156         "comments": "",
157         "outputs": 1,
158         "x": 818.0952491760254,
159         "y": 484.7619037628174,
160         "z": "2b8c09cd.8f7676",
161         "wires": [
162             []
163         ]
164     },
165     {
166         "id": "c530e391.01e37",
167         "type": "other",
168         "name": "other",
169         "xml": "<outcome value='Other'>\n",
170         "comments": "",
171         "outputs": 1,
172         "x": 669.5237846374512,
173         "y": 546.1904907226562,
174         "z": "2b8c09cd.8f7676",
175         "wires": [
176             [
177                 "983f9e5e.6f1e4"
178             ]
179         ]
180     },
181     {
182         "id": "983f9e5e.6f1e4",
183         "type": "returnFailure",
184         "name": "return failure",
185         "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 service because there are networks defined\" />\n",
186         "comments": "",
187         "x": 836.6666793823242,
188         "y": 544.7618789672852,
189         "z": "2b8c09cd.8f7676",
190         "wires": []
191     },
192     {
193         "id": "8cbcdd86.4ea2d",
194         "type": "switchNode",
195         "name": "switch vnf_length",
196         "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
197         "comments": "",
198         "outputs": 1,
199         "x": 475.2381057739258,
200         "y": 631.904670715332,
201         "z": "2b8c09cd.8f7676",
202         "wires": [
203             [
204                 "1a015c38.b0cdd4",
205                 "3d0c23ae.7944fc",
206                 "42c177a7.fa5448"
207             ]
208         ]
209     },
210     {
211         "id": "1a015c38.b0cdd4",
212         "type": "outcome",
213         "name": "0",
214         "xml": "<outcome value='0'>\n",
215         "comments": "",
216         "outputs": 1,
217         "x": 668.0951614379883,
218         "y": 590.4760599136353,
219         "z": "2b8c09cd.8f7676",
220         "wires": [
221             [
222                 "b2b3efeb.d8fc2"
223             ]
224         ]
225     },
226     {
227         "id": "3d0c23ae.7944fc",
228         "type": "outcome",
229         "name": "NULL",
230         "xml": "<outcome value=''>",
231         "comments": "",
232         "outputs": 1,
233         "x": 666.6665725708008,
234         "y": 631.9047174453735,
235         "z": "2b8c09cd.8f7676",
236         "wires": [
237             [
238                 "b2b3efeb.d8fc2"
239             ]
240         ]
241     },
242     {
243         "id": "b2b3efeb.d8fc2",
244         "type": "block",
245         "name": "block",
246         "xml": "<block>\n",
247         "atomic": "false",
248         "comments": "",
249         "outputs": 1,
250         "x": 815.2380867004395,
251         "y": 611.9047183990479,
252         "z": "2b8c09cd.8f7676",
253         "wires": [
254             []
255         ]
256     },
257     {
258         "id": "42c177a7.fa5448",
259         "type": "other",
260         "name": "other",
261         "xml": "<outcome value='Other'>\n",
262         "comments": "",
263         "outputs": 1,
264         "x": 666.6666221618652,
265         "y": 673.3333053588867,
266         "z": "2b8c09cd.8f7676",
267         "wires": [
268             [
269                 "9b2891f2.0e51b"
270             ]
271         ]
272     },
273     {
274         "id": "9b2891f2.0e51b",
275         "type": "returnFailure",
276         "name": "return failure",
277         "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 service because there are VNFs defined\" />\n",
278         "comments": "",
279         "x": 833.8095169067383,
280         "y": 671.9046936035156,
281         "z": "2b8c09cd.8f7676",
282         "wires": []
283     },
284     {
285         "id": "9c98677c.c76e58",
286         "type": "set",
287         "name": "clear service-data and service-status",
288         "xml": "<set>\n<parameter name='service-data.' value='' />\n<parameter name='service-status.' value='' />\n",
289         "comments": "",
290         "x": 538.0952453613281,
291         "y": 958.095130443573,
292         "z": "2b8c09cd.8f7676",
293         "wires": []
294     },
295     {
296         "id": "8ebb5ade.227d28",
297         "type": "dgstart",
298         "name": "DGSTART",
299         "outputs": 1,
300         "x": 113.33336639404297,
301         "y": 84.99999237060547,
302         "z": "2b8c09cd.8f7676",
303         "wires": [
304             [
305                 "c1ce781b.d50358"
306             ]
307         ]
308     },
309     {
310         "id": "c1ce781b.d50358",
311         "type": "service-logic",
312         "name": "GENERIC-RESOURCE-API ${project.version}",
313         "module": "GENERIC-RESOURCE-API",
314         "version": "${project.version}",
315         "comments": "",
316         "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}'>",
317         "outputs": 1,
318         "x": 188.61907196044922,
319         "y": 125.23810386657715,
320         "z": "2b8c09cd.8f7676",
321         "wires": [
322             [
323                 "25743b1c.a929d4"
324             ]
325         ]
326     },
327     {
328         "id": "25743b1c.a929d4",
329         "type": "method",
330         "name": "method service-topology-operation-delete",
331         "xml": "<method rpc='service-topology-operation-delete' mode='sync'>\n",
332         "comments": "",
333         "outputs": 1,
334         "x": 217.76199340820312,
335         "y": 164.99998664855957,
336         "z": "2b8c09cd.8f7676",
337         "wires": [
338             [
339                 "42440be9.04b654"
340             ]
341         ]
342     },
343     {
344         "id": "f1543edb.c8ae1",
345         "type": "comment",
346         "name": "service-topology-operation-delete",
347         "info": "",
348         "comments": "",
349         "x": 507.67822265625,
350         "y": 32.58633613586426,
351         "z": "2b8c09cd.8f7676",
352         "wires": []
353     },
354     {
355         "id": "889c05be.733888",
356         "type": "switchNode",
357         "name": "switch service-data.service-topology.service-topology-identifier.service-instance-id",
358         "xml": "<switch test='`$service-data.service-topology.service-topology-identifier.service-instance-id`'>\n",
359         "comments": "",
360         "outputs": 1,
361         "x": 677.1428756713867,
362         "y": 242.85715293884277,
363         "z": "2b8c09cd.8f7676",
364         "wires": [
365             [
366                 "1019f3dd.ec3c3c"
367             ]
368         ]
369     },
370     {
371         "id": "1019f3dd.ec3c3c",
372         "type": "outcome",
373         "name": "NULL",
374         "xml": "<outcome value=''>",
375         "comments": "",
376         "outputs": 1,
377         "x": 1048.5714950561523,
378         "y": 242.85716938972473,
379         "z": "2b8c09cd.8f7676",
380         "wires": [
381             [
382                 "a97d9d2d.ac5c1"
383             ]
384         ]
385     },
386     {
387         "id": "9f043d1e.49bce",
388         "type": "switchNode",
389         "name": "switch service-data.service-level-oper-status.order-status",
390         "xml": "<switch test='`$service-data.service-level-oper-status.order-status`'>\n",
391         "comments": "",
392         "outputs": 1,
393         "x": 597.1428680419922,
394         "y": 398.57144355773926,
395         "z": "2b8c09cd.8f7676",
396         "wires": [
397             [
398                 "d2aec0fb.6eb24",
399                 "d6b45bcb.26da28"
400             ]
401         ]
402     },
403     {
404         "id": "d2aec0fb.6eb24",
405         "type": "outcome",
406         "name": "PendingDelete",
407         "xml": "<outcome value='PendingDelete'>\n",
408         "comments": "",
409         "outputs": 1,
410         "x": 918.5714285714284,
411         "y": 382.85714285714283,
412         "z": "2b8c09cd.8f7676",
413         "wires": [
414             [
415                 "93e133c9.0b965"
416             ]
417         ]
418     },
419     {
420         "id": "d6b45bcb.26da28",
421         "type": "other",
422         "name": "other",
423         "xml": "<outcome value='Other'>\n",
424         "comments": "",
425         "outputs": 1,
426         "x": 892.8571357727051,
427         "y": 427.14287185668945,
428         "z": "2b8c09cd.8f7676",
429         "wires": [
430             [
431                 "929eab0f.dcf048"
432             ]
433         ]
434     },
435     {
436         "id": "929eab0f.dcf048",
437         "type": "returnFailure",
438         "name": "return failure",
439         "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=\"`'Order status is ' + $service-data.service-level-oper-status.order-status\n       + ' but must be PendingDelete'`\" />\n",
440         "comments": "",
441         "x": 1092.857177734375,
442         "y": 425.71429443359375,
443         "z": "2b8c09cd.8f7676",
444         "wires": []
445     },
446     {
447         "id": "93e133c9.0b965",
448         "type": "block",
449         "name": "block : atomic",
450         "xml": "<block atomic=\"true\">",
451         "atomic": "true",
452         "outputs": 1,
453         "x": 1095.71435546875,
454         "y": 381.4285888671875,
455         "z": "2b8c09cd.8f7676",
456         "wires": [
457             []
458         ]
459     },
460     {
461         "id": "d20eaf9b.6a16d",
462         "type": "switchNode",
463         "name": "switch provided-allotted-resource length",
464         "xml": "<switch test='`$service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
465         "comments": "",
466         "outputs": 1,
467         "x": 541.6666870117188,
468         "y": 758.3332624435425,
469         "z": "2b8c09cd.8f7676",
470         "wires": [
471             [
472                 "f2b5411.bb824c",
473                 "feaed589.3e9658",
474                 "55f0e2d1.bcd42c"
475             ]
476         ]
477     },
478     {
479         "id": "f2b5411.bb824c",
480         "type": "outcome",
481         "name": "NULL",
482         "xml": "<outcome value=''>",
483         "comments": "",
484         "outputs": 1,
485         "x": 783.333179473877,
486         "y": 758.3332424163818,
487         "z": "2b8c09cd.8f7676",
488         "wires": [
489             [
490                 "c7e318df.48c538"
491             ]
492         ]
493     },
494     {
495         "id": "feaed589.3e9658",
496         "type": "other",
497         "name": "other",
498         "xml": "<outcome value='Other'>\n",
499         "comments": "",
500         "outputs": 1,
501         "x": 783.3332023620605,
502         "y": 799.9999504089355,
503         "z": "2b8c09cd.8f7676",
504         "wires": [
505             [
506                 "b72c1478.7fe018"
507             ]
508         ]
509     },
510     {
511         "id": "b72c1478.7fe018",
512         "type": "returnFailure",
513         "name": "return failure",
514         "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 deactivate this service because there are provided allotted resources\" />\n",
515         "comments": "",
516         "x": 931.6666030883789,
517         "y": 799.999870300293,
518         "z": "2b8c09cd.8f7676",
519         "wires": []
520     },
521     {
522         "id": "c7e318df.48c538",
523         "type": "block",
524         "name": "block",
525         "xml": "<block>\n",
526         "atomic": "false",
527         "comments": "",
528         "outputs": 1,
529         "x": 913.3332061767578,
530         "y": 736.6666164398193,
531         "z": "2b8c09cd.8f7676",
532         "wires": [
533             []
534         ]
535     },
536     {
537         "id": "c3e8266e.658778",
538         "type": "switchNode",
539         "name": "switch consumed-allotted-resource length",
540         "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
541         "comments": "",
542         "outputs": 1,
543         "x": 546.6666564941406,
544         "y": 881.666600227356,
545         "z": "2b8c09cd.8f7676",
546         "wires": [
547             [
548                 "b525f07c.00458",
549                 "98609590.b62e08",
550                 "a7d2b5a5.d54a78"
551             ]
552         ]
553     },
554     {
555         "id": "b525f07c.00458",
556         "type": "outcome",
557         "name": "NULL",
558         "xml": "<outcome value=''>",
559         "comments": "",
560         "outputs": 1,
561         "x": 781.6664962768555,
562         "y": 881.666579246521,
563         "z": "2b8c09cd.8f7676",
564         "wires": [
565             [
566                 "138caece.68dc91"
567             ]
568         ]
569     },
570     {
571         "id": "98609590.b62e08",
572         "type": "other",
573         "name": "other",
574         "xml": "<outcome value='Other'>\n",
575         "comments": "",
576         "outputs": 1,
577         "x": 781.6665344238281,
578         "y": 921.6666011810303,
579         "z": "2b8c09cd.8f7676",
580         "wires": [
581             [
582                 "46ef5f07.ba5fb"
583             ]
584         ]
585     },
586     {
587         "id": "46ef5f07.ba5fb",
588         "type": "returnFailure",
589         "name": "return failure",
590         "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 deactivate this service because there are consumed allotted resources\" />\n",
591         "comments": "",
592         "x": 931.6665420532227,
593         "y": 923.3331871032715,
594         "z": "2b8c09cd.8f7676",
595         "wires": []
596     },
597     {
598         "id": "138caece.68dc91",
599         "type": "block",
600         "name": "block",
601         "xml": "<block>\n",
602         "atomic": "false",
603         "comments": "",
604         "outputs": 1,
605         "x": 909.9998321533203,
606         "y": 858.3332653045654,
607         "z": "2b8c09cd.8f7676",
608         "wires": [
609             []
610         ]
611     },
612     {
613         "id": "55f0e2d1.bcd42c",
614         "type": "outcome",
615         "name": "0",
616         "xml": "<outcome value='0'>\n",
617         "comments": "",
618         "outputs": 1,
619         "x": 784.9999389648438,
620         "y": 716.6666259765625,
621         "z": "2b8c09cd.8f7676",
622         "wires": [
623             [
624                 "c7e318df.48c538"
625             ]
626         ]
627     },
628     {
629         "id": "a7d2b5a5.d54a78",
630         "type": "outcome",
631         "name": "0",
632         "xml": "<outcome value='0'>\n",
633         "comments": "",
634         "outputs": 1,
635         "x": 783.3332405090332,
636         "y": 841.6666393280029,
637         "z": "2b8c09cd.8f7676",
638         "wires": [
639             [
640                 "138caece.68dc91"
641             ]
642         ]
643     },
644     {
645         "id": "a97d9d2d.ac5c1",
646         "type": "returnFailure",
647         "name": "return failure",
648         "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"`'Service ' + $service-topology-operation-input.service-information.service-instance-id + ' is not found'`\" />\n",
649         "comments": "",
650         "x": 1200.0000076293945,
651         "y": 243.33331489562988,
652         "z": "2b8c09cd.8f7676",
653         "wires": []
654     }
655 ]