3 "id": "4957f22c.5e2f1c",
4 "type": "service-logic",
5 "name": "GENERIC-RESOURCE-API ${project.version}",
6 "module": "GENERIC-RESOURCE-API",
7 "version": "${project.version}",
9 "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}'>",
12 "y": 189.23809814453125,
13 "z": "a0c86160.b392c",
21 "id": "91cb305c.596c5",
25 "x": 136.71429443359375,
26 "y": 148.99998664855957,
27 "z": "a0c86160.b392c",
35 "id": "c6d0a907.91d928",
37 "name": "method site-vnf-topology-operation-deactivate",
38 "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>",
41 "x": 205.1429214477539,
42 "y": 228.99998092651367,
43 "z": "a0c86160.b392c",
51 "id": "1123bd39.e47163",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">",
57 "x": 245.88101959228516,
59 "z": "a0c86160.b392c",
74 "id": "1b149ea5.120f71",
76 "name": "block : atomic",
77 "xml": "<block atomic=\"true\">",
80 "x": 652.9286193847656,
81 "y": 165.80950736999512,
82 "z": "a0c86160.b392c",
93 "id": "3c6f9bb2.b231d4",
95 "name": "switch service-data.vnfs.vnf_length",
96 "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
99 "x": 932.817626953125,
100 "y": 191.14282512664795,
101 "z": "a0c86160.b392c",
110 "id": "bcdc7cd3.0b4fb",
112 "name": "outcome Null",
113 "xml": "<outcome value=''>\n",
116 "x": 1186.4287490844727,
117 "y": 172.8095121383667,
118 "z": "a0c86160.b392c",
126 "id": "e5a3d434.f56108",
127 "type": "returnFailure",
128 "name": "return failure",
129 "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
131 "x": 1360.4287643432617,
132 "y": 172.8095121383667,
133 "z": "a0c86160.b392c",
137 "id": "e83c4587.34b728",
140 "xml": "<outcome value='Other'>\n",
143 "x": 1169.9287185668945,
144 "y": 208.80952262878418,
145 "z": "a0c86160.b392c",
153 "id": "da47adb6.7e467",
155 "name": "block : atomic",
156 "xml": "<block atomic=\"true\">",
159 "x": 1351.9289169311523,
160 "y": 219.80952835083008,
161 "z": "a0c86160.b392c",
170 "id": "6cc13507.3cb79c",
171 "type": "switchNode",
172 "name": "switch tmp.vidx ",
173 "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
176 "x": 1541.928810119629,
177 "y": 236.80952262878418,
178 "z": "a0c86160.b392c",
186 "id": "a8b21c1e.3abec",
187 "type": "switchNode",
188 "name": "switch vnf-level-oper-status",
189 "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
192 "x": 896.0954284667969,
193 "y": 286.69837856292725,
194 "z": "a0c86160.b392c",
203 "id": "263aaa11.82a2b6",
205 "name": "outcome Active",
206 "xml": "<outcome value='Active'>\n",
209 "x": 1202.9287414550781,
210 "y": 267.8095006942749,
211 "z": "a0c86160.b392c",
219 "id": "59d6bbbd.f09a24",
222 "xml": "<outcome value='Other'>\n",
225 "x": 1170.9287414550781,
226 "y": 307.8095006942749,
227 "z": "a0c86160.b392c",
235 "id": "de14e045.7333a",
236 "type": "returnFailure",
237 "name": "return failure",
238 "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=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
240 "x": 1328.4287414550781,
241 "y": 307.8095006942749,
242 "z": "a0c86160.b392c",
246 "id": "233b3043.9673c",
247 "type": "switchNode",
248 "name": "switch vnf-id",
249 "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
252 "x": 874.9287261962891,
253 "y": 131.8094997406006,
254 "z": "a0c86160.b392c",
262 "id": "bd1b23ac.08604",
265 "xml": "<outcome value=''>",
268 "x": 1017.9287185668945,
269 "y": 131.80950260162354,
270 "z": "a0c86160.b392c",
278 "id": "78d81ec0.02c25",
279 "type": "returnFailure",
280 "name": "return failure",
281 "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=\"vnf-topology-operation-input.vnf-information.vnf-id is a required input\" />\n",
283 "x": 1166.4287185668945,
284 "y": 131.80950164794922,
285 "z": "a0c86160.b392c",
289 "id": "d1af55da.8f3b18",
291 "name": "for vidx..service-data.vnfs.vnf[]",
292 "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
295 "x": 1587.428840637207,
296 "y": 198.8095121383667,
297 "z": "a0c86160.b392c",
305 "id": "ea3ec79e.bdec18",
306 "type": "switchNode",
307 "name": "switch vnf-id found",
308 "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
311 "x": 1873.428840637207,
312 "y": 198.8095121383667,
313 "z": "a0c86160.b392c",
321 "id": "a7ba6ae5.977098",
322 "type": "outcomeTrue",
324 "xml": "<outcome value='true'>\n",
327 "x": 2058.9289169311523,
328 "y": 198.80951404571533,
329 "z": "a0c86160.b392c",
337 "id": "4dbc76e0.8d7858",
339 "name": "set tmp.vidx and ctx.vnf-data",
340 "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
342 "x": 2266.928840637207,
343 "y": 198.8095121383667,
344 "z": "a0c86160.b392c",
348 "id": "5ac1b74d.5a62b8",
349 "type": "returnFailure",
350 "name": "return failure",
351 "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=\"vnf-topology-operation-input.vnf-information.vnf-id not found in service-data\" />\n",
353 "x": 1833.428810119629,
354 "y": 236.80952262878418,
355 "z": "a0c86160.b392c",
359 "id": "7a52469e.0fa9f8",
362 "xml": "<outcome value=''>\n",
365 "x": 1695.928810119629,
366 "y": 236.80952262878418,
367 "z": "a0c86160.b392c",
375 "id": "cb3ab0a3.18f7a",
377 "name": "set vnf in service-data",
378 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />",
380 "x": 639.7145080566406,
381 "y": 634.00022315979,
382 "z": "a0c86160.b392c",
386 "id": "9f93822a.38acf",
388 "name": "set vnfId and vnf-object-path",
389 "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-request-input.vnf-id + '/vnf-data/'` \" />",
391 "x": 661.2701034545898,
392 "y": 671.2224445343018,
393 "z": "a0c86160.b392c",
397 "id": "fd9e7734.9c2008",
398 "type": "returnSuccess",
399 "name": "return success",
400 "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",
402 "x": 615.0478849411011,
403 "y": 821.7778739929199,
404 "z": "a0c86160.b392c",
408 "id": "79d541bc.c80a2",
410 "name": "set vnf-level-oper-status to PendingDelete",
411 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
413 "x": 699.7145080566406,
414 "y": 715.0002861022949,
415 "z": "a0c86160.b392c",
419 "id": "894517c4.94cc68",
421 "name": "block : atomic",
422 "xml": "<block atomic=\"true\">",
425 "x": 1396.856201171875,
426 "y": 271.88886964321136,
427 "z": "a0c86160.b392c",
433 "id": "35b35733.634ca8",
435 "name": "execute requiredParameters",
436 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
439 "x": 924.7145385742188,
441 "z": "a0c86160.b392c",
447 "id": "13f26ce4.e0b983",
449 "name": "site-vnf-topology-operation-deactivate",
453 "y": 94.23809814453125,
454 "z": "a0c86160.b392c",
458 "id": "75e2f346.784bbc",
460 "name": "for loop idx - VNF input parameters",
461 "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n",
464 "x": 697.0001487731934,
465 "y": 365.0000219345093,
466 "z": "a0c86160.b392c",
474 "id": "ccc1f150.dcee8",
481 "x": 903.8958854675293,
482 "y": 364.9218854904175,
483 "z": "a0c86160.b392c",
492 "id": "e5d9799e.ae8628",
493 "type": "switchNode",
494 "name": "switch role",
495 "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`\">\n",
498 "x": 1041.0130882263184,
499 "y": 364.89532566070557,
500 "z": "a0c86160.b392c",
508 "id": "a6693add.80f898",
509 "type": "outcomeTrue",
511 "xml": "<outcome value='true'>\n",
514 "x": 1181.013095855713,
515 "y": 365.89532566070557,
516 "z": "a0c86160.b392c",
524 "id": "139aae5d.e30622",
526 "name": "block : atomic",
527 "xml": "<block atomic=\"true\">",
530 "x": 1329.562744140625,
531 "y": 366.9220190048218,
532 "z": "a0c86160.b392c",
540 "id": "3d248a1d.8a4626",
543 "xml": "<set>\n<parameter name='prop.site.role' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n",
545 "x": 1473.8961067199707,
546 "y": 367.9220361709595,
547 "z": "a0c86160.b392c",
551 "id": "afea211a.e0c0a",
552 "type": "switchNode",
553 "name": "switch prop.site.sdwan",
554 "xml": "<switch test=\"`$prop.site.sdwan`\">\n",
558 "y": 520.0000438690186,
559 "z": "a0c86160.b392c",
567 "id": "79bc523a.1ecdec",
568 "type": "outcomeTrue",
570 "xml": "<outcome value='true'>\n",
573 "x": 852.0001335144043,
574 "y": 521.0000705718994,
575 "z": "a0c86160.b392c",
583 "id": "44a4d10f.69bea",
586 "xml": "<outcome value='success'>\n",
589 "x": 1556.500156402588,
590 "y": 489.00012493133545,
591 "z": "a0c86160.b392c",
599 "id": "4ad01ef7.c1305",
601 "name": "set controller data",
602 "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n",
604 "x": 1745.0002517700195,
605 "y": 483.0001345872879,
606 "z": "a0c86160.b392c",
610 "id": "5be09b23.d55b04",
613 "xml": "<outcome value='not-found'>\n",
616 "x": 1559.991123199463,
617 "y": 536.5741605758667,
618 "z": "a0c86160.b392c",
626 "id": "48c84162.ad4b8",
627 "type": "returnFailure",
628 "name": "return failure",
629 "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=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
631 "x": 1733.5625343322754,
632 "y": 524.8598966598511,
633 "z": "a0c86160.b392c",
637 "id": "89230c24.b3cdd",
640 "xml": "<outcome value='Other'>\n",
643 "x": 1552.324131011963,
644 "y": 577.907473564148,
645 "z": "a0c86160.b392c",
653 "id": "85634a7c.b937a8",
654 "type": "returnFailure",
655 "name": "return failure",
656 "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=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
658 "x": 1740.0966873168945,
659 "y": 573.3466663360596,
660 "z": "a0c86160.b392c",
664 "id": "a63c00b2.95bd5",
665 "type": "get-resource",
666 "name": "get-resource esr-thirdparty-sdnc",
667 "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
670 "x": 1289.5000686645508,
671 "y": 537.0001307725906,
672 "z": "a0c86160.b392c",
682 "id": "d6db6a91.6f4a78",
684 "name": "execute RestApiCallNode Create SDWAN site",
685 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
688 "x": 1318.0004119873047,
689 "y": 735.0002021789551,
690 "z": "a0c86160.b392c",
698 "id": "d2619b3c.655228",
700 "name": "block : atomic",
701 "xml": "<block atomic=\"true\">",
705 "x": 1811.6665420532227,
706 "y": 708.8889743089676,
707 "z": "a0c86160.b392c",
713 "id": "abc65d9c.3615e",
714 "type": "returnFailure",
715 "name": "return failure",
716 "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 executing Create vpn rest api\" />\n",
718 "x": 1787.111183166504,
719 "y": 770.4443570375443,
720 "z": "a0c86160.b392c",
724 "id": "af0f8953.715328",
727 "xml": "<outcome value='failure'>\n",
730 "x": 1642.111183166504,
731 "y": 767.4443570375443,
732 "z": "a0c86160.b392c",
740 "id": "6896c2eb.698ffc",
743 "xml": "<outcome value='success'>\n",
746 "x": 1638.5555572509766,
747 "y": 709.1111422777176,
748 "z": "a0c86160.b392c",
756 "id": "98c6743f.874588",
758 "name": "execute RestApiCallNode Get token",
759 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
762 "x": 1290.754165649414,
763 "y": 630.0041915178299,
764 "z": "a0c86160.b392c",
772 "id": "39a5c053.f8453",
775 "xml": "<outcome value='success'>\n",
778 "x": 1555.7540473937988,
779 "y": 615.0040866136551,
780 "z": "a0c86160.b392c",
788 "id": "a60d94cb.1ae848",
791 "xml": "<outcome value='failure'>\n",
794 "x": 1548.0040473937988,
795 "y": 656.6469699144363,
796 "z": "a0c86160.b392c",
804 "id": "a3e0da6b.559e48",
811 "x": 1674.0875434875488,
812 "y": 656.8930026292801,
813 "z": "a0c86160.b392c",
819 "id": "f6e07bec.bc35c8",
821 "name": "set token-id",
822 "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
824 "x": 1692.7540473937988,
825 "y": 615.0040866136551,
826 "z": "a0c86160.b392c",
830 "id": "f570928f.4101f",
832 "name": "tmp.thirdparty-sdnc-id is hardcoded value?",
835 "x": 1286.0039596557617,
836 "y": 504.0040522813797,
837 "z": "a0c86160.b392c",
841 "id": "c9dc3c5b.ce873",
843 "name": "block : atomic",
844 "xml": "<block atomic=\"true\">",
847 "x": 1013.0000686645508,
848 "y": 521.6665782928467,
849 "z": "a0c86160.b392c",
859 "id": "f2b6a437.7e6008",
861 "name": "update siteInstance configuration in AAI",
862 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' /> \n<parameter name='operational-status' value='PendingDelete' />\n",
865 "x": 693.0000915527344,
866 "y": 754.0001029968262,
867 "z": "a0c86160.b392c",
873 "id": "1badb5ed.e28e8a",
874 "type": "switchNode",
875 "name": "switch siteId",
876 "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`\">\n",
879 "x": 1041.0129852294922,
880 "y": 439.8953685760498,
881 "z": "a0c86160.b392c",
889 "id": "d169692c.c9c248",
890 "type": "outcomeTrue",
892 "xml": "<outcome value='true'>\n",
895 "x": 1181.0129928588867,
896 "y": 440.8953685760498,
897 "z": "a0c86160.b392c",
905 "id": "6b473348.32e71c",
907 "name": "block : atomic",
908 "xml": "<block atomic=\"true\">",
911 "x": 1329.5626411437988,
912 "y": 441.922061920166,
913 "z": "a0c86160.b392c",
921 "id": "b1ed9a25.d49d18",
923 "name": "set siteId",
924 "xml": "<set>\n<parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n",
926 "x": 1473.8960037231445,
927 "y": 442.9220790863037,
928 "z": "a0c86160.b392c",
932 "id": "5308b9e7.a82c18",
934 "name": "Get siteId to delete",
937 "x": 1052.9999694824219,
938 "y": 409.0000247955322,
939 "z": "a0c86160.b392c",