SDWAN flow based end-end test and issue fix
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-create.json
1 [
2   {
3     "id": "469452cb.bb081c",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 110.00390625,
8     "y": 47.00390625,
9     "z": "fb90012b.616c1",
10     "wires": [
11       [
12         "c7697d03.d4e67"
13       ]
14     ]
15   },
16   {
17     "id": "c7697d03.d4e67",
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": 209.28960418701172,
26     "y": 121.24201414268464,
27     "z": "fb90012b.616c1",
28     "wires": [
29       [
30         "1e04cec3.e58791"
31       ]
32     ]
33   },
34   {
35     "id": "1e04cec3.e58791",
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": 233.43252563476562,
42     "y": 210.0039258003235,
43     "z": "fb90012b.616c1",
44     "wires": [
45       [
46         "415535ab.ee3b9c"
47       ]
48     ]
49   },
50   {
51     "id": "415535ab.ee3b9c",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 341.6706085205078,
58     "y": 417.67058992385864,
59     "z": "fb90012b.616c1",
60     "wires": [
61       [
62         "d5db9f82.a9caa",
63         "105b56f8.ca1c29",
64         "e1b2d352.980df",
65         "5e7b33b7.c9f95c",
66         "1e1b598f.ff6d76",
67         "24d8ed6f.1c08a2",
68         "76af4df6.0affe4",
69         "8d749358.a9898",
70         "a234fc68.a7971",
71         "f1475869.e78fd8",
72         "a35f1e97.dfac6",
73         "788b5a8e.cd86b4",
74         "17c0b4a9.0b865b"
75       ]
76     ]
77   },
78   {
79     "id": "d5db9f82.a9caa",
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": 631.3375396728516,
85     "y": 869.3377075195312,
86     "z": "fb90012b.616c1",
87     "wires": []
88   },
89   {
90     "id": "105b56f8.ca1c29",
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.id = $prop.vnf-index' >\n<parameter name=\"id\" value=\"`$prop.vnf-index`\" />\n<parameter name=\"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.ipAdddress`\" />\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": 718.0042953491211,
97     "y": 776.5599503517151,
98     "z": "fb90012b.616c1",
99     "wires": [
100       []
101     ]
102   },
103   {
104     "id": "e1b2d352.980df",
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": 696.0043640136719,
111     "y": 443.67932987213135,
112     "z": "fb90012b.616c1",
113     "wires": [
114       [
115         "971e9894.559198"
116       ]
117     ]
118   },
119   {
120     "id": "971e9894.559198",
121     "type": "block",
122     "name": "block",
123     "xml": "<block>\n",
124     "atomic": "false",
125     "comments": "",
126     "outputs": 1,
127     "x": 910.7827072143555,
128     "y": 441.23491382598877,
129     "z": "fb90012b.616c1",
130     "wires": [
131       [
132         "5db5d5cb.e3665c",
133         "137642b5.af1c4d"
134       ]
135     ]
136   },
137   {
138     "id": "54f3a8ba.c8c8f8",
139     "type": "comment",
140     "name": "set input parameters",
141     "info": "",
142     "comments": "",
143     "x": 914.6775550842285,
144     "y": 569.6009178161621,
145     "z": "fb90012b.616c1",
146     "wires": []
147   },
148   {
149     "id": "5e7b33b7.c9f95c",
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": 706.9937286376953,
156     "y": 140.60080528259277,
157     "z": "fb90012b.616c1",
158     "wires": [
159       [
160         "58cb915c.e63fb",
161         "61229cc4.7e2a84"
162       ]
163     ]
164   },
165   {
166     "id": "58cb915c.e63fb",
167     "type": "other",
168     "name": "NULL",
169     "xml": "<outcome value=''>\n",
170     "comments": "",
171     "outputs": 1,
172     "x": 943.7079563140869,
173     "y": 130.7436351776123,
174     "z": "fb90012b.616c1",
175     "wires": [
176       [
177         "2a580441.a1df1c"
178       ]
179     ]
180   },
181   {
182     "id": "61229cc4.7e2a84",
183     "type": "other",
184     "name": "other",
185     "xml": "<outcome value='Other'>\n",
186     "comments": "",
187     "outputs": 1,
188     "x": 939.1366729736328,
189     "y": 169.02948570251465,
190     "z": "fb90012b.616c1",
191     "wires": [
192       [
193         "ea6697cb.65e638"
194       ]
195     ]
196   },
197   {
198     "id": "ea6697cb.65e638",
199     "type": "block",
200     "name": "block",
201     "xml": "<block>\n",
202     "atomic": "false",
203     "comments": "",
204     "outputs": 1,
205     "x": 1071.8508682250977,
206     "y": 174.02942562103271,
207     "z": "fb90012b.616c1",
208     "wires": [
209       [
210         "1f8d31b6.15942e",
211         "3f14ea6e.335126"
212       ]
213     ]
214   },
215   {
216     "id": "2a580441.a1df1c",
217     "type": "set",
218     "name": "set vnf-index=0",
219     "xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
220     "comments": "",
221     "x": 1099.9937705993652,
222     "y": 129.74371528625488,
223     "z": "fb90012b.616c1",
224     "wires": []
225   },
226   {
227     "id": "1f8d31b6.15942e",
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": 1300.993782043457,
233     "y": 146.31512928009033,
234     "z": "fb90012b.616c1",
235     "wires": []
236   },
237   {
238     "id": "3f14ea6e.335126",
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": 1283.422248840332,
245     "y": 186.31509113311768,
246     "z": "fb90012b.616c1",
247     "wires": [
248       [
249         "5dff7a8c.9711b4"
250       ]
251     ]
252   },
253   {
254     "id": "5dff7a8c.9711b4",
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": 1641.7080307006836,
261     "y": 185.88659477233887,
262     "z": "fb90012b.616c1",
263     "wires": [
264       [
265         "b200b751.6600d8"
266       ]
267     ]
268   },
269   {
270     "id": "5634d26b.2c620c",
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": 2084.5650024414062,
276     "y": 186.4580249786377,
277     "z": "fb90012b.616c1",
278     "wires": []
279   },
280   {
281     "id": "b200b751.6600d8",
282     "type": "outcomeTrue",
283     "name": "true",
284     "xml": "<outcome value='true'>\n",
285     "comments": "",
286     "outputs": 1,
287     "x": 1946.9936714172363,
288     "y": 185.45802116394043,
289     "z": "fb90012b.616c1",
290     "wires": [
291       [
292         "5634d26b.2c620c"
293       ]
294     ]
295   },
296   {
297     "id": "24d8ed6f.1c08a2",
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": 685.9936218261719,
304     "y": 272.60077476501465,
305     "z": "fb90012b.616c1",
306     "wires": [
307       []
308     ]
309   },
310   {
311     "id": "1e1b598f.ff6d76",
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": 659.9936065673828,
317     "y": 237.60078287124634,
318     "z": "fb90012b.616c1",
319     "wires": []
320   },
321   {
322     "id": "8d749358.a9898",
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": 704.9936981201172,
328     "y": 688.6010332107544,
329     "z": "fb90012b.616c1",
330     "wires": []
331   },
332   {
333     "id": "76af4df6.0affe4",
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": 638.8468208312988,
339     "y": 642.5972957611084,
340     "z": "fb90012b.616c1",
341     "wires": []
342   },
343   {
344     "id": "a234fc68.a7971",
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.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />",
348     "comments": "",
349     "outputs": 1,
350     "x": 688.9936981201172,
351     "y": 824.6011228561401,
352     "z": "fb90012b.616c1",
353     "wires": [
354       []
355     ]
356   },
357   {
358     "id": "f1475869.e78fd8",
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": 691.9936294555664,
364     "y": 732.601044178009,
365     "z": "fb90012b.616c1",
366     "wires": []
367   },
368   {
369     "id": "a35f1e97.dfac6",
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": 624.0039329528809,
376     "y": 325.0039367675781,
377     "z": "fb90012b.616c1",
378     "wires": [
379       []
380     ]
381   },
382   {
383     "id": "e6a6ec15.a72f5",
384     "type": "comment",
385     "name": "Take the parameter names by removing prefix",
386     "info": "",
387     "comments": "",
388     "x": 804.0042266845703,
389     "y": 413.0039920806885,
390     "z": "fb90012b.616c1",
391     "wires": []
392   },
393   {
394     "id": "5db5d5cb.e3665c",
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": 1124.038818359375,
401     "y": 391.9830369949341,
402     "z": "fb90012b.616c1",
403     "wires": [
404       []
405     ]
406   },
407   {
408     "id": "137642b5.af1c4d",
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": 1092.4833221435547,
414     "y": 460.98312282562256,
415     "z": "fb90012b.616c1",
416     "wires": []
417   },
418   {
419     "id": "788b5a8e.cd86b4",
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": 669.0043525695801,
426     "y": 574.0043067932129,
427     "z": "fb90012b.616c1",
428     "wires": [
429       []
430     ]
431   },
432   {
433     "id": "17c0b4a9.0b865b",
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": 650.0039367675781,
439     "y": 541.004054069519,
440     "z": "fb90012b.616c1",
441     "wires": []
442   }
443 ]