3 "id": "df4555dd.a3e848",
9 "z": "5775f861.275e28",
17 "id": "92ceb461.e9ae38",
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": 316.00000381469727,
26 "y": 113.0000171661377,
27 "z": "5775f861.275e28",
35 "id": "d3022041.62ba5",
37 "name": "sdwan-attachment-topology-operation-delete",
38 "xml": "<method rpc='sdwan-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 304.0001220703125,
43 "z": "5775f861.275e28",
51 "id": "28bf3b94.47a4c4",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 320.0001220703125,
59 "y": 756.0002446174622,
60 "z": "5775f861.275e28",
82 "id": "807be759.b5e538",
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": 716.9935607910156,
88 "y": 154.9934868812561,
89 "z": "5775f861.275e28",
93 "id": "d198c8fb.642db8",
95 "name": "set tmp ar-id to fetch resource from MDSAL",
98 "x": 745.9538726806641,
99 "y": 119.02528285980225,
100 "z": "5775f861.275e28",
104 "id": "3103f64.d6db90a",
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": 670.9934997558594,
110 "y": 247.99349212646484,
111 "z": "5775f861.275e28",
115 "id": "967f6552.ee9a38",
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": 677.2553901672363,
122 "y": 335.6602210998535,
123 "z": "5775f861.275e28",
129 "id": "6956382b.b9da98",
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": 709.2554168701172,
136 "y": 423.66020250320435,
137 "z": "5775f861.275e28",
143 "id": "3672b3c8.5060cc",
145 "name": "Used for setting output to API Handler",
148 "x": 724.9935302734375,
149 "y": 214.993501663208,
150 "z": "5775f861.275e28",
154 "id": "e2c9f631.cf0b18",
156 "name": "Obtain different URL, template location etc",
157 "info": "For saving resource information to MDSAL & for AAI",
159 "x": 742.9934959411621,
160 "y": 300.8823823928833,
161 "z": "5775f861.275e28",
165 "id": "c3b16670.191818",
167 "name": "Used to Get AR by id to MDSAL, same as self-link",
170 "x": 768.9935150146484,
171 "y": 387.8823413848877,
172 "z": "5775f861.275e28",
176 "id": "bae16026.94177",
178 "name": "GET parent-service-data from mdsal to check existence of other End point",
181 "x": 836.0003280639648,
182 "y": 842.5316228866577,
183 "z": "5775f861.275e28",
187 "id": "d310ec7e.ce8c1",
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": 1664.1849365234375,
194 "y": 1076.00425863266,
195 "z": "5775f861.275e28",
203 "id": "fe793d2b.5a34a",
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": 815.1842956542969,
210 "y": 1082.718041419983,
211 "z": "5775f861.275e28",
220 "id": "1ad39230.0014ce",
222 "name": "block : atomic",
223 "xml": "<block atomic=\"true\">",
226 "x": 1265.4544582366943,
227 "y": 1122.7015271186829,
228 "z": "5775f861.275e28",
237 "id": "ec3e44a4.ec0718",
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": 2114.296142578125,
244 "y": 1074.0041165351868,
245 "z": "5775f861.275e28",
253 "id": "a1a9abde.ea9de8",
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": 726.9687118530273,
259 "y": 878.0000677108765,
260 "z": "5775f861.275e28",
264 "id": "23d329ac.3b7e66",
267 "xml": "<outcome value='success'>\n",
270 "x": 1106.968994140625,
271 "y": 956.0001826286316,
272 "z": "5775f861.275e28",
280 "id": "e13f07b8.3067a8",
283 "xml": "<outcome value='Other'>\n",
286 "x": 1098.8207969665527,
287 "y": 991.066267490387,
288 "z": "5775f861.275e28",
296 "id": "ad43541b.ecf6c8",
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": 1273.969482421875,
302 "y": 987.3336176872253,
303 "z": "5775f861.275e28",
307 "id": "5bb8e723.a51448",
314 "x": 1257.968994140625,
315 "y": 954.0001826286316,
316 "z": "5775f861.275e28",
322 "id": "9e10ac1a.8f491",
325 "xml": "<outcome value='failure'>\n",
328 "x": 960.7307624816895,
329 "y": 1271.952815413475,
330 "z": "5775f861.275e28",
338 "id": "37086a0f.d393c6",
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": 1127.2546424865723,
344 "y": 1283.57188642025,
345 "z": "5775f861.275e28",
349 "id": "824c305f.f99dc",
352 "xml": "<outcome value='not-found'>\n",
355 "x": 967.8260498046875,
356 "y": 1304.7147830724716,
357 "z": "5775f861.275e28",
365 "id": "bf221914.603808",
367 "name": "TODO: Rework after confirmation from AAI",
370 "x": 1092.1374282836914,
371 "y": 1222.8732151985168,
372 "z": "5775f861.275e28",
376 "id": "d08c66c4.7c2608",
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": 693.5461502075195,
382 "y": 1235.8276824951172,
383 "z": "5775f861.275e28",
387 "id": "661b7087.2c2c2",
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": 662.9592552185059,
393 "y": 1336.4434370994568,
394 "z": "5775f861.275e28",
398 "id": "9281bde8.0db15",
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": 742.6666641235352,
405 "y": 512.3333625793457,
406 "z": "5775f861.275e28",
416 "id": "3bcdf792.ce5568",
419 "xml": "<outcome value='not-found'>\n",
422 "x": 982.3081665039062,
423 "y": 552.6649107933044,
424 "z": "5775f861.275e28",
432 "id": "75f51d5f.311a14",
435 "xml": "<outcome value='failure'>\n",
438 "x": 979.3081665039062,
439 "y": 509.16490840911865,
440 "z": "5775f861.275e28",
448 "id": "aab69d22.7b384",
451 "xml": "<outcome value='success'>\n",
454 "x": 986.0582466125488,
455 "y": 468.5220036506653,
456 "z": "5775f861.275e28",
464 "id": "a17e8ce5.2802d",
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": 1138.058334350586,
470 "y": 530.9149088859558,
471 "z": "5775f861.275e28",
475 "id": "e5460f9f.21ecb",
482 "x": 1123.7141780853271,
483 "y": 468.7141833305359,
484 "z": "5775f861.275e28",
490 "id": "cb30deee.bf09a",
492 "name": "Delete Allotted Resource",
495 "x": 690.0000457763672,
496 "y": 481.0000286102295,
497 "z": "5775f861.275e28",
501 "id": "950f3191.ae2ba",
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": "5775f861.275e28",
517 "id": "a05764a0.242458",
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": 793.0032920837402,
524 "y": 678.71790766716,
525 "z": "5775f861.275e28",
534 "id": "70bab1b2.6f71f",
536 "name": "outcome Null",
537 "xml": "<outcome value=''>\n",
540 "x": 1117.1461563110352,
541 "y": 661.5753421783447,
542 "z": "5775f861.275e28",
550 "id": "ab0947c0.c09f58",
553 "xml": "<outcome value='Other'>\n",
556 "x": 1103.1461791992188,
557 "y": 724.5753309726715,
558 "z": "5775f861.275e28",
566 "id": "d2367329.94565",
568 "name": "block : atomic",
569 "xml": "<block atomic=\"true\">",
572 "x": 1263.2732696533203,
573 "y": 722.7013075351715,
574 "z": "5775f861.275e28",
583 "id": "51c0b7ea.3f9dc8",
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": 749.8606262207031,
589 "y": 749.28955078125,
590 "z": "5775f861.275e28",
594 "id": "763d401a.4c2ab",
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": 2078.1155166625977,
601 "y": 714.0040283203125,
602 "z": "5775f861.275e28",
610 "id": "8699c549.34eb68",
611 "type": "outcomeTrue",
613 "xml": "<outcome value='true'>\n",
616 "x": 2273.925338745117,
617 "y": 713.4683527946472,
618 "z": "5775f861.275e28",
626 "id": "365e6c51.6f6434",
628 "name": "set tmp.cidx",
629 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
631 "x": 2589.2618713378906,
632 "y": 714.2246108055115,
633 "z": "5775f861.275e28",
637 "id": "dda8dc98.e31b",
639 "name": "Delete consumed service consumed-allotted-resources in mdsal",
642 "x": 804.0045623779297,
643 "y": 611.0038724095793,
644 "z": "5775f861.275e28",
648 "id": "f55bb2df.f0b",
650 "name": "This set resource will be deleted in MDSAL by provider code",
653 "x": 794.337345123291,
654 "y": 715.781964302063,
655 "z": "5775f861.275e28",
659 "id": "c48ea2e0.f31db",
661 "name": "Obtain the index of conusumed AR",
664 "x": 716.7817535400391,
665 "y": 642.8927326202393,
666 "z": "5775f861.275e28",
670 "id": "b260d54b.5e5f58",
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": "5775f861.275e28",
681 "id": "a387ae74.594b6",
683 "name": "block : atomic",
684 "xml": "<block atomic=\"true\">",
687 "x": 2423.003936767578,
688 "y": 714.2539558410645,
689 "z": "5775f861.275e28",
697 "id": "9d4dfb29.6b9ee8",
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": "5775f861.275e28",
708 "id": "42d75f79.805d2",
711 "xml": "<outcome value=''>\n",
716 "z": "5775f861.275e28",
724 "id": "51c9f5a5.4315fc",
725 "type": "switchNode",
726 "name": "switch tmp.cidx ",
727 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
732 "z": "5775f861.275e28",
740 "id": "7f854ddc.974234",
742 "name": "Delete provided service provided-allotted-resources in mdsal",
745 "x": 790.5039215087891,
747 "z": "5775f861.275e28",
751 "id": "7505397d.8aabc8",
754 "xml": "<outcome value='Other'>\n",
757 "x": 1118.5041770935059,
758 "y": 1121.7540984153748,
759 "z": "5775f861.275e28",
767 "id": "7a0bf533.2fea3c",
769 "name": "outcome Null",
770 "xml": "<outcome value=''>\n",
773 "x": 1135.5040969848633,
774 "y": 1033.7539324760437,
775 "z": "5775f861.275e28",
783 "id": "7c243332.a34bdc",
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": 1299.3616943359375,
789 "y": 1034.1824774742126,
790 "z": "5775f861.275e28",
794 "id": "eb1cae26.e29d4",
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": 1730.7539501190186,
800 "y": 1151.753936290741,
801 "z": "5775f861.275e28",
805 "id": "7690b02b.7872f",
808 "xml": "<outcome value=''>\n",
811 "x": 1593.2539501190186,
812 "y": 1151.753936290741,
813 "z": "5775f861.275e28",
821 "id": "757e6827.467698",
822 "type": "switchNode",
823 "name": "switch tmp.pidx ",
824 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
827 "x": 1439.2539501190186,
828 "y": 1151.753936290741,
829 "z": "5775f861.275e28",
837 "id": "f9268a01.5183a8",
838 "type": "outcomeTrue",
840 "xml": "<outcome value='true'>\n",
843 "x": 2303.504367828369,
844 "y": 1071.7540946006775,
845 "z": "5775f861.275e28",
853 "id": "b544cb9e.217168",
855 "name": "set tmp.pidx",
856 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
858 "x": 2371.8404846191406,
859 "y": 1206.5101914405823,
860 "z": "5775f861.275e28",
864 "id": "86a5d9a6.a11a58",
866 "name": "block : atomic",
867 "xml": "<block atomic=\"true\">",
870 "x": 2363.582820892334,
871 "y": 1142.539580821991,
872 "z": "5775f861.275e28",
880 "id": "3ad79f2e.53c8c",
882 "name": "set provided allotted resources for deletion",
883 "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",
885 "x": 749.0039978027344,
886 "y": 1137.0039768218994,
887 "z": "5775f861.275e28",
891 "id": "82dc876b.abfd98",
893 "name": "update AAI allotted-resource",
894 "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",
897 "x": 706.2227554321289,
898 "y": 1291.754346370697,
899 "z": "5775f861.275e28",
908 "id": "12de84a1.b1a80b",
910 "name": "execute RestApiCallNode - get-resource parent service data",
911 "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",
914 "x": 796.3334197998047,
915 "y": 977.333366394043,
916 "z": "5775f861.275e28",
925 "id": "55f05cd1.c7cc44",
927 "name": "get parent-service-data tmp.ar-url-psd",
928 "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`\"/>",
931 "x": 730.3333587646484,
932 "y": 935.3332056999207,
933 "z": "5775f861.275e28",