3 "id": "11e769e3.3811f6",
9 "z": "22c49458.dad37c",
17 "id": "a911446f.df7748",
18 "type": "service-logic",
19 "name": "GENERIC-RESOURCE-API ${project.version}",
20 "module": "GENERIC-RESOURCE-API",
21 "version": "${project.version}",
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}'>",
25 "x": 288.00000381469727,
26 "y": 95.0000171661377,
27 "z": "22c49458.dad37c",
35 "id": "7ff497ab.f66f98",
37 "name": "sotn-attachment-topology-operation-delete",
38 "xml": "<method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 276.0001220703125,
43 "z": "22c49458.dad37c",
51 "id": "5cbadab.7a99a24",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 292.0001220703125,
59 "y": 738.0002446174622,
60 "z": "22c49458.dad37c",
82 "id": "12de2d1a.68bba3",
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",
87 "x": 688.9935607910156,
88 "y": 136.9934868812561,
89 "z": "22c49458.dad37c",
93 "id": "a47c80d2.4bf0a",
95 "name": "set tmp ar-id to fetch resource from MDSAL",
98 "x": 717.9538726806641,
99 "y": 101.02528285980225,
100 "z": "22c49458.dad37c",
104 "id": "51b97e85.9070d",
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",
109 "x": 642.9934997558594,
110 "y": 229.99349212646484,
111 "z": "22c49458.dad37c",
115 "id": "5b5b7d66.22fc34",
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",
121 "x": 649.2553901672363,
122 "y": 317.6602210998535,
123 "z": "22c49458.dad37c",
129 "id": "1fed4a5d.8e6a46",
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",
135 "x": 681.2554168701172,
136 "y": 405.66020250320435,
137 "z": "22c49458.dad37c",
143 "id": "ab7e7ca9.bc19e",
145 "name": "Used for setting output to API Handler",
148 "x": 696.9935302734375,
149 "y": 196.993501663208,
150 "z": "22c49458.dad37c",
154 "id": "ba32781e.53a208",
156 "name": "Obtain different URL, template location etc",
157 "info": "For saving resource information to MDSAL & for AAI",
159 "x": 714.9934959411621,
160 "y": 282.8823823928833,
161 "z": "22c49458.dad37c",
165 "id": "b5885f7.9b7d5a",
167 "name": "Used to Get AR by id to MDSAL, same as self-link",
170 "x": 740.9935150146484,
171 "y": 369.8823413848877,
172 "z": "22c49458.dad37c",
176 "id": "e2ab0cde.eabb7",
178 "name": "GET parent-service-data from mdsal to check existence of other End point",
181 "x": 808.0003280639648,
182 "y": 824.5316228866577,
183 "z": "22c49458.dad37c",
187 "id": "9608d482.14feb8",
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",
193 "x": 1636.1849365234375,
194 "y": 1058.00425863266,
195 "z": "22c49458.dad37c",
203 "id": "6484d39f.eed1bc",
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",
209 "x": 787.1842956542969,
210 "y": 1064.718041419983,
211 "z": "22c49458.dad37c",
220 "id": "72d22ab8.9fbaf4",
222 "name": "block : atomic",
223 "xml": "<block atomic=\"true\">",
226 "x": 1237.4544582366943,
227 "y": 1104.7015271186829,
228 "z": "22c49458.dad37c",
237 "id": "9f0a169a.b7bf38",
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",
243 "x": 2086.296142578125,
244 "y": 1056.0041165351868,
245 "z": "22c49458.dad37c",
253 "id": "e0c27564.dc6708",
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",
258 "x": 698.9687118530273,
259 "y": 860.0000677108765,
260 "z": "22c49458.dad37c",
264 "id": "df350c49.f450e",
267 "xml": "<outcome value='success'>\n",
270 "x": 1078.968994140625,
271 "y": 938.0001826286316,
272 "z": "22c49458.dad37c",
280 "id": "a707d837.6f7a08",
283 "xml": "<outcome value='Other'>\n",
286 "x": 1070.8207969665527,
287 "y": 973.066267490387,
288 "z": "22c49458.dad37c",
296 "id": "72020d23.f0ba44",
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",
301 "x": 1245.969482421875,
302 "y": 969.3336176872253,
303 "z": "22c49458.dad37c",
307 "id": "f5ff5552.dcef18",
314 "x": 1229.968994140625,
315 "y": 936.0001826286316,
316 "z": "22c49458.dad37c",
322 "id": "b9f57970.85bbb8",
325 "xml": "<outcome value='failure'>\n",
328 "x": 932.7307624816895,
329 "y": 1253.952815413475,
330 "z": "22c49458.dad37c",
338 "id": "7794b76c.3bcdd8",
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",
343 "x": 1099.2546424865723,
344 "y": 1265.57188642025,
345 "z": "22c49458.dad37c",
349 "id": "2e04eae7.d58896",
352 "xml": "<outcome value='not-found'>\n",
355 "x": 939.8260498046875,
356 "y": 1286.7147830724716,
357 "z": "22c49458.dad37c",
365 "id": "4516c95e.b99748",
367 "name": "set output to api handler",
368 "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",
370 "x": 665.5461502075195,
371 "y": 1217.8276824951172,
372 "z": "22c49458.dad37c",
376 "id": "497a6009.1522c",
377 "type": "returnSuccess",
378 "name": "return success",
379 "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",
381 "x": 634.9592552185059,
382 "y": 1318.4434370994568,
383 "z": "22c49458.dad37c",
387 "id": "75c532eb.23cc8c",
389 "name": "execute RestApiCallNode - PUT AR by id",
390 "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",
393 "x": 714.6666641235352,
394 "y": 494.3333625793457,
395 "z": "22c49458.dad37c",
405 "id": "62855576.29e8bc",
408 "xml": "<outcome value='not-found'>\n",
411 "x": 954.3081665039062,
412 "y": 534.6649107933044,
413 "z": "22c49458.dad37c",
421 "id": "943e1cd3.5570d",
424 "xml": "<outcome value='failure'>\n",
427 "x": 951.3081665039062,
428 "y": 491.16490840911865,
429 "z": "22c49458.dad37c",
437 "id": "d016523b.d696c",
440 "xml": "<outcome value='success'>\n",
443 "x": 958.0582466125488,
444 "y": 450.5220036506653,
445 "z": "22c49458.dad37c",
453 "id": "1a54db3b.e65b75",
454 "type": "returnFailure",
455 "name": "return failure",
456 "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",
458 "x": 1110.058334350586,
459 "y": 512.9149088859558,
460 "z": "22c49458.dad37c",
464 "id": "4e5c2e12.2b4c5",
471 "x": 1095.7141780853271,
472 "y": 450.7141833305359,
473 "z": "22c49458.dad37c",
479 "id": "568d92cc.719a5c",
481 "name": "Delete Allotted Resource",
484 "x": 662.0000457763672,
485 "y": 463.0000286102295,
486 "z": "22c49458.dad37c",
490 "id": "34b11a52.976836",
492 "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
493 "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
498 "z": "22c49458.dad37c",
506 "id": "79c8cfb5.a81b4",
507 "type": "switchNode",
508 "name": "switch service-data.consumed-allotted-resources_length",
509 "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
512 "x": 765.0032920837402,
513 "y": 660.71790766716,
514 "z": "22c49458.dad37c",
523 "id": "a04a8128.1b845",
525 "name": "outcome Null",
526 "xml": "<outcome value=''>\n",
529 "x": 1089.1461563110352,
530 "y": 643.5753421783447,
531 "z": "22c49458.dad37c",
539 "id": "9bf1251d.a97d08",
542 "xml": "<outcome value='Other'>\n",
545 "x": 1075.1461791992188,
546 "y": 706.5753309726715,
547 "z": "22c49458.dad37c",
555 "id": "db5549c4.4372e8",
557 "name": "block : atomic",
558 "xml": "<block atomic=\"true\">",
561 "x": 1235.2732696533203,
562 "y": 704.7013075351715,
563 "z": "22c49458.dad37c",
572 "id": "72f76f27.124fe",
574 "name": "set consumed allotted resources for deletion",
575 "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",
577 "x": 721.8606262207031,
578 "y": 731.28955078125,
579 "z": "22c49458.dad37c",
583 "id": "905bba1a.0e8108",
584 "type": "switchNode",
585 "name": "switch allotted-resource-id",
586 "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
589 "x": 2050.1155166625977,
590 "y": 696.0040283203125,
591 "z": "22c49458.dad37c",
599 "id": "a9176335.8c5a3",
600 "type": "outcomeTrue",
602 "xml": "<outcome value='true'>\n",
605 "x": 2245.925338745117,
606 "y": 695.4683527946472,
607 "z": "22c49458.dad37c",
615 "id": "cc5aea61.28e048",
617 "name": "set tmp.cidx",
618 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
620 "x": 2561.2618713378906,
621 "y": 696.2246108055115,
622 "z": "22c49458.dad37c",
626 "id": "ad0e4910.5dc848",
628 "name": "Delete consumed service consumed-allotted-resources in mdsal",
631 "x": 776.0045623779297,
632 "y": 593.0038724095793,
633 "z": "22c49458.dad37c",
637 "id": "5b6b08ee.203c48",
639 "name": "This set resource will be deleted in MDSAL by provider code",
642 "x": 766.337345123291,
643 "y": 697.781964302063,
644 "z": "22c49458.dad37c",
648 "id": "5c1ad210.960a1c",
650 "name": "Obtain the index of conusumed AR",
653 "x": 688.7817535400391,
654 "y": 624.8927326202393,
655 "z": "22c49458.dad37c",
659 "id": "673a72bf.8ebb9c",
660 "type": "returnFailure",
661 "name": "return failure",
662 "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",
666 "z": "22c49458.dad37c",
670 "id": "c3d97090.70bae",
672 "name": "block : atomic",
673 "xml": "<block atomic=\"true\">",
676 "x": 2395.003936767578,
677 "y": 696.2539558410645,
678 "z": "22c49458.dad37c",
686 "id": "b29df060.eb56c",
687 "type": "returnFailure",
688 "name": "return failure",
689 "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",
693 "z": "22c49458.dad37c",
697 "id": "b8b02536.9fab38",
700 "xml": "<outcome value=''>\n",
705 "z": "22c49458.dad37c",
713 "id": "f5274780.cdc8d8",
714 "type": "switchNode",
715 "name": "switch tmp.cidx ",
716 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
721 "z": "22c49458.dad37c",
729 "id": "88b79953.981898",
731 "name": "Delete provided service provided-allotted-resources in mdsal",
734 "x": 762.5039215087891,
736 "z": "22c49458.dad37c",
740 "id": "525dfe7f.9aace",
743 "xml": "<outcome value='Other'>\n",
746 "x": 1090.5041770935059,
747 "y": 1103.7540984153748,
748 "z": "22c49458.dad37c",
756 "id": "3cb5550a.e1379a",
758 "name": "outcome Null",
759 "xml": "<outcome value=''>\n",
762 "x": 1107.5040969848633,
763 "y": 1015.7539324760437,
764 "z": "22c49458.dad37c",
772 "id": "b0f98381.70f7",
773 "type": "returnFailure",
774 "name": "return failure",
775 "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",
777 "x": 1271.3616943359375,
778 "y": 1016.1824774742126,
779 "z": "22c49458.dad37c",
783 "id": "1af61fb0.016",
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 is not available in mdsal\" />\n",
788 "x": 1702.7539501190186,
789 "y": 1133.753936290741,
790 "z": "22c49458.dad37c",
794 "id": "457e37be.33a0e8",
797 "xml": "<outcome value=''>\n",
800 "x": 1565.2539501190186,
801 "y": 1133.753936290741,
802 "z": "22c49458.dad37c",
810 "id": "37cdb210.11699e",
811 "type": "switchNode",
812 "name": "switch tmp.pidx ",
813 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
816 "x": 1411.2539501190186,
817 "y": 1133.753936290741,
818 "z": "22c49458.dad37c",
826 "id": "1c3b0551.8a3d7b",
827 "type": "outcomeTrue",
829 "xml": "<outcome value='true'>\n",
832 "x": 2275.504367828369,
833 "y": 1053.7540946006775,
834 "z": "22c49458.dad37c",
842 "id": "26796192.02fd4e",
844 "name": "set tmp.pidx",
845 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n\n",
847 "x": 2343.8404846191406,
848 "y": 1188.5101914405823,
849 "z": "22c49458.dad37c",
853 "id": "f8a04da0.ae331",
855 "name": "block : atomic",
856 "xml": "<block atomic=\"true\">",
859 "x": 2335.582820892334,
860 "y": 1124.539580821991,
861 "z": "22c49458.dad37c",
869 "id": "eb5610dc.278e7",
871 "name": "update AAI allotted-resource",
872 "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",
875 "x": 678.2227554321289,
876 "y": 1273.754346370697,
877 "z": "22c49458.dad37c",
886 "id": "322e0846.b44bc8",
888 "name": "execute RestApiCallNode - get-resource parent service data",
889 "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",
892 "x": 768.3334197998047,
893 "y": 959.333366394043,
894 "z": "22c49458.dad37c",
903 "id": "8cb29231.a6eaa",
905 "name": "get parent-service-data tmp.ar-url-psd",
906 "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`\"/>",
909 "x": 702.3333587646484,
910 "y": 917.3332056999207,
911 "z": "22c49458.dad37c",
917 "id": "9ea8a95d.e39878",
919 "name": "execute RestApiCallNode - delete-resource parent service data",
920 "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",
925 "z": "22c49458.dad37c",