SDWAN flow based end-end test and issue fix
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-delete.json
1 [
2   {
3     "id": "9ff5a59d.ba1e08",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 90.00390625,
8     "y": 49.999999046325684,
9     "z": "3cf3c3f6.8ecf4c",
10     "wires": [
11       [
12         "2a13d7f0.0d4348"
13       ]
14     ]
15   },
16   {
17     "id": "2a13d7f0.0d4348",
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": 302.00391006469727,
26     "y": 122.00001621246338,
27     "z": "3cf3c3f6.8ecf4c",
28     "wires": [
29       [
30         "a747a1bc.5a7f6"
31       ]
32     ]
33   },
34   {
35     "id": "a747a1bc.5a7f6",
36     "type": "method",
37     "name": "sdwan-attachment-topology-operation-delete",
38     "xml": "<method rpc='sdwan-attachment-topology-operation-delete' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 290.0040283203125,
42     "y": 209.99999904632568,
43     "z": "3cf3c3f6.8ecf4c",
44     "wires": [
45       [
46         "c8f19e0f.8c32c"
47       ]
48     ]
49   },
50   {
51     "id": "c8f19e0f.8c32c",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 306.0040283203125,
59     "y": 765.0002436637878,
60     "z": "3cf3c3f6.8ecf4c",
61     "wires": [
62       [
63         "ac139f07.afe46",
64         "d564f17f.3cd7c",
65         "b24304d4.852188",
66         "81139b91.d72eb8",
67         "da5a8374.7ecac",
68         "72df0cf3.25ba74",
69         "b5ddcb9b.3d0b08",
70         "7e7d6803.801908",
71         "97410a5a.3537b8",
72         "d656e279.64fe3",
73         "be0fff75.07c73",
74         "38ea07fe.9ae708",
75         "9639b1d0.6aa4d",
76         "5ded2c1d.2cf294"
77       ]
78     ]
79   },
80   {
81     "id": "ac139f07.afe46",
82     "type": "set",
83     "name": "set tmp.ar.allotted-resource-id,etc",
84     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n",
85     "comments": "",
86     "x": 702.9974670410156,
87     "y": 163.9934859275818,
88     "z": "3cf3c3f6.8ecf4c",
89     "wires": []
90   },
91   {
92     "id": "c1a22f40.b7f8d",
93     "type": "comment",
94     "name": "set tmp ar-id to fetch resource from MDSAL",
95     "info": "",
96     "comments": "",
97     "x": 731.9577789306641,
98     "y": 128.02528190612793,
99     "z": "3cf3c3f6.8ecf4c",
100     "wires": []
101   },
102   {
103     "id": "d564f17f.3cd7c",
104     "type": "set",
105     "name": "set tmp.ar.self-link",
106     "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
107     "comments": "",
108     "x": 656.9974060058594,
109     "y": 256.9934911727905,
110     "z": "3cf3c3f6.8ecf4c",
111     "wires": []
112   },
113   {
114     "id": "da5a8374.7ecac",
115     "type": "execute",
116     "name": "execute Properties",
117     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 663.2592964172363,
121     "y": 344.6602201461792,
122     "z": "3cf3c3f6.8ecf4c",
123     "wires": [
124       []
125     ]
126   },
127   {
128     "id": "b24304d4.852188",
129     "type": "execute",
130     "name": "generate allotted-resource url",
131     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
132     "comments": "",
133     "outputs": 1,
134     "x": 695.2593231201172,
135     "y": 432.66020154953003,
136     "z": "3cf3c3f6.8ecf4c",
137     "wires": [
138       []
139     ]
140   },
141   {
142     "id": "595e5ef1.fa051",
143     "type": "comment",
144     "name": "Used for setting output to API Handler",
145     "info": "",
146     "comments": "",
147     "x": 710.9974365234375,
148     "y": 223.9935007095337,
149     "z": "3cf3c3f6.8ecf4c",
150     "wires": []
151   },
152   {
153     "id": "6c854173.f4bc7",
154     "type": "comment",
155     "name": "Obtain different URL, template location etc",
156     "info": "For saving resource information to MDSAL & for AAI",
157     "comments": "",
158     "x": 728.9974021911621,
159     "y": 309.882381439209,
160     "z": "3cf3c3f6.8ecf4c",
161     "wires": []
162   },
163   {
164     "id": "e788822e.3722e",
165     "type": "comment",
166     "name": "Used to Get AR by id to MDSAL, same as self-link",
167     "info": "",
168     "comments": "",
169     "x": 754.9974212646484,
170     "y": 396.8823404312134,
171     "z": "3cf3c3f6.8ecf4c",
172     "wires": []
173   },
174   {
175     "id": "dff7fd40.e0f0c",
176     "type": "comment",
177     "name": "GET parent-service-data from mdsal to check existence of other End point",
178     "info": "",
179     "comments": "",
180     "x": 822.0042343139648,
181     "y": 851.5316219329834,
182     "z": "3cf3c3f6.8ecf4c",
183     "wires": []
184   },
185   {
186     "id": "5cba16bf.c97498",
187     "type": "for",
188     "name": "for pidx..mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[]",
189     "xml": "<for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' >\n",
190     "comments": "",
191     "outputs": 1,
192     "x": 1650.1888427734375,
193     "y": 1085.0042576789856,
194     "z": "3cf3c3f6.8ecf4c",
195     "wires": [
196       [
197         "72856d05.385d64"
198       ]
199     ]
200   },
201   {
202     "id": "81139b91.d72eb8",
203     "type": "switchNode",
204     "name": "switch mdsal-psd.service-data.provided-allotted-resources_length",
205     "xml": "<switch test='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
206     "comments": "",
207     "outputs": 1,
208     "x": 801.1882019042969,
209     "y": 1091.7180404663086,
210     "z": "3cf3c3f6.8ecf4c",
211     "wires": [
212       [
213         "e3d57198.c43ea",
214         "2011daa6.6398e6"
215       ]
216     ]
217   },
218   {
219     "id": "73a8d368.4b79bc",
220     "type": "block",
221     "name": "block : atomic",
222     "xml": "<block atomic=\"true\">",
223     "atomic": "true",
224     "outputs": 1,
225     "x": 1251.4583644866943,
226     "y": 1131.7015261650085,
227     "z": "3cf3c3f6.8ecf4c",
228     "wires": [
229       [
230         "5cba16bf.c97498",
231         "4ca0ceba.893a2"
232       ]
233     ]
234   },
235   {
236     "id": "72856d05.385d64",
237     "type": "switchNode",
238     "name": "switch allotted-resource-id",
239     "xml": "<switch test=\"`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
240     "comments": "",
241     "outputs": 1,
242     "x": 2100.300048828125,
243     "y": 1083.0041155815125,
244     "z": "3cf3c3f6.8ecf4c",
245     "wires": [
246       [
247         "f2234386.9854c"
248       ]
249     ]
250   },
251   {
252     "id": "72df0cf3.25ba74",
253     "type": "set",
254     "name": "set tmp.ar.parent-service-instance-id",
255     "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
256     "comments": "",
257     "x": 712.9726181030273,
258     "y": 887.0000667572021,
259     "z": "3cf3c3f6.8ecf4c",
260     "wires": []
261   },
262   {
263     "id": "32223174.f7450e",
264     "type": "success",
265     "name": "success",
266     "xml": "<outcome value='success'>\n",
267     "comments": "",
268     "outputs": 1,
269     "x": 1092.972900390625,
270     "y": 965.0001816749573,
271     "z": "3cf3c3f6.8ecf4c",
272     "wires": [
273       [
274         "c45c28d6.ff3cc8"
275       ]
276     ]
277   },
278   {
279     "id": "e0a303bb.2dc06",
280     "type": "other",
281     "name": "other",
282     "xml": "<outcome value='Other'>\n",
283     "comments": "",
284     "outputs": 1,
285     "x": 1084.8247032165527,
286     "y": 1000.0662665367126,
287     "z": "3cf3c3f6.8ecf4c",
288     "wires": [
289       [
290         "3e0bcadf.484fe6"
291       ]
292     ]
293   },
294   {
295     "id": "3e0bcadf.484fe6",
296     "type": "returnFailure",
297     "name": "return failure",
298     "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=\"Error: SOTN resource not found\" />\n    \n",
299     "comments": "",
300     "x": 1259.973388671875,
301     "y": 996.333616733551,
302     "z": "3cf3c3f6.8ecf4c",
303     "wires": []
304   },
305   {
306     "id": "c45c28d6.ff3cc8",
307     "type": "block",
308     "name": "block",
309     "xml": "<block>\n",
310     "atomic": "false",
311     "comments": "",
312     "outputs": 1,
313     "x": 1243.972900390625,
314     "y": 963.0001816749573,
315     "z": "3cf3c3f6.8ecf4c",
316     "wires": [
317       []
318     ]
319   },
320   {
321     "id": "ebfdd448.549cc8",
322     "type": "failure",
323     "name": "failure",
324     "xml": "<outcome value='failure'>\n",
325     "comments": "",
326     "outputs": 1,
327     "x": 946.7346687316895,
328     "y": 1280.9528144598007,
329     "z": "3cf3c3f6.8ecf4c",
330     "wires": [
331       [
332         "65c46af.7320594"
333       ]
334     ]
335   },
336   {
337     "id": "65c46af.7320594",
338     "type": "returnFailure",
339     "name": "return failure",
340     "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=\"AAI failed\" />\n",
341     "comments": "",
342     "x": 1113.2585487365723,
343     "y": 1292.5718854665756,
344     "z": "3cf3c3f6.8ecf4c",
345     "wires": []
346   },
347   {
348     "id": "4d049da0.ca99b4",
349     "type": "failure",
350     "name": "not-found",
351     "xml": "<outcome value='not-found'>\n",
352     "comments": "",
353     "outputs": 1,
354     "x": 953.8299560546875,
355     "y": 1313.7147821187973,
356     "z": "3cf3c3f6.8ecf4c",
357     "wires": [
358       [
359         "65c46af.7320594"
360       ]
361     ]
362   },
363   {
364     "id": "36f9e028.ff6b9",
365     "type": "comment",
366     "name": "TODO: Rework after confirmation from AAI",
367     "info": "",
368     "comments": "",
369     "x": 1078.1413345336914,
370     "y": 1231.8732142448425,
371     "z": "3cf3c3f6.8ecf4c",
372     "wires": []
373   },
374   {
375     "id": "b5ddcb9b.3d0b08",
376     "type": "set",
377     "name": "set output to api handler",
378     "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
379     "comments": "",
380     "x": 679.5500564575195,
381     "y": 1244.8276815414429,
382     "z": "3cf3c3f6.8ecf4c",
383     "wires": []
384   },
385   {
386     "id": "7e7d6803.801908",
387     "type": "returnSuccess",
388     "name": "return success",
389     "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",
390     "comments": "",
391     "x": 648.9631729125977,
392     "y": 1351.443561553955,
393     "z": "3cf3c3f6.8ecf4c",
394     "wires": []
395   },
396   {
397     "id": "97410a5a.3537b8",
398     "type": "execute",
399     "name": "execute RestApiCallNode - PUT AR by id",
400     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='Delete' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",
401     "comments": "",
402     "outputs": 1,
403     "x": 728.6705703735352,
404     "y": 521.3333616256714,
405     "z": "3cf3c3f6.8ecf4c",
406     "wires": [
407       [
408         "1994f5fd.2a6f4a",
409         "da3ffcab.ea62a",
410         "e404bf43.f1066"
411       ]
412     ]
413   },
414   {
415     "id": "1994f5fd.2a6f4a",
416     "type": "not-found",
417     "name": "not-found",
418     "xml": "<outcome value='not-found'>\n",
419     "comments": "",
420     "outputs": 1,
421     "x": 968.3120727539062,
422     "y": 561.6649098396301,
423     "z": "3cf3c3f6.8ecf4c",
424     "wires": [
425       [
426         "e45dc5dc.4ac748"
427       ]
428     ]
429   },
430   {
431     "id": "da3ffcab.ea62a",
432     "type": "failure",
433     "name": "failure",
434     "xml": "<outcome value='failure'>\n",
435     "comments": "",
436     "outputs": 1,
437     "x": 965.3120727539062,
438     "y": 518.1649074554443,
439     "z": "3cf3c3f6.8ecf4c",
440     "wires": [
441       [
442         "e45dc5dc.4ac748"
443       ]
444     ]
445   },
446   {
447     "id": "e404bf43.f1066",
448     "type": "success",
449     "name": "success",
450     "xml": "<outcome value='success'>\n",
451     "comments": "",
452     "outputs": 1,
453     "x": 972.0621528625488,
454     "y": 477.52200269699097,
455     "z": "3cf3c3f6.8ecf4c",
456     "wires": [
457       [
458         "6706c73a.4ce818"
459       ]
460     ]
461   },
462   {
463     "id": "e45dc5dc.4ac748",
464     "type": "returnFailure",
465     "name": "return failure",
466     "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
467     "comments": "",
468     "x": 1124.062240600586,
469     "y": 539.9149079322815,
470     "z": "3cf3c3f6.8ecf4c",
471     "wires": []
472   },
473   {
474     "id": "6706c73a.4ce818",
475     "type": "block",
476     "name": "block",
477     "xml": "<block>\n",
478     "atomic": "false",
479     "comments": "",
480     "outputs": 1,
481     "x": 1109.7180843353271,
482     "y": 477.7141823768616,
483     "z": "3cf3c3f6.8ecf4c",
484     "wires": [
485       []
486     ]
487   },
488   {
489     "id": "61ea2842.341858",
490     "type": "comment",
491     "name": "Delete Allotted Resource",
492     "info": "",
493     "comments": "",
494     "x": 676.0039520263672,
495     "y": 490.0000276565552,
496     "z": "3cf3c3f6.8ecf4c",
497     "wires": []
498   },
499   {
500     "id": "6dbcd93.5772b28",
501     "type": "for",
502     "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
503     "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
504     "comments": "",
505     "outputs": 1,
506     "x": 1626.0078125,
507     "y": 727.0039052963257,
508     "z": "3cf3c3f6.8ecf4c",
509     "wires": [
510       [
511         "8604274a.795a98"
512       ]
513     ]
514   },
515   {
516     "id": "d656e279.64fe3",
517     "type": "switchNode",
518     "name": "switch service-data.consumed-allotted-resources_length",
519     "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
520     "comments": "",
521     "outputs": 1,
522     "x": 779.0071983337402,
523     "y": 687.7179067134857,
524     "z": "3cf3c3f6.8ecf4c",
525     "wires": [
526       [
527         "e4f37d32.adb08",
528         "b232603b.f0d15"
529       ]
530     ]
531   },
532   {
533     "id": "e4f37d32.adb08",
534     "type": "other",
535     "name": "outcome Null",
536     "xml": "<outcome value=''>\n",
537     "comments": "",
538     "outputs": 1,
539     "x": 1103.1500625610352,
540     "y": 670.5753412246704,
541     "z": "3cf3c3f6.8ecf4c",
542     "wires": [
543       [
544         "157affe5.dc6c6"
545       ]
546     ]
547   },
548   {
549     "id": "b232603b.f0d15",
550     "type": "other",
551     "name": "other",
552     "xml": "<outcome value='Other'>\n",
553     "comments": "",
554     "outputs": 1,
555     "x": 1089.1500854492188,
556     "y": 733.5753300189972,
557     "z": "3cf3c3f6.8ecf4c",
558     "wires": [
559       [
560         "a3ecd1d6.43a2e"
561       ]
562     ]
563   },
564   {
565     "id": "a3ecd1d6.43a2e",
566     "type": "block",
567     "name": "block : atomic",
568     "xml": "<block atomic=\"true\">",
569     "atomic": "true",
570     "outputs": 1,
571     "x": 1249.2771759033203,
572     "y": 731.7013065814972,
573     "z": "3cf3c3f6.8ecf4c",
574     "wires": [
575       [
576         "6dbcd93.5772b28",
577         "9971417.dd05cc"
578       ]
579     ]
580   },
581   {
582     "id": "be0fff75.07c73",
583     "type": "set",
584     "name": "set consumed allotted resources for deletion",
585     "xml": "<set>\n<parameter name=\"service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].\" value=\"\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length - 1`' />\n\n",
586     "comments": "",
587     "x": 735.8645324707031,
588     "y": 758.2895498275757,
589     "z": "3cf3c3f6.8ecf4c",
590     "wires": []
591   },
592   {
593     "id": "8604274a.795a98",
594     "type": "switchNode",
595     "name": "switch allotted-resource-id",
596     "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
597     "comments": "",
598     "outputs": 1,
599     "x": 2064.1194229125977,
600     "y": 723.0040273666382,
601     "z": "3cf3c3f6.8ecf4c",
602     "wires": [
603       [
604         "3ce4b91e.bc1ea6"
605       ]
606     ]
607   },
608   {
609     "id": "3ce4b91e.bc1ea6",
610     "type": "outcomeTrue",
611     "name": "true",
612     "xml": "<outcome value='true'>\n",
613     "comments": "",
614     "outputs": 1,
615     "x": 2259.929244995117,
616     "y": 722.4683518409729,
617     "z": "3cf3c3f6.8ecf4c",
618     "wires": [
619       [
620         "bfbb9b9d.413298"
621       ]
622     ]
623   },
624   {
625     "id": "5d4138bb.2e6948",
626     "type": "set",
627     "name": "set tmp.cidx",
628     "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
629     "comments": "",
630     "x": 2575.2657775878906,
631     "y": 723.2246098518372,
632     "z": "3cf3c3f6.8ecf4c",
633     "wires": []
634   },
635   {
636     "id": "80fa82c1.032f3",
637     "type": "comment",
638     "name": "Delete consumed service consumed-allotted-resources in mdsal",
639     "info": "",
640     "comments": "",
641     "x": 790.0084686279297,
642     "y": 620.003871455905,
643     "z": "3cf3c3f6.8ecf4c",
644     "wires": []
645   },
646   {
647     "id": "b69750ea.d13e7",
648     "type": "comment",
649     "name": "This set resource will be deleted in MDSAL by provider code",
650     "info": "",
651     "comments": "",
652     "x": 780.341251373291,
653     "y": 724.7819633483887,
654     "z": "3cf3c3f6.8ecf4c",
655     "wires": []
656   },
657   {
658     "id": "24feb42b.2816cc",
659     "type": "comment",
660     "name": "Obtain the index of conusumed AR",
661     "info": "",
662     "comments": "",
663     "x": 702.7856597900391,
664     "y": 651.8927316665649,
665     "z": "3cf3c3f6.8ecf4c",
666     "wires": []
667   },
668   {
669     "id": "157affe5.dc6c6",
670     "type": "returnFailure",
671     "name": "return failure",
672     "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=\"Resource to be deleted doesn't exist in MDSAL.\" />\n",
673     "comments": "",
674     "x": 1265.0078125,
675     "y": 671.0039052963257,
676     "z": "3cf3c3f6.8ecf4c",
677     "wires": []
678   },
679   {
680     "id": "bfbb9b9d.413298",
681     "type": "block",
682     "name": "block : atomic",
683     "xml": "<block atomic=\"true\">",
684     "atomic": "true",
685     "outputs": 1,
686     "x": 2409.007843017578,
687     "y": 723.2539548873901,
688     "z": "3cf3c3f6.8ecf4c",
689     "wires": [
690       [
691         "5d4138bb.2e6948"
692       ]
693     ]
694   },
695   {
696     "id": "f597fe60.1abe5",
697     "type": "returnFailure",
698     "name": "return failure",
699     "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=\"resource to be deleted is not available in mdsal\" />\n",
700     "comments": "",
701     "x": 1719.2578125,
702     "y": 780.2539052963257,
703     "z": "3cf3c3f6.8ecf4c",
704     "wires": []
705   },
706   {
707     "id": "15fa064d.455b2a",
708     "type": "outcome",
709     "name": "NULL",
710     "xml": "<outcome value=''>\n",
711     "comments": "",
712     "outputs": 1,
713     "x": 1581.7578125,
714     "y": 780.2539052963257,
715     "z": "3cf3c3f6.8ecf4c",
716     "wires": [
717       [
718         "f597fe60.1abe5"
719       ]
720     ]
721   },
722   {
723     "id": "9971417.dd05cc",
724     "type": "switchNode",
725     "name": "switch tmp.cidx ",
726     "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
727     "comments": "",
728     "outputs": 1,
729     "x": 1427.7578125,
730     "y": 780.2539052963257,
731     "z": "3cf3c3f6.8ecf4c",
732     "wires": [
733       [
734         "15fa064d.455b2a"
735       ]
736     ]
737   },
738   {
739     "id": "78b32310.b31e1c",
740     "type": "comment",
741     "name": "Delete provided service provided-allotted-resources in mdsal",
742     "info": "",
743     "comments": "",
744     "x": 776.5078277587891,
745     "y": 816.0039052963257,
746     "z": "3cf3c3f6.8ecf4c",
747     "wires": []
748   },
749   {
750     "id": "2011daa6.6398e6",
751     "type": "other",
752     "name": "other",
753     "xml": "<outcome value='Other'>\n",
754     "comments": "",
755     "outputs": 1,
756     "x": 1104.5080833435059,
757     "y": 1130.7540974617004,
758     "z": "3cf3c3f6.8ecf4c",
759     "wires": [
760       [
761         "73a8d368.4b79bc"
762       ]
763     ]
764   },
765   {
766     "id": "e3d57198.c43ea",
767     "type": "other",
768     "name": "outcome Null",
769     "xml": "<outcome value=''>\n",
770     "comments": "",
771     "outputs": 1,
772     "x": 1121.5080032348633,
773     "y": 1042.7539315223694,
774     "z": "3cf3c3f6.8ecf4c",
775     "wires": [
776       [
777         "e0cbd03d.fef77"
778       ]
779     ]
780   },
781   {
782     "id": "e0cbd03d.fef77",
783     "type": "returnFailure",
784     "name": "return failure",
785     "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=\"Resource to be deleted doesn't exist in MDSAL.\" />\n",
786     "comments": "",
787     "x": 1285.3656005859375,
788     "y": 1043.1824765205383,
789     "z": "3cf3c3f6.8ecf4c",
790     "wires": []
791   },
792   {
793     "id": "8152d4f5.017ee8",
794     "type": "returnFailure",
795     "name": "return failure",
796     "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=\"resource to be deleted is not available in mdsal\" />\n",
797     "comments": "",
798     "x": 1716.7578563690186,
799     "y": 1160.7539353370667,
800     "z": "3cf3c3f6.8ecf4c",
801     "wires": []
802   },
803   {
804     "id": "9af42612.9cc9e8",
805     "type": "outcome",
806     "name": "NULL",
807     "xml": "<outcome value=''>\n",
808     "comments": "",
809     "outputs": 1,
810     "x": 1579.2578563690186,
811     "y": 1160.7539353370667,
812     "z": "3cf3c3f6.8ecf4c",
813     "wires": [
814       [
815         "8152d4f5.017ee8"
816       ]
817     ]
818   },
819   {
820     "id": "4ca0ceba.893a2",
821     "type": "switchNode",
822     "name": "switch tmp.pidx ",
823     "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
824     "comments": "",
825     "outputs": 1,
826     "x": 1425.2578563690186,
827     "y": 1160.7539353370667,
828     "z": "3cf3c3f6.8ecf4c",
829     "wires": [
830       [
831         "9af42612.9cc9e8"
832       ]
833     ]
834   },
835   {
836     "id": "f2234386.9854c",
837     "type": "outcomeTrue",
838     "name": "true",
839     "xml": "<outcome value='true'>\n",
840     "comments": "",
841     "outputs": 1,
842     "x": 2289.508274078369,
843     "y": 1080.7540936470032,
844     "z": "3cf3c3f6.8ecf4c",
845     "wires": [
846       [
847         "8c3b4c6c.f6375"
848       ]
849     ]
850   },
851   {
852     "id": "51d5026c.5bd4fc",
853     "type": "set",
854     "name": "set tmp.pidx",
855     "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
856     "comments": "",
857     "x": 2357.8443908691406,
858     "y": 1215.510190486908,
859     "z": "3cf3c3f6.8ecf4c",
860     "wires": []
861   },
862   {
863     "id": "8c3b4c6c.f6375",
864     "type": "block",
865     "name": "block : atomic",
866     "xml": "<block atomic=\"true\">",
867     "atomic": "true",
868     "outputs": 1,
869     "x": 2349.586727142334,
870     "y": 1151.5395798683167,
871     "z": "3cf3c3f6.8ecf4c",
872     "wires": [
873       [
874         "51d5026c.5bd4fc"
875       ]
876     ]
877   },
878   {
879     "id": "38ea07fe.9ae708",
880     "type": "set",
881     "name": "set provided allotted resources for deletion",
882     "xml": "<set>\n<parameter name=\"service-data.provided-allotted-resources.consumed-allotted-resource[$pidx].\" value=\"\" />\n<parameter name=\"service-data.provided-allotted-resources.consumed-allotted-resource_length\" value='`$service-data.provided-allotted-resources.consumed-allotted-resource_length - 1`' />\n\n",
883     "comments": "",
884     "x": 735.0079040527344,
885     "y": 1146.003975868225,
886     "z": "3cf3c3f6.8ecf4c",
887     "wires": []
888   },
889   {
890     "id": "a01da430.f51578",
891     "type": "update",
892     "name": "update AAI allotted-resource",
893     "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='allotted-resource'  \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\">\n",
894     "comments": "",
895     "outputs": 1,
896     "x": 692.2266616821289,
897     "y": 1300.7543454170227,
898     "z": "3cf3c3f6.8ecf4c",
899     "wires": [
900       [
901         "ebfdd448.549cc8",
902         "4d049da0.ca99b4"
903       ]
904     ]
905   },
906   {
907     "id": "5ded2c1d.2cf294",
908     "type": "execute",
909     "name": "execute RestApiCallNode - get-resource parent service data",
910     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url-psd`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='GET' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-psd\" />\n\n",
911     "comments": "",
912     "outputs": 1,
913     "x": 782.3373260498047,
914     "y": 986.3333654403687,
915     "z": "3cf3c3f6.8ecf4c",
916     "wires": [
917       [
918         "32223174.f7450e",
919         "e0a303bb.2dc06"
920       ]
921     ]
922   },
923   {
924     "id": "9639b1d0.6aa4d",
925     "type": "execute",
926     "name": "get parent-service-data tmp.ar-url-psd",
927     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url-psd\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>",
928     "comments": "",
929     "outputs": 1,
930     "x": 716.3372650146484,
931     "y": 944.3332047462463,
932     "z": "3cf3c3f6.8ecf4c",
933     "wires": [
934       []
935     ]
936   }
937 ]