3 "id": "fd0440a.ecd51c",
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": 82.23810958862305,
13 "z": "842fbc05.cce04",
21 "id": "e5b0a995.906238",
25 "x": 116.71429443359375,
27 "z": "842fbc05.cce04",
35 "id": "23553cdf.889914",
37 "name": "block : atomic",
38 "xml": "<block atomic=\"true\">",
41 "x": 197.3809585571289,
42 "y": 343.66666984558105,
43 "z": "842fbc05.cce04",
62 "id": "f71d7490.89bd28",
63 "type": "returnSuccess",
64 "name": "return success",
65 "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",
67 "x": 578.0479011535645,
68 "y": 965.3337297439575,
69 "z": "842fbc05.cce04",
73 "id": "bf0f7a26.a11068",
75 "name": "set vnf-level-oper-status to Created",
76 "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",
78 "x": 667.5279121398926,
79 "y": 697.6708345413208,
80 "z": "842fbc05.cce04",
84 "id": "20a30a30.b04286",
86 "name": "copy input data to service data",
87 "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.`' />",
89 "x": 645.381103515625,
90 "y": 753.667010307312,
91 "z": "842fbc05.cce04",
95 "id": "ef25e38.ee9742",
97 "name": "save deviceInstance configuration in AAI",
98 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.device-id = $prop.vnf-id' >\n<parameter name='device-id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.esn`' />\n<parameter name='device-name' value='`$prop.device.name`' />\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",
101 "x": 1123.7149963378906,
102 "y": 770.5563173294067,
103 "z": "842fbc05.cce04",
109 "id": "127bb9c5.150526",
111 "name": "method sdwan-vnf-topology-operation-device-create",
112 "xml": "<method rpc='sdwan-vnf-topology-operation-device-create' mode='sync'>\n",
115 "x": 207.71429443359375,
116 "y": 176.58634185791016,
117 "z": "842fbc05.cce04",
125 "id": "ed1f7a5f.52aa38",
127 "name": "set vnfId and vnf-object-path",
128 "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/'` \" />",
130 "x": 648.7145538330078,
131 "y": 646.5866470336914,
132 "z": "842fbc05.cce04",
136 "id": "abbdb9a7.a00168",
138 "name": "set deviceId to service data",
139 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />\n",
141 "x": 654.7147064208984,
142 "y": 598.5868940353394,
143 "z": "842fbc05.cce04",
147 "id": "c106be0b.38899",
149 "name": "AAI resource need to update",
152 "x": 969.714599609375,
153 "y": 724.5867567062378,
154 "z": "842fbc05.cce04",
158 "id": "63a58c6c.370174",
160 "name": "execute generate-vnf-id",
161 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-id\"/>\n",
164 "x": 1153.7149810791016,
165 "y": 111.58645248413086,
166 "z": "842fbc05.cce04",
172 "id": "60a78e84.5e55",
174 "name": "save service relationship in AAI",
175 "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.device-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-id`\" />",
178 "x": 635.7148551940918,
179 "y": 920.3336315155029,
180 "z": "842fbc05.cce04",
186 "id": "1a809147.c1ebef",
187 "type": "switchNode",
188 "name": "switch vnf-id",
189 "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
192 "x": 617.7144012451172,
193 "y": 215.23787117004395,
194 "z": "842fbc05.cce04",
203 "id": "ecde6b48.bbfc48",
206 "xml": "<outcome value=''>",
209 "x": 758.7144050598145,
210 "y": 190.2378625869751,
211 "z": "842fbc05.cce04",
219 "id": "81003234.70dcc",
221 "name": "block : atomic",
222 "xml": "<block atomic=\"true\">",
225 "x": 906.7145080566406,
226 "y": 126.23785495758057,
227 "z": "842fbc05.cce04",
237 "id": "1019aeef.5808d1",
240 "xml": "<outcome value='Other'>\n",
243 "x": 755.2455825805664,
244 "y": 250.26910018920898,
245 "z": "842fbc05.cce04",
253 "id": "fe4dccde.57bcf",
255 "name": "set prop.vnf-id",
256 "xml": "<set>\n<parameter name='prop.vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n",
258 "x": 1094.246337890625,
259 "y": 329.2694733142853,
260 "z": "842fbc05.cce04",
264 "id": "b2303be.abcc1c8",
266 "name": "block : atomic",
267 "xml": "<block atomic=\"true\">",
270 "x": 906.2460021972656,
271 "y": 282.2692222595215,
272 "z": "842fbc05.cce04",
282 "id": "53d08385.3ed46c",
284 "name": "set prop.sdncCreate=false",
285 "xml": "<set>\n<parameter name='prop.sdncCreate' value='false' />\n",
287 "x": 692.2456512451172,
288 "y": 106.26909446716309,
289 "z": "842fbc05.cce04",
293 "id": "d658c8ee.f13848",
294 "type": "switchNode",
295 "name": "switch prop.sdncCreate",
296 "xml": "<switch test='`$prop.sdncCreate`'>\n",
299 "x": 614.7459869384766,
300 "y": 800.2695140838623,
301 "z": "842fbc05.cce04",
310 "id": "be0155ce.278c18",
311 "type": "outcomeTrue",
313 "xml": "<outcome value='true'>\n",
316 "x": 860.7457580566406,
317 "y": 770.769250869751,
318 "z": "842fbc05.cce04",
326 "id": "f63d8c0c.a2846",
327 "type": "outcomeTrue",
329 "xml": "<outcome value='false'>\n",
332 "x": 862.2457427978516,
333 "y": 825.7692651748657,
334 "z": "842fbc05.cce04",
342 "id": "69aa8a5d.0ac9a4",
344 "name": "set prop.updateAAIsdncCreate",
345 "xml": "<set>\n<parameter name='prop.sdncCreate' value='true' />\n",
347 "x": 1171.2460708618164,
348 "y": 71.26917839050293,
349 "z": "842fbc05.cce04",
353 "id": "8e20e633.b9b588",
355 "name": "for loop idx - VNF input parameters",
356 "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
359 "x": 680.2457275390625,
360 "y": 400.2691287994385,
361 "z": "842fbc05.cce04",
369 "id": "6a3b248.f431cdc",
376 "x": 895.0240707397461,
377 "y": 397.8247127532959,
378 "z": "842fbc05.cce04",
387 "id": "b9f2cae.04bc638",
389 "name": "set parameterName",
390 "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",
392 "x": 1060.7247009277344,
393 "y": 412.5729675292969,
394 "z": "842fbc05.cce04",
398 "id": "c1af467b.da6408",
400 "name": "execute split parameterName",
401 "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",
404 "x": 1091.2802734375,
405 "y": 375.5728511810303,
406 "z": "842fbc05.cce04",
412 "id": "61dc4d5e.3ba864",
414 "name": "set vnf-request-input.",
415 "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
417 "x": 642.2453460693359,
418 "y": 474.593843460083,
419 "z": "842fbc05.cce04",
423 "id": "43e73a53.fc83c4",
425 "name": "call sdwan-get-device-param",
426 "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
429 "x": 667.2457275390625,
430 "y": 506.59400367736816,
431 "z": "842fbc05.cce04",
437 "id": "98f6587a.b563b8",
439 "name": "if SO provide vnf-id use that else create new",
442 "x": 709.2455749511719,
443 "y": 160.26910400390625,
444 "z": "842fbc05.cce04",
448 "id": "6eb09a3f.09bc74",
450 "name": "block : atomic",
451 "xml": "<block atomic=\"true\">",
454 "x": 1114.746078491211,
455 "y": 208.26919746398926,
456 "z": "842fbc05.cce04",
465 "id": "10311b8f.214a74",
466 "type": "switchNode",
467 "name": "switch service-data.vnfs.vnf_length",
468 "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
471 "x": 1358.7459678649902,
472 "y": 165.26919078826904,
473 "z": "842fbc05.cce04",
482 "id": "e8ee65b6.e0bb98",
485 "xml": "<outcome value=''>\n",
488 "x": 1572.460350036621,
489 "y": 148.41196155548096,
490 "z": "842fbc05.cce04",
498 "id": "2bb1c8ad.9ae4c8",
500 "name": "set vnf-index=0",
501 "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
503 "x": 1720.7459983825684,
504 "y": 145.412015914917,
505 "z": "842fbc05.cce04",
509 "id": "8e4d05a7.18d778",
512 "xml": "<outcome value='Other'>\n",
515 "x": 1575.8888473510742,
516 "y": 193.69775295257568,
517 "z": "842fbc05.cce04",
525 "id": "20358c1.fc83f74",
527 "name": "set vnf-index = vnf_length",
528 "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
530 "x": 1759.7465896606445,
531 "y": 193.98352146148682,
532 "z": "842fbc05.cce04",
536 "id": "d0785948.131e88",
538 "name": "set new vnf_length",
539 "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
541 "x": 1305.746109008789,
542 "y": 213.26918148994446,
543 "z": "842fbc05.cce04",
547 "id": "2097a67.fbc2c5a",
549 "name": "update deviceInstance configuration in AAI",
550 "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.device-id = $prop.vnf-id' >\n<parameter name='device-id' value='`$prop.vnf-id`' />\n<parameter name='esn' value='`$prop.device.esn`' />\n<parameter name='device-name' value='`$prop.device.name`' />\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",
553 "x": 1115.7455749511719,
554 "y": 828.269118309021,
555 "z": "842fbc05.cce04",
561 "id": "d5a722bf.9d266",
563 "name": "for each existing VNF",
564 "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
567 "x": 1121.7456130981445,
568 "y": 280.2691307067871,
569 "z": "842fbc05.cce04",
577 "id": "7b2ea8f.f293e58",
578 "type": "outcomeTrue",
580 "xml": "<outcome value='true'>\n",
583 "x": 1658.3174228668213,
584 "y": 328.4120855331421,
585 "z": "842fbc05.cce04",
593 "id": "6db207f2.3f0a88",
594 "type": "returnFailure",
595 "name": "return failure",
596 "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",
598 "x": 1796.888780593872,
599 "y": 328.4120464324951,
600 "z": "842fbc05.cce04",
604 "id": "f8ea0727.32b188",
606 "name": "make sure this vnf-id doesn't exist already",
609 "x": 1752.1738967895508,
610 "y": 457.41196870803833,
611 "z": "842fbc05.cce04",
615 "id": "aceae556.187d88",
616 "type": "switchNode",
617 "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
618 "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
621 "x": 1460.745620727539,
622 "y": 281.26913356781006,
623 "z": "842fbc05.cce04",
631 "id": "ff98826e.6bc6d",
633 "name": "set sdncCreate to service data",
634 "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",
636 "x": 628.745662689209,
637 "y": 861.269121170044,
638 "z": "842fbc05.cce04",