3 "id": "4b30503e.867f2",
8 "y": 47.999999046325684,
17 "id": "37e77520.ee3cba",
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": 328.00391006469727,
26 "y": 120.00001621246338,
27 "z": "5c846185.ea888",
35 "id": "5677b71b.5fb328",
37 "name": "sotn-attachment-topology-operation-delete",
38 "xml": "<method rpc='sotn-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 316.0040283203125,
42 "y": 207.99999904632568,
43 "z": "5c846185.ea888",
51 "id": "9d2f20f7.d7e57",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 332.0040283203125,
59 "y": 763.0002436637878,
60 "z": "5c846185.ea888",
82 "id": "ed51ef95.ae803",
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": 728.9974670410156,
88 "y": 161.9934859275818,
89 "z": "5c846185.ea888",
93 "id": "d21298fe.289dd8",
95 "name": "set tmp ar-id to fetch resource from MDSAL",
98 "x": 757.9577789306641,
99 "y": 126.02528190612793,
100 "z": "5c846185.ea888",
104 "id": "88df7f3c.6dcf",
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": 682.9974060058594,
110 "y": 254.99349117279053,
111 "z": "5c846185.ea888",
115 "id": "d8fe29bc.d00d68",
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": 689.2592964172363,
122 "y": 342.6602201461792,
123 "z": "5c846185.ea888",
129 "id": "3f1b61e1.0ac49e",
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": 721.2593231201172,
136 "y": 430.66020154953003,
137 "z": "5c846185.ea888",
143 "id": "c43edf3b.dcbac",
145 "name": "Used for setting output to API Handler",
148 "x": 736.9974365234375,
149 "y": 221.9935007095337,
150 "z": "5c846185.ea888",
154 "id": "10733905.283097",
156 "name": "Obtain different URL, template location etc",
157 "info": "For saving resource information to MDSAL & for AAI",
159 "x": 754.9974021911621,
160 "y": 307.882381439209,
161 "z": "5c846185.ea888",
165 "id": "62545852.867ec8",
167 "name": "Used to Get AR by id to MDSAL, same as self-link",
170 "x": 780.9974212646484,
171 "y": 394.8823404312134,
172 "z": "5c846185.ea888",
176 "id": "ed0a2645.640ef8",
178 "name": "GET parent-service-data from mdsal to check existence of other End point",
181 "x": 848.0042343139648,
182 "y": 849.5316219329834,
183 "z": "5c846185.ea888",
187 "id": "a950273c.9f66a8",
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": 1676.1888427734375,
194 "y": 1083.0042576789856,
195 "z": "5c846185.ea888",
203 "id": "e2fe8873.3a2848",
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": 827.1882019042969,
210 "y": 1089.7180404663086,
211 "z": "5c846185.ea888",
220 "id": "2fdb27fa.f6ac38",
222 "name": "block : atomic",
223 "xml": "<block atomic=\"true\">",
226 "x": 1277.4583644866943,
227 "y": 1129.7015261650085,
228 "z": "5c846185.ea888",
237 "id": "e88ff344.a2353",
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": 2126.300048828125,
244 "y": 1081.0041155815125,
245 "z": "5c846185.ea888",
253 "id": "4903f6e1.1eeb68",
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": 738.9726181030273,
259 "y": 885.0000667572021,
260 "z": "5c846185.ea888",
264 "id": "9023749d.2a65a8",
267 "xml": "<outcome value='success'>\n",
270 "x": 1118.972900390625,
271 "y": 963.0001816749573,
272 "z": "5c846185.ea888",
280 "id": "13a32c23.faaff4",
283 "xml": "<outcome value='Other'>\n",
286 "x": 1110.8247032165527,
287 "y": 998.0662665367126,
288 "z": "5c846185.ea888",
296 "id": "61460fc5.a222",
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": 1285.973388671875,
302 "y": 994.333616733551,
303 "z": "5c846185.ea888",
307 "id": "85ec274.d7380d8",
314 "x": 1269.972900390625,
315 "y": 961.0001816749573,
316 "z": "5c846185.ea888",
322 "id": "2a315011.b7952",
325 "xml": "<outcome value='failure'>\n",
328 "x": 972.7346687316895,
329 "y": 1278.9528144598007,
330 "z": "5c846185.ea888",
338 "id": "398739b4.01afc6",
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": 1139.2585487365723,
344 "y": 1290.5718854665756,
345 "z": "5c846185.ea888",
349 "id": "2e78e3b1.a4cadc",
352 "xml": "<outcome value='not-found'>\n",
355 "x": 979.8299560546875,
356 "y": 1311.7147821187973,
357 "z": "5c846185.ea888",
365 "id": "3f6ffe96.e0bda2",
367 "name": "TODO: Rework after confirmation from AAI",
370 "x": 1104.1413345336914,
371 "y": 1229.8732142448425,
372 "z": "5c846185.ea888",
376 "id": "f2266740.3e9f68",
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": 705.5500564575195,
382 "y": 1242.8276815414429,
383 "z": "5c846185.ea888",
387 "id": "a2240e65.e6034",
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": 674.9631614685059,
393 "y": 1343.4434361457825,
394 "z": "5c846185.ea888",
398 "id": "1742ced6.939601",
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": 754.6705703735352,
405 "y": 519.3333616256714,
406 "z": "5c846185.ea888",
416 "id": "597f085a.f89fd8",
419 "xml": "<outcome value='not-found'>\n",
422 "x": 994.3120727539062,
423 "y": 559.6649098396301,
424 "z": "5c846185.ea888",
432 "id": "c3fb7b14.ff60a8",
435 "xml": "<outcome value='failure'>\n",
438 "x": 991.3120727539062,
439 "y": 516.1649074554443,
440 "z": "5c846185.ea888",
448 "id": "e4c15d29.0e847",
451 "xml": "<outcome value='success'>\n",
454 "x": 998.0621528625488,
455 "y": 475.52200269699097,
456 "z": "5c846185.ea888",
464 "id": "67fdc38f.4e65cc",
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": 1150.062240600586,
470 "y": 537.9149079322815,
471 "z": "5c846185.ea888",
475 "id": "50ef93e6.56ad3c",
482 "x": 1135.7180843353271,
483 "y": 475.7141823768616,
484 "z": "5c846185.ea888",
490 "id": "c4e5f3c2.475ed",
492 "name": "Delete Allotted Resource",
495 "x": 702.0039520263672,
496 "y": 488.0000276565552,
497 "z": "5c846185.ea888",
501 "id": "de43dad6.d53448",
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",
508 "y": 725.0039052963257,
509 "z": "5c846185.ea888",
517 "id": "8b97d92c.0d63e8",
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": 805.0071983337402,
524 "y": 685.7179067134857,
525 "z": "5c846185.ea888",
534 "id": "3433f8dc.aa0358",
536 "name": "outcome Null",
537 "xml": "<outcome value=''>\n",
540 "x": 1129.1500625610352,
541 "y": 668.5753412246704,
542 "z": "5c846185.ea888",
550 "id": "d35e52b4.a3e33",
553 "xml": "<outcome value='Other'>\n",
556 "x": 1115.1500854492188,
557 "y": 731.5753300189972,
558 "z": "5c846185.ea888",
566 "id": "27f778ec.7e6108",
568 "name": "block : atomic",
569 "xml": "<block atomic=\"true\">",
572 "x": 1275.2771759033203,
573 "y": 729.7013065814972,
574 "z": "5c846185.ea888",
583 "id": "4eb557ec.96c928",
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": 761.8645324707031,
589 "y": 756.2895498275757,
590 "z": "5c846185.ea888",
594 "id": "584a4c5d.3639a4",
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": 2090.1194229125977,
601 "y": 721.0040273666382,
602 "z": "5c846185.ea888",
610 "id": "c6c0a37e.c2dab",
611 "type": "outcomeTrue",
613 "xml": "<outcome value='true'>\n",
616 "x": 2285.929244995117,
617 "y": 720.4683518409729,
618 "z": "5c846185.ea888",
626 "id": "b3956a96.0877a8",
628 "name": "set tmp.cidx",
629 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
631 "x": 2601.2657775878906,
632 "y": 721.2246098518372,
633 "z": "5c846185.ea888",
637 "id": "f7015fdd.73e0f",
639 "name": "Delete consumed service consumed-allotted-resources in mdsal",
642 "x": 816.0084686279297,
643 "y": 618.003871455905,
644 "z": "5c846185.ea888",
648 "id": "1b9b1c3c.959814",
650 "name": "This set resource will be deleted in MDSAL by provider code",
653 "x": 806.341251373291,
654 "y": 722.7819633483887,
655 "z": "5c846185.ea888",
659 "id": "4ceb1c8.5e02ee4",
661 "name": "Obtain the index of conusumed AR",
664 "x": 728.7856597900391,
665 "y": 649.8927316665649,
666 "z": "5c846185.ea888",
670 "id": "e9cfa004.3e1db",
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",
676 "y": 669.0039052963257,
677 "z": "5c846185.ea888",
681 "id": "980eb324.1f10c",
683 "name": "block : atomic",
684 "xml": "<block atomic=\"true\">",
687 "x": 2435.007843017578,
688 "y": 721.2539548873901,
689 "z": "5c846185.ea888",
697 "id": "157c6d55.8b7213",
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",
703 "y": 778.2539052963257,
704 "z": "5c846185.ea888",
708 "id": "2c9e34da.91de0c",
711 "xml": "<outcome value=''>\n",
715 "y": 778.2539052963257,
716 "z": "5c846185.ea888",
724 "id": "c89d5c3.bdcfea",
725 "type": "switchNode",
726 "name": "switch tmp.cidx ",
727 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
731 "y": 778.2539052963257,
732 "z": "5c846185.ea888",
740 "id": "c4252e31.dbb43",
742 "name": "Delete provided service provided-allotted-resources in mdsal",
745 "x": 802.5078277587891,
746 "y": 814.0039052963257,
747 "z": "5c846185.ea888",
751 "id": "dea01091.d8b15",
754 "xml": "<outcome value='Other'>\n",
757 "x": 1130.5080833435059,
758 "y": 1128.7540974617004,
759 "z": "5c846185.ea888",
767 "id": "7dbb67ae.29f3f8",
769 "name": "outcome Null",
770 "xml": "<outcome value=''>\n",
773 "x": 1147.5080032348633,
774 "y": 1040.7539315223694,
775 "z": "5c846185.ea888",
783 "id": "f54472a.345109",
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": 1311.3656005859375,
789 "y": 1041.1824765205383,
790 "z": "5c846185.ea888",
794 "id": "e1824da6.1f214",
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": 1742.7578563690186,
800 "y": 1158.7539353370667,
801 "z": "5c846185.ea888",
805 "id": "8205df8d.8ddee",
808 "xml": "<outcome value=''>\n",
811 "x": 1605.2578563690186,
812 "y": 1158.7539353370667,
813 "z": "5c846185.ea888",
821 "id": "19cf7741.613499",
822 "type": "switchNode",
823 "name": "switch tmp.pidx ",
824 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
827 "x": 1451.2578563690186,
828 "y": 1158.7539353370667,
829 "z": "5c846185.ea888",
837 "id": "c87ef19e.e93cf",
838 "type": "outcomeTrue",
840 "xml": "<outcome value='true'>\n",
843 "x": 2315.508274078369,
844 "y": 1078.7540936470032,
845 "z": "5c846185.ea888",
853 "id": "33e9010b.6c835e",
855 "name": "set tmp.pidx",
856 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
858 "x": 2383.8443908691406,
859 "y": 1213.510190486908,
860 "z": "5c846185.ea888",
864 "id": "27e8796d.045376",
866 "name": "block : atomic",
867 "xml": "<block atomic=\"true\">",
870 "x": 2375.586727142334,
871 "y": 1149.5395798683167,
872 "z": "5c846185.ea888",
880 "id": "608b88dd.e3a5a8",
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": 761.0079040527344,
886 "y": 1144.003975868225,
887 "z": "5c846185.ea888",
891 "id": "12cd17c5.66c948",
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": 718.2266616821289,
898 "y": 1298.7543454170227,
899 "z": "5c846185.ea888",
908 "id": "cf61b833.d96918",
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": 808.3373260498047,
915 "y": 984.3333654403687,
916 "z": "5c846185.ea888",
925 "id": "9eb3dfae.f51c4",
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": 742.3372650146484,
932 "y": 942.3332047462463,
933 "z": "5c846185.ea888",