3 "id": "afa5c42a.a2ebf8",
17 "id": "cf1c9dc9.bb2d2",
18 "type": "service-logic",
19 "name": "GENERIC-RESOURCE-API ${project.version}",
20 "module": "GENERIC-RESOURCE-API",
21 "version": "${project.version}",
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}'>",
25 "x": 242.36902618408203,
26 "y": 126.48811340332031,
27 "z": "dca5409f.4b488",
35 "id": "6b44ec68.545204",
37 "name": "method port-mirror-topology-operation-disable",
38 "xml": "<method rpc='port-mirror-topology-operation-disable' mode='sync'>\n",
41 "x": 240.17862701416016,
43 "z": "dca5409f.4b488",
51 "id": "de981556.6c92f8",
53 "name": "port-mirror-topology-operation-disable",
56 "x": 523.094856262207,
57 "y": 33.83634376525879,
58 "z": "dca5409f.4b488",
62 "id": "7aa285f3.503f3c",
64 "name": "block : atomic",
65 "xml": "<block atomic=\"true\">",
69 "y": 765.5357189178467,
70 "z": "dca5409f.4b488",
89 "id": "5e62ea77.c8eff4",
90 "type": "returnSuccess",
91 "name": "return success",
92 "xml": "<return status='success'>\n<parameter name='error-code' value='200' />\n<parameter name='ack-final' value='Y' />",
94 "x": 455.60711669921875,
95 "y": 1303.8689861297607,
96 "z": "dca5409f.4b488",
100 "id": "1f8e4075.61402",
102 "name": "set tmp.configuration-id",
103 "xml": "<set>\n<parameter name='tmp.configuration-id' value='`$port-mirror-topology-operation-input.configuration-information.configuration-id`' />\n\n",
105 "x": 481.5594940185547,
106 "y": 231.01191997528076,
107 "z": "dca5409f.4b488",
111 "id": "cc6aae5f.3a8c5",
113 "name": "execute readProperties",
114 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
117 "x": 483.2738037109375,
118 "y": 273.86901473999023,
119 "z": "dca5409f.4b488",
125 "id": "186fa0f2.58675f",
127 "name": "generate port-mirror-configuration url",
128 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.pm-configuration`\"/>\n <parameter name=\"outputPath\" value=\"tmp.pmc-url\"/>\n <parameter name=\"target\" value=\"{configuration-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.configuration-id`\"/>\n",
131 "x": 523.273811340332,
132 "y": 315.2975902557373,
133 "z": "dca5409f.4b488",
139 "id": "81aa6fa5.1e0db",
141 "name": "execute RestApiCallNode - get port-mirror-configuration",
142 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.pmc-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='GET' />\n <parameter name=\"responsePrefix\" value=\"pm-mdsal\" />\n\n",
145 "x": 581.8452758789062,
146 "y": 379.5833988189697,
147 "z": "dca5409f.4b488",
156 "id": "5160c826.6574f8",
159 "xml": "<outcome value='success'>\n",
162 "x": 879.9983978271484,
163 "y": 350.3912477493286,
164 "z": "dca5409f.4b488",
172 "id": "58ec2f2e.df96f",
175 "xml": "<outcome value='Other'>\n",
178 "x": 877.5595359802246,
179 "y": 399.58334159851074,
180 "z": "dca5409f.4b488",
188 "id": "41f30bac.7dc954",
189 "type": "returnFailure",
190 "name": "return failure",
191 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Cannot find port-mirror-configuration ' + $tmp.configuration-id`\" />\n",
193 "x": 1391.84521484375,
194 "y": 396.72620391845703,
195 "z": "dca5409f.4b488",
199 "id": "3bcc9f6e.a7792",
200 "type": "switchNode",
201 "name": "switch order-status == 'Active'",
202 "xml": "<switch test=\"`$pm-mdsal.port-mirror-configuration[0].configuration-data.configuration-oper-status.order-status == 'Active'`\">\n",
205 "x": 505.8928909301758,
206 "y": 503.3928031921387,
207 "z": "dca5409f.4b488",
215 "id": "e5e068e4.dd8428",
216 "type": "switchNode",
217 "name": "switch length == 1",
218 "xml": "<switch test='`$pm-mdsal.port-mirror-configuration_length == 1`'>\n",
221 "x": 1058.9880981445312,
222 "y": 349.5833559036255,
223 "z": "dca5409f.4b488",
231 "id": "f5f6996c.652fe8",
232 "type": "outcomeFalse",
234 "xml": "<outcome value='false'>\n",
237 "x": 1228.9881286621094,
238 "y": 349.58334732055664,
239 "z": "dca5409f.4b488",
247 "id": "3fc32962.070946",
248 "type": "outcomeFalse",
250 "xml": "<outcome value='false'>\n",
253 "x": 734.4643020629883,
254 "y": 503.3928909301758,
255 "z": "dca5409f.4b488",
263 "id": "db0e50e6.2c8ce",
264 "type": "returnFailure",
265 "name": "return failure",
266 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Order status is ' + $mdsal-pmc.port-mirror-configuration[0].configuration-data.configuration-oper-status.order-status + ' but must be Active'`\" />\n",
268 "x": 895.8928909301758,
269 "y": 501.9643020629883,
270 "z": "dca5409f.4b488",
274 "id": "49639130.bcbb1",
276 "name": "rpc-port-mirror-1130",
280 "y": 560.2976331710815,
281 "z": "dca5409f.4b488",
285 "id": "5bedfddc.e597c4",
287 "name": "step 1 - call contrail to turn off packet mirroring",
290 "x": 551.3690643310547,
291 "y": 758.869083404541,
292 "z": "dca5409f.4b488",
296 "id": "640a7569.398d7c",
298 "name": "step 2 - set is-port-mirroring in A&AI ",
301 "x": 502.79759216308594,
302 "y": 1148.5834102630615,
303 "z": "dca5409f.4b488",
307 "id": "219abf57.0c159",
309 "name": "Find the source port",
312 "x": 459.9404231480189,
313 "y": 601.7262674059186,
314 "z": "dca5409f.4b488",
318 "id": "c7696869.d71998",
320 "name": "for each mapped source port",
321 "xml": "<for index='idx' start='0' end='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map_length`' >\n",
324 "x": 504.2261505126953,
325 "y": 641.7262935638428,
326 "z": "dca5409f.4b488",
334 "id": "d3eaa14b.aea04",
335 "type": "switchNode",
336 "name": "switch mapped source port id == input source port id",
337 "xml": "<switch test='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$idx].source-port-id\n == $port-mirror-topology-operation-input.port-mirror-configuration-request-input.source-port.source-port-id`'>\n",
340 "x": 857.0833282470703,
341 "y": 640.2976245880127,
342 "z": "dca5409f.4b488",
350 "id": "c2e13495.7d0978",
351 "type": "outcomeTrue",
353 "xml": "<outcome value='true'>\n",
356 "x": 1132.797565460205,
357 "y": 638.8691053390503,
358 "z": "dca5409f.4b488",
366 "id": "640f5b27.a577f4",
368 "name": "set src-idx",
369 "xml": "<set>\n<parameter name='src-idx' value='`$idx`' />\n",
371 "x": 1482.797492980957,
372 "y": 614.5833559036255,
373 "z": "dca5409f.4b488",
377 "id": "e115b87b.36f0f8",
379 "name": "block : atomic",
380 "xml": "<block atomic=\"true\">",
383 "x": 1285.6547088623047,
384 "y": 637.4405879974365,
385 "z": "dca5409f.4b488",
394 "id": "a7ee3026.a6e8",
399 "x": 1455.6546821594238,
400 "y": 660.2977313995361,
401 "z": "dca5409f.4b488",
405 "id": "2ba101b7.37177e",
406 "type": "switchNode",
407 "name": "switch src-idx",
408 "xml": "<switch test='`$src-idx`'>\n",
411 "x": 454.46424102783203,
412 "y": 708.8691101074219,
413 "z": "dca5409f.4b488",
421 "id": "58ac3aae.bc8044",
424 "xml": "<outcome value=''>\n",
427 "x": 672.7975921630859,
428 "y": 707.4405879974365,
429 "z": "dca5409f.4b488",
437 "id": "d5822713.a71b88",
438 "type": "returnFailure",
439 "name": "return failure",
440 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Unable to find source port ' + $port-mirror-topology-operation-input.port-mirror-configuration-request-input.source-port.source-port-id + ' in MD-SAL'`\" />\n",
442 "x": 827.0832977294922,
443 "y": 706.011999130249,
444 "z": "dca5409f.4b488",
448 "id": "327c0b68.fb42d4",
450 "name": "execute ContrailAdaptor to disable port mirroring",
451 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='port-mirroring' />\n<parameter name='api-action' value='disable' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='display-name'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-name`' />\n<parameter name='contrail-virtual-machine-interface-name'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-name`' />\n<parameter name='contrail-virtual-machine-interface-id'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-id`' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='default-project'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant`' />\n<parameter name='traffic-direction' value='both' />\n<parameter name='analyzer-ip-address'\n value='`$tmp.analyzer.ip-address`' />\n<parameter name='udp-port' value='8099' />\n<parameter name='routing-instance'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-network-fqdn`' />\n<parameter name='local-preference' value='1' />\n<parameter name='cloud-region-id'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-region-id`' />\n<parameter name='cloud-owner'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-owner`' />\n\n",
454 "x": 564.7978134155273,
455 "y": 1069.9178819656372,
456 "z": "dca5409f.4b488",
465 "id": "eaf862d4.043dd",
468 "xml": "<outcome value='failure'>\n",
471 "x": 839.083438873291,
472 "y": 1095.6321649551392,
473 "z": "dca5409f.4b488",
481 "id": "303f390e.c7fa26",
482 "type": "switchNode",
483 "name": "switch ipv4-address",
484 "xml": "<switch test='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.ipv4-address`'>\n",
487 "x": 471.94065856933594,
488 "y": 812.7750616073608,
489 "z": "dca5409f.4b488",
498 "id": "87756d33.8ea47",
501 "xml": "<outcome value=''>\n",
504 "x": 637.6548538208008,
505 "y": 854.2036333084106,
506 "z": "dca5409f.4b488",
514 "id": "8298b662.2d9938",
517 "xml": "<outcome value='Other'>\n",
520 "x": 640.5120010375977,
521 "y": 811.3465251922607,
522 "z": "dca5409f.4b488",
530 "id": "9156cd31.843db",
532 "name": "set tmp.analyzer.ip-address",
533 "xml": "<set>\n<parameter name='tmp.analyzer.ip-address'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.ipv4-address`' />\n",
535 "x": 831.9406890869141,
536 "y": 809.9179544448853,
537 "z": "dca5409f.4b488",
541 "id": "1bac5e62.5c03a2",
542 "type": "switchNode",
543 "name": "switch ipv6-address",
544 "xml": "<switch test='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.ipv6-address`'>\n",
547 "x": 809.0835189819336,
548 "y": 854.2035989761353,
549 "z": "dca5409f.4b488",
558 "id": "b61120a5.93b57",
561 "xml": "<outcome value=''>\n",
564 "x": 970.5121078491211,
565 "y": 897.0607767105103,
566 "z": "dca5409f.4b488",
574 "id": "fa2aeb48.7c5db8",
577 "xml": "<outcome value='Other'>\n",
580 "x": 973.369255065918,
581 "y": 854.2036685943604,
582 "z": "dca5409f.4b488",
590 "id": "9a995b34.8ffdf8",
592 "name": "set tmp.analyzer.ip-address",
593 "xml": "<set>\n<parameter name='tmp.analyzer.ip-address'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.ipv6-address`' />\n",
595 "x": 1164.7979431152344,
596 "y": 852.7750978469849,
597 "z": "dca5409f.4b488",
601 "id": "9b289fea.447ed",
602 "type": "switchNode",
603 "name": "switch vipv4-address",
604 "xml": "<switch test='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.vipv4-address`'>\n",
607 "x": 1141.940773010254,
608 "y": 897.0607423782349,
609 "z": "dca5409f.4b488",
618 "id": "62515cbb.2125a4",
621 "xml": "<outcome value=''>\n",
624 "x": 1304.797752380371,
625 "y": 937.0607767105103,
626 "z": "dca5409f.4b488",
634 "id": "b626a219.807f2",
637 "xml": "<outcome value='Other'>\n",
640 "x": 1306.2263145446777,
641 "y": 895.6323432922363,
642 "z": "dca5409f.4b488",
650 "id": "71b7c0e4.601d3",
652 "name": "set tmp.analyzer.ip-address",
653 "xml": "<set>\n<parameter name='tmp.analyzer.ip-address'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.vipv4-address`' />\n",
655 "x": 1499.0835876464844,
656 "y": 892.7750978469849,
657 "z": "dca5409f.4b488",
661 "id": "2e6d6d0b.171e12",
662 "type": "switchNode",
663 "name": "switch vipv6-address",
664 "xml": "<switch test='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.vipv6-address`'>\n",
667 "x": 1476.226417541504,
668 "y": 937.0607423782349,
669 "z": "dca5409f.4b488",
678 "id": "d62a09ce.06cd18",
681 "xml": "<outcome value=''>\n",
684 "x": 1643.369285583496,
685 "y": 978.4893655776978,
686 "z": "dca5409f.4b488",
694 "id": "c630f236.09afb",
697 "xml": "<outcome value='Other'>\n",
700 "x": 1644.7978477478027,
701 "y": 937.0609321594238,
702 "z": "dca5409f.4b488",
710 "id": "a5b80d6a.ee8af",
712 "name": "set tmp.analyzer.ip-address",
713 "xml": "<set>\n<parameter name='tmp.analyzer.ip-address'\n value='`$pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].dest-ip-addresses.ip-addresses.vipv6-address`' />\n",
715 "x": 1837.6551208496094,
716 "y": 934.2036867141724,
717 "z": "dca5409f.4b488",
721 "id": "c50ee7c7.395c58",
724 "xml": "<outcome value='success'>\n",
727 "x": 841.940616607666,
728 "y": 1048.489239692688,
729 "z": "dca5409f.4b488",
737 "id": "e0872973.76a968",
739 "name": "set contrail-set[]",
740 "xml": "<set>\n<parameter name='contrail-set[$src-idx]' value='true' />\n",
742 "x": 997.6548233032227,
743 "y": 1047.0607719421387,
744 "z": "dca5409f.4b488",
748 "id": "3cd84440.1100cc",
750 "name": "update l-interface object",
751 "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"l-interface\"\n key=\"cloud-region.cloud-region-id = $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-region-id\n AND cloud-region.cloud-owner = $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-owner\n AND tenant.tenant-id = $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant-id\n AND vserver.vserver-id = $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-vserver-id\n AND l-interface.interface-name = $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-name\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"is-port-mirrored\" value=\"false\" />",
754 "x": 489.3213806152344,
755 "y": 1215.5833673477173,
756 "z": "dca5409f.4b488",
765 "id": "8a4455b4.e26628",
768 "xml": "<outcome value='failure'>\n",
771 "x": 692.0119781494141,
772 "y": 1241.3455305099487,
773 "z": "dca5409f.4b488",
781 "id": "6a76abbb.425c24",
784 "xml": "<outcome value='not-found'>\n",
787 "x": 700.5834274291992,
788 "y": 1196.3457250595093,
789 "z": "dca5409f.4b488",
797 "id": "cf52a216.7bcba",
798 "type": "returnFailure",
799 "name": "return failure",
800 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'No dest addresses stored for source port ' + $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-name`\" />\n",
802 "x": 1787.3213348388672,
803 "y": 981.250036239624,
804 "z": "dca5409f.4b488",
808 "id": "b5b4127.7ba46f",
809 "type": "returnFailure",
810 "name": "return failure",
811 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to update policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n",
813 "x": 985.6546478271484,
814 "y": 1094.5834102630615,
815 "z": "dca5409f.4b488",
819 "id": "ae976edd.7993e",
820 "type": "returnFailure",
821 "name": "return failure",
822 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to update l-interface object in AAI for interface ' + $pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[$src-idx].source-port-name`\" />\n",
824 "x": 855.6546478271484,
825 "y": 1217.9166622161865,
826 "z": "dca5409f.4b488",
830 "id": "8e3809f5.0badf8",
833 "xml": "<set>\n<parameter name='pm.configuration-id' value='`$tmp.configuration-id`' />\n<parameter name='pm.configuration-data.' value='`$pm-mdsal.port-mirror-configuration[0].configuration-data.`' />\n",
835 "x": 432.55950927734375,
836 "y": 439.1071090698242,
837 "z": "dca5409f.4b488",