49ba9cfebd7a7f6b3e3a8162d47bea04757d1726
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-delete.json
1 [
2   {
3     "id": "de2bb8e4.c4dbd8",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 89,
8     "y": 38,
9     "z": "5256b6fe.7fc0a8",
10     "wires": [
11       [
12         "4df3844d.66920c"
13       ]
14     ]
15   },
16   {
17     "id": "4df3844d.66920c",
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": 301.00000381469727,
26     "y": 110.0000171661377,
27     "z": "5256b6fe.7fc0a8",
28     "wires": [
29       [
30         "defa06c2.08a958"
31       ]
32     ]
33   },
34   {
35     "id": "defa06c2.08a958",
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": 289.0001220703125,
42     "y": 198,
43     "z": "5256b6fe.7fc0a8",
44     "wires": [
45       [
46         "6f0fe5c1.42509c"
47       ]
48     ]
49   },
50   {
51     "id": "6f0fe5c1.42509c",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 305.0001220703125,
59     "y": 753.0002446174622,
60     "z": "5256b6fe.7fc0a8",
61     "wires": [
62       [
63         "d4b618b3.e243f8",
64         "daa2fd1c.e15f9",
65         "98a0548f.d105b8",
66         "4086ba28.5e7fb4",
67         "3a054970.ddb4f6",
68         "6a9e6940.dc60c8",
69         "1dcc043a.41212c",
70         "cfbf99ba.e9ea08",
71         "a788afc2.3b764",
72         "9bec45ba.823fc8",
73         "295f039a.2c737c",
74         "2676412c.7c20ee",
75         "8b527b2a.81e648",
76         "e2838697.661268",
77         "d9f8d014.bcccd"
78       ]
79     ]
80   },
81   {
82     "id": "d4b618b3.e243f8",
83     "type": "set",
84     "name": "set tmp.ar.allotted-resource-id,etc",
85     "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",
86     "comments": "",
87     "x": 701.9935607910156,
88     "y": 151.9934868812561,
89     "z": "5256b6fe.7fc0a8",
90     "wires": []
91   },
92   {
93     "id": "2548027c.9fde3e",
94     "type": "comment",
95     "name": "set tmp ar-id to fetch resource from MDSAL",
96     "info": "",
97     "comments": "",
98     "x": 730.9538726806641,
99     "y": 116.02528285980225,
100     "z": "5256b6fe.7fc0a8",
101     "wires": []
102   },
103   {
104     "id": "daa2fd1c.e15f9",
105     "type": "set",
106     "name": "set tmp.ar.self-link",
107     "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",
108     "comments": "",
109     "x": 655.9934997558594,
110     "y": 244.99349212646484,
111     "z": "5256b6fe.7fc0a8",
112     "wires": []
113   },
114   {
115     "id": "3a054970.ddb4f6",
116     "type": "execute",
117     "name": "execute Properties",
118     "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",
119     "comments": "",
120     "outputs": 1,
121     "x": 662.2553901672363,
122     "y": 332.6602210998535,
123     "z": "5256b6fe.7fc0a8",
124     "wires": [
125       []
126     ]
127   },
128   {
129     "id": "98a0548f.d105b8",
130     "type": "execute",
131     "name": "generate allotted-resource url",
132     "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",
133     "comments": "",
134     "outputs": 1,
135     "x": 694.2554168701172,
136     "y": 420.66020250320435,
137     "z": "5256b6fe.7fc0a8",
138     "wires": [
139       []
140     ]
141   },
142   {
143     "id": "7276eff0.df0a8",
144     "type": "comment",
145     "name": "Used for setting output to API Handler",
146     "info": "",
147     "comments": "",
148     "x": 709.9935302734375,
149     "y": 211.993501663208,
150     "z": "5256b6fe.7fc0a8",
151     "wires": []
152   },
153   {
154     "id": "e3eaa523.b8fec8",
155     "type": "comment",
156     "name": "Obtain different URL, template location etc",
157     "info": "For saving resource information to MDSAL & for AAI",
158     "comments": "",
159     "x": 727.9934959411621,
160     "y": 297.8823823928833,
161     "z": "5256b6fe.7fc0a8",
162     "wires": []
163   },
164   {
165     "id": "94cc654b.383a58",
166     "type": "comment",
167     "name": "Used to Get AR by id to MDSAL, same as self-link",
168     "info": "",
169     "comments": "",
170     "x": 753.9935150146484,
171     "y": 384.8823413848877,
172     "z": "5256b6fe.7fc0a8",
173     "wires": []
174   },
175   {
176     "id": "860c0bbd.079788",
177     "type": "comment",
178     "name": "GET parent-service-data from mdsal to check existence of other End point",
179     "info": "",
180     "comments": "",
181     "x": 821.0003280639648,
182     "y": 839.5316228866577,
183     "z": "5256b6fe.7fc0a8",
184     "wires": []
185   },
186   {
187     "id": "1bc8c1a0.e4996e",
188     "type": "for",
189     "name": "for pidx..mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[]",
190     "xml": "<for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' >\n",
191     "comments": "",
192     "outputs": 1,
193     "x": 1649.1849365234375,
194     "y": 1073.00425863266,
195     "z": "5256b6fe.7fc0a8",
196     "wires": [
197       [
198         "389840a4.f6186"
199       ]
200     ]
201   },
202   {
203     "id": "4086ba28.5e7fb4",
204     "type": "switchNode",
205     "name": "switch mdsal-psd.service-data.provided-allotted-resources_length",
206     "xml": "<switch test='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
207     "comments": "",
208     "outputs": 1,
209     "x": 800.1842956542969,
210     "y": 1079.718041419983,
211     "z": "5256b6fe.7fc0a8",
212     "wires": [
213       [
214         "6019a57.13f705c",
215         "4a21aa00.3b1ac8"
216       ]
217     ]
218   },
219   {
220     "id": "30a78dd9.3c8b22",
221     "type": "block",
222     "name": "block : atomic",
223     "xml": "<block atomic=\"true\">",
224     "atomic": "true",
225     "outputs": 1,
226     "x": 1250.4544582366943,
227     "y": 1119.7015271186829,
228     "z": "5256b6fe.7fc0a8",
229     "wires": [
230       [
231         "1bc8c1a0.e4996e",
232         "e9fadefb.0c149"
233       ]
234     ]
235   },
236   {
237     "id": "389840a4.f6186",
238     "type": "switchNode",
239     "name": "switch allotted-resource-id",
240     "xml": "<switch test=\"`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
241     "comments": "",
242     "outputs": 1,
243     "x": 2099.296142578125,
244     "y": 1071.0041165351868,
245     "z": "5256b6fe.7fc0a8",
246     "wires": [
247       [
248         "87f0a9d.62cd658"
249       ]
250     ]
251   },
252   {
253     "id": "6a9e6940.dc60c8",
254     "type": "set",
255     "name": "set tmp.ar.parent-service-instance-id",
256     "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",
257     "comments": "",
258     "x": 711.9687118530273,
259     "y": 875.0000677108765,
260     "z": "5256b6fe.7fc0a8",
261     "wires": []
262   },
263   {
264     "id": "9c6dc3c.897554",
265     "type": "success",
266     "name": "success",
267     "xml": "<outcome value='success'>\n",
268     "comments": "",
269     "outputs": 1,
270     "x": 1091.968994140625,
271     "y": 953.0001826286316,
272     "z": "5256b6fe.7fc0a8",
273     "wires": [
274       [
275         "1e4f6a7c.485c96"
276       ]
277     ]
278   },
279   {
280     "id": "f96c62b7.b194",
281     "type": "other",
282     "name": "other",
283     "xml": "<outcome value='Other'>\n",
284     "comments": "",
285     "outputs": 1,
286     "x": 1083.8207969665527,
287     "y": 988.066267490387,
288     "z": "5256b6fe.7fc0a8",
289     "wires": [
290       [
291         "ecfe720a.b902e"
292       ]
293     ]
294   },
295   {
296     "id": "ecfe720a.b902e",
297     "type": "returnFailure",
298     "name": "return failure",
299     "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",
300     "comments": "",
301     "x": 1258.969482421875,
302     "y": 984.3336176872253,
303     "z": "5256b6fe.7fc0a8",
304     "wires": []
305   },
306   {
307     "id": "1e4f6a7c.485c96",
308     "type": "block",
309     "name": "block",
310     "xml": "<block>\n",
311     "atomic": "false",
312     "comments": "",
313     "outputs": 1,
314     "x": 1242.968994140625,
315     "y": 951.0001826286316,
316     "z": "5256b6fe.7fc0a8",
317     "wires": [
318       []
319     ]
320   },
321   {
322     "id": "5fa2362a.75f678",
323     "type": "failure",
324     "name": "failure",
325     "xml": "<outcome value='failure'>\n",
326     "comments": "",
327     "outputs": 1,
328     "x": 945.7307624816895,
329     "y": 1268.952815413475,
330     "z": "5256b6fe.7fc0a8",
331     "wires": [
332       [
333         "3cb41c0b.eae2b4"
334       ]
335     ]
336   },
337   {
338     "id": "3cb41c0b.eae2b4",
339     "type": "returnFailure",
340     "name": "return failure",
341     "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",
342     "comments": "",
343     "x": 1112.2546424865723,
344     "y": 1280.57188642025,
345     "z": "5256b6fe.7fc0a8",
346     "wires": []
347   },
348   {
349     "id": "144dae97.c82161",
350     "type": "failure",
351     "name": "not-found",
352     "xml": "<outcome value='not-found'>\n",
353     "comments": "",
354     "outputs": 1,
355     "x": 952.8260498046875,
356     "y": 1301.7147830724716,
357     "z": "5256b6fe.7fc0a8",
358     "wires": [
359       [
360         "3cb41c0b.eae2b4"
361       ]
362     ]
363   },
364   {
365     "id": "2d8a7679.e4417a",
366     "type": "comment",
367     "name": "TODO: Rework after confirmation from AAI",
368     "info": "",
369     "comments": "",
370     "x": 1077.1374282836914,
371     "y": 1219.8732151985168,
372     "z": "5256b6fe.7fc0a8",
373     "wires": []
374   },
375   {
376     "id": "1dcc043a.41212c",
377     "type": "set",
378     "name": "set output to api handler",
379     "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",
380     "comments": "",
381     "x": 678.5461502075195,
382     "y": 1232.8276824951172,
383     "z": "5256b6fe.7fc0a8",
384     "wires": []
385   },
386   {
387     "id": "cfbf99ba.e9ea08",
388     "type": "returnSuccess",
389     "name": "return success",
390     "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",
391     "comments": "",
392     "x": 647.9592666625977,
393     "y": 1339.4435625076294,
394     "z": "5256b6fe.7fc0a8",
395     "wires": []
396   },
397   {
398     "id": "a788afc2.3b764",
399     "type": "execute",
400     "name": "execute RestApiCallNode - PUT AR by id",
401     "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",
402     "comments": "",
403     "outputs": 1,
404     "x": 727.6666641235352,
405     "y": 509.3333625793457,
406     "z": "5256b6fe.7fc0a8",
407     "wires": [
408       [
409         "694caf54.7b798",
410         "ae592dd1.c9cc1",
411         "f4c65729.068fc8"
412       ]
413     ]
414   },
415   {
416     "id": "694caf54.7b798",
417     "type": "not-found",
418     "name": "not-found",
419     "xml": "<outcome value='not-found'>\n",
420     "comments": "",
421     "outputs": 1,
422     "x": 967.3081665039062,
423     "y": 549.6649107933044,
424     "z": "5256b6fe.7fc0a8",
425     "wires": [
426       [
427         "cccfb0fc.4d54b"
428       ]
429     ]
430   },
431   {
432     "id": "ae592dd1.c9cc1",
433     "type": "failure",
434     "name": "failure",
435     "xml": "<outcome value='failure'>\n",
436     "comments": "",
437     "outputs": 1,
438     "x": 964.3081665039062,
439     "y": 506.16490840911865,
440     "z": "5256b6fe.7fc0a8",
441     "wires": [
442       [
443         "cccfb0fc.4d54b"
444       ]
445     ]
446   },
447   {
448     "id": "f4c65729.068fc8",
449     "type": "success",
450     "name": "success",
451     "xml": "<outcome value='success'>\n",
452     "comments": "",
453     "outputs": 1,
454     "x": 971.0582466125488,
455     "y": 465.5220036506653,
456     "z": "5256b6fe.7fc0a8",
457     "wires": [
458       [
459         "f5848024.451b6"
460       ]
461     ]
462   },
463   {
464     "id": "cccfb0fc.4d54b",
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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",
468     "comments": "",
469     "x": 1123.058334350586,
470     "y": 527.9149088859558,
471     "z": "5256b6fe.7fc0a8",
472     "wires": []
473   },
474   {
475     "id": "f5848024.451b6",
476     "type": "block",
477     "name": "block",
478     "xml": "<block>\n",
479     "atomic": "false",
480     "comments": "",
481     "outputs": 1,
482     "x": 1108.7141780853271,
483     "y": 465.7141833305359,
484     "z": "5256b6fe.7fc0a8",
485     "wires": [
486       []
487     ]
488   },
489   {
490     "id": "ace0db7.0de1828",
491     "type": "comment",
492     "name": "Delete Allotted Resource",
493     "info": "",
494     "comments": "",
495     "x": 675.0000457763672,
496     "y": 478.0000286102295,
497     "z": "5256b6fe.7fc0a8",
498     "wires": []
499   },
500   {
501     "id": "8845d317.b4499",
502     "type": "for",
503     "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
504     "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
505     "comments": "",
506     "outputs": 1,
507     "x": 1625.00390625,
508     "y": 715.00390625,
509     "z": "5256b6fe.7fc0a8",
510     "wires": [
511       [
512         "f7e8e6c4.e21498"
513       ]
514     ]
515   },
516   {
517     "id": "9bec45ba.823fc8",
518     "type": "switchNode",
519     "name": "switch service-data.consumed-allotted-resources_length",
520     "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
521     "comments": "",
522     "outputs": 1,
523     "x": 778.0032920837402,
524     "y": 675.71790766716,
525     "z": "5256b6fe.7fc0a8",
526     "wires": [
527       [
528         "105cf808.d9fc58",
529         "5f964ad4.a47694"
530       ]
531     ]
532   },
533   {
534     "id": "105cf808.d9fc58",
535     "type": "other",
536     "name": "outcome Null",
537     "xml": "<outcome value=''>\n",
538     "comments": "",
539     "outputs": 1,
540     "x": 1102.1461563110352,
541     "y": 658.5753421783447,
542     "z": "5256b6fe.7fc0a8",
543     "wires": [
544       [
545         "c721eaa0.d90778"
546       ]
547     ]
548   },
549   {
550     "id": "5f964ad4.a47694",
551     "type": "other",
552     "name": "other",
553     "xml": "<outcome value='Other'>\n",
554     "comments": "",
555     "outputs": 1,
556     "x": 1088.1461791992188,
557     "y": 721.5753309726715,
558     "z": "5256b6fe.7fc0a8",
559     "wires": [
560       [
561         "d487336b.5c21"
562       ]
563     ]
564   },
565   {
566     "id": "d487336b.5c21",
567     "type": "block",
568     "name": "block : atomic",
569     "xml": "<block atomic=\"true\">",
570     "atomic": "true",
571     "outputs": 1,
572     "x": 1248.2732696533203,
573     "y": 719.7013075351715,
574     "z": "5256b6fe.7fc0a8",
575     "wires": [
576       [
577         "8845d317.b4499",
578         "2a5719f4.0daa06"
579       ]
580     ]
581   },
582   {
583     "id": "295f039a.2c737c",
584     "type": "set",
585     "name": "set consumed allotted resources for deletion",
586     "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",
587     "comments": "",
588     "x": 734.8606262207031,
589     "y": 746.28955078125,
590     "z": "5256b6fe.7fc0a8",
591     "wires": []
592   },
593   {
594     "id": "f7e8e6c4.e21498",
595     "type": "switchNode",
596     "name": "switch allotted-resource-id",
597     "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
598     "comments": "",
599     "outputs": 1,
600     "x": 2063.1155166625977,
601     "y": 711.0040283203125,
602     "z": "5256b6fe.7fc0a8",
603     "wires": [
604       [
605         "129a19f.57049e6"
606       ]
607     ]
608   },
609   {
610     "id": "129a19f.57049e6",
611     "type": "outcomeTrue",
612     "name": "true",
613     "xml": "<outcome value='true'>\n",
614     "comments": "",
615     "outputs": 1,
616     "x": 2258.925338745117,
617     "y": 710.4683527946472,
618     "z": "5256b6fe.7fc0a8",
619     "wires": [
620       [
621         "e64da982.d670b8"
622       ]
623     ]
624   },
625   {
626     "id": "a61544d0.afeca8",
627     "type": "set",
628     "name": "set tmp.cidx",
629     "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
630     "comments": "",
631     "x": 2574.2618713378906,
632     "y": 711.2246108055115,
633     "z": "5256b6fe.7fc0a8",
634     "wires": []
635   },
636   {
637     "id": "77efab9.9957c54",
638     "type": "comment",
639     "name": "Delete consumed service consumed-allotted-resources in mdsal",
640     "info": "",
641     "comments": "",
642     "x": 789.0045623779297,
643     "y": 608.0038724095793,
644     "z": "5256b6fe.7fc0a8",
645     "wires": []
646   },
647   {
648     "id": "78d83bc7.d44d54",
649     "type": "comment",
650     "name": "This set resource will be deleted in MDSAL by provider code",
651     "info": "",
652     "comments": "",
653     "x": 779.337345123291,
654     "y": 712.781964302063,
655     "z": "5256b6fe.7fc0a8",
656     "wires": []
657   },
658   {
659     "id": "a9f71f74.85a1",
660     "type": "comment",
661     "name": "Obtain the index of conusumed AR",
662     "info": "",
663     "comments": "",
664     "x": 701.7817535400391,
665     "y": 639.8927326202393,
666     "z": "5256b6fe.7fc0a8",
667     "wires": []
668   },
669   {
670     "id": "c721eaa0.d90778",
671     "type": "returnFailure",
672     "name": "return failure",
673     "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",
674     "comments": "",
675     "x": 1264.00390625,
676     "y": 659.00390625,
677     "z": "5256b6fe.7fc0a8",
678     "wires": []
679   },
680   {
681     "id": "e64da982.d670b8",
682     "type": "block",
683     "name": "block : atomic",
684     "xml": "<block atomic=\"true\">",
685     "atomic": "true",
686     "outputs": 1,
687     "x": 2408.003936767578,
688     "y": 711.2539558410645,
689     "z": "5256b6fe.7fc0a8",
690     "wires": [
691       [
692         "a61544d0.afeca8"
693       ]
694     ]
695   },
696   {
697     "id": "15284a02.c01676",
698     "type": "returnFailure",
699     "name": "return failure",
700     "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",
701     "comments": "",
702     "x": 1718.25390625,
703     "y": 768.25390625,
704     "z": "5256b6fe.7fc0a8",
705     "wires": []
706   },
707   {
708     "id": "3056effb.bf63e",
709     "type": "outcome",
710     "name": "NULL",
711     "xml": "<outcome value=''>\n",
712     "comments": "",
713     "outputs": 1,
714     "x": 1580.75390625,
715     "y": 768.25390625,
716     "z": "5256b6fe.7fc0a8",
717     "wires": [
718       [
719         "15284a02.c01676"
720       ]
721     ]
722   },
723   {
724     "id": "2a5719f4.0daa06",
725     "type": "switchNode",
726     "name": "switch tmp.cidx ",
727     "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
728     "comments": "",
729     "outputs": 1,
730     "x": 1426.75390625,
731     "y": 768.25390625,
732     "z": "5256b6fe.7fc0a8",
733     "wires": [
734       [
735         "3056effb.bf63e"
736       ]
737     ]
738   },
739   {
740     "id": "7516e2f4.527d0c",
741     "type": "comment",
742     "name": "Delete provided service provided-allotted-resources in mdsal",
743     "info": "",
744     "comments": "",
745     "x": 775.5039215087891,
746     "y": 804.00390625,
747     "z": "5256b6fe.7fc0a8",
748     "wires": []
749   },
750   {
751     "id": "4a21aa00.3b1ac8",
752     "type": "other",
753     "name": "other",
754     "xml": "<outcome value='Other'>\n",
755     "comments": "",
756     "outputs": 1,
757     "x": 1103.5041770935059,
758     "y": 1118.7540984153748,
759     "z": "5256b6fe.7fc0a8",
760     "wires": [
761       [
762         "30a78dd9.3c8b22"
763       ]
764     ]
765   },
766   {
767     "id": "6019a57.13f705c",
768     "type": "other",
769     "name": "outcome Null",
770     "xml": "<outcome value=''>\n",
771     "comments": "",
772     "outputs": 1,
773     "x": 1120.5040969848633,
774     "y": 1030.7539324760437,
775     "z": "5256b6fe.7fc0a8",
776     "wires": [
777       [
778         "949446a8.12d2b8"
779       ]
780     ]
781   },
782   {
783     "id": "949446a8.12d2b8",
784     "type": "returnFailure",
785     "name": "return failure",
786     "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",
787     "comments": "",
788     "x": 1284.3616943359375,
789     "y": 1031.1824774742126,
790     "z": "5256b6fe.7fc0a8",
791     "wires": []
792   },
793   {
794     "id": "f670e307.a2a7a",
795     "type": "returnFailure",
796     "name": "return failure",
797     "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",
798     "comments": "",
799     "x": 1715.7539501190186,
800     "y": 1148.753936290741,
801     "z": "5256b6fe.7fc0a8",
802     "wires": []
803   },
804   {
805     "id": "66a217ce.0565f8",
806     "type": "outcome",
807     "name": "NULL",
808     "xml": "<outcome value=''>\n",
809     "comments": "",
810     "outputs": 1,
811     "x": 1578.2539501190186,
812     "y": 1148.753936290741,
813     "z": "5256b6fe.7fc0a8",
814     "wires": [
815       [
816         "f670e307.a2a7a"
817       ]
818     ]
819   },
820   {
821     "id": "e9fadefb.0c149",
822     "type": "switchNode",
823     "name": "switch tmp.pidx ",
824     "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
825     "comments": "",
826     "outputs": 1,
827     "x": 1424.2539501190186,
828     "y": 1148.753936290741,
829     "z": "5256b6fe.7fc0a8",
830     "wires": [
831       [
832         "66a217ce.0565f8"
833       ]
834     ]
835   },
836   {
837     "id": "87f0a9d.62cd658",
838     "type": "outcomeTrue",
839     "name": "true",
840     "xml": "<outcome value='true'>\n",
841     "comments": "",
842     "outputs": 1,
843     "x": 2288.504367828369,
844     "y": 1068.7540946006775,
845     "z": "5256b6fe.7fc0a8",
846     "wires": [
847       [
848         "9a3770db.667c5"
849       ]
850     ]
851   },
852   {
853     "id": "30ce9227.a6174e",
854     "type": "set",
855     "name": "set tmp.pidx",
856     "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
857     "comments": "",
858     "x": 2356.8404846191406,
859     "y": 1203.5101914405823,
860     "z": "5256b6fe.7fc0a8",
861     "wires": []
862   },
863   {
864     "id": "9a3770db.667c5",
865     "type": "block",
866     "name": "block : atomic",
867     "xml": "<block atomic=\"true\">",
868     "atomic": "true",
869     "outputs": 1,
870     "x": 2348.582820892334,
871     "y": 1139.539580821991,
872     "z": "5256b6fe.7fc0a8",
873     "wires": [
874       [
875         "30ce9227.a6174e"
876       ]
877     ]
878   },
879   {
880     "id": "d9f8d014.bcccd",
881     "type": "update",
882     "name": "update AAI allotted-resource",
883     "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",
884     "comments": "",
885     "outputs": 1,
886     "x": 691.2227554321289,
887     "y": 1288.754346370697,
888     "z": "5256b6fe.7fc0a8",
889     "wires": [
890       [
891         "5fa2362a.75f678",
892         "144dae97.c82161"
893       ]
894     ]
895   },
896   {
897     "id": "8b527b2a.81e648",
898     "type": "execute",
899     "name": "execute RestApiCallNode - get-resource parent service data",
900     "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",
901     "comments": "",
902     "outputs": 1,
903     "x": 781.3334197998047,
904     "y": 974.333366394043,
905     "z": "5256b6fe.7fc0a8",
906     "wires": [
907       [
908         "9c6dc3c.897554",
909         "f96c62b7.b194"
910       ]
911     ]
912   },
913   {
914     "id": "2676412c.7c20ee",
915     "type": "execute",
916     "name": "get parent-service-data tmp.ar-url-psd",
917     "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`\"/>",
918     "comments": "",
919     "outputs": 1,
920     "x": 715.3333587646484,
921     "y": 932.3332056999207,
922     "z": "5256b6fe.7fc0a8",
923     "wires": [
924       []
925     ]
926   },
927   {
928     "id": "e2838697.661268",
929     "type": "execute",
930     "name": "execute RestApiCallNode - delete-resource parent service data",
931     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value=\"`$prop.controller.url + $tmp.ar-url-psd + '/provided-allotted-resources/provided-allotted-resource/' + $tmp.ar.allotted-resource-id`\" />\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-psd-delete\" />\n\n",
932     "comments": "",
933     "outputs": 1,
934     "x": 797.00390625,
935     "y": 1179.00390625,
936     "z": "5256b6fe.7fc0a8",
937     "wires": [
938       []
939     ]
940   }
941 ]