3 "id": "40d74cd7.316a14",
9 "z": "344982e2.7dca5e",
17 "id": "f8cb9b5e.038868",
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": 313.00000381469727,
26 "y": 112.0000171661377,
27 "z": "344982e2.7dca5e",
35 "id": "a82adde1.bdf47",
37 "name": "sotn-attachment-topology-operation-delete",
38 "xml": "<method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 301.0001220703125,
43 "z": "344982e2.7dca5e",
51 "id": "949cc74.207fe38",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 317.0001220703125,
59 "y": 755.0002446174622,
60 "z": "344982e2.7dca5e",
81 "id": "e8c0ed11.a9ee2",
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",
86 "x": 713.9935607910156,
87 "y": 153.9934868812561,
88 "z": "344982e2.7dca5e",
94 "id": "43da58d7.610758",
96 "name": "set tmp ar-id to fetch resource from MDSAL",
99 "x": 742.9538726806641,
100 "y": 118.02528285980225,
101 "z": "344982e2.7dca5e",
107 "id": "acbb646b.d77cc8",
109 "name": "set tmp.ar.self-link",
110 "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",
112 "x": 667.9934997558594,
113 "y": 246.99349212646484,
114 "z": "344982e2.7dca5e",
120 "id": "90800e39.89524",
122 "name": "execute Properties",
123 "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",
126 "x": 674.2553901672363,
127 "y": 334.6602210998535,
128 "z": "344982e2.7dca5e",
136 "id": "fd6eb40b.cdb328",
138 "name": "generate allotted-resource url",
139 "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",
142 "x": 706.2554168701172,
143 "y": 422.66020250320435,
144 "z": "344982e2.7dca5e",
152 "id": "1905b8ab.ca3847",
154 "name": "Used for setting output to API Handler",
157 "x": 721.9935302734375,
158 "y": 213.993501663208,
159 "z": "344982e2.7dca5e",
165 "id": "472b5b53.359df4",
167 "name": "Obtain different URL, template location etc",
168 "info": "For saving resource information to MDSAL & for AAI",
170 "x": 739.9934959411621,
171 "y": 299.8823823928833,
172 "z": "344982e2.7dca5e",
178 "id": "e758b3f.c00a45",
180 "name": "Used to Get AR by id to MDSAL, same as self-link",
183 "x": 765.9935150146484,
184 "y": 386.8823413848877,
185 "z": "344982e2.7dca5e",
191 "id": "9e6bdd2.2396b2",
192 "type": "get-resource",
193 "name": "get-resource parent-service-data",
194 "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='services/service/$tmp.ar.parent-service-instance-id/service-data' pfx='mdsal-psd' >\n",
197 "x": 713.0003890991211,
198 "y": 912.531683921814,
199 "z": "344982e2.7dca5e",
208 "id": "7df855f0.47079c",
210 "name": "GET parent-service-data from mdsal to check existence of other End point",
213 "x": 833.0003280639648,
214 "y": 841.5316228866577,
215 "z": "344982e2.7dca5e",
221 "id": "3af49e65.969612",
223 "name": "for pidx..mdsal-psd.provided-allotted-resources.provided-allotted-resource[]",
224 "xml": "<for index='pidx' start='0' end='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`' >\n",
227 "x": 1644.1849060058594,
228 "y": 1017.0042171478271,
229 "z": "344982e2.7dca5e",
237 "id": "b1c2a911.f82f08",
238 "type": "switchNode",
239 "name": "switch mdsal-psd.provided-allotted-resources_length",
240 "xml": "<switch test='`$mdsal-psd.provided-allotted-resources.provided-allotted-resource_length`'>\n",
243 "x": 772.1841125488281,
244 "y": 1001.7180595397949,
245 "z": "344982e2.7dca5e",
254 "id": "97446eab.09441",
256 "name": "block : atomic",
257 "xml": "<block atomic=\"true\">",
260 "x": 1258.4543991088867,
261 "y": 1057.7015590667725,
262 "z": "344982e2.7dca5e",
271 "id": "c4ca63d9.fd59d",
272 "type": "switchNode",
273 "name": "switch allotted-resource-id",
274 "xml": "<switch test=\"`$mdsal-psd.provided-allotted-resources.provided-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
277 "x": 2063.2962188720703,
278 "y": 1017.0040645599365,
279 "z": "344982e2.7dca5e",
287 "id": "3735d68f.ab66da",
289 "name": "set tmp.ar.parent-service-instance-id",
290 "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",
292 "x": 723.9687118530273,
293 "y": 877.0000677108765,
294 "z": "344982e2.7dca5e",
300 "id": "376a6931.f70fe6",
303 "xml": "<outcome value='success'>\n",
306 "x": 959.9687118530273,
307 "y": 905.0000677108765,
308 "z": "344982e2.7dca5e",
316 "id": "344c3669.3f542a",
319 "xml": "<outcome value='Other'>\n",
322 "x": 951.8205146789551,
323 "y": 940.0661525726318,
324 "z": "344982e2.7dca5e",
332 "id": "38d98c77.5a5dc4",
333 "type": "returnFailure",
334 "name": "return failure",
335 "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",
337 "x": 1126.9692001342773,
338 "y": 936.3335027694702,
339 "z": "344982e2.7dca5e",
345 "id": "eee1cf23.532fa",
352 "x": 1110.9687118530273,
353 "y": 903.0000677108765,
354 "z": "344982e2.7dca5e",
362 "id": "fd82a90d.c15198",
365 "xml": "<outcome value='failure'>\n",
368 "x": 952.7306861877441,
369 "y": 1186.9527963399887,
370 "z": "344982e2.7dca5e",
378 "id": "a5f6bd09.ffa1d",
379 "type": "returnFailure",
380 "name": "return failure",
381 "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",
383 "x": 1119.254566192627,
384 "y": 1198.5718673467636,
385 "z": "344982e2.7dca5e",
391 "id": "399e5f25.1d673",
394 "xml": "<outcome value='not-found'>\n",
397 "x": 959.8259735107422,
398 "y": 1219.7147639989853,
399 "z": "344982e2.7dca5e",
407 "id": "c1db391c.684108",
409 "name": "TODO: Rework after confirmation from AAI",
412 "x": 1084.137351989746,
413 "y": 1137.8731961250305,
414 "z": "344982e2.7dca5e",
420 "id": "c9fb1b0b.8e8c48",
422 "name": "set output to api handler",
423 "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",
425 "x": 685.5460739135742,
426 "y": 1150.8276634216309,
427 "z": "344982e2.7dca5e",
433 "id": "3438f4ce.6e83dc",
434 "type": "returnSuccess",
435 "name": "return success",
436 "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",
438 "x": 654.9591789245605,
439 "y": 1251.4434180259705,
440 "z": "344982e2.7dca5e",
446 "id": "8443751c.74bd98",
448 "name": "execute RestApiCallNode - PUT AR by id",
449 "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",
452 "x": 739.6666641235352,
453 "y": 511.3333625793457,
454 "z": "344982e2.7dca5e",
464 "id": "800033f.1bbe0d",
467 "xml": "<outcome value='not-found'>\n",
470 "x": 1008.3080406188965,
471 "y": 562.6647743210196,
472 "z": "344982e2.7dca5e",
480 "id": "b5b39fe4.c4cab",
483 "xml": "<outcome value='failure'>\n",
486 "x": 999.3080902099609,
487 "y": 531.1648000702262,
488 "z": "344982e2.7dca5e",
496 "id": "11a37ef9.11cf81",
499 "xml": "<outcome value='success'>\n",
502 "x": 1003.0581283569336,
503 "y": 501.52190494537354,
504 "z": "344982e2.7dca5e",
512 "id": "84c30bf1.79ce98",
513 "type": "returnFailure",
514 "name": "return failure",
515 "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",
517 "x": 1169.0581283569336,
518 "y": 531.9148239120841,
519 "z": "344982e2.7dca5e",
525 "id": "b7efe17a.65f42",
532 "x": 1144.714096069336,
533 "y": 497.71407413482666,
534 "z": "344982e2.7dca5e",
542 "id": "67cf0e71.e946f",
544 "name": "Delete Allotted Resource",
547 "x": 687.0000457763672,
548 "y": 480.0000286102295,
549 "z": "344982e2.7dca5e",
555 "id": "c1be7c26.8538e",
557 "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
558 "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
563 "z": "344982e2.7dca5e",
571 "id": "4de78821.6f3c58",
572 "type": "switchNode",
573 "name": "switch service-data.consumed-allotted-resources_length",
574 "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
577 "x": 790.0032920837402,
578 "y": 677.71790766716,
579 "z": "344982e2.7dca5e",
588 "id": "9fcadeb2.7ddd3",
590 "name": "outcome Null",
591 "xml": "<outcome value=''>\n",
594 "x": 1114.1461563110352,
595 "y": 660.5753421783447,
596 "z": "344982e2.7dca5e",
604 "id": "f277a541.5d4da8",
607 "xml": "<outcome value='Other'>\n",
610 "x": 1100.1461791992188,
611 "y": 723.5753309726715,
612 "z": "344982e2.7dca5e",
620 "id": "a167b159.d1f0a",
622 "name": "block : atomic",
623 "xml": "<block atomic=\"true\">",
626 "x": 1260.2732696533203,
627 "y": 721.7013075351715,
628 "z": "344982e2.7dca5e",
637 "id": "bcd52af9.df1738",
639 "name": "set consumed allotted resources for deletion",
640 "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",
642 "x": 746.8606262207031,
643 "y": 748.28955078125,
644 "z": "344982e2.7dca5e",
650 "id": "b702145d.d12dd8",
651 "type": "switchNode",
652 "name": "switch allotted-resource-id",
653 "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
656 "x": 2075.1155166625977,
657 "y": 713.0040283203125,
658 "z": "344982e2.7dca5e",
666 "id": "5f8fbf17.00afa",
667 "type": "outcomeTrue",
669 "xml": "<outcome value='true'>\n",
672 "x": 2270.925338745117,
673 "y": 712.4683527946472,
674 "z": "344982e2.7dca5e",
682 "id": "43e9034f.c4ea2c",
684 "name": "set tmp.cidx",
685 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
688 "y": 672.2246131896973,
689 "z": "344982e2.7dca5e",
695 "id": "cdccd47e.bede38",
697 "name": "Delete consumed service consumed-allotted-resources in mdsal",
700 "x": 801.0045623779297,
701 "y": 610.0038724095793,
702 "z": "344982e2.7dca5e",
708 "id": "d296b738.04dcc8",
710 "name": "This set resource will be deleted in MDSAL by provider code",
713 "x": 791.337345123291,
714 "y": 714.781964302063,
715 "z": "344982e2.7dca5e",
721 "id": "8922e52b.01caf8",
723 "name": "Obtain the index of conusumed AR",
726 "x": 713.7817535400391,
727 "y": 641.8927326202393,
728 "z": "344982e2.7dca5e",
734 "id": "6ed5686.b9f1498",
735 "type": "returnFailure",
736 "name": "return failure",
737 "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",
741 "z": "344982e2.7dca5e",
747 "id": "e0029499.0fe808",
752 "x": 2574.003875732422,
753 "y": 732.2540216445923,
754 "z": "344982e2.7dca5e",
760 "id": "c51401e.55444",
762 "name": "block : atomic",
763 "xml": "<block atomic=\"true\">",
766 "x": 2420.003936767578,
767 "y": 713.2539558410645,
768 "z": "344982e2.7dca5e",
777 "id": "f81fb204.590a8",
778 "type": "returnFailure",
779 "name": "return failure",
780 "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",
784 "z": "344982e2.7dca5e",
790 "id": "1a2d8fc2.146df",
793 "xml": "<outcome value=''>\n",
798 "z": "344982e2.7dca5e",
806 "id": "a14b9903.574488",
807 "type": "switchNode",
808 "name": "switch tmp.cidx ",
809 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
814 "z": "344982e2.7dca5e",
822 "id": "a2784c5c.f26de",
824 "name": "Delete provided service provided-allotted-resources in mdsal",
827 "x": 787.5039215087891,
829 "z": "344982e2.7dca5e",
835 "id": "fc0125f.d3b43d8",
838 "xml": "<outcome value='Other'>\n",
841 "x": 1081.5039596557617,
842 "y": 1054.7539730072021,
843 "z": "344982e2.7dca5e",
851 "id": "af927d7b.49dce",
853 "name": "outcome Null",
854 "xml": "<outcome value=''>\n",
857 "x": 1093.5038833618164,
858 "y": 991.7539174556732,
859 "z": "344982e2.7dca5e",
867 "id": "29d2e8ba.860218",
868 "type": "returnFailure",
869 "name": "return failure",
870 "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",
872 "x": 1255.3616333007812,
873 "y": 992.1824815273285,
874 "z": "344982e2.7dca5e",
880 "id": "8fbe7fb5.2044c",
881 "type": "returnFailure",
882 "name": "return failure",
883 "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",
887 "z": "344982e2.7dca5e",
893 "id": "99d40761.083518",
896 "xml": "<outcome value=''>\n",
901 "z": "344982e2.7dca5e",
909 "id": "7aae58e1.7b18c8",
910 "type": "switchNode",
911 "name": "switch tmp.pidx ",
912 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
917 "z": "344982e2.7dca5e",
925 "id": "637d9cfe.cdf994",
926 "type": "outcomeTrue",
928 "xml": "<outcome value='true'>\n",
931 "x": 2262.503963470459,
932 "y": 1014.7539739608765,
933 "z": "344982e2.7dca5e",
941 "id": "fb4a1e64.0992d",
943 "name": "set tmp.pidx",
944 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
946 "x": 2580.8404235839844,
947 "y": 973.5101690292358,
948 "z": "344982e2.7dca5e",
954 "id": "a63547e2.d5edc8",
959 "x": 2572.5825805664062,
960 "y": 1033.5395774841309,
961 "z": "344982e2.7dca5e",
967 "id": "240168eb.ef4528",
969 "name": "block : atomic",
970 "xml": "<block atomic=\"true\">",
973 "x": 2418.5826416015625,
974 "y": 1014.539511680603,
975 "z": "344982e2.7dca5e",
984 "id": "9273699a.4d08c8",
986 "name": "set provided allotted resources for deletion",
987 "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",
989 "x": 741.0039215087891,
990 "y": 1052.003957748413,
991 "z": "344982e2.7dca5e",
997 "id": "85ce8a7e.f20d58",
999 "name": "update AAI allotted-resource",
1000 "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",
1003 "x": 698.2226791381836,
1004 "y": 1206.7543272972107,
1005 "z": "344982e2.7dca5e",