3 "id": "727269c5.c0c088",
17 "id": "476f18dc.439248",
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": 281.00000381469727,
26 "y": 93.0000171661377,
27 "z": "9a9db3db.b812b",
35 "id": "e0fac416.80f518",
37 "name": "sotn-attachment-topology-operation-delete",
38 "xml": "<method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 269.0001220703125,
43 "z": "9a9db3db.b812b",
51 "id": "231c9f70.d1a7d",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 285.0001220703125,
59 "y": 736.0002446174622,
60 "z": "9a9db3db.b812b",
82 "id": "daf8cd41.f5737",
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": 681.9935607910156,
88 "y": 134.9934868812561,
89 "z": "9a9db3db.b812b",
93 "id": "f092463.fee0fb8",
95 "name": "set tmp ar-id to fetch resource from MDSAL",
98 "x": 710.9538726806641,
99 "y": 99.02528285980225,
100 "z": "9a9db3db.b812b",
104 "id": "a1a6aaf1.a46af8",
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": 635.9934997558594,
110 "y": 227.99349212646484,
111 "z": "9a9db3db.b812b",
115 "id": "6eccbbd0.6de454",
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": 642.2553901672363,
122 "y": 315.6602210998535,
123 "z": "9a9db3db.b812b",
129 "id": "90947482.aca148",
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": 674.2554168701172,
136 "y": 403.66020250320435,
137 "z": "9a9db3db.b812b",
143 "id": "a011c3.2eb3ce4",
145 "name": "Used for setting output to API Handler",
148 "x": 689.9935302734375,
149 "y": 194.993501663208,
150 "z": "9a9db3db.b812b",
154 "id": "d15c9938.74a878",
156 "name": "Obtain different URL, template location etc",
157 "info": "For saving resource information to MDSAL & for AAI",
159 "x": 707.9934959411621,
160 "y": 280.8823823928833,
161 "z": "9a9db3db.b812b",
165 "id": "a5405514.70c5b8",
167 "name": "Used to Get AR by id to MDSAL, same as self-link",
170 "x": 733.9935150146484,
171 "y": 367.8823413848877,
172 "z": "9a9db3db.b812b",
176 "id": "88c1d026.0cefd",
178 "name": "GET parent-service-data from mdsal to check existence of other End point",
181 "x": 801.0003280639648,
182 "y": 822.5316228866577,
183 "z": "9a9db3db.b812b",
187 "id": "3c5cf576.01802a",
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": 1629.1849365234375,
194 "y": 1056.00425863266,
195 "z": "9a9db3db.b812b",
203 "id": "b9944c13.63436",
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": 780.1842956542969,
210 "y": 1062.718041419983,
211 "z": "9a9db3db.b812b",
220 "id": "e65e2eca.21548",
222 "name": "block : atomic",
223 "xml": "<block atomic=\"true\">",
226 "x": 1230.4544582366943,
227 "y": 1102.7015271186829,
228 "z": "9a9db3db.b812b",
237 "id": "3496000b.b50ee",
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": 2079.296142578125,
244 "y": 1054.0041165351868,
245 "z": "9a9db3db.b812b",
253 "id": "1a37f19e.b4ca8e",
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": 691.9687118530273,
259 "y": 858.0000677108765,
260 "z": "9a9db3db.b812b",
264 "id": "f65db35d.ec076",
267 "xml": "<outcome value='success'>\n",
270 "x": 1071.968994140625,
271 "y": 936.0001826286316,
272 "z": "9a9db3db.b812b",
280 "id": "733108ec.4b0c18",
283 "xml": "<outcome value='Other'>\n",
286 "x": 1063.8207969665527,
287 "y": 971.066267490387,
288 "z": "9a9db3db.b812b",
296 "id": "d0615553.03e2f8",
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": 1238.969482421875,
302 "y": 967.3336176872253,
303 "z": "9a9db3db.b812b",
307 "id": "c80198f0.eabc78",
314 "x": 1222.968994140625,
315 "y": 934.0001826286316,
316 "z": "9a9db3db.b812b",
322 "id": "5239fca8.d17b94",
325 "xml": "<outcome value='failure'>\n",
328 "x": 925.7307624816895,
329 "y": 1251.952815413475,
330 "z": "9a9db3db.b812b",
338 "id": "d9416e9b.67f3a",
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": 1092.2546424865723,
344 "y": 1263.57188642025,
345 "z": "9a9db3db.b812b",
349 "id": "c631f277.5fd19",
352 "xml": "<outcome value='not-found'>\n",
355 "x": 932.8260498046875,
356 "y": 1284.7147830724716,
357 "z": "9a9db3db.b812b",
365 "id": "b769698c.40e9c8",
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": 658.5461502075195,
371 "y": 1215.8276824951172,
372 "z": "9a9db3db.b812b",
376 "id": "a43d6d68.0f0c8",
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": 627.9592552185059,
382 "y": 1316.4434370994568,
383 "z": "9a9db3db.b812b",
387 "id": "36034272.10e4ae",
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": 707.6666641235352,
394 "y": 492.3333625793457,
395 "z": "9a9db3db.b812b",
405 "id": "b9a614f.423c0e8",
408 "xml": "<outcome value='not-found'>\n",
411 "x": 947.3081665039062,
412 "y": 532.6649107933044,
413 "z": "9a9db3db.b812b",
421 "id": "1fe78f55.993961",
424 "xml": "<outcome value='failure'>\n",
427 "x": 944.3081665039062,
428 "y": 489.16490840911865,
429 "z": "9a9db3db.b812b",
437 "id": "2453145c.fe210c",
440 "xml": "<outcome value='success'>\n",
443 "x": 951.0582466125488,
444 "y": 448.5220036506653,
445 "z": "9a9db3db.b812b",
453 "id": "ceacff91.78296",
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": 1103.058334350586,
459 "y": 510.9149088859558,
460 "z": "9a9db3db.b812b",
464 "id": "cc515c42.f40e8",
471 "x": 1088.7141780853271,
472 "y": 448.7141833305359,
473 "z": "9a9db3db.b812b",
479 "id": "afc0a167.60e96",
481 "name": "Delete Allotted Resource",
484 "x": 655.0000457763672,
485 "y": 461.0000286102295,
486 "z": "9a9db3db.b812b",
490 "id": "930f6554.7ad0e8",
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": "9a9db3db.b812b",
506 "id": "190ff216.cb59ee",
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": 758.0032920837402,
513 "y": 658.71790766716,
514 "z": "9a9db3db.b812b",
523 "id": "22a6f73e.83f758",
525 "name": "outcome Null",
526 "xml": "<outcome value=''>\n",
529 "x": 1082.1461563110352,
530 "y": 641.5753421783447,
531 "z": "9a9db3db.b812b",
539 "id": "59a890e7.9e391",
542 "xml": "<outcome value='Other'>\n",
545 "x": 1068.1461791992188,
546 "y": 704.5753309726715,
547 "z": "9a9db3db.b812b",
555 "id": "741d09f.ef4e8f8",
557 "name": "block : atomic",
558 "xml": "<block atomic=\"true\">",
561 "x": 1228.2732696533203,
562 "y": 702.7013075351715,
563 "z": "9a9db3db.b812b",
572 "id": "4a2552b4.8267bc",
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": 714.8606262207031,
578 "y": 729.28955078125,
579 "z": "9a9db3db.b812b",
583 "id": "ab2d612c.e624d",
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": 2043.1155166625977,
590 "y": 694.0040283203125,
591 "z": "9a9db3db.b812b",
599 "id": "d09e4ce4.cdbe3",
600 "type": "outcomeTrue",
602 "xml": "<outcome value='true'>\n",
605 "x": 2238.925338745117,
606 "y": 693.4683527946472,
607 "z": "9a9db3db.b812b",
615 "id": "92647963.e38708",
617 "name": "set tmp.cidx",
618 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
620 "x": 2554.2618713378906,
621 "y": 694.2246108055115,
622 "z": "9a9db3db.b812b",
626 "id": "8d54089c.d1a698",
628 "name": "Delete consumed service consumed-allotted-resources in mdsal",
631 "x": 769.0045623779297,
632 "y": 591.0038724095793,
633 "z": "9a9db3db.b812b",
637 "id": "66e1c966.841508",
639 "name": "This set resource will be deleted in MDSAL by provider code",
642 "x": 759.337345123291,
643 "y": 695.781964302063,
644 "z": "9a9db3db.b812b",
648 "id": "491e50db.34949",
650 "name": "Obtain the index of conusumed AR",
653 "x": 681.7817535400391,
654 "y": 622.8927326202393,
655 "z": "9a9db3db.b812b",
659 "id": "d98f9bea.dbb4e8",
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": "9a9db3db.b812b",
670 "id": "c313761f.950178",
672 "name": "block : atomic",
673 "xml": "<block atomic=\"true\">",
676 "x": 2388.003936767578,
677 "y": 694.2539558410645,
678 "z": "9a9db3db.b812b",
686 "id": "6aa48d02.a58084",
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": "9a9db3db.b812b",
697 "id": "bf5c462c.da5e08",
700 "xml": "<outcome value=''>\n",
705 "z": "9a9db3db.b812b",
713 "id": "a2d1d665.9bea78",
714 "type": "switchNode",
715 "name": "switch tmp.cidx ",
716 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
721 "z": "9a9db3db.b812b",
729 "id": "e3078c06.7be5",
731 "name": "Delete provided service provided-allotted-resources in mdsal",
734 "x": 755.5039215087891,
736 "z": "9a9db3db.b812b",
740 "id": "86c1925.6123e7",
743 "xml": "<outcome value='Other'>\n",
746 "x": 1083.5041770935059,
747 "y": 1101.7540984153748,
748 "z": "9a9db3db.b812b",
756 "id": "af74ccd9.4a43f",
758 "name": "outcome Null",
759 "xml": "<outcome value=''>\n",
762 "x": 1100.5040969848633,
763 "y": 1013.7539324760437,
764 "z": "9a9db3db.b812b",
772 "id": "fea3dc81.4b3fa",
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": 1264.3616943359375,
778 "y": 1014.1824774742126,
779 "z": "9a9db3db.b812b",
783 "id": "39762013.3aeda",
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": 1695.7539501190186,
789 "y": 1131.753936290741,
790 "z": "9a9db3db.b812b",
794 "id": "f41a3391.116cf",
797 "xml": "<outcome value=''>\n",
800 "x": 1558.2539501190186,
801 "y": 1131.753936290741,
802 "z": "9a9db3db.b812b",
810 "id": "fad43184.faa77",
811 "type": "switchNode",
812 "name": "switch tmp.pidx ",
813 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
816 "x": 1404.2539501190186,
817 "y": 1131.753936290741,
818 "z": "9a9db3db.b812b",
826 "id": "2b9e1b87.4d7be4",
827 "type": "outcomeTrue",
829 "xml": "<outcome value='true'>\n",
832 "x": 2268.504367828369,
833 "y": 1051.7540946006775,
834 "z": "9a9db3db.b812b",
842 "id": "124aec38.7e75f4",
844 "name": "set tmp.pidx",
845 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n\n",
847 "x": 2336.8404846191406,
848 "y": 1186.5101914405823,
849 "z": "9a9db3db.b812b",
853 "id": "3e54d0ca.68119",
855 "name": "block : atomic",
856 "xml": "<block atomic=\"true\">",
859 "x": 2328.582820892334,
860 "y": 1122.539580821991,
861 "z": "9a9db3db.b812b",
869 "id": "471618ce.1aa6e8",
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.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\">\n",
875 "x": 671.2227554321289,
876 "y": 1271.754346370697,
877 "z": "9a9db3db.b812b",
886 "id": "af833dcd.19d57",
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": 761.3334197998047,
893 "y": 957.333366394043,
894 "z": "9a9db3db.b812b",
903 "id": "afce32ae.04764",
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": 695.3333587646484,
910 "y": 915.3332056999207,
911 "z": "9a9db3db.b812b",
917 "id": "abce896b.ee5ab8",
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": "9a9db3db.b812b",