3 "id": "9cb483d7.ff8df",
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}'>",
11 "x": 183.78570556640625,
12 "y": 145.0002658367157,
13 "z": "f234e69c.c27828",
21 "id": "a3a5e35d.08a8b",
26 "y": 82.76215624809265,
27 "z": "f234e69c.c27828",
35 "id": "194cf25c.9d64be",
37 "name": "block : atomic",
38 "xml": "<block atomic=\"true\">",
41 "x": 185.16666412353516,
42 "y": 406.4288260936737,
43 "z": "f234e69c.c27828",
62 "id": "94ec7644.8f3208",
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": 565.8336067199707,
68 "y": 1028.0958859920502,
69 "z": "f234e69c.c27828",
73 "id": "12b7db37.f7ff25",
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": 655.3136177062988,
79 "y": 760.4329907894135,
80 "z": "f234e69c.c27828",
84 "id": "ade80aa2.c72f18",
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": 633.1668090820312,
90 "y": 816.4291665554047,
91 "z": "f234e69c.c27828",
95 "id": "bf289ee9.17eee",
97 "name": "save deviceInstance configuration in AAI",
98 "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",
101 "x": 1111.5007019042969,
102 "y": 833.3184735774994,
103 "z": "f234e69c.c27828",
109 "id": "82081d1c.b4352",
111 "name": "method sdwan-vnf-topology-operation-device-create",
112 "xml": "<method rpc='sdwan-vnf-topology-operation-device-create' mode='sync'>\n",
116 "y": 239.3484981060028,
117 "z": "f234e69c.c27828",
125 "id": "d463d74.bf70428",
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": 636.5002593994141,
131 "y": 709.3488032817841,
132 "z": "f234e69c.c27828",
136 "id": "b128ad93.6f9ac",
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": 642.5004119873047,
142 "y": 661.349050283432,
143 "z": "f234e69c.c27828",
147 "id": "de11064d.94a5d8",
149 "name": "AAI resource need to update",
152 "x": 957.5003051757812,
153 "y": 787.3489129543304,
154 "z": "f234e69c.c27828",
158 "id": "4f128f3f.350cf",
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": 1141.5006866455078,
165 "y": 174.3486087322235,
166 "z": "f234e69c.c27828",
172 "id": "9bf97976.fa1928",
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.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-id`\" />",
178 "x": 623.500560760498,
179 "y": 983.0957877635956,
180 "z": "f234e69c.c27828",
186 "id": "d76d180.81a43e8",
187 "type": "switchNode",
188 "name": "switch vnf-id",
189 "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
192 "x": 605.5001068115234,
193 "y": 278.0000274181366,
194 "z": "f234e69c.c27828",
203 "id": "621f97e2.b689f8",
206 "xml": "<outcome value=''>",
209 "x": 746.5001106262207,
210 "y": 253.00001883506775,
211 "z": "f234e69c.c27828",
219 "id": "ef09f155.972b9",
221 "name": "block : atomic",
222 "xml": "<block atomic=\"true\">",
225 "x": 894.5002136230469,
226 "y": 189.00001120567322,
227 "z": "f234e69c.c27828",
237 "id": "786ad46d.cda56c",
240 "xml": "<outcome value='Other'>\n",
243 "x": 743.0312881469727,
244 "y": 313.03125643730164,
245 "z": "f234e69c.c27828",
253 "id": "8bf27ffe.7192e",
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": 1082.0320434570312,
259 "y": 392.03162956237793,
260 "z": "f234e69c.c27828",
264 "id": "b8aff249.035f2",
266 "name": "block : atomic",
267 "xml": "<block atomic=\"true\">",
270 "x": 894.0317077636719,
271 "y": 345.03137850761414,
272 "z": "f234e69c.c27828",
282 "id": "d4716c92.1b3cb",
284 "name": "set prop.sdncCreate=false",
285 "xml": "<set>\n<parameter name='prop.sdncCreate' value='false' />\n",
287 "x": 680.0313568115234,
288 "y": 169.03125071525574,
289 "z": "f234e69c.c27828",
293 "id": "1202a9f6.764af6",
294 "type": "switchNode",
295 "name": "switch prop.sdncCreate",
296 "xml": "<switch test='`$prop.sdncCreate`'>\n",
299 "x": 602.5316925048828,
300 "y": 863.031670331955,
301 "z": "f234e69c.c27828",
310 "id": "a65c4106.c8fe7",
311 "type": "outcomeTrue",
313 "xml": "<outcome value='true'>\n",
316 "x": 848.5314636230469,
317 "y": 833.5314071178436,
318 "z": "f234e69c.c27828",
326 "id": "b49509b2.10c3c8",
327 "type": "outcomeTrue",
329 "xml": "<outcome value='false'>\n",
332 "x": 850.0314483642578,
333 "y": 888.5314214229584,
334 "z": "f234e69c.c27828",
342 "id": "e345eb47.17b7c8",
344 "name": "set prop.updateAAIsdncCreate",
345 "xml": "<set>\n<parameter name='prop.sdncCreate' value='true' />\n",
347 "x": 1159.0317764282227,
348 "y": 134.03133463859558,
349 "z": "f234e69c.c27828",
353 "id": "50fb4440.68b56c",
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": 668.0314331054688,
360 "y": 463.0312850475311,
361 "z": "f234e69c.c27828",
369 "id": "d8830e39.7254c",
376 "x": 882.8097763061523,
377 "y": 460.58686900138855,
378 "z": "f234e69c.c27828",
387 "id": "24244ebf.8f5572",
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": 1048.5104064941406,
393 "y": 475.3351237773895,
394 "z": "f234e69c.c27828",
398 "id": "6cb4a749.692908",
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": 1079.0659790039062,
405 "y": 438.3350074291229,
406 "z": "f234e69c.c27828",
412 "id": "35434662.4bcfda",
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": 630.0310516357422,
418 "y": 537.3559997081757,
419 "z": "f234e69c.c27828",
423 "id": "b21ec7e.52c2938",
425 "name": "call sdwan-get-device-param",
426 "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
429 "x": 655.0314331054688,
430 "y": 569.3561599254608,
431 "z": "f234e69c.c27828",
437 "id": "bcf057ee.ac0fd8",
439 "name": "if SO provide vnf-id use that else create new",
442 "x": 697.0312805175781,
443 "y": 223.0312602519989,
444 "z": "f234e69c.c27828",
448 "id": "82623d50.b5d47",
450 "name": "block : atomic",
451 "xml": "<block atomic=\"true\">",
454 "x": 1102.5317840576172,
455 "y": 271.0313537120819,
456 "z": "f234e69c.c27828",
465 "id": "d5e68c18.6d168",
466 "type": "switchNode",
467 "name": "switch service-data.vnfs.vnf_length",
468 "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
471 "x": 1346.5316734313965,
472 "y": 228.0313470363617,
473 "z": "f234e69c.c27828",
482 "id": "f59d1f3f.83f78",
485 "xml": "<outcome value=''>\n",
488 "x": 1560.2460556030273,
489 "y": 211.1741178035736,
490 "z": "f234e69c.c27828",
498 "id": "b1cc315c.65ade",
500 "name": "set vnf-index=0",
501 "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
503 "x": 1708.5317039489746,
504 "y": 208.17417216300964,
505 "z": "f234e69c.c27828",
509 "id": "475c8f31.8dce6",
512 "xml": "<outcome value='Other'>\n",
515 "x": 1563.6745529174805,
516 "y": 256.45990920066833,
517 "z": "f234e69c.c27828",
525 "id": "f950bc3f.5973b",
527 "name": "set vnf-index = vnf_length",
528 "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
530 "x": 1747.5322952270508,
531 "y": 256.74567770957947,
532 "z": "f234e69c.c27828",
536 "id": "2bfd5f0a.c7681",
538 "name": "set new vnf_length",
539 "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
541 "x": 1293.5318145751953,
542 "y": 276.0313377380371,
543 "z": "f234e69c.c27828",
547 "id": "593b4cfd.497904",
549 "name": "update deviceInstance configuration in AAI",
550 "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",
553 "x": 1103.5312805175781,
554 "y": 891.0312745571136,
555 "z": "f234e69c.c27828",
561 "id": "ac207b07.0b4de8",
563 "name": "for each existing VNF",
564 "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
567 "x": 1109.5313186645508,
568 "y": 343.03128695487976,
569 "z": "f234e69c.c27828",
577 "id": "4fb64c02.89a0b4",
578 "type": "outcomeTrue",
580 "xml": "<outcome value='true'>\n",
583 "x": 1646.1031284332275,
584 "y": 391.17424178123474,
585 "z": "f234e69c.c27828",
593 "id": "1752f719.1e90a9",
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": 1784.6744861602783,
599 "y": 391.17420268058777,
600 "z": "f234e69c.c27828",
604 "id": "1b529b77.5e22e5",
606 "name": "make sure this vnf-id doesn't exist already",
609 "x": 1739.959602355957,
610 "y": 520.174124956131,
611 "z": "f234e69c.c27828",
615 "id": "d4f21952.f2dd68",
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": 1448.5313262939453,
622 "y": 344.0312898159027,
623 "z": "f234e69c.c27828",
631 "id": "93472449.69d418",
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": 616.5313682556152,
637 "y": 924.0312774181366,
638 "z": "f234e69c.c27828",