Allow sub directories for graphs
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_site-vnf-topology-operation-create.json
1 [
2   {
3     "id": "735f5ad1.ead7c4",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 77.71430206298828,
8     "y": 47,
9     "z": "5c7962f1.1a851c",
10     "wires": [
11       [
12         "fe8db64d.524ea8"
13       ]
14     ]
15   },
16   {
17     "id": "fe8db64d.524ea8",
18     "type": "service-logic",
19     "name": "GENERIC-RESOURCE-API ${project.version}",
20     "module": "GENERIC-RESOURCE-API",
21     "version": "${project.version}",
22     "comments": "",
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}'>",
24     "outputs": 1,
25     "x": 177,
26     "y": 121.23810789268464,
27     "z": "5c7962f1.1a851c",
28     "wires": [
29       [
30         "1caac0d4.b3765f"
31       ]
32     ]
33   },
34   {
35     "id": "1caac0d4.b3765f",
36     "type": "method",
37     "name": "method site-vnf-topology-operation-create",
38     "xml": "<method rpc='site-vnf-topology-operation-create' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 198.14291381835938,
42     "y": 210.99999639671296,
43     "z": "5c7962f1.1a851c",
44     "wires": [
45       [
46         "d05aaf1d.08055"
47       ]
48     ]
49   },
50   {
51     "id": "d05aaf1d.08055",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 178.3809585571289,
58     "y": 382.66666814964265,
59     "z": "5c7962f1.1a851c",
60     "wires": [
61       [
62         "6f65d305.7dd0dc",
63         "c0e8c4a0.84ad08",
64         "d1be6ea1.8ea6a",
65         "8988370b.251a38",
66         "61f164dd.5ae33c",
67         "1f2f5cd6.515d03",
68         "7fec36e8.2120f8",
69         "2f304e20.895352",
70         "4e05fc36.a331a4",
71         "b30ee953.435c78",
72         "1bdd47aa.96d5c8",
73         "e5bdd145.df52f"
74       ]
75     ]
76   },
77   {
78     "id": "c0e8c4a0.84ad08",
79     "type": "set",
80     "name": "set vnf-level-oper-status to Created",
81     "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",
82     "comments": "",
83     "x": 606.5277099609375,
84     "y": 801.6705660820007,
85     "z": "5c7962f1.1a851c",
86     "wires": []
87   },
88   {
89     "id": "6f65d305.7dd0dc",
90     "type": "set",
91     "name": "copy input data to service data",
92     "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",
93     "comments": "",
94     "x": 593.380859375,
95     "y": 699.6667819023132,
96     "z": "5c7962f1.1a851c",
97     "wires": []
98   },
99   {
100     "id": "61f164dd.5ae33c",
101     "type": "execute",
102     "name": "execute generate-vnf-index",
103     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n",
104     "comments": "",
105     "outputs": 1,
106     "x": 577.7143936157227,
107     "y": 626.3334531784058,
108     "z": "5c7962f1.1a851c",
109     "wires": [
110       []
111     ]
112   },
113   {
114     "id": "8388db61.48edd8",
115     "type": "set",
116     "name": "set vnf-index to service data",
117     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-index`' />\n",
118     "comments": "",
119     "x": 590.7144584655762,
120     "y": 755.333420753479,
121     "z": "5c7962f1.1a851c",
122     "wires": []
123   },
124   {
125     "id": "d1be6ea1.8ea6a",
126     "type": "switchNode",
127     "name": "switch service-data.vnfs.vnf_length",
128     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
129     "comments": "",
130     "outputs": 1,
131     "x": 607.7142791748047,
132     "y": 261.33335971832275,
133     "z": "5c7962f1.1a851c",
134     "wires": [
135       [
136         "ec91878.ef3fc78",
137         "8eb89062.3f8df"
138       ]
139     ]
140   },
141   {
142     "id": "ec91878.ef3fc78",
143     "type": "other",
144     "name": "NULL",
145     "xml": "<outcome value=''>\n",
146     "comments": "",
147     "outputs": 1,
148     "x": 842.4286651611328,
149     "y": 256.4761800765991,
150     "z": "5c7962f1.1a851c",
151     "wires": [
152       [
153         "ee0ce75d.fadbc8"
154       ]
155     ]
156   },
157   {
158     "id": "ee0ce75d.fadbc8",
159     "type": "set",
160     "name": "set vnf-index=0",
161     "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
162     "comments": "",
163     "x": 1002.7143707275391,
164     "y": 256.4762716293335,
165     "z": "5c7962f1.1a851c",
166     "wires": []
167   },
168   {
169     "id": "8eb89062.3f8df",
170     "type": "other",
171     "name": "other",
172     "xml": "<outcome value='Other'>\n",
173     "comments": "",
174     "outputs": 1,
175     "x": 838.8572044372559,
176     "y": 289.76201152801514,
177     "z": "5c7962f1.1a851c",
178     "wires": [
179       [
180         "dddde8e2.a6e3a8"
181       ]
182     ]
183   },
184   {
185     "id": "22bd6504.22c48a",
186     "type": "set",
187     "name": "set vnf-index = vnf_length",
188     "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
189     "comments": "",
190     "x": 1231.7144470214844,
191     "y": 268.04773712158203,
192     "z": "5c7962f1.1a851c",
193     "wires": []
194   },
195   {
196     "id": "8d104e1d.a35c3",
197     "type": "for",
198     "name": "for each existing VNF",
199     "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
200     "comments": "",
201     "outputs": 1,
202     "x": 1220.14306640625,
203     "y": 303.0477089881897,
204     "z": "5c7962f1.1a851c",
205     "wires": [
206       [
207         "5570c3fc.a06f2c"
208       ]
209     ]
210   },
211   {
212     "id": "dddde8e2.a6e3a8",
213     "type": "block",
214     "name": "block",
215     "xml": "<block>\n",
216     "atomic": "false",
217     "comments": "",
218     "outputs": 1,
219     "x": 973.5714874267578,
220     "y": 291.761981010437,
221     "z": "5c7962f1.1a851c",
222     "wires": [
223       [
224         "22bd6504.22c48a",
225         "8d104e1d.a35c3"
226       ]
227     ]
228   },
229   {
230     "id": "5570c3fc.a06f2c",
231     "type": "switchNode",
232     "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
233     "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
234     "comments": "",
235     "outputs": 1,
236     "x": 1613.4288024902344,
237     "y": 303.6191930770874,
238     "z": "5c7962f1.1a851c",
239     "wires": [
240       [
241         "476608a3.dc62a8"
242       ]
243     ]
244   },
245   {
246     "id": "476608a3.dc62a8",
247     "type": "outcomeTrue",
248     "name": "true",
249     "xml": "<outcome value='true'>\n",
250     "comments": "",
251     "outputs": 1,
252     "x": 1894.7145042419434,
253     "y": 302.190598487854,
254     "z": "5c7962f1.1a851c",
255     "wires": [
256       [
257         "c72cc9fe.2f14b8"
258       ]
259     ]
260   },
261   {
262     "id": "480cbd60.5b2ab4",
263     "type": "comment",
264     "name": "make sure this vnf-id doesn't exist already",
265     "info": "",
266     "comments": "",
267     "x": 1582.571418762207,
268     "y": 267.1905851364136,
269     "z": "5c7962f1.1a851c",
270     "wires": []
271   },
272   {
273     "id": "8988370b.251a38",
274     "type": "set",
275     "name": "set new vnf_length",
276     "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
277     "comments": "",
278     "x": 559.71435546875,
279     "y": 593.3334078788757,
280     "z": "5c7962f1.1a851c",
281     "wires": []
282   },
283   {
284     "id": "2f304e20.895352",
285     "type": "returnSuccess",
286     "name": "return success",
287     "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",
288     "comments": "",
289     "x": 561.7143821716309,
290     "y": 1024.5970349311829,
291     "z": "5c7962f1.1a851c",
292     "wires": []
293   },
294   {
295     "id": "1f2f5cd6.515d03",
296     "type": "save",
297     "name": "save siteInstance configuration in AAI",
298     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n      key='site-resource.site-resource-id = $prop.vnf-index' >\n<parameter name='site-resource-id' value='`$prop.vnf-index`' />      \n<parameter name='site-resource-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",
299     "comments": "",
300     "outputs": 1,
301     "x": 610.3811264038086,
302     "y": 896.8190660476685,
303     "z": "5c7962f1.1a851c",
304     "wires": [
305       []
306     ]
307   },
308   {
309     "id": "7fec36e8.2120f8",
310     "type": "save",
311     "name": "save service relationship in AAI",
312     "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.site-resource-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />",
313     "comments": "",
314     "outputs": 1,
315     "x": 599.3811302185059,
316     "y": 959.5969486236572,
317     "z": "5c7962f1.1a851c",
318     "wires": [
319       []
320     ]
321   },
322   {
323     "id": "4e05fc36.a331a4",
324     "type": "set",
325     "name": "set vnf-index and vnf-object-path",
326     "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/'` \" />",
327     "comments": "",
328     "x": 600.7143783569336,
329     "y": 845.5968370437622,
330     "z": "5c7962f1.1a851c",
331     "wires": []
332   },
333   {
334     "id": "b30ee953.435c78",
335     "type": "for",
336     "name": "for loop idx - VNF input parameters",
337     "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
338     "comments": "",
339     "outputs": 1,
340     "x": 593.7143936157227,
341     "y": 400.0000629425049,
342     "z": "5c7962f1.1a851c",
343     "wires": [
344       [
345         "a33f518e.35371"
346       ]
347     ]
348   },
349   {
350     "id": "a33f518e.35371",
351     "type": "block",
352     "name": "block",
353     "xml": "<block>\n",
354     "atomic": "false",
355     "comments": "",
356     "outputs": 1,
357     "x": 808.4927368164062,
358     "y": 397.5556468963623,
359     "z": "5c7962f1.1a851c",
360     "wires": [
361       [
362         "97fc593c.33ca48",
363         "dcd520b2.7e574"
364       ]
365     ]
366   },
367   {
368     "id": "97fc593c.33ca48",
369     "type": "execute",
370     "name": "execute split parameterName",
371     "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",
372     "comments": "",
373     "outputs": 1,
374     "x": 1004.7489395141602,
375     "y": 375.3037853240967,
376     "z": "5c7962f1.1a851c",
377     "wires": [
378       []
379     ]
380   },
381   {
382     "id": "dcd520b2.7e574",
383     "type": "set",
384     "name": "set parameterName",
385     "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",
386     "comments": "",
387     "x": 974.1933670043945,
388     "y": 412.3039016723633,
389     "z": "5c7962f1.1a851c",
390     "wires": []
391   },
392   {
393     "id": "1bdd47aa.96d5c8",
394     "type": "set",
395     "name": "set vnf-request-input.",
396     "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
397     "comments": "",
398     "x": 555.7140121459961,
399     "y": 474.3247776031494,
400     "z": "5c7962f1.1a851c",
401     "wires": []
402   },
403   {
404     "id": "e5bdd145.df52f",
405     "type": "call",
406     "name": "call sdwan-get-site-param",
407     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n",
408     "comments": "",
409     "outputs": 1,
410     "x": 571.7143783569336,
411     "y": 506.3249816894531,
412     "z": "5c7962f1.1a851c",
413     "wires": [
414       []
415     ]
416   },
417   {
418     "id": "c72cc9fe.2f14b8",
419     "type": "returnFailure",
420     "name": "return failure",
421     "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",
422     "comments": "",
423     "x": 2023.285873413086,
424     "y": 353.19061279296875,
425     "z": "5c7962f1.1a851c",
426     "wires": []
427   },
428   {
429     "id": "272c1a85.bab626",
430     "type": "comment",
431     "name": "Take the parameter names by removing prefix",
432     "info": "",
433     "comments": "",
434     "x": 1316.714485168457,
435     "y": 356.6666793823242,
436     "z": "5c7962f1.1a851c",
437     "wires": []
438   }
439 ]