3 "id": "9ff5a59d.ba1e08",
8 "y": 49.999999046325684,
9 "z": "3cf3c3f6.8ecf4c",
17 "id": "2a13d7f0.0d4348",
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": 302.00391006469727,
26 "y": 122.00001621246338,
27 "z": "3cf3c3f6.8ecf4c",
35 "id": "a747a1bc.5a7f6",
37 "name": "sdwan-attachment-topology-operation-delete",
38 "xml": "<method rpc='sdwan-attachment-topology-operation-delete' mode='sync'>\n",
41 "x": 290.0040283203125,
42 "y": 209.99999904632568,
43 "z": "3cf3c3f6.8ecf4c",
51 "id": "c8f19e0f.8c32c",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">\n",
58 "x": 306.0040283203125,
59 "y": 765.0002436637878,
60 "z": "3cf3c3f6.8ecf4c",
81 "id": "ac139f07.afe46",
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": 702.9974670410156,
87 "y": 163.9934859275818,
88 "z": "3cf3c3f6.8ecf4c",
92 "id": "c1a22f40.b7f8d",
94 "name": "set tmp ar-id to fetch resource from MDSAL",
97 "x": 731.9577789306641,
98 "y": 128.02528190612793,
99 "z": "3cf3c3f6.8ecf4c",
103 "id": "d564f17f.3cd7c",
105 "name": "set tmp.ar.self-link",
106 "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",
108 "x": 656.9974060058594,
109 "y": 256.9934911727905,
110 "z": "3cf3c3f6.8ecf4c",
114 "id": "da5a8374.7ecac",
116 "name": "execute Properties",
117 "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",
120 "x": 663.2592964172363,
121 "y": 344.6602201461792,
122 "z": "3cf3c3f6.8ecf4c",
128 "id": "b24304d4.852188",
130 "name": "generate allotted-resource url",
131 "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",
134 "x": 695.2593231201172,
135 "y": 432.66020154953003,
136 "z": "3cf3c3f6.8ecf4c",
142 "id": "595e5ef1.fa051",
144 "name": "Used for setting output to API Handler",
147 "x": 710.9974365234375,
148 "y": 223.9935007095337,
149 "z": "3cf3c3f6.8ecf4c",
153 "id": "6c854173.f4bc7",
155 "name": "Obtain different URL, template location etc",
156 "info": "For saving resource information to MDSAL & for AAI",
158 "x": 728.9974021911621,
159 "y": 309.882381439209,
160 "z": "3cf3c3f6.8ecf4c",
164 "id": "e788822e.3722e",
166 "name": "Used to Get AR by id to MDSAL, same as self-link",
169 "x": 754.9974212646484,
170 "y": 396.8823404312134,
171 "z": "3cf3c3f6.8ecf4c",
175 "id": "dff7fd40.e0f0c",
177 "name": "GET parent-service-data from mdsal to check existence of other End point",
180 "x": 822.0042343139648,
181 "y": 851.5316219329834,
182 "z": "3cf3c3f6.8ecf4c",
186 "id": "5cba16bf.c97498",
188 "name": "for pidx..mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[]",
189 "xml": "<for index='pidx' start='0' end='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`' >\n",
192 "x": 1650.1888427734375,
193 "y": 1085.0042576789856,
194 "z": "3cf3c3f6.8ecf4c",
202 "id": "81139b91.d72eb8",
203 "type": "switchNode",
204 "name": "switch mdsal-psd.service-data.provided-allotted-resources_length",
205 "xml": "<switch test='`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource_length`'>\n",
208 "x": 801.1882019042969,
209 "y": 1091.7180404663086,
210 "z": "3cf3c3f6.8ecf4c",
219 "id": "73a8d368.4b79bc",
221 "name": "block : atomic",
222 "xml": "<block atomic=\"true\">",
225 "x": 1251.4583644866943,
226 "y": 1131.7015261650085,
227 "z": "3cf3c3f6.8ecf4c",
236 "id": "72856d05.385d64",
237 "type": "switchNode",
238 "name": "switch allotted-resource-id",
239 "xml": "<switch test=\"`$mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
242 "x": 2100.300048828125,
243 "y": 1083.0041155815125,
244 "z": "3cf3c3f6.8ecf4c",
252 "id": "72df0cf3.25ba74",
254 "name": "set tmp.ar.parent-service-instance-id",
255 "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",
257 "x": 712.9726181030273,
258 "y": 887.0000667572021,
259 "z": "3cf3c3f6.8ecf4c",
263 "id": "32223174.f7450e",
266 "xml": "<outcome value='success'>\n",
269 "x": 1092.972900390625,
270 "y": 965.0001816749573,
271 "z": "3cf3c3f6.8ecf4c",
279 "id": "e0a303bb.2dc06",
282 "xml": "<outcome value='Other'>\n",
285 "x": 1084.8247032165527,
286 "y": 1000.0662665367126,
287 "z": "3cf3c3f6.8ecf4c",
295 "id": "3e0bcadf.484fe6",
296 "type": "returnFailure",
297 "name": "return failure",
298 "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",
300 "x": 1259.973388671875,
301 "y": 996.333616733551,
302 "z": "3cf3c3f6.8ecf4c",
306 "id": "c45c28d6.ff3cc8",
313 "x": 1243.972900390625,
314 "y": 963.0001816749573,
315 "z": "3cf3c3f6.8ecf4c",
321 "id": "ebfdd448.549cc8",
324 "xml": "<outcome value='failure'>\n",
327 "x": 946.7346687316895,
328 "y": 1280.9528144598007,
329 "z": "3cf3c3f6.8ecf4c",
337 "id": "65c46af.7320594",
338 "type": "returnFailure",
339 "name": "return failure",
340 "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",
342 "x": 1113.2585487365723,
343 "y": 1292.5718854665756,
344 "z": "3cf3c3f6.8ecf4c",
348 "id": "4d049da0.ca99b4",
351 "xml": "<outcome value='not-found'>\n",
354 "x": 953.8299560546875,
355 "y": 1313.7147821187973,
356 "z": "3cf3c3f6.8ecf4c",
364 "id": "36f9e028.ff6b9",
366 "name": "TODO: Rework after confirmation from AAI",
369 "x": 1078.1413345336914,
370 "y": 1231.8732142448425,
371 "z": "3cf3c3f6.8ecf4c",
375 "id": "b5ddcb9b.3d0b08",
377 "name": "set output to api handler",
378 "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",
380 "x": 679.5500564575195,
381 "y": 1244.8276815414429,
382 "z": "3cf3c3f6.8ecf4c",
386 "id": "7e7d6803.801908",
387 "type": "returnSuccess",
388 "name": "return success",
389 "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",
391 "x": 648.9631729125977,
392 "y": 1351.443561553955,
393 "z": "3cf3c3f6.8ecf4c",
397 "id": "97410a5a.3537b8",
399 "name": "execute RestApiCallNode - PUT AR by id",
400 "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",
403 "x": 728.6705703735352,
404 "y": 521.3333616256714,
405 "z": "3cf3c3f6.8ecf4c",
415 "id": "1994f5fd.2a6f4a",
418 "xml": "<outcome value='not-found'>\n",
421 "x": 968.3120727539062,
422 "y": 561.6649098396301,
423 "z": "3cf3c3f6.8ecf4c",
431 "id": "da3ffcab.ea62a",
434 "xml": "<outcome value='failure'>\n",
437 "x": 965.3120727539062,
438 "y": 518.1649074554443,
439 "z": "3cf3c3f6.8ecf4c",
447 "id": "e404bf43.f1066",
450 "xml": "<outcome value='success'>\n",
453 "x": 972.0621528625488,
454 "y": 477.52200269699097,
455 "z": "3cf3c3f6.8ecf4c",
463 "id": "e45dc5dc.4ac748",
464 "type": "returnFailure",
465 "name": "return failure",
466 "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",
468 "x": 1124.062240600586,
469 "y": 539.9149079322815,
470 "z": "3cf3c3f6.8ecf4c",
474 "id": "6706c73a.4ce818",
481 "x": 1109.7180843353271,
482 "y": 477.7141823768616,
483 "z": "3cf3c3f6.8ecf4c",
489 "id": "61ea2842.341858",
491 "name": "Delete Allotted Resource",
494 "x": 676.0039520263672,
495 "y": 490.0000276565552,
496 "z": "3cf3c3f6.8ecf4c",
500 "id": "6dbcd93.5772b28",
502 "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
503 "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
507 "y": 727.0039052963257,
508 "z": "3cf3c3f6.8ecf4c",
516 "id": "d656e279.64fe3",
517 "type": "switchNode",
518 "name": "switch service-data.consumed-allotted-resources_length",
519 "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
522 "x": 779.0071983337402,
523 "y": 687.7179067134857,
524 "z": "3cf3c3f6.8ecf4c",
533 "id": "e4f37d32.adb08",
535 "name": "outcome Null",
536 "xml": "<outcome value=''>\n",
539 "x": 1103.1500625610352,
540 "y": 670.5753412246704,
541 "z": "3cf3c3f6.8ecf4c",
549 "id": "b232603b.f0d15",
552 "xml": "<outcome value='Other'>\n",
555 "x": 1089.1500854492188,
556 "y": 733.5753300189972,
557 "z": "3cf3c3f6.8ecf4c",
565 "id": "a3ecd1d6.43a2e",
567 "name": "block : atomic",
568 "xml": "<block atomic=\"true\">",
571 "x": 1249.2771759033203,
572 "y": 731.7013065814972,
573 "z": "3cf3c3f6.8ecf4c",
582 "id": "be0fff75.07c73",
584 "name": "set consumed allotted resources for deletion",
585 "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",
587 "x": 735.8645324707031,
588 "y": 758.2895498275757,
589 "z": "3cf3c3f6.8ecf4c",
593 "id": "8604274a.795a98",
594 "type": "switchNode",
595 "name": "switch allotted-resource-id",
596 "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
599 "x": 2064.1194229125977,
600 "y": 723.0040273666382,
601 "z": "3cf3c3f6.8ecf4c",
609 "id": "3ce4b91e.bc1ea6",
610 "type": "outcomeTrue",
612 "xml": "<outcome value='true'>\n",
615 "x": 2259.929244995117,
616 "y": 722.4683518409729,
617 "z": "3cf3c3f6.8ecf4c",
625 "id": "5d4138bb.2e6948",
627 "name": "set tmp.cidx",
628 "xml": "<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n",
630 "x": 2575.2657775878906,
631 "y": 723.2246098518372,
632 "z": "3cf3c3f6.8ecf4c",
636 "id": "80fa82c1.032f3",
638 "name": "Delete consumed service consumed-allotted-resources in mdsal",
641 "x": 790.0084686279297,
642 "y": 620.003871455905,
643 "z": "3cf3c3f6.8ecf4c",
647 "id": "b69750ea.d13e7",
649 "name": "This set resource will be deleted in MDSAL by provider code",
652 "x": 780.341251373291,
653 "y": 724.7819633483887,
654 "z": "3cf3c3f6.8ecf4c",
658 "id": "24feb42b.2816cc",
660 "name": "Obtain the index of conusumed AR",
663 "x": 702.7856597900391,
664 "y": 651.8927316665649,
665 "z": "3cf3c3f6.8ecf4c",
669 "id": "157affe5.dc6c6",
670 "type": "returnFailure",
671 "name": "return failure",
672 "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",
675 "y": 671.0039052963257,
676 "z": "3cf3c3f6.8ecf4c",
680 "id": "bfbb9b9d.413298",
682 "name": "block : atomic",
683 "xml": "<block atomic=\"true\">",
686 "x": 2409.007843017578,
687 "y": 723.2539548873901,
688 "z": "3cf3c3f6.8ecf4c",
696 "id": "f597fe60.1abe5",
697 "type": "returnFailure",
698 "name": "return failure",
699 "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",
702 "y": 780.2539052963257,
703 "z": "3cf3c3f6.8ecf4c",
707 "id": "15fa064d.455b2a",
710 "xml": "<outcome value=''>\n",
714 "y": 780.2539052963257,
715 "z": "3cf3c3f6.8ecf4c",
723 "id": "9971417.dd05cc",
724 "type": "switchNode",
725 "name": "switch tmp.cidx ",
726 "xml": "<switch test=\"`$tmp.cidx`\">\n\n",
730 "y": 780.2539052963257,
731 "z": "3cf3c3f6.8ecf4c",
739 "id": "78b32310.b31e1c",
741 "name": "Delete provided service provided-allotted-resources in mdsal",
744 "x": 776.5078277587891,
745 "y": 816.0039052963257,
746 "z": "3cf3c3f6.8ecf4c",
750 "id": "2011daa6.6398e6",
753 "xml": "<outcome value='Other'>\n",
756 "x": 1104.5080833435059,
757 "y": 1130.7540974617004,
758 "z": "3cf3c3f6.8ecf4c",
766 "id": "e3d57198.c43ea",
768 "name": "outcome Null",
769 "xml": "<outcome value=''>\n",
772 "x": 1121.5080032348633,
773 "y": 1042.7539315223694,
774 "z": "3cf3c3f6.8ecf4c",
782 "id": "e0cbd03d.fef77",
783 "type": "returnFailure",
784 "name": "return failure",
785 "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",
787 "x": 1285.3656005859375,
788 "y": 1043.1824765205383,
789 "z": "3cf3c3f6.8ecf4c",
793 "id": "8152d4f5.017ee8",
794 "type": "returnFailure",
795 "name": "return failure",
796 "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",
798 "x": 1716.7578563690186,
799 "y": 1160.7539353370667,
800 "z": "3cf3c3f6.8ecf4c",
804 "id": "9af42612.9cc9e8",
807 "xml": "<outcome value=''>\n",
810 "x": 1579.2578563690186,
811 "y": 1160.7539353370667,
812 "z": "3cf3c3f6.8ecf4c",
820 "id": "4ca0ceba.893a2",
821 "type": "switchNode",
822 "name": "switch tmp.pidx ",
823 "xml": "<switch test=\"`$tmp.pidx`\">\n\n",
826 "x": 1425.2578563690186,
827 "y": 1160.7539353370667,
828 "z": "3cf3c3f6.8ecf4c",
836 "id": "f2234386.9854c",
837 "type": "outcomeTrue",
839 "xml": "<outcome value='true'>\n",
842 "x": 2289.508274078369,
843 "y": 1080.7540936470032,
844 "z": "3cf3c3f6.8ecf4c",
852 "id": "51d5026c.5bd4fc",
854 "name": "set tmp.pidx",
855 "xml": "<set>\n<parameter name='tmp.pidx' value='`$pidx`' />\n",
857 "x": 2357.8443908691406,
858 "y": 1215.510190486908,
859 "z": "3cf3c3f6.8ecf4c",
863 "id": "8c3b4c6c.f6375",
865 "name": "block : atomic",
866 "xml": "<block atomic=\"true\">",
869 "x": 2349.586727142334,
870 "y": 1151.5395798683167,
871 "z": "3cf3c3f6.8ecf4c",
879 "id": "38ea07fe.9ae708",
881 "name": "set provided allotted resources for deletion",
882 "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",
884 "x": 735.0079040527344,
885 "y": 1146.003975868225,
886 "z": "3cf3c3f6.8ecf4c",
890 "id": "a01da430.f51578",
892 "name": "update AAI allotted-resource",
893 "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",
896 "x": 692.2266616821289,
897 "y": 1300.7543454170227,
898 "z": "3cf3c3f6.8ecf4c",
907 "id": "5ded2c1d.2cf294",
909 "name": "execute RestApiCallNode - get-resource parent service data",
910 "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",
913 "x": 782.3373260498047,
914 "y": 986.3333654403687,
915 "z": "3cf3c3f6.8ecf4c",
924 "id": "9639b1d0.6aa4d",
926 "name": "get parent-service-data tmp.ar-url-psd",
927 "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`\"/>",
930 "x": 716.3372650146484,
931 "y": 944.3332047462463,
932 "z": "3cf3c3f6.8ecf4c",