a6359acb746dc97fa929e7820bd4030fec2a2d2e
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-vnf-topology-operation-wanport-delete.json
1 [
2   {
3     "id": "503a78f7.47ca18",
4     "type": "switchNode",
5     "name": "switch service-data.vnfs.vnf_length",
6     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 657.0634536743164,
10     "y": 392,
11     "z": "944c3ee1.29b9e",
12     "wires": [
13       [
14         "77aa4ba.68c1bb4",
15         "4952201a.7d4c8"
16       ]
17     ]
18   },
19   {
20     "id": "1a9196c0.4e6769",
21     "type": "dgstart",
22     "name": "DGSTART",
23     "outputs": 1,
24     "x": 118.96875,
25     "y": 156.73882961273193,
26     "z": "944c3ee1.29b9e",
27     "wires": [
28       [
29         "902e1c94.66f24"
30       ]
31     ]
32   },
33   {
34     "id": "902e1c94.66f24",
35     "type": "service-logic",
36     "name": "GENERIC-RESOURCE-API ${project.version}",
37     "module": "GENERIC-RESOURCE-API",
38     "version": "${project.version}",
39     "comments": "",
40     "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}'>",
41     "outputs": 1,
42     "x": 194.25445556640625,
43     "y": 196.9769411087036,
44     "z": "944c3ee1.29b9e",
45     "wires": [
46       [
47         "a3cff3f0.d5beb"
48       ]
49     ]
50   },
51   {
52     "id": "2648545f.a0239c",
53     "type": "comment",
54     "name": "wan port-vnf-topology-operation-delete",
55     "info": "",
56     "comments": "",
57     "x": 568.3136672973633,
58     "y": 230.32522869110107,
59     "z": "944c3ee1.29b9e",
60     "wires": []
61   },
62   {
63     "id": "cb66206e.4a85e",
64     "type": "block",
65     "name": "block : atomic",
66     "xml": "<block atomic=\"true\">",
67     "atomic": "true",
68     "outputs": 1,
69     "x": 195.63541412353516,
70     "y": 458.4055013656616,
71     "z": "944c3ee1.29b9e",
72     "wires": [
73       [
74         "99c3b58a.28fe68",
75         "41864004.a59f8",
76         "7d0a1f82.5f016",
77         "60ff59e4.f2b988",
78         "335cedb5.736ac2",
79         "503a78f7.47ca18",
80         "ee257c77.ce85f",
81         "b68bb604.af2598",
82         "55b1fa8a.f95f74"
83       ]
84     ]
85   },
86   {
87     "id": "77aa4ba.68c1bb4",
88     "type": "other",
89     "name": "outcome Null",
90     "xml": "<outcome value=''>\n",
91     "comments": "",
92     "outputs": 1,
93     "x": 921.7857666015625,
94     "y": 374.5556221008301,
95     "z": "944c3ee1.29b9e",
96     "wires": [
97       [
98         "5f41004a.301df"
99       ]
100     ]
101   },
102   {
103     "id": "5f41004a.301df",
104     "type": "returnFailure",
105     "name": "return failure",
106     "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-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
107     "comments": "",
108     "x": 1102.7856369018555,
109     "y": 369.5555000305176,
110     "z": "944c3ee1.29b9e",
111     "wires": []
112   },
113   {
114     "id": "4952201a.7d4c8",
115     "type": "other",
116     "name": "other",
117     "xml": "<outcome value='Other'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 907.2857666015625,
121     "y": 426.55558490753174,
122     "z": "944c3ee1.29b9e",
123     "wires": [
124       [
125         "dcbc4218.194a6"
126       ]
127     ]
128   },
129   {
130     "id": "dcbc4218.194a6",
131     "type": "block",
132     "name": "block : atomic",
133     "xml": "<block atomic=\"true\">",
134     "atomic": "true",
135     "outputs": 1,
136     "x": 1079.285472869873,
137     "y": 426.5555830001831,
138     "z": "944c3ee1.29b9e",
139     "wires": [
140       [
141         "b8b4f7cf.20f728",
142         "f6b988cf.3ccc88",
143         "a936ae5c.480e"
144       ]
145     ]
146   },
147   {
148     "id": "f6b988cf.3ccc88",
149     "type": "switchNode",
150     "name": "switch tmp.vidx ",
151     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
152     "comments": "",
153     "outputs": 1,
154     "x": 1254.28564453125,
155     "y": 445.55550479888916,
156     "z": "944c3ee1.29b9e",
157     "wires": [
158       [
159         "2be170a7.d1fc4"
160       ]
161     ]
162   },
163   {
164     "id": "335cedb5.736ac2",
165     "type": "switchNode",
166     "name": "switch vnf-level-oper-status",
167     "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
168     "comments": "",
169     "outputs": 1,
170     "x": 627.4524536132812,
171     "y": 466.4444637298584,
172     "z": "944c3ee1.29b9e",
173     "wires": [
174       [
175         "2a3d41e1.8aa8ce",
176         "c521841a.091868"
177       ]
178     ]
179   },
180   {
181     "id": "2a3d41e1.8aa8ce",
182     "type": "outcome",
183     "name": "outcome PendingDelete",
184     "xml": "<outcome value='PendingDelete'>\n",
185     "comments": "",
186     "outputs": 1,
187     "x": 918.2857208251953,
188     "y": 470.55558681488037,
189     "z": "944c3ee1.29b9e",
190     "wires": [
191       [
192         "edb94879.c47ed8"
193       ]
194     ]
195   },
196   {
197     "id": "c521841a.091868",
198     "type": "other",
199     "name": "other",
200     "xml": "<outcome value='Other'>\n",
201     "comments": "",
202     "outputs": 1,
203     "x": 864.2857818603516,
204     "y": 517.5555906295776,
205     "z": "944c3ee1.29b9e",
206     "wires": [
207       [
208         "8d57a7f4.cb78b8"
209       ]
210     ]
211   },
212   {
213     "id": "8d57a7f4.cb78b8",
214     "type": "returnFailure",
215     "name": "return failure",
216     "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 is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
217     "comments": "",
218     "x": 1023.7855491638184,
219     "y": 520.5555896759033,
220     "z": "944c3ee1.29b9e",
221     "wires": []
222   },
223   {
224     "id": "ee257c77.ce85f",
225     "type": "switchNode",
226     "name": "switch vnf-id",
227     "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
228     "comments": "",
229     "outputs": 1,
230     "x": 593.2857704162598,
231     "y": 347.5555934906006,
232     "z": "944c3ee1.29b9e",
233     "wires": [
234       [
235         "d82c9312.151d9"
236       ]
237     ]
238   },
239   {
240     "id": "d82c9312.151d9",
241     "type": "outcome",
242     "name": "NULL",
243     "xml": "<outcome value=''>",
244     "comments": "",
245     "outputs": 1,
246     "x": 791.2858352661133,
247     "y": 337.5556058883667,
248     "z": "944c3ee1.29b9e",
249     "wires": [
250       [
251         "a3bf6d80.2d0f6"
252       ]
253     ]
254   },
255   {
256     "id": "a3bf6d80.2d0f6",
257     "type": "returnFailure",
258     "name": "return failure",
259     "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-request-input.vnf-input-parameters.name is a required input\" />\n",
260     "comments": "",
261     "x": 957.7857208251953,
262     "y": 334.5556001663208,
263     "z": "944c3ee1.29b9e",
264     "wires": []
265   },
266   {
267     "id": "b8b4f7cf.20f728",
268     "type": "for",
269     "name": "for vidx..service-data.vnfs.vnf[]",
270     "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
271     "comments": "",
272     "outputs": 1,
273     "x": 1314.7856483459473,
274     "y": 381.5555009841919,
275     "z": "944c3ee1.29b9e",
276     "wires": [
277       [
278         "ba14948d.015c78"
279       ]
280     ]
281   },
282   {
283     "id": "ba14948d.015c78",
284     "type": "switchNode",
285     "name": "switch vnf-id found",
286     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
287     "comments": "",
288     "outputs": 1,
289     "x": 1570.7856674194336,
290     "y": 381.5555009841919,
291     "z": "944c3ee1.29b9e",
292     "wires": [
293       [
294         "b53ab16b.22442"
295       ]
296     ]
297   },
298   {
299     "id": "b53ab16b.22442",
300     "type": "outcomeTrue",
301     "name": "true",
302     "xml": "<outcome value='true'>\n",
303     "comments": "",
304     "outputs": 1,
305     "x": 1747.2857208251953,
306     "y": 384.5555009841919,
307     "z": "944c3ee1.29b9e",
308     "wires": [
309       [
310         "c9311851.f90738"
311       ]
312     ]
313   },
314   {
315     "id": "c9311851.f90738",
316     "type": "set",
317     "name": "set tmp.vidx and ctx.vnf-data",
318     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
319     "comments": "",
320     "x": 1914.2857360839844,
321     "y": 445.5555009841919,
322     "z": "944c3ee1.29b9e",
323     "wires": []
324   },
325   {
326     "id": "6ec9cdbe.844104",
327     "type": "returnFailure",
328     "name": "return failure",
329     "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-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
330     "comments": "",
331     "x": 1559.785659790039,
332     "y": 445.55550479888916,
333     "z": "944c3ee1.29b9e",
334     "wires": []
335   },
336   {
337     "id": "2be170a7.d1fc4",
338     "type": "outcome",
339     "name": "NULL",
340     "xml": "<outcome value=''>\n",
341     "comments": "",
342     "outputs": 1,
343     "x": 1422.285659790039,
344     "y": 445.55550479888916,
345     "z": "944c3ee1.29b9e",
346     "wires": [
347       [
348         "6ec9cdbe.844104"
349       ]
350     ]
351   },
352   {
353     "id": "7d0a1f82.5f016",
354     "type": "set",
355     "name": "set vnfId and vnf-object-path",
356     "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='vnf-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />",
357     "comments": "",
358     "x": 605.3021850585938,
359     "y": 642.0722465515137,
360     "z": "944c3ee1.29b9e",
361     "wires": []
362   },
363   {
364     "id": "60ff59e4.f2b988",
365     "type": "returnSuccess",
366     "name": "return success",
367     "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",
368     "comments": "",
369     "x": 554.4133453369141,
370     "y": 767.6276769638062,
371     "z": "944c3ee1.29b9e",
372     "wires": []
373   },
374   {
375     "id": "99c3b58a.28fe68",
376     "type": "set",
377     "name": "set new vnf length",
378     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
379     "comments": "",
380     "x": 585.9347686767578,
381     "y": 539.5431041717529,
382     "z": "944c3ee1.29b9e",
383     "wires": []
384   },
385   {
386     "id": "41864004.a59f8",
387     "type": "set",
388     "name": "Remove vnf from ServiceData",
389     "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$tmp.vidx].\" value=\"\"/>\n\n",
390     "comments": "",
391     "x": 621.5589599609375,
392     "y": 583.5110712051392,
393     "z": "944c3ee1.29b9e",
394     "wires": []
395   },
396   {
397     "id": "edb94879.c47ed8",
398     "type": "block",
399     "name": "block : atomic",
400     "xml": "<block atomic=\"true\">",
401     "atomic": "true",
402     "outputs": 1,
403     "x": 1115.5921211242676,
404     "y": 480.88074111938477,
405     "z": "944c3ee1.29b9e",
406     "wires": [
407       []
408     ]
409   },
410   {
411     "id": "a3cff3f0.d5beb",
412     "type": "method",
413     "name": "method sdwan-vnf-topology-operation-wanport-delete",
414     "xml": "<method rpc='sdwan-vnf-topology-operation-wanport-delete' mode='sync'>\n",
415     "comments": "",
416     "outputs": 1,
417     "x": 199.5,
418     "y": 313,
419     "z": "944c3ee1.29b9e",
420     "wires": [
421       [
422         "cb66206e.4a85e"
423       ]
424     ]
425   },
426   {
427     "id": "b68bb604.af2598",
428     "type": "execute",
429     "name": "execute requiredParameters",
430     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
431     "comments": "",
432     "outputs": 1,
433     "x": 650.7858276367188,
434     "y": 287.55559253692627,
435     "z": "944c3ee1.29b9e",
436     "wires": [
437       []
438     ]
439   },
440   {
441     "id": "55b1fa8a.f95f74",
442     "type": "delete",
443     "name": "delete wan port instance configuration in AAI",
444     "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='wan-port-config' \n        key='wan-port-config.id = $vnf-topology-operation-input.vnf-information.vnf-id'>\n",
445     "comments": "",
446     "outputs": 1,
447     "x": 657.5,
448     "y": 704,
449     "z": "944c3ee1.29b9e",
450     "wires": [
451       []
452     ]
453   },
454   {
455     "id": "a936ae5c.480e",
456     "type": "record",
457     "name": "record",
458     "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=\"tmp.vidx1234555\"/>\n<parameter name=\"field3\" value='`$tmp.vidx`'/>\n",
459     "comments": "",
460     "outputs": 1,
461     "x": 1303.5001373291016,
462     "y": 500.0000123977661,
463     "z": "944c3ee1.29b9e",
464     "wires": [
465       []
466     ]
467   }
468 ]