3 "id": "de2bb8e4.c4dbd8",
9 "z": "5256b6fe.7fc0a8",
17 "id": "4df3844d.66920c",
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": 301.00000381469727,
26 "y": 110.0000171661377,
27 "z": "5256b6fe.7fc0a8",
35 "id": "defa06c2.08a958",
37 "name": "sdwan-attachment-topology-operation-delete",
38 "xml": "<method rpc='sdwan-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 289.0001220703125,
43 "z": "5256b6fe.7fc0a8",
51 "id": "6f0fe5c1.42509c",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 305.0001220703125,
59 "y": 753.0002446174622,
60 "z": "5256b6fe.7fc0a8",
82 "id": "d4b618b3.e243f8",
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": 701.9935607910156,
88 "y": 151.9934868812561,
89 "z": "5256b6fe.7fc0a8",
93 "id": "2548027c.9fde3e",
95 "name": "set tmp ar-id to fetch resource from MDSAL",
98 "x": 730.9538726806641,
99 "y": 116.02528285980225,
100 "z": "5256b6fe.7fc0a8",
104 "id": "daa2fd1c.e15f9",
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": 655.9934997558594,
110 "y": 244.99349212646484,
111 "z": "5256b6fe.7fc0a8",
115 "id": "3a054970.ddb4f6",
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": 662.2553901672363,
122 "y": 332.6602210998535,
123 "z": "5256b6fe.7fc0a8",
129 "id": "98a0548f.d105b8",
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": 694.2554168701172,
136 "y": 420.66020250320435,
137 "z": "5256b6fe.7fc0a8",
143 "id": "7276eff0.df0a8",
145 "name": "Used for setting output to API Handler",
148 "x": 709.9935302734375,
149 "y": 211.993501663208,
150 "z": "5256b6fe.7fc0a8",
154 "id": "e3eaa523.b8fec8",
156 "name": "Obtain different URL, template location etc",
157 "info": "For saving resource information to MDSAL & for AAI",
159 "x": 727.9934959411621,
160 "y": 297.8823823928833,
161 "z": "5256b6fe.7fc0a8",
165 "id": "94cc654b.383a58",
167 "name": "Used to Get AR by id to MDSAL, same as self-link",
170 "x": 753.9935150146484,
171 "y": 384.8823413848877,
172 "z": "5256b6fe.7fc0a8",
176 "id": "860c0bbd.079788",
178 "name": "GET parent-service-data from mdsal to check existence of other End point",
181 "x": 821.0003280639648,
182 "y": 839.5316228866577,
183 "z": "5256b6fe.7fc0a8",
187 "id": "1bc8c1a0.e4996e",
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": 1649.1849365234375,
194 "y": 1073.00425863266,
195 "z": "5256b6fe.7fc0a8",
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",
209 "x": 800.1842956542969,
210 "y": 1079.718041419983,
211 "z": "5256b6fe.7fc0a8",
220 "id": "30a78dd9.3c8b22",
222 "name": "block : atomic",
223 "xml": "<block atomic=\"true\">",
226 "x": 1250.4544582366943,
227 "y": 1119.7015271186829,
228 "z": "5256b6fe.7fc0a8",
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",
243 "x": 2099.296142578125,
244 "y": 1071.0041165351868,
245 "z": "5256b6fe.7fc0a8",
253 "id": "6a9e6940.dc60c8",
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": 711.9687118530273,
259 "y": 875.0000677108765,
260 "z": "5256b6fe.7fc0a8",
264 "id": "9c6dc3c.897554",
267 "xml": "<outcome value='success'>\n",
270 "x": 1091.968994140625,
271 "y": 953.0001826286316,
272 "z": "5256b6fe.7fc0a8",
280 "id": "f96c62b7.b194",
283 "xml": "<outcome value='Other'>\n",
286 "x": 1083.8207969665527,
287 "y": 988.066267490387,
288 "z": "5256b6fe.7fc0a8",
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",
301 "x": 1258.969482421875,
302 "y": 984.3336176872253,
303 "z": "5256b6fe.7fc0a8",
307 "id": "1e4f6a7c.485c96",
314 "x": 1242.968994140625,
315 "y": 951.0001826286316,
316 "z": "5256b6fe.7fc0a8",
322 "id": "5fa2362a.75f678",
325 "xml": "<outcome value='failure'>\n",
328 "x": 945.7307624816895,
329 "y": 1268.952815413475,
330 "z": "5256b6fe.7fc0a8",
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",
343 "x": 1112.2546424865723,
344 "y": 1280.57188642025,
345 "z": "5256b6fe.7fc0a8",
349 "id": "144dae97.c82161",
352 "xml": "<outcome value='not-found'>\n",
355 "x": 952.8260498046875,
356 "y": 1301.7147830724716,
357 "z": "5256b6fe.7fc0a8",
365 "id": "2d8a7679.e4417a",
367 "name": "TODO: Rework after confirmation from AAI",
370 "x": 1077.1374282836914,
371 "y": 1219.8732151985168,
372 "z": "5256b6fe.7fc0a8",
376 "id": "1dcc043a.41212c",
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",
381 "x": 678.5461502075195,
382 "y": 1232.8276824951172,
383 "z": "5256b6fe.7fc0a8",
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",
392 "x": 647.9592666625977,
393 "y": 1339.4435625076294,
394 "z": "5256b6fe.7fc0a8",
398 "id": "a788afc2.3b764",
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",
404 "x": 727.6666641235352,
405 "y": 509.3333625793457,
406 "z": "5256b6fe.7fc0a8",
416 "id": "694caf54.7b798",
419 "xml": "<outcome value='not-found'>\n",
422 "x": 967.3081665039062,
423 "y": 549.6649107933044,
424 "z": "5256b6fe.7fc0a8",
432 "id": "ae592dd1.c9cc1",
435 "xml": "<outcome value='failure'>\n",
438 "x": 964.3081665039062,
439 "y": 506.16490840911865,
440 "z": "5256b6fe.7fc0a8",
448 "id": "f4c65729.068fc8",
451 "xml": "<outcome value='success'>\n",
454 "x": 971.0582466125488,
455 "y": 465.5220036506653,
456 "z": "5256b6fe.7fc0a8",
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",
469 "x": 1123.058334350586,
470 "y": 527.9149088859558,
471 "z": "5256b6fe.7fc0a8",
475 "id": "f5848024.451b6",
482 "x": 1108.7141780853271,
483 "y": 465.7141833305359,
484 "z": "5256b6fe.7fc0a8",
490 "id": "ace0db7.0de1828",
492 "name": "Delete Allotted Resource",
495 "x": 675.0000457763672,
496 "y": 478.0000286102295,
497 "z": "5256b6fe.7fc0a8",
501 "id": "8845d317.b4499",
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",
509 "z": "5256b6fe.7fc0a8",
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",
523 "x": 778.0032920837402,
524 "y": 675.71790766716,
525 "z": "5256b6fe.7fc0a8",
534 "id": "105cf808.d9fc58",
536 "name": "outcome Null",
537 "xml": "<outcome value=''>\n",
540 "x": 1102.1461563110352,
541 "y": 658.5753421783447,
542 "z": "5256b6fe.7fc0a8",
550 "id": "5f964ad4.a47694",
553 "xml": "<outcome value='Other'>\n",
556 "x": 1088.1461791992188,
557 "y": 721.5753309726715,
558 "z": "5256b6fe.7fc0a8",
566 "id": "d487336b.5c21",
568 "name": "block : atomic",
569 "xml": "<block atomic=\"true\">",
572 "x": 1248.2732696533203,
573 "y": 719.7013075351715,
574 "z": "5256b6fe.7fc0a8",
583 "id": "295f039a.2c737c",
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",
588 "x": 734.8606262207031,
589 "y": 746.28955078125,
590 "z": "5256b6fe.7fc0a8",
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",
600 "x": 2063.1155166625977,
601 "y": 711.0040283203125,
602 "z": "5256b6fe.7fc0a8",
610 "id": "129a19f.57049e6",
611 "type": "outcomeTrue",
613 "xml": "<outcome value='true'>\n",
616 "x": 2258.925338745117,
617 "y": 710.4683527946472,
618 "z": "5256b6fe.7fc0a8",
626 "id": "a61544d0.afeca8",
628 "name": "set tmp.cidx",
629 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
631 "x": 2574.2618713378906,
632 "y": 711.2246108055115,
633 "z": "5256b6fe.7fc0a8",
637 "id": "77efab9.9957c54",
639 "name": "Delete consumed service consumed-allotted-resources in mdsal",
642 "x": 789.0045623779297,
643 "y": 608.0038724095793,
644 "z": "5256b6fe.7fc0a8",
648 "id": "78d83bc7.d44d54",
650 "name": "This set resource will be deleted in MDSAL by provider code",
653 "x": 779.337345123291,
654 "y": 712.781964302063,
655 "z": "5256b6fe.7fc0a8",
659 "id": "a9f71f74.85a1",
661 "name": "Obtain the index of conusumed AR",
664 "x": 701.7817535400391,
665 "y": 639.8927326202393,
666 "z": "5256b6fe.7fc0a8",
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",
677 "z": "5256b6fe.7fc0a8",
681 "id": "e64da982.d670b8",
683 "name": "block : atomic",
684 "xml": "<block atomic=\"true\">",
687 "x": 2408.003936767578,
688 "y": 711.2539558410645,
689 "z": "5256b6fe.7fc0a8",
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",
704 "z": "5256b6fe.7fc0a8",
708 "id": "3056effb.bf63e",
711 "xml": "<outcome value=''>\n",
716 "z": "5256b6fe.7fc0a8",
724 "id": "2a5719f4.0daa06",
725 "type": "switchNode",
726 "name": "switch tmp.cidx ",
727 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
732 "z": "5256b6fe.7fc0a8",
740 "id": "7516e2f4.527d0c",
742 "name": "Delete provided service provided-allotted-resources in mdsal",
745 "x": 775.5039215087891,
747 "z": "5256b6fe.7fc0a8",
751 "id": "4a21aa00.3b1ac8",
754 "xml": "<outcome value='Other'>\n",
757 "x": 1103.5041770935059,
758 "y": 1118.7540984153748,
759 "z": "5256b6fe.7fc0a8",
767 "id": "6019a57.13f705c",
769 "name": "outcome Null",
770 "xml": "<outcome value=''>\n",
773 "x": 1120.5040969848633,
774 "y": 1030.7539324760437,
775 "z": "5256b6fe.7fc0a8",
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",
788 "x": 1284.3616943359375,
789 "y": 1031.1824774742126,
790 "z": "5256b6fe.7fc0a8",
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",
799 "x": 1715.7539501190186,
800 "y": 1148.753936290741,
801 "z": "5256b6fe.7fc0a8",
805 "id": "66a217ce.0565f8",
808 "xml": "<outcome value=''>\n",
811 "x": 1578.2539501190186,
812 "y": 1148.753936290741,
813 "z": "5256b6fe.7fc0a8",
821 "id": "e9fadefb.0c149",
822 "type": "switchNode",
823 "name": "switch tmp.pidx ",
824 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
827 "x": 1424.2539501190186,
828 "y": 1148.753936290741,
829 "z": "5256b6fe.7fc0a8",
837 "id": "87f0a9d.62cd658",
838 "type": "outcomeTrue",
840 "xml": "<outcome value='true'>\n",
843 "x": 2288.504367828369,
844 "y": 1068.7540946006775,
845 "z": "5256b6fe.7fc0a8",
853 "id": "30ce9227.a6174e",
855 "name": "set tmp.pidx",
856 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
858 "x": 2356.8404846191406,
859 "y": 1203.5101914405823,
860 "z": "5256b6fe.7fc0a8",
864 "id": "9a3770db.667c5",
866 "name": "block : atomic",
867 "xml": "<block atomic=\"true\">",
870 "x": 2348.582820892334,
871 "y": 1139.539580821991,
872 "z": "5256b6fe.7fc0a8",
880 "id": "d9f8d014.bcccd",
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",
886 "x": 691.2227554321289,
887 "y": 1288.754346370697,
888 "z": "5256b6fe.7fc0a8",
897 "id": "8b527b2a.81e648",
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",
903 "x": 781.3334197998047,
904 "y": 974.333366394043,
905 "z": "5256b6fe.7fc0a8",
914 "id": "2676412c.7c20ee",
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`\"/>",
920 "x": 715.3333587646484,
921 "y": 932.3332056999207,
922 "z": "5256b6fe.7fc0a8",
928 "id": "e2838697.661268",
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",
936 "z": "5256b6fe.7fc0a8",