Allow sub directories for graphs
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / sdwan / GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.json
1 [
2   {
3     "id": "58d8ca80.754ee4",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 86,
8     "y": 38,
9     "z": "5ff8bbe7.b04e84",
10     "wires": [
11       [
12         "9b331136.66aea"
13       ]
14     ]
15   },
16   {
17     "id": "9b331136.66aea",
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": 185.28569793701172,
26     "y": 112.23810789268464,
27     "z": "5ff8bbe7.b04e84",
28     "wires": [
29       [
30         "ec9fe349.f9372"
31       ]
32     ]
33   },
34   {
35     "id": "ec9fe349.f9372",
36     "type": "method",
37     "name": "method sdwan-vnf-topology-operation-wanport-create",
38     "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-create' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 209.42861938476562,
42     "y": 201.0000195503235,
43     "z": "5ff8bbe7.b04e84",
44     "wires": [
45       [
46         "87efdcb1.d6671"
47       ]
48     ]
49   },
50   {
51     "id": "87efdcb1.d6671",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 317.6667022705078,
58     "y": 408.66668367385864,
59     "z": "5ff8bbe7.b04e84",
60     "wires": [
61       [
62         "daaa1789.61ed38",
63         "40e846a4.f63368",
64         "b8f54335.fcb32",
65         "4e193e5a.f6bb9",
66         "83c99a9.e9d4868",
67         "c7efce39.0f90c",
68         "596fe131.2f016",
69         "ee0f7cd9.73819",
70         "618cf28.a3bd10c",
71         "2794c131.0510ce",
72         "4dbd7ea2.8473c",
73         "a279f8fb.0934f8",
74         "4f31f3dc.48bbdc"
75       ]
76     ]
77   },
78   {
79     "id": "daaa1789.61ed38",
80     "type": "returnSuccess",
81     "name": "return success",
82     "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",
83     "comments": "",
84     "x": 607.3336334228516,
85     "y": 860.3338012695312,
86     "z": "5ff8bbe7.b04e84",
87     "wires": []
88   },
89   {
90     "id": "40e846a4.f63368",
91     "type": "save",
92     "name": "save sdwan device port configuration in AAI",
93     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config' \n      key='wan-port-config.wan-port-config-id = $prop.vnf-index' >\n<parameter name=\"wan-port-config-id\" value=\"`$prop.vnf-index`\" />\n<parameter name=\"wan-port-config-name\" value=\"`$prop.wan.name`\" />\n<parameter name=\"device-id\" value=\"`$prop.wan.deviceName`\" />\n<parameter name='vlan-id' value=\"`$prop.wan.vlanId`\" />\n<parameter name=\"ip-address\" value=\"`$prop.wan.ipAddress`\" />\n<parameter name=\"provider-ip-address\" value=\"`$prop.wan.providerIpAddress`\" />\n<parameter name=\"input-bandwidth\" value=\"`$prop.wan.inputBandwidth`\" />\n<parameter name=\"output-bandwidth\" value=\"`$prop.wan.outputBandwidth`\" />\n<parameter name=\"description\" value=\"`$prop.wan.description`\" />\n<parameter name=\"port-type\" value=\"`$prop.wan.portType`\" />\n<parameter name=\"port-number\" value=\"`$prop.wan.portNumber`\" />\n<parameter name=\"transport-network-name\" value=\"`$prop.wan.transportNetworkName`\" />\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",
94     "comments": "",
95     "outputs": 1,
96     "x": 694.0003890991211,
97     "y": 767.5560441017151,
98     "z": "5ff8bbe7.b04e84",
99     "wires": [
100       []
101     ]
102   },
103   {
104     "id": "b8f54335.fcb32",
105     "type": "for",
106     "name": "for loop idx - VNF input parameters",
107     "xml": "<for index=\"idx\" start=\"0\" end=\"`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`\">\n",
108     "comments": "",
109     "outputs": 1,
110     "x": 672.0004577636719,
111     "y": 434.67542362213135,
112     "z": "5ff8bbe7.b04e84",
113     "wires": [
114       [
115         "acd8d091.0d71d"
116       ]
117     ]
118   },
119   {
120     "id": "acd8d091.0d71d",
121     "type": "block",
122     "name": "block",
123     "xml": "<block>\n",
124     "atomic": "false",
125     "comments": "",
126     "outputs": 1,
127     "x": 886.7788009643555,
128     "y": 432.23100757598877,
129     "z": "5ff8bbe7.b04e84",
130     "wires": [
131       [
132         "828392b5.41563",
133         "a73faa8e.c89ba8"
134       ]
135     ]
136   },
137   {
138     "id": "cf40793a.a6d2e8",
139     "type": "comment",
140     "name": "set input parameters",
141     "info": "",
142     "comments": "",
143     "x": 890.6736488342285,
144     "y": 560.5970115661621,
145     "z": "5ff8bbe7.b04e84",
146     "wires": []
147   },
148   {
149     "id": "4e193e5a.f6bb9",
150     "type": "switchNode",
151     "name": "switch service-data.vnfs.vnf_length",
152     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
153     "comments": "",
154     "outputs": 1,
155     "x": 682.9898223876953,
156     "y": 131.59689903259277,
157     "z": "5ff8bbe7.b04e84",
158     "wires": [
159       [
160         "54b6d1d2.416d5",
161         "503b3e94.4de07"
162       ]
163     ]
164   },
165   {
166     "id": "54b6d1d2.416d5",
167     "type": "other",
168     "name": "NULL",
169     "xml": "<outcome value=''>\n",
170     "comments": "",
171     "outputs": 1,
172     "x": 919.7040500640869,
173     "y": 121.7397289276123,
174     "z": "5ff8bbe7.b04e84",
175     "wires": [
176       [
177         "b3cfe846.219ca8"
178       ]
179     ]
180   },
181   {
182     "id": "503b3e94.4de07",
183     "type": "other",
184     "name": "other",
185     "xml": "<outcome value='Other'>\n",
186     "comments": "",
187     "outputs": 1,
188     "x": 915.1327667236328,
189     "y": 160.02557945251465,
190     "z": "5ff8bbe7.b04e84",
191     "wires": [
192       [
193         "f27d7807.d35938"
194       ]
195     ]
196   },
197   {
198     "id": "f27d7807.d35938",
199     "type": "block",
200     "name": "block",
201     "xml": "<block>\n",
202     "atomic": "false",
203     "comments": "",
204     "outputs": 1,
205     "x": 1047.8469619750977,
206     "y": 165.02551937103271,
207     "z": "5ff8bbe7.b04e84",
208     "wires": [
209       [
210         "7ed2d1b2.320ec",
211         "e6e34bc5.a44238"
212       ]
213     ]
214   },
215   {
216     "id": "b3cfe846.219ca8",
217     "type": "set",
218     "name": "set vnf-index=0",
219     "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
220     "comments": "",
221     "x": 1075.9898643493652,
222     "y": 120.73980903625488,
223     "z": "5ff8bbe7.b04e84",
224     "wires": []
225   },
226   {
227     "id": "7ed2d1b2.320ec",
228     "type": "set",
229     "name": "set vnf-index = vnf_length",
230     "xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
231     "comments": "",
232     "x": 1276.989875793457,
233     "y": 137.31122303009033,
234     "z": "5ff8bbe7.b04e84",
235     "wires": []
236   },
237   {
238     "id": "e6e34bc5.a44238",
239     "type": "for",
240     "name": "for each existing VNF",
241     "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
242     "comments": "",
243     "outputs": 1,
244     "x": 1259.418342590332,
245     "y": 177.31118488311768,
246     "z": "5ff8bbe7.b04e84",
247     "wires": [
248       [
249         "e6e708fd.086418"
250       ]
251     ]
252   },
253   {
254     "id": "e6e708fd.086418",
255     "type": "switchNode",
256     "name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
257     "xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
258     "comments": "",
259     "outputs": 1,
260     "x": 1617.7041244506836,
261     "y": 176.88268852233887,
262     "z": "5ff8bbe7.b04e84",
263     "wires": [
264       [
265         "f6e0def3.d2f88"
266       ]
267     ]
268   },
269   {
270     "id": "55da435b.f5309c",
271     "type": "returnFailure",
272     "name": "return failure",
273     "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",
274     "comments": "",
275     "x": 2060.5610961914062,
276     "y": 177.4541187286377,
277     "z": "5ff8bbe7.b04e84",
278     "wires": []
279   },
280   {
281     "id": "f6e0def3.d2f88",
282     "type": "outcomeTrue",
283     "name": "true",
284     "xml": "<outcome value='true'>\n",
285     "comments": "",
286     "outputs": 1,
287     "x": 1922.9897651672363,
288     "y": 176.45411491394043,
289     "z": "5ff8bbe7.b04e84",
290     "wires": [
291       [
292         "55da435b.f5309c"
293       ]
294     ]
295   },
296   {
297     "id": "c7efce39.0f90c",
298     "type": "execute",
299     "name": "execute generate-vnf-index",
300     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n",
301     "comments": "",
302     "outputs": 1,
303     "x": 661.9897155761719,
304     "y": 263.59686851501465,
305     "z": "5ff8bbe7.b04e84",
306     "wires": [
307       []
308     ]
309   },
310   {
311     "id": "83c99a9.e9d4868",
312     "type": "set",
313     "name": "set new vnf_length",
314     "xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
315     "comments": "",
316     "x": 635.9897003173828,
317     "y": 228.59687662124634,
318     "z": "5ff8bbe7.b04e84",
319     "wires": []
320   },
321   {
322     "id": "ee0f7cd9.73819",
323     "type": "set",
324     "name": "set vnf-level-oper-status to Created",
325     "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",
326     "comments": "",
327     "x": 680.9897918701172,
328     "y": 679.5971269607544,
329     "z": "5ff8bbe7.b04e84",
330     "wires": []
331   },
332   {
333     "id": "596fe131.2f016",
334     "type": "set",
335     "name": "copy input data",
336     "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",
337     "comments": "",
338     "x": 614.8429145812988,
339     "y": 633.5933895111084,
340     "z": "5ff8bbe7.b04e84",
341     "wires": []
342   },
343   {
344     "id": "618cf28.a3bd10c",
345     "type": "save",
346     "name": "save service relationship in AAI",
347     "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=\"wan-port-config\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/wan-port-configs/wan-port-config/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"wan-port-config.wan-port-config-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />",
348     "comments": "",
349     "outputs": 1,
350     "x": 664.9897918701172,
351     "y": 815.5972166061401,
352     "z": "5ff8bbe7.b04e84",
353     "wires": [
354       []
355     ]
356   },
357   {
358     "id": "2794c131.0510ce",
359     "type": "set",
360     "name": "set vnf-index and vnf-object-path",
361     "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/'` \" />",
362     "comments": "",
363     "x": 667.9897232055664,
364     "y": 723.597137928009,
365     "z": "5ff8bbe7.b04e84",
366     "wires": []
367   },
368   {
369     "id": "4dbd7ea2.8473c",
370     "type": "record",
371     "name": "record",
372     "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sdwan-wanport-vnf-topology-operation-create\"/>\n<parameter name=\"field3\" value=\"SDWAN-Config\"/>\n",
373     "comments": "",
374     "outputs": 1,
375     "x": 600.0000267028809,
376     "y": 316.0000305175781,
377     "z": "5ff8bbe7.b04e84",
378     "wires": [
379       []
380     ]
381   },
382   {
383     "id": "93da82db.2cdc9",
384     "type": "comment",
385     "name": "Take the parameter names by removing prefix",
386     "info": "",
387     "comments": "",
388     "x": 780.0003204345703,
389     "y": 404.0000858306885,
390     "z": "5ff8bbe7.b04e84",
391     "wires": []
392   },
393   {
394     "id": "828392b5.41563",
395     "type": "execute",
396     "name": "execute split parameterName",
397     "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",
398     "comments": "",
399     "outputs": 1,
400     "x": 1100.034912109375,
401     "y": 382.9791307449341,
402     "z": "5ff8bbe7.b04e84",
403     "wires": [
404       []
405     ]
406   },
407   {
408     "id": "a73faa8e.c89ba8",
409     "type": "set",
410     "name": "set parameterName",
411     "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",
412     "comments": "",
413     "x": 1068.4794158935547,
414     "y": 451.97921657562256,
415     "z": "5ff8bbe7.b04e84",
416     "wires": []
417   },
418   {
419     "id": "a279f8fb.0934f8",
420     "type": "call",
421     "name": "call sdwan-get-wan-param",
422     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-wan-param' mode='sync' >\n",
423     "comments": "",
424     "outputs": 1,
425     "x": 645.0004463195801,
426     "y": 565.0004005432129,
427     "z": "5ff8bbe7.b04e84",
428     "wires": [
429       []
430     ]
431   },
432   {
433     "id": "4f31f3dc.48bbdc",
434     "type": "set",
435     "name": "set vnf-request-input.",
436     "xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
437     "comments": "",
438     "x": 626.0000305175781,
439     "y": 532.000147819519,
440     "z": "5ff8bbe7.b04e84",
441     "wires": []
442   }
443 ]