3 "id": "5e3d5340.60ff6c",
5 "name": "sdwan-vnf-topology-operation-device-activate",
8 "x": 508.3447952270508,
10 "z": "68e83c1d.51ded4",
14 "id": "98a7b4d5.abb6c8",
15 "type": "service-logic",
16 "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT",
17 "module": "GENERIC-RESOURCE-API",
18 "version": "1.2.1-SNAPSHOT",
20 "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='1.2.1-SNAPSHOT'>",
22 "x": 188.28570556640625,
23 "y": 122.0002670288086,
24 "z": "68e83c1d.51ded4",
32 "id": "b122f38a.d6d66",
37 "y": 59.76215744018555,
38 "z": "68e83c1d.51ded4",
46 "id": "acf9046.9fdadf8",
48 "name": "block : atomic",
49 "xml": "<block atomic=\"true\">",
52 "x": 189.66666412353516,
53 "y": 383.4288272857666,
54 "z": "68e83c1d.51ded4",
73 "id": "3d1725f.b682bda",
74 "type": "returnSuccess",
75 "name": "return success",
76 "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",
78 "x": 570.3336067199707,
79 "y": 1005.0958871841431,
80 "z": "68e83c1d.51ded4",
84 "id": "fadd626.2db7aa",
86 "name": "set vnf-level-oper-status to Created",
87 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].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[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
89 "x": 659.8136177062988,
90 "y": 737.4329919815063,
91 "z": "68e83c1d.51ded4",
95 "id": "a8ec1f34.2d716",
97 "name": "copy input data to service data",
98 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />",
100 "x": 637.6668090820312,
101 "y": 793.4291677474976,
102 "z": "68e83c1d.51ded4",
106 "id": "3cb5e097.323b3",
108 "name": "save deviceInstance configuration in AAI",
109 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $prop.vnf-id' >\n<parameter name='id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.name`' />\n<parameter name='name' value=\"true\" />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` \" />\n",
112 "x": 1116.0007019042969,
113 "y": 810.3184747695923,
114 "z": "68e83c1d.51ded4",
120 "id": "6e6cf252.6d76ac",
122 "name": "method sdwan-vnf-topology-operation-device-create",
123 "xml": "<method rpc='sdwan-vnf-topology-operation-device-create' mode='sync'>\n",
127 "y": 216.3484992980957,
128 "z": "68e83c1d.51ded4",
136 "id": "973ba2fa.09281",
138 "name": "set vnfId and vnf-object-path",
139 "xml": "<set>\n<parameter name='vnfId' value='`$prop.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/' + $prop.vnf-id + '/vnf-data/'` \" />",
141 "x": 641.0002593994141,
142 "y": 686.348804473877,
143 "z": "68e83c1d.51ded4",
147 "id": "1a8342ca.6c718d",
149 "name": "set deviceId to service data",
150 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n",
152 "x": 647.0004119873047,
153 "y": 638.3490514755249,
154 "z": "68e83c1d.51ded4",
158 "id": "11b9f4bc.54a6db",
160 "name": "AAI resource need to update",
163 "x": 962.0003051757812,
164 "y": 764.3489141464233,
165 "z": "68e83c1d.51ded4",
169 "id": "57ec6080.aef67",
171 "name": "execute generate-vnf-id",
172 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-id\"/>\n",
175 "x": 1146.0006866455078,
176 "y": 151.3486099243164,
177 "z": "68e83c1d.51ded4",
183 "id": "f5373c70.1c094",
185 "name": "save service relationship in AAI",
186 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $prop.vnf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-id`\" />",
189 "x": 628.000560760498,
190 "y": 960.0957889556885,
191 "z": "68e83c1d.51ded4",
197 "id": "2f458da.dde6872",
198 "type": "switchNode",
199 "name": "switch vnf-id",
200 "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
203 "x": 610.0001068115234,
204 "y": 255.0000286102295,
205 "z": "68e83c1d.51ded4",
214 "id": "96bd2791.9be248",
217 "xml": "<outcome value=''>",
220 "x": 751.0001106262207,
221 "y": 230.00002002716064,
222 "z": "68e83c1d.51ded4",
230 "id": "17f3f6fd.04e999",
232 "name": "block : atomic",
233 "xml": "<block atomic=\"true\">",
236 "x": 899.0002136230469,
237 "y": 166.0000123977661,
238 "z": "68e83c1d.51ded4",
248 "id": "67087b1d.5c3fb4",
251 "xml": "<outcome value='Other'>\n",
254 "x": 747.5312881469727,
255 "y": 290.03125762939453,
256 "z": "68e83c1d.51ded4",
264 "id": "71433e4d.c21fc",
266 "name": "set prop.vnf-id",
267 "xml": "<set>\n<parameter name='prop.vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n",
269 "x": 1062.531982421875,
270 "y": 359.03163146972656,
271 "z": "68e83c1d.51ded4",
275 "id": "36044171.bb341e",
277 "name": "block : atomic",
278 "xml": "<block atomic=\"true\">",
281 "x": 898.5317077636719,
282 "y": 322.03137969970703,
283 "z": "68e83c1d.51ded4",
293 "id": "5b27914d.aaeea",
295 "name": "set prop.sdncCreate=false",
296 "xml": "<set>\n<parameter name='prop.sdncCreate' value='false' />\n",
298 "x": 684.5313568115234,
299 "y": 146.03125190734863,
300 "z": "68e83c1d.51ded4",
304 "id": "14b0db80.805625",
305 "type": "switchNode",
306 "name": "switch prop.sdncCreate",
307 "xml": "<switch test='`$prop.sdncCreate`'>\n",
310 "x": 607.0316925048828,
311 "y": 840.0316715240479,
312 "z": "68e83c1d.51ded4",
321 "id": "f49b5933.b5d218",
322 "type": "outcomeTrue",
324 "xml": "<outcome value='true'>\n",
327 "x": 853.0314636230469,
328 "y": 810.5314083099365,
329 "z": "68e83c1d.51ded4",
337 "id": "b6ead02e.a5302",
338 "type": "outcomeTrue",
340 "xml": "<outcome value='false'>\n",
343 "x": 854.5314483642578,
344 "y": 865.5314226150513,
345 "z": "68e83c1d.51ded4",
353 "id": "3fbf12e1.7d984e",
355 "name": "set prop.updateAAIsdncCreate",
356 "xml": "<set>\n<parameter name='prop.sdncCreate' value='true' />\n",
358 "x": 1163.5317764282227,
359 "y": 111.03133583068848,
360 "z": "68e83c1d.51ded4",
364 "id": "60a129a0.bbdd58",
366 "name": "for loop idx - VNF input parameters",
367 "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
370 "x": 672.5314331054688,
371 "y": 440.031286239624,
372 "z": "68e83c1d.51ded4",
380 "id": "ea444b8d.2a7e58",
387 "x": 887.3097763061523,
388 "y": 437.58687019348145,
389 "z": "68e83c1d.51ded4",
398 "id": "c56fa091.a24ed",
400 "name": "set parameterName",
401 "xml": "<set>\n<parameter name=\"`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n",
403 "x": 1053.0104064941406,
404 "y": 452.3351249694824,
405 "z": "68e83c1d.51ded4",
409 "id": "5cf3f0ff.4ce19",
411 "name": "execute split parameterName",
412 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
415 "x": 1083.5659790039062,
416 "y": 415.3350086212158,
417 "z": "68e83c1d.51ded4",
423 "id": "b0ca4039.10bf1",
425 "name": "set vnf-request-input.",
426 "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
428 "x": 634.5310516357422,
429 "y": 514.3560009002686,
430 "z": "68e83c1d.51ded4",
434 "id": "48942c51.646f94",
436 "name": "call sdwan-get-device-param",
437 "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
440 "x": 659.5314331054688,
441 "y": 546.3561611175537,
442 "z": "68e83c1d.51ded4",
448 "id": "76da7c24.a3ef74",
450 "name": "if SO provide vnf-id use that else create new",
453 "x": 701.5312805175781,
454 "y": 200.0312614440918,
455 "z": "68e83c1d.51ded4",
459 "id": "1f9131ce.7814de",
461 "name": "block : atomic",
462 "xml": "<block atomic=\"true\">",
465 "x": 1107.0317840576172,
466 "y": 248.0313549041748,
467 "z": "68e83c1d.51ded4",
476 "id": "3b0d82e1.8f158e",
477 "type": "switchNode",
478 "name": "switch service-data.vnfs.vnf_length",
479 "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
482 "x": 1351.0316734313965,
483 "y": 205.0313482284546,
484 "z": "68e83c1d.51ded4",
493 "id": "975a1f09.2f8c8",
496 "xml": "<outcome value=''>\n",
499 "x": 1564.7460556030273,
500 "y": 188.1741189956665,
501 "z": "68e83c1d.51ded4",
509 "id": "3e9891d0.1834fe",
511 "name": "set vnf-index=0",
512 "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
514 "x": 1713.0317039489746,
515 "y": 185.17417335510254,
516 "z": "68e83c1d.51ded4",
520 "id": "a0a50419.1fe858",
523 "xml": "<outcome value='Other'>\n",
526 "x": 1568.1745529174805,
527 "y": 233.45991039276123,
528 "z": "68e83c1d.51ded4",
536 "id": "bfe1f8cb.5f4108",
538 "name": "set vnf-index = vnf_length",
539 "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
541 "x": 1752.0322952270508,
542 "y": 233.74567890167236,
543 "z": "68e83c1d.51ded4",
547 "id": "2e1a03e.c5a90fc",
549 "name": "set new vnf_length",
550 "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
552 "x": 1303.0317344665527,
553 "y": 240.031343460083,
554 "z": "68e83c1d.51ded4",
558 "id": "689dbbbf.19b784",
560 "name": "update deviceInstance configuration in AAI",
561 "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $prop.vnf-id' >\n<parameter name='id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.name`' />\n<parameter name='name' value=\"true\" />\n<parameter name='description' value='`$prop.device.description`' />\n<parameter name='vendor' value='`$prop.device.vendor`' />\n<parameter name='class' value='`$prop.device.class`' />\n<parameter name='type' value='`$prop.device.deviceModel`' />\n<parameter name='version' value='`$prop.device.version`' />\n<parameter name='system-ip' value='`$prop.device.systemIp`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` \" />\n",
564 "x": 1108.0312805175781,
565 "y": 868.0312757492065,
566 "z": "68e83c1d.51ded4",
572 "id": "ded55567.2a8678",
574 "name": "for each existing VNF",
575 "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
578 "x": 1114.0313186645508,
579 "y": 320.03128814697266,
580 "z": "68e83c1d.51ded4",
588 "id": "e638f4a.543e508",
589 "type": "outcomeTrue",
591 "xml": "<outcome value='true'>\n",
594 "x": 1650.6031284332275,
595 "y": 368.17424297332764,
596 "z": "68e83c1d.51ded4",
604 "id": "584781cc.b608c",
605 "type": "returnFailure",
606 "name": "return failure",
607 "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 id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n",
609 "x": 1789.1744861602783,
610 "y": 368.17420387268066,
611 "z": "68e83c1d.51ded4",
615 "id": "e89efb32.eef4a8",
617 "name": "make sure this vnf-id doesn't exist already",
620 "x": 1744.459602355957,
621 "y": 497.1741261482239,
622 "z": "68e83c1d.51ded4",
626 "id": "5b9cdd8f.43fa54",
627 "type": "switchNode",
628 "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
629 "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
632 "x": 1453.0313262939453,
633 "y": 321.0312910079956,
634 "z": "68e83c1d.51ded4",
642 "id": "f06f6e0f.f753c",
644 "name": "set deviceId to service data",
645 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value=\"sdncCreate\" />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$prop.sdncCreate`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n",
647 "x": 621.0313682556152,
648 "y": 901.0312786102295,
649 "z": "68e83c1d.51ded4",