3 "id": "1fe30678.9b6c5a",
9 "z": "c632d855.425948",
17 "id": "6f581451.d6d46c",
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": 221.31694793701172,
26 "y": 156.26935789268464,
27 "z": "c632d855.425948",
35 "id": "ffdaf6e4.8fe2a8",
37 "name": "method site-vnf-topology-operation-create",
38 "xml": "<method rpc='site-vnf-topology-operation-create' mode='sync'>\n",
41 "x": 242.4598617553711,
42 "y": 246.03124639671296,
43 "z": "c632d855.425948",
51 "id": "4928aa8e.b25464",
53 "name": "block : atomic",
54 "xml": "<block atomic=\"true\">",
57 "x": 222.69790649414062,
58 "y": 417.69791814964265,
59 "z": "c632d855.425948",
79 "id": "2113cd25.2b0aa2",
81 "name": "set vnf-level-oper-status to Created",
82 "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",
84 "x": 650.8446578979492,
85 "y": 836.7018160820007,
86 "z": "c632d855.425948",
90 "id": "290eb35e.b9e26c",
92 "name": "copy input data to service data",
93 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-index`' />\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.' />\n\n",
95 "x": 637.6978073120117,
96 "y": 734.6980319023132,
97 "z": "c632d855.425948",
101 "id": "81b868ec.b075e8",
103 "name": "execute generate-vnf-index",
104 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n",
107 "x": 622.0313415527344,
108 "y": 661.3647031784058,
109 "z": "c632d855.425948",
115 "id": "1e868a78.080646",
117 "name": "set vnf-index to service data",
118 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-index`' />\n",
120 "x": 628.0313034057617,
121 "y": 790.3646578788757,
122 "z": "c632d855.425948",
126 "id": "63b1d38d.89ffcc",
127 "type": "switchNode",
128 "name": "switch service-data.vnfs.vnf_length",
129 "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
132 "x": 652.0312271118164,
133 "y": 296.36460971832275,
134 "z": "c632d855.425948",
143 "id": "65a65f43.d7119",
146 "xml": "<outcome value=''>\n",
149 "x": 886.7456130981445,
150 "y": 291.5074300765991,
151 "z": "c632d855.425948",
159 "id": "1145bf21.5d5e11",
161 "name": "set vnf-index=0",
162 "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
164 "x": 1047.0313186645508,
165 "y": 291.5075216293335,
166 "z": "c632d855.425948",
170 "id": "e1777473.61ad38",
173 "xml": "<outcome value='Other'>\n",
176 "x": 883.1741523742676,
177 "y": 324.79326152801514,
178 "z": "c632d855.425948",
186 "id": "3c64116d.221f3e",
188 "name": "set vnf-index = vnf_length",
189 "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
191 "x": 1276.031394958496,
192 "y": 303.07898712158203,
193 "z": "c632d855.425948",
197 "id": "2bf3f4e0.d3268c",
199 "name": "for each existing VNF",
200 "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
203 "x": 1264.4600143432617,
204 "y": 338.0789589881897,
205 "z": "c632d855.425948",
213 "id": "43f60e81.7293",
220 "x": 1017.8884353637695,
221 "y": 326.793231010437,
222 "z": "c632d855.425948",
231 "id": "8fa582ed.781d1",
232 "type": "switchNode",
233 "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
234 "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
237 "x": 1657.745750427246,
238 "y": 338.6504430770874,
239 "z": "c632d855.425948",
247 "id": "d1ebb0ef.628be",
248 "type": "outcomeTrue",
250 "xml": "<outcome value='true'>\n",
253 "x": 1939.031452178955,
254 "y": 337.221848487854,
255 "z": "c632d855.425948",
263 "id": "25d81b97.ed5734",
265 "name": "make sure this vnf-id doesn't exist already",
268 "x": 1626.8883666992188,
269 "y": 302.2218351364136,
270 "z": "c632d855.425948",
274 "id": "c8bfa3ce.63b66",
276 "name": "set new vnf_length",
277 "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
279 "x": 604.0313034057617,
280 "y": 628.3646578788757,
281 "z": "c632d855.425948",
285 "id": "f33cfcda.f0c5d",
286 "type": "returnSuccess",
287 "name": "return success",
288 "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",
290 "x": 606.0313301086426,
291 "y": 1059.6282849311829,
292 "z": "c632d855.425948",
296 "id": "8129d44e.2d4828",
298 "name": "save siteInstance configuration in AAI",
299 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n key='site-resource.id = $prop.vnf-index' >\n<parameter name='id' value='`$prop.vnf-index`' /> \n<parameter name='name' value='`$prop.site.name`' />\n<parameter name='description' value='`$prop.site.description`' />\n<parameter name='type' value='prop.site.type' />\n<parameter name='role' value='prop.site.role' />\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-index + '/vnf-data/'` \" />\n",
302 "x": 654.6980743408203,
303 "y": 931.8503160476685,
304 "z": "c632d855.425948",
310 "id": "66b4b0a.218e25",
312 "name": "save service relationship in AAI",
313 "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=\"site-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/site-resources/site-resource/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"site-resource.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />",
316 "x": 643.6980781555176,
317 "y": 994.6281986236572,
318 "z": "c632d855.425948",
324 "id": "87aab9f9.450f38",
326 "name": "set vnf-index and vnf-object-path",
327 "xml": "<set>\n<parameter name='vnfId' value='`$prop.vnf-index`' />\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-index + '/vnf-data/'` \" />",
329 "x": 645.0313262939453,
330 "y": 880.6280870437622,
331 "z": "c632d855.425948",
335 "id": "c3c6696a.6ae368",
337 "name": "for loop idx - VNF input parameters",
338 "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
341 "x": 638.0313415527344,
342 "y": 435.0313129425049,
343 "z": "c632d855.425948",
351 "id": "8cb85abf.a9b198",
358 "x": 852.809684753418,
359 "y": 432.5868968963623,
360 "z": "c632d855.425948",
369 "id": "e6a0ec42.6ba",
371 "name": "execute split parameterName",
372 "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",
375 "x": 1049.0658874511719,
376 "y": 410.3350353240967,
377 "z": "c632d855.425948",
383 "id": "cdd1aefb.fa2f8",
385 "name": "set parameterName",
386 "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",
388 "x": 1018.5103149414062,
389 "y": 447.3351516723633,
390 "z": "c632d855.425948",
394 "id": "b6127d24.eca33",
396 "name": "set vnf-request-input.",
397 "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
399 "x": 600.0309600830078,
400 "y": 509.3560276031494,
401 "z": "c632d855.425948",
405 "id": "82b5aeb7.909dc",
407 "name": "call sdwan-get-site-param",
408 "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n",
411 "x": 616.0313262939453,
412 "y": 541.3562316894531,
413 "z": "c632d855.425948",
419 "id": "43f17df2.e71f94",
420 "type": "returnFailure",
421 "name": "return failure",
422 "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",
424 "x": 2067.6028213500977,
425 "y": 388.22186279296875,
426 "z": "c632d855.425948",
430 "id": "ee62377b.687508",
432 "name": "Take the parameter names by removing prefix",
435 "x": 1361.0314331054688,
436 "y": 391.6979293823242,
437 "z": "c632d855.425948",