Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_port-mirror-topology-operation-mapping-vprobe.json
1 [
2     {
3         "id": "d865558f.8efaa8",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 117.14286041259766,
8         "y": 84.28571319580078,
9         "z": "660eb50b.12658c",
10         "wires": [
11             [
12                 "846785d8.683638"
13             ]
14         ]
15     },
16     {
17         "id": "846785d8.683638",
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": 231.0952377319336,
26         "y": 124.52383422851562,
27         "z": "660eb50b.12658c",
28         "wires": [
29             [
30                 "d2d2a3b0.5e5cf"
31             ]
32         ]
33     },
34     {
35         "id": "d2d2a3b0.5e5cf",
36         "type": "method",
37         "name": "method port-mirror-topology-operation-mapping-vprobe",
38         "xml": "<method rpc='port-mirror-topology-operation-mapping-vprobe' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 258.42864990234375,
42         "y": 165.71428680419922,
43         "z": "660eb50b.12658c",
44         "wires": [
45             [
46                 "67b4d64c.e399f8"
47             ]
48         ]
49     },
50     {
51         "id": "95f0422f.b3d2c",
52         "type": "comment",
53         "name": "port-mirror-topology-operation-mapping-vprobe",
54         "info": "",
55         "comments": "",
56         "x": 511.4877166748047,
57         "y": 31.87205696105957,
58         "z": "660eb50b.12658c",
59         "wires": []
60     },
61     {
62         "id": "aa8038f.fd261c8",
63         "type": "for",
64         "name": "for each source vnfc-object",
65         "xml": "<for silentFailure='true' index='vnfc-so-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object_length`' >\n",
66         "comments": "",
67         "outputs": 1,
68         "x": 412.14302825927734,
69         "y": 834.618974685669,
70         "z": "660eb50b.12658c",
71         "wires": [
72             [
73                 "3837ea89.85c4d6"
74             ]
75         ]
76     },
77     {
78         "id": "3837ea89.85c4d6",
79         "type": "for",
80         "name": "for each source vnic",
81         "xml": "<for silentFailure='true' index='vnic-s-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic_length`' >\n",
82         "comments": "",
83         "outputs": 1,
84         "x": 653.8096923828125,
85         "y": 834.0460891723633,
86         "z": "660eb50b.12658c",
87         "wires": [
88             [
89                 "833c3032.ce493"
90             ]
91         ]
92     },
93     {
94         "id": "8cb72a4d.cda468",
95         "type": "for",
96         "name": "for each dest vnfc-object",
97         "xml": "<for silentFailure='true' index='vnfc-do-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object_length`' >\n",
98         "comments": "",
99         "outputs": 1,
100         "x": 1092.33349609375,
101         "y": 733.9510021209717,
102         "z": "660eb50b.12658c",
103         "wires": [
104             [
105                 "5e36f7e6.7d7318"
106             ]
107         ]
108     },
109     {
110         "id": "5e36f7e6.7d7318",
111         "type": "for",
112         "name": "for each dest vnic",
113         "xml": "<for silentFailure='true' index='vnic-d-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic_length`' >\n",
114         "comments": "",
115         "outputs": 1,
116         "x": 1314.7146072387695,
117         "y": 733.3326072692871,
118         "z": "660eb50b.12658c",
119         "wires": [
120             [
121                 "13722054.5e929"
122             ]
123         ]
124     },
125     {
126         "id": "9c27bf76.2cc07",
127         "type": "switchNode",
128         "name": "enough capacity?",
129         "xml": "<switch test='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].capacity.vnic-capacity\n  &lt;= $tmp.rem-cap`'>\n",
130         "comments": "",
131         "outputs": 1,
132         "x": 1693.048080444336,
133         "y": 758.2370805740356,
134         "z": "660eb50b.12658c",
135         "wires": [
136             [
137                 "50e739ed.9ece08"
138             ]
139         ]
140     },
141     {
142         "id": "13722054.5e929",
143         "type": "block",
144         "name": "block : atomic",
145         "xml": "<block atomic=\"true\">",
146         "atomic": "true",
147         "outputs": 1,
148         "x": 1504.0004272460938,
149         "y": 732.5232133865356,
150         "z": "660eb50b.12658c",
151         "wires": [
152             [
153                 "5ec61bd2.c386d4",
154                 "9c27bf76.2cc07"
155             ]
156         ]
157     },
158     {
159         "id": "5ec61bd2.c386d4",
160         "type": "set",
161         "name": "set remaining capacity",
162         "xml": "<set>\n<parameter name='tmp.rem-cap' value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.vnic-capacity\n  - $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.used-capacity`' />\n",
163         "comments": "",
164         "x": 1706.6194534301758,
165         "y": 705.8562164306641,
166         "z": "660eb50b.12658c",
167         "wires": []
168     },
169     {
170         "id": "50e739ed.9ece08",
171         "type": "outcomeTrue",
172         "name": "true",
173         "xml": "<outcome value='true'>\n",
174         "comments": "",
175         "outputs": 1,
176         "x": 1860.4287872314453,
177         "y": 757.6658725738525,
178         "z": "660eb50b.12658c",
179         "wires": [
180             [
181                 "ee37c9ea.374c38"
182             ]
183         ]
184     },
185     {
186         "id": "80910918.dbf9d8",
187         "type": "set",
188         "name": "add to used-capacity",
189         "xml": "<set>\n<parameter name='service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].capacity.used-capacity'\n  value='`$tmp.src-pps + $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].capacity.used-capacity`' />\n",
190         "comments": "",
191         "x": 1082.3334579467773,
192         "y": 914.6179370880127,
193         "z": "660eb50b.12658c",
194         "wires": []
195     },
196     {
197         "id": "2a8d0015.ea3c6",
198         "type": "set",
199         "name": "set source-to-dest-map",
200         "xml": "<set>\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-port-id'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].vnic-port-id`' />\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-port-name'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].vnic-port-name`' />\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].source-vserver-id'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vserver-id`' />\n\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-port-id'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].vnic-port-id`' />\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-port-name'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].vnic-port-name`' />\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-vserver-id'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vserver-id`' />\n\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-ip-addresses.ip-addresses.ipv4-address'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].vnic-ip-addresses.ip-addresses.ipv4-address`' />\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$map-idx].dest-ip-addresses.ip-addresses.ipv6-address'\n  value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$tmp.save-vnfc-do-idx].vnics.vnic[$tmp.save-vnic-d-idx].vnic-ip-addresses.ip-addresses.ipv6-address`' />\n",
201         "comments": "",
202         "x": 1089.0001525878906,
203         "y": 957.9512882232666,
204         "z": "660eb50b.12658c",
205         "wires": []
206     },
207     {
208         "id": "342ed31a.7fb37c",
209         "type": "set",
210         "name": "set tmp.found-capacity=N",
211         "xml": "<set>\n<parameter name='tmp.found-capacity' value='N' />\n<parameter name='tmp.save-rem-cap' value='0' />\n",
212         "comments": "",
213         "x": 1097.0956268310547,
214         "y": 684.903995513916,
215         "z": "660eb50b.12658c",
216         "wires": []
217     },
218     {
219         "id": "d265eabd.0ec438",
220         "type": "switchNode",
221         "name": "switch found-capacity == N?",
222         "xml": "<switch test=\"`$tmp.found-capacity == 'N'`\">\n",
223         "comments": "",
224         "outputs": 1,
225         "x": 1100.428955078125,
226         "y": 799.9037551879883,
227         "z": "660eb50b.12658c",
228         "wires": [
229             [
230                 "16e3151a.db68db"
231             ]
232         ]
233     },
234     {
235         "id": "16e3151a.db68db",
236         "type": "outcomeTrue",
237         "name": "true",
238         "xml": "<outcome value='true'>\n",
239         "comments": "",
240         "outputs": 1,
241         "x": 1297.5717010498047,
242         "y": 800.2611198425293,
243         "z": "660eb50b.12658c",
244         "wires": [
245             [
246                 "78769168.05467"
247             ]
248         ]
249     },
250     {
251         "id": "833c3032.ce493",
252         "type": "block",
253         "name": "block : atomic",
254         "xml": "<block atomic=\"true\">",
255         "atomic": "true",
256         "outputs": 1,
257         "x": 854.476448059082,
258         "y": 834.1895208358765,
259         "z": "660eb50b.12658c",
260         "wires": [
261             [
262                 "342ed31a.7fb37c",
263                 "8cb72a4d.cda468",
264                 "d265eabd.0ec438",
265                 "80910918.dbf9d8",
266                 "2a8d0015.ea3c6",
267                 "7030b73e.7416d8"
268             ]
269         ]
270     },
271     {
272         "id": "9021e5af.5cc618",
273         "type": "set",
274         "name": "set map-idx to 0",
275         "xml": "<set>\n<parameter name='map-idx' value='0' />\n",
276         "comments": "",
277         "x": 379.2382507324219,
278         "y": 620.6177444458008,
279         "z": "660eb50b.12658c",
280         "wires": []
281     },
282     {
283         "id": "7030b73e.7416d8",
284         "type": "set",
285         "name": "increment map-idx",
286         "xml": "<set>\n<parameter name='map-idx' value='`$map-idx + 1`' />\n",
287         "comments": "",
288         "x": 1073.0000839233398,
289         "y": 1003.9514389038086,
290         "z": "660eb50b.12658c",
291         "wires": []
292     },
293     {
294         "id": "ee37c9ea.374c38",
295         "type": "switchNode",
296         "name": "is there an ipv4-address?",
297         "xml": "<switch test='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-ip-addresses.ip-addresses.ipv4-address`'>\n",
298         "comments": "",
299         "outputs": 1,
300         "x": 2050.3812103271484,
301         "y": 758.2372093200684,
302         "z": "660eb50b.12658c",
303         "wires": [
304             [
305                 "42d3f046.6533e",
306                 "3e7e4f38.7c3b3"
307             ]
308         ]
309     },
310     {
311         "id": "42d3f046.6533e",
312         "type": "other",
313         "name": "NULL",
314         "xml": "<outcome value=''>\n",
315         "comments": "",
316         "outputs": 1,
317         "x": 2250.381191253662,
318         "y": 756.8089141845703,
319         "z": "660eb50b.12658c",
320         "wires": [
321             [
322                 "9898c47b.17dc68"
323             ]
324         ]
325     },
326     {
327         "id": "9898c47b.17dc68",
328         "type": "switchNode",
329         "name": "is there an ipv6-address?",
330         "xml": "<switch test='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-ip-addresses.ip-addresses.ipv6-address`'>\n",
331         "comments": "",
332         "outputs": 1,
333         "x": 2444.6669692993164,
334         "y": 755.380163192749,
335         "z": "660eb50b.12658c",
336         "wires": [
337             [
338                 "7758eb3f.b453a4",
339                 "bbcfc415.922a78"
340             ]
341         ]
342     },
343     {
344         "id": "7758eb3f.b453a4",
345         "type": "other",
346         "name": "NULL",
347         "xml": "<outcome value=''>\n",
348         "comments": "",
349         "outputs": 1,
350         "x": 2637.524269104004,
351         "y": 753.951696395874,
352         "z": "660eb50b.12658c",
353         "wires": [
354             [
355                 "d7f88536.7fca88"
356             ]
357         ]
358     },
359     {
360         "id": "3e7e4f38.7c3b3",
361         "type": "other",
362         "name": "other",
363         "xml": "<outcome value='Other'>\n",
364         "comments": "",
365         "outputs": 1,
366         "x": 2247.5240478515625,
367         "y": 803.9515285491943,
368         "z": "660eb50b.12658c",
369         "wires": [
370             [
371                 "2648638f.48dc3c"
372             ]
373         ]
374     },
375     {
376         "id": "bbcfc415.922a78",
377         "type": "other",
378         "name": "other",
379         "xml": "<outcome value='Other'>\n",
380         "comments": "",
381         "outputs": 1,
382         "x": 2634.667018890381,
383         "y": 799.6659545898438,
384         "z": "660eb50b.12658c",
385         "wires": [
386             [
387                 "2648638f.48dc3c"
388             ]
389         ]
390     },
391     {
392         "id": "d7f88536.7fca88",
393         "type": "block",
394         "name": "block : atomic",
395         "xml": "<block atomic=\"true\">",
396         "atomic": "true",
397         "outputs": 1,
398         "x": 2794.667091369629,
399         "y": 751.094518661499,
400         "z": "660eb50b.12658c",
401         "wires": [
402             []
403         ]
404     },
405     {
406         "id": "194fd5ff.1b122a",
407         "type": "comment",
408         "name": "Found a usable destination port",
409         "info": "",
410         "comments": "",
411         "x": 1118.4765014648438,
412         "y": 867.9990339279175,
413         "z": "660eb50b.12658c",
414         "wires": []
415     },
416     {
417         "id": "67b4d64c.e399f8",
418         "type": "block",
419         "name": "block : atomic",
420         "xml": "<block atomic=\"true\">",
421         "atomic": "true",
422         "outputs": 1,
423         "x": 137.14286041259766,
424         "y": 805.9523487091064,
425         "z": "660eb50b.12658c",
426         "wires": [
427             [
428                 "9021e5af.5cc618",
429                 "aa8038f.fd261c8",
430                 "3812658a.229d9a",
431                 "d45ff25c.78723",
432                 "aba11878.3d0528",
433                 "7f4adf17.47b08",
434                 "e3e68421.71a8b8",
435                 "a97afc7d.c209b",
436                 "3600f5af.f19cca"
437             ]
438         ]
439     },
440     {
441         "id": "78769168.05467",
442         "type": "returnFailure",
443         "name": "return failure",
444         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'No capacity for source interface '\n  + $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.src-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-so-idx].vnics.vnic[$vnic-s-idx].vnic-port-id`\" />\n",
445         "comments": "",
446         "x": 1482.8097114562988,
447         "y": 801.4523735046387,
448         "z": "660eb50b.12658c",
449         "wires": []
450     },
451     {
452         "id": "3812658a.229d9a",
453         "type": "returnSuccess",
454         "name": "return success",
455         "xml": "<return status='success'>\n<parameter name='' value='' />\n",
456         "comments": "",
457         "x": 373.1429748535156,
458         "y": 1290.6190147399902,
459         "z": "660eb50b.12658c",
460         "wires": []
461     },
462     {
463         "id": "60f2dbb9.ae8cd4",
464         "type": "failure",
465         "name": "failure",
466         "xml": "<outcome value='failure'>\n",
467         "comments": "",
468         "outputs": 1,
469         "x": 712.142822265625,
470         "y": 289.2857131958008,
471         "z": "660eb50b.12658c",
472         "wires": [
473             [
474                 "8cddc4c2.57a498"
475             ]
476         ]
477     },
478     {
479         "id": "639eed7b.da1bd4",
480         "type": "not-found",
481         "name": "not-found",
482         "xml": "<outcome value='not-found'>\n",
483         "comments": "",
484         "outputs": 1,
485         "x": 720.7142581939697,
486         "y": 332.57142639160156,
487         "z": "660eb50b.12658c",
488         "wires": [
489             [
490                 "608970aa.edcc1"
491             ]
492         ]
493     },
494     {
495         "id": "d45ff25c.78723",
496         "type": "get-resource",
497         "name": "get-resource VNICS_CAPACITY_GROUP",
498         "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='select vnics_group_id\n    from VNICS_CAPACITY_GROUP\n    where service_instance_id = $tmp.service-instance-id\n    and nfc_naming_code = $tmp.dest-nfc-naming-code\n    and vnf_id = $tmp.dest-vnf-id'\n  pfx='db'>\n",
499         "comments": "",
500         "outputs": 1,
501         "x": 459.21429443359375,
502         "y": 315.0477695465088,
503         "z": "660eb50b.12658c",
504         "wires": [
505             [
506                 "60f2dbb9.ae8cd4",
507                 "639eed7b.da1bd4"
508             ]
509         ]
510     },
511     {
512         "id": "8cddc4c2.57a498",
513         "type": "returnFailure",
514         "name": "return failure",
515         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"Failure reading VNICS_CAPACITY_GROUP table\" />\n",
516         "comments": "",
517         "x": 880.4761505126953,
518         "y": 287.61901664733887,
519         "z": "660eb50b.12658c",
520         "wires": []
521     },
522     {
523         "id": "608970aa.edcc1",
524         "type": "save",
525         "name": "save VNICS_CAPACITY_GROUP",
526         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\n\tkey=\"insert into VNICS_CAPACITY_GROUP \n\t  (service_instance_id, nfc_naming_code, vnf_id)\n\t  VALUES ( $tmp.service-instance-id , $tmp.dest-nfc-naming-code , $tmp.dest-vnf-id )\"\n\tpfx='pfx' >\n",
527         "comments": "",
528         "outputs": 1,
529         "x": 938.8094787597656,
530         "y": 330.95237255096436,
531         "z": "660eb50b.12658c",
532         "wires": [
533             [
534                 "94fe9e7b.6e187",
535                 "a7412aee.970778"
536             ]
537         ]
538     },
539     {
540         "id": "94fe9e7b.6e187",
541         "type": "failure",
542         "name": "failure",
543         "xml": "<outcome value='failure'>\n",
544         "comments": "",
545         "outputs": 1,
546         "x": 1170.4759979248047,
547         "y": 309.28586769104004,
548         "z": "660eb50b.12658c",
549         "wires": [
550             [
551                 "dae1ca1a.80ef58"
552             ]
553         ]
554     },
555     {
556         "id": "7f8c369a.933558",
557         "type": "execute",
558         "name": "printContext",
559         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vnics.log' />\n",
560         "comments": "",
561         "outputs": 1,
562         "x": 364.4762268066406,
563         "y": 359.2857437133789,
564         "z": "660eb50b.12658c",
565         "wires": [
566             []
567         ]
568     },
569     {
570         "id": "dae1ca1a.80ef58",
571         "type": "returnFailure",
572         "name": "return failure",
573         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"Failure to insert record into VNICS_CAPACITY_GROUP table\" />\n",
574         "comments": "",
575         "x": 1322.1427421569824,
576         "y": 308.61905574798584,
577         "z": "660eb50b.12658c",
578         "wires": []
579     },
580     {
581         "id": "a7412aee.970778",
582         "type": "success",
583         "name": "success",
584         "xml": "<outcome value='success'>\n",
585         "comments": "",
586         "outputs": 1,
587         "x": 1173.8094940185547,
588         "y": 355.95239448547363,
589         "z": "660eb50b.12658c",
590         "wires": [
591             [
592                 "746962c4.c67a7c"
593             ]
594         ]
595     },
596     {
597         "id": "746962c4.c67a7c",
598         "type": "get-resource",
599         "name": "get-resource VNICS_CAPACITY_GROUP",
600         "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='select vnics_group_id\n    from VNICS_CAPACITY_GROUP\n    where service_instance_id = $tmp.service-instance-id\n    and nfc_naming_code = $tmp.dest-nfc-naming-code\n    and vnf_id = $tmp.dest-vnf-id'\n  pfx='db'>\n",
601         "comments": "",
602         "outputs": 1,
603         "x": 1413.8095397949219,
604         "y": 354.2856864929199,
605         "z": "660eb50b.12658c",
606         "wires": [
607             [
608                 "5f3550c3.13f43"
609             ]
610         ]
611     },
612     {
613         "id": "5f3550c3.13f43",
614         "type": "failure",
615         "name": "failure",
616         "xml": "<outcome value='failure'>\n",
617         "comments": "",
618         "outputs": 1,
619         "x": 1655.4761009216309,
620         "y": 352.6190195083618,
621         "z": "660eb50b.12658c",
622         "wires": [
623             [
624                 "c948a7c1.8a3228"
625             ]
626         ]
627     },
628     {
629         "id": "c948a7c1.8a3228",
630         "type": "returnFailure",
631         "name": "return failure",
632         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"Failure reading VNICS_CAPACITY_GROUP table\" />\n",
633         "comments": "",
634         "x": 1823.8094291687012,
635         "y": 350.9523229598999,
636         "z": "660eb50b.12658c",
637         "wires": []
638     },
639     {
640         "id": "aba11878.3d0528",
641         "type": "for",
642         "name": "for each dest vnfc-object",
643         "xml": "<for silentFailure='true' index='vnfc-do-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object_length`' >\n",
644         "comments": "",
645         "outputs": 1,
646         "x": 407.14293670654297,
647         "y": 520.6189937591553,
648         "z": "660eb50b.12658c",
649         "wires": [
650             [
651                 "ba61fc56.2bff3"
652             ]
653         ]
654     },
655     {
656         "id": "ba61fc56.2bff3",
657         "type": "for",
658         "name": "for each dest vnic",
659         "xml": "<for silentFailure='true' index='vnic-d-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic_length`' >\n",
660         "comments": "",
661         "outputs": 1,
662         "x": 637.1430130004883,
663         "y": 520.6189823150635,
664         "z": "660eb50b.12658c",
665         "wires": [
666             [
667                 "3429f2b4.06a52e"
668             ]
669         ]
670     },
671     {
672         "id": "3429f2b4.06a52e",
673         "type": "get-resource",
674         "name": "get-resource VNICS_CAPACITY",
675         "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='select available_capacity, vnic_capacity\n    from VNICS_CAPACITY\n    where vnics_group_id = $db.vnics-group-id\n    and vnic_port_name = $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-port-name'\n  pfx='db.vnics-capacity'>\n",
676         "comments": "",
677         "outputs": 1,
678         "x": 883.8098297119141,
679         "y": 520.6189737319946,
680         "z": "660eb50b.12658c",
681         "wires": [
682             [
683                 "363cb986.7e0746",
684                 "fda3755.4ca4688",
685                 "6169bfbf.6fa9c"
686             ]
687         ]
688     },
689     {
690         "id": "363cb986.7e0746",
691         "type": "failure",
692         "name": "failure",
693         "xml": "<outcome value='failure'>\n",
694         "comments": "",
695         "outputs": 1,
696         "x": 1107.1429595947266,
697         "y": 470.61901473999023,
698         "z": "660eb50b.12658c",
699         "wires": [
700             [
701                 "ce11a3a3.c1403"
702             ]
703         ]
704     },
705     {
706         "id": "ce11a3a3.c1403",
707         "type": "returnFailure",
708         "name": "return failure",
709         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"Failure reading VNICS_CAPACITY_GROUP table\" />\n",
710         "comments": "",
711         "x": 1275.4762878417969,
712         "y": 468.9523181915283,
713         "z": "660eb50b.12658c",
714         "wires": []
715     },
716     {
717         "id": "fda3755.4ca4688",
718         "type": "not-found",
719         "name": "not-found",
720         "xml": "<outcome value='not-found'>\n",
721         "comments": "",
722         "outputs": 1,
723         "x": 1115.4762954711914,
724         "y": 523.9523372650146,
725         "z": "660eb50b.12658c",
726         "wires": [
727             [
728                 "41079a08.942214"
729             ]
730         ]
731     },
732     {
733         "id": "41079a08.942214",
734         "type": "save",
735         "name": "save VNICS_CAPACITY",
736         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\n\tkey=\"insert into VNICS_CAPACITY \n\t  (vnics_group_id, vnic_port_name, available_capacity, vnic_capacity)\n\t  VALUES ( $db.vnics-group-id ,\n\t    $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-port-name ,\n\t    $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.vnic-capacity ,\n\t    $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.vnic-capacity\n\t    )\"\n\tpfx='pfx' >\n",
737         "comments": "",
738         "outputs": 1,
739         "x": 1312.1430053710938,
740         "y": 523.9523277282715,
741         "z": "660eb50b.12658c",
742         "wires": [
743             [
744                 "6a32b892.8f68f8"
745             ]
746         ]
747     },
748     {
749         "id": "6a32b892.8f68f8",
750         "type": "failure",
751         "name": "failure",
752         "xml": "<outcome value='failure'>\n",
753         "comments": "",
754         "outputs": 1,
755         "x": 1510.476276397705,
756         "y": 522.2856945991516,
757         "z": "660eb50b.12658c",
758         "wires": [
759             [
760                 "a8fbb0ff.039e6"
761             ]
762         ]
763     },
764     {
765         "id": "a8fbb0ff.039e6",
766         "type": "returnFailure",
767         "name": "return failure",
768         "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"Failure to insert record into VNICS_CAPACITY table\" />\n",
769         "comments": "",
770         "x": 1662.1430206298828,
771         "y": 521.6188826560974,
772         "z": "660eb50b.12658c",
773         "wires": []
774     },
775     {
776         "id": "6169bfbf.6fa9c",
777         "type": "success",
778         "name": "success",
779         "xml": "<outcome value='success'>\n",
780         "comments": "",
781         "outputs": 1,
782         "x": 1115.476417541504,
783         "y": 580.6189975738525,
784         "z": "660eb50b.12658c",
785         "wires": [
786             [
787                 "91c7d1c5.6a47a"
788             ]
789         ]
790     },
791     {
792         "id": "91c7d1c5.6a47a",
793         "type": "set",
794         "name": "set vnic-capacity",
795         "xml": "<set>\n<parameter name='service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.vnic-capacity'\n  value='`$db.vnics-capacity.available-capacity`' />\n",
796         "comments": "",
797         "x": 1285.4762573242188,
798         "y": 580.6189765930176,
799         "z": "660eb50b.12658c",
800         "wires": []
801     },
802     {
803         "id": "7f4adf17.47b08",
804         "type": "set",
805         "name": "set source-to-dest-map_length",
806         "xml": "<set>\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map_length'\n  value='`$map-idx`' />\n",
807         "comments": "",
808         "x": 426.47618865966797,
809         "y": 1052.2857131958008,
810         "z": "660eb50b.12658c",
811         "wires": []
812     },
813     {
814         "id": "2648638f.48dc3c",
815         "type": "switchNode",
816         "name": "is this is most remaining capacity so far?",
817         "xml": "<switch test='`$tmp.rem-cap &gt; $tmp.save-rem-cap`'>\n",
818         "comments": "",
819         "outputs": 1,
820         "x": 2254.47664642334,
821         "y": 880.6190948486328,
822         "z": "660eb50b.12658c",
823         "wires": [
824             [
825                 "813e25b7.580f58"
826             ]
827         ]
828     },
829     {
830         "id": "813e25b7.580f58",
831         "type": "outcomeTrue",
832         "name": "true",
833         "xml": "<outcome value='true'>\n",
834         "comments": "",
835         "outputs": 1,
836         "x": 2501.1432189941406,
837         "y": 878.9523334503174,
838         "z": "660eb50b.12658c",
839         "wires": [
840             [
841                 "56ba6414.9f4ccc"
842             ]
843         ]
844     },
845     {
846         "id": "56ba6414.9f4ccc",
847         "type": "set",
848         "name": "set found-capacity and save vnic",
849         "xml": "<set>\n<parameter name='tmp.found-capacity' value='Y' />\n<parameter name='tmp.save-vnfc-do-idx' value='`$vnfc-do-idx`' />\n<parameter name='tmp.save-vnic-d-idx' value='`$vnic-d-idx`' />\n<parameter name='tmp.save-rem-cap' value='`$tmp.rem-cap`' />\n",
850         "comments": "",
851         "x": 2757.8097610473633,
852         "y": 878.9523677825928,
853         "z": "660eb50b.12658c",
854         "wires": []
855     },
856     {
857         "id": "e3e68421.71a8b8",
858         "type": "for",
859         "name": "for each dest vnfc-object",
860         "xml": "<for silentFailure='true' index='vnfc-do-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object_length`' >\n",
861         "comments": "",
862         "outputs": 1,
863         "x": 409.80950927734375,
864         "y": 1112.2857131958008,
865         "z": "660eb50b.12658c",
866         "wires": [
867             [
868                 "e42814ea.b0ea28"
869             ]
870         ]
871     },
872     {
873         "id": "e42814ea.b0ea28",
874         "type": "for",
875         "name": "for each dest vnic",
876         "xml": "<for silentFailure='true' index='vnic-d-idx' start='0' end='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic_length`' >\n",
877         "comments": "",
878         "outputs": 1,
879         "x": 639.8096008300781,
880         "y": 1112.285701751709,
881         "z": "660eb50b.12658c",
882         "wires": [
883             [
884                 "999a9dbf.6d329"
885             ]
886         ]
887     },
888     {
889         "id": "e98ed9b2.d66598",
890         "type": "update",
891         "name": "update VNICS_CAPACITY",
892         "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"update VNICS_CAPACITY\n     set available_capacity = $tmp.avail-capacity\n     where vnics_group_id = $db.vnics-group-id\n     and vnic_port_name = $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-port-name\n\" >",
893         "comments": "",
894         "outputs": 1,
895         "x": 1063.142837524414,
896         "y": 1163.9522199630737,
897         "z": "660eb50b.12658c",
898         "wires": [
899             [
900                 "e37dddbd.93743"
901             ]
902         ]
903     },
904     {
905         "id": "e37dddbd.93743",
906         "type": "failure",
907         "name": "failure",
908         "xml": "<outcome value='failure'>\n",
909         "comments": "",
910         "outputs": 1,
911         "x": 1279.809413909912,
912         "y": 1162.2856788635254,
913         "z": "660eb50b.12658c",
914         "wires": [
915             [
916                 "9a4f7649.32e9d8"
917             ]
918         ]
919     },
920     {
921         "id": "9a4f7649.32e9d8",
922         "type": "returnFailure",
923         "name": "return failure",
924         "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=\"Failure updating VNICS_CAPACITY table\" />\n",
925         "comments": "",
926         "x": 1448.1427536010742,
927         "y": 1160.4287452697754,
928         "z": "660eb50b.12658c",
929         "wires": []
930     },
931     {
932         "id": "999a9dbf.6d329",
933         "type": "block",
934         "name": "block : atomic",
935         "xml": "<block atomic=\"true\">",
936         "atomic": "true",
937         "outputs": 1,
938         "x": 826.4761505126953,
939         "y": 1110.6189651489258,
940         "z": "660eb50b.12658c",
941         "wires": [
942             [
943                 "59c4c4cf.8c1e7c",
944                 "61833831.c63cb8",
945                 "e98ed9b2.d66598"
946             ]
947         ]
948     },
949     {
950         "id": "59c4c4cf.8c1e7c",
951         "type": "get-resource",
952         "name": "get-resource VNICS_CAPACITY",
953         "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='select available_capacity\n    from VNICS_CAPACITY\n    where vnics_group_id = $db.vnics-group-id\n    and vnic_port_name = $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].vnic-port-name'\n  pfx='db.vnics-capacity'>\n",
954         "comments": "",
955         "outputs": 1,
956         "x": 1081.4761085510254,
957         "y": 1060.618984222412,
958         "z": "660eb50b.12658c",
959         "wires": [
960             [
961                 "bcb1f86a.023148"
962             ]
963         ]
964     },
965     {
966         "id": "61833831.c63cb8",
967         "type": "set",
968         "name": "set new available capacity",
969         "xml": "<set>\n<parameter name='tmp.original-avail-capacity' value='`$db.vnics-capacity.available-capacity`' />\n<parameter name='tmp.original-used-capacity' value='`$service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.used-capacity`' />\n<parameter name='tmp.avail-capacity' value='`$db.vnics-capacity.available-capacity - $service-data.vnfc-instance-groups.vnfc-instance-group[$tmp.dest-vnfc-idx].vnfc-objects.vnfc-object[$vnfc-do-idx].vnics.vnic[$vnic-d-idx].capacity.used-capacity`' />\n",
970         "comments": "",
971         "x": 1061.4761695861816,
972         "y": 1112.2856330871582,
973         "z": "660eb50b.12658c",
974         "wires": []
975     },
976     {
977         "id": "bcb1f86a.023148",
978         "type": "failure",
979         "name": "failure",
980         "xml": "<outcome value='failure'>\n",
981         "comments": "",
982         "outputs": 1,
983         "x": 1304.8094635009766,
984         "y": 1058.9523391723633,
985         "z": "660eb50b.12658c",
986         "wires": [
987             [
988                 "a87c2664.36e398"
989             ]
990         ]
991     },
992     {
993         "id": "a87c2664.36e398",
994         "type": "returnFailure",
995         "name": "return failure",
996         "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=\"Failure reading VNICS_CAPACITY table\" />\n",
997         "comments": "",
998         "x": 1473.1428031921387,
999         "y": 1057.0954055786133,
1000         "z": "660eb50b.12658c",
1001         "wires": []
1002     },
1003     {
1004         "id": "a97afc7d.c209b",
1005         "type": "save",
1006         "name": "save VNICS_CONFIGURATION_ID",
1007         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\n\tkey=\"insert into VNICS_CONFIGURATION_ID\n\t(configuration_id, vnics_group_id)\n\tvalues ( $tmp.configuration-id , $db.vnics-group-id )\"\n\tpfx='pfx' >\n",
1008         "comments": "",
1009         "outputs": 1,
1010         "x": 439.8095245361328,
1011         "y": 1223.9523391723633,
1012         "z": "660eb50b.12658c",
1013         "wires": [
1014             []
1015         ]
1016     },
1017     {
1018         "id": "3600f5af.f19cca",
1019         "type": "set",
1020         "name": "set vnics-group-id",
1021         "xml": "<set>\n<parameter name='pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.vnics-group-id'\n  value='`$db.vnics-group-id`' />\n",
1022         "comments": "",
1023         "x": 383.4761962890625,
1024         "y": 424.2857131958008,
1025         "z": "660eb50b.12658c",
1026         "wires": []
1027     }
1028 ]