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-assign-sync.json
1 [{"id":"d4981d0d.a6054","type":"dgstart","name":"DGSTART","outputs":1,"x":99.99999237060547,"y":89.080322265625,"z":"28d78a5d.e3aa46","wires":[["c6e9bc29.d4914"]]},{"id":"c6e9bc29.d4914","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","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}'>","outputs":1,"x":213.6190185546875,"y":129.3184356689453,"z":"28d78a5d.e3aa46","wires":[["4a5a9c6b.fcbe14"]]},{"id":"4a5a9c6b.fcbe14","type":"method","name":"method port-mirror-topology-operation-assign-sync","xml":"<method rpc='port-mirror-topology-operation-assign-sync' mode='sync'>\n","comments":"","outputs":1,"x":227.42861938476562,"y":169.080322265625,"z":"28d78a5d.e3aa46","wires":[["2b414eef.f2d3e2"]]},{"id":"f0e95717.55e158","type":"comment","name":"port-mirror-topology-operation-assign-sync","info":"","comments":"","x":494.3448486328125,"y":36.66666603088379,"z":"28d78a5d.e3aa46","wires":[]},{"id":"2b414eef.f2d3e2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":156.6666488647461,"y":590.0326976776123,"z":"28d78a5d.e3aa46","wires":[["e97a4616.1a2ef8","8e922c1f.6598e","b93a573d.91e578","c18afb65.324068","6eddde34.9dcbb","22301bc.8523de4","712d0a9f.ac38b4"]]},{"id":"8e922c1f.6598e","type":"get-resource","name":"get-resource PORT_MIRROR_CAPABILITY","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='select role,nfc_naming_code,pps_capacity\n    from PORT_MIRROR_CAPABILITY cap, PORT_MIRROR_CONFIGURATION conf, SERVICE_PROXY sp\n    where cap.port_mirror_capability_name=conf.port_mirror_capability_name\n     and cap.port_mirror_service_uuid=conf.port_mirror_service_uuid\n     and cap.service_proxy_name=conf.service_proxy_name\n     and cap.service_proxy_name=sp.service_proxy_name\n     and cap.port_mirror_service_uuid=sp.parent_service_uuid\n     and conf.customization_uuid = $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid\n     and conf.port_mirror_service_uuid = $service-data.service-information.onap-model-information.model-uuid\n    order by role'\n  pfx='db.cap[]'>\n\n","comments":"","outputs":1,"x":512.6190032958984,"y":321.69937896728516,"z":"28d78a5d.e3aa46","wires":[["faec1832.428eb8","86f1b9bb.986ec8"]]},{"id":"97d0df89.5c5ac","type":"returnFailure","name":"return failure","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=\"`'Unable to find PORT_MIRROR_CONFIGURATION entry for ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":936.1904029846191,"y":340.84213638305664,"z":"28d78a5d.e3aa46","wires":[]},{"id":"faec1832.428eb8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":766.9761638641357,"y":297.3659191131592,"z":"28d78a5d.e3aa46","wires":[["675d5840.c6f238"]]},{"id":"86f1b9bb.986ec8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":775.5475997924805,"y":340.65163230895996,"z":"28d78a5d.e3aa46","wires":[["97d0df89.5c5ac"]]},{"id":"675d5840.c6f238","type":"returnFailure","name":"return failure","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=\"Error reading PORT_MIRROR_CONFIGURATION and PORT_MIRROR_CAPABILITY tables\" />\n","comments":"","x":938.4047431945801,"y":297.36595344543457,"z":"28d78a5d.e3aa46","wires":[]},{"id":"e97a4616.1a2ef8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name='error-code' value='200' />\n<parameter name='ack-final' value='N' />","comments":"","x":407.09517669677734,"y":926.222993850708,"z":"28d78a5d.e3aa46","wires":[]},{"id":"c3686485.05b8a8","type":"switchNode","name":"switch db.cap_length == 2","xml":"<switch test='`$db.cap_length == 2`'>\n","comments":"","outputs":1,"x":1117.618911743164,"y":394.080379486084,"z":"28d78a5d.e3aa46","wires":[["b55ad9a0.811a08"]]},{"id":"4169e23c.9e0dbc","type":"returnFailure","name":"return failure","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=\"`'PORT_MIRROR_CONFIGURATION does not contain exactly 2 entries for UUID ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1527.618902206421,"y":393.41372871398926,"z":"28d78a5d.e3aa46","wires":[]},{"id":"b55ad9a0.811a08","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1356.1903400421143,"y":393.84223556518555,"z":"28d78a5d.e3aa46","wires":[["4169e23c.9e0dbc"]]},{"id":"2077d65b.fd2b8a","type":"switchNode","name":"switch db.cap[0].role == collector","xml":"<switch test=\"`$db.cap[0].role == 'collector'`\">\n","comments":"","outputs":1,"x":1136.1903381347656,"y":442.65181159973145,"z":"28d78a5d.e3aa46","wires":[["4f6a0ac5.2a7bd4"]]},{"id":"4f6a0ac5.2a7bd4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1354.7618255615234,"y":440.9851703643799,"z":"28d78a5d.e3aa46","wires":[["e9504b90.1d6868"]]},{"id":"e9504b90.1d6868","type":"returnFailure","name":"return failure","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=\"`'No collector capability_role found for UUID ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1527.618902206421,"y":440.98517417907715,"z":"28d78a5d.e3aa46","wires":[]},{"id":"3fcce2c4.a741de","type":"switchNode","name":"switch db.cap[1].role == source","xml":"<switch test=\"`$db.cap[1].role == 'source'`\">\n","comments":"","outputs":1,"x":1127.6189498901367,"y":491.2232313156128,"z":"28d78a5d.e3aa46","wires":[["25db0d53.1bf8b2"]]},{"id":"25db0d53.1bf8b2","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1354.761754989624,"y":489.55668449401855,"z":"28d78a5d.e3aa46","wires":[["24be1582.7b80ea"]]},{"id":"24be1582.7b80ea","type":"returnFailure","name":"return failure","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=\"`'No source capability_role found for UUID ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1526.1903324127197,"y":489.55660247802734,"z":"28d78a5d.e3aa46","wires":[]},{"id":"b93a573d.91e578","type":"set","name":"set tmp.pm.configuration-id","xml":"<set>\n<parameter name='tmp.pm.configuration-id' value='`$port-mirror-topology-operation-input.configuration-information.configuration-id`' />\n\n","comments":"","x":445.1904754638672,"y":681.4612274169922,"z":"28d78a5d.e3aa46","wires":[]},{"id":"c18afb65.324068","type":"execute","name":"execute readProperties","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","comments":"","outputs":1,"x":433.3333206176758,"y":730.0326557159424,"z":"28d78a5d.e3aa46","wires":[[]]},{"id":"6eddde34.9dcbb","type":"execute","name":"generate port-mirror-configuration url","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.pm.configuration-id`\"/>\n","comments":"","outputs":1,"x":476.1904830932617,"y":777.1755027770996,"z":"28d78a5d.e3aa46","wires":[[]]},{"id":"22301bc.8523de4","type":"execute","name":"execute RestApiCallNode - get port-mirror-configuration","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=\"mdsal-pmc\" />\n\n","comments":"","outputs":1,"x":534.7619247436523,"y":845.7470531463623,"z":"28d78a5d.e3aa46","wires":[["94cba7d6.3f7d18","49892716.4419a8"]]},{"id":"94cba7d6.3f7d18","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":840.0578842163086,"y":823.697735786438,"z":"28d78a5d.e3aa46","wires":[["77af0812.11c6a8"]]},{"id":"77af0812.11c6a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Port mirror configuration ' + $tmp.pm.configuration-id + ' already exists'`\" />\n","comments":"","x":999.0475578308105,"y":822.8898220062256,"z":"28d78a5d.e3aa46","wires":[]},{"id":"49892716.4419a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":836.1904678344727,"y":865.7469863891602,"z":"28d78a5d.e3aa46","wires":[["2df08cc1.2a79c4"]]},{"id":"2df08cc1.2a79c4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":981.9047431945801,"y":865.7469387054443,"z":"28d78a5d.e3aa46","wires":[[]]},{"id":"712d0a9f.ac38b4","type":"switchNode","name":"switch configuration-sub-type","xml":"<switch test='`$port-mirror-topology-operation-input.configuration-information.configuration-sub-type`'>\n","comments":"","outputs":1,"x":458.09519958496094,"y":504.3184242248535,"z":"28d78a5d.e3aa46","wires":[["ac124ecb.f843c","1484ba45.65af16"]]},{"id":"ac124ecb.f843c","type":"outcome","name":"vprobe","xml":"<outcome value='vprobe'>\n","comments":"","outputs":1,"x":699.7618789672852,"y":442.651704788208,"z":"28d78a5d.e3aa46","wires":[["f8f05771.ef2d68"]]},{"id":"1484ba45.65af16","type":"outcome","name":"pprobe","xml":"<outcome value='pprobe'>\n","comments":"","outputs":1,"x":694.761791229248,"y":574.3183403015137,"z":"28d78a5d.e3aa46","wires":[["c6d75ff9.ed799"]]},{"id":"f8f05771.ef2d68","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":884.7618255615234,"y":442.6517143249512,"z":"28d78a5d.e3aa46","wires":[["c3686485.05b8a8","2077d65b.fd2b8a","3fcce2c4.a741de"]]},{"id":"693d48ed.60ed18","type":"switchNode","name":"switch db.cap_length == 1","xml":"<switch test='`$db.cap_length == 1`'>\n","comments":"","outputs":1,"x":1114.7618103027344,"y":545.9850616455078,"z":"28d78a5d.e3aa46","wires":[["e6747547.7c68a8"]]},{"id":"fb6bfd1e.507c7","type":"returnFailure","name":"return failure","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=\"`'PORT_MIRROR_CONFIGURATION does not contain exactly 1 entry for UUID ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1524.7618007659912,"y":545.3184108734131,"z":"28d78a5d.e3aa46","wires":[]},{"id":"e6747547.7c68a8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1353.3332386016846,"y":545.7469177246094,"z":"28d78a5d.e3aa46","wires":[["fb6bfd1e.507c7"]]},{"id":"47f223e.0467cdc","type":"switchNode","name":"switch db.cap[0].role == source","xml":"<switch test=\"`$db.cap[0].role == 'source'`\">\n","comments":"","outputs":1,"x":1128.09521484375,"y":599.7945365905762,"z":"28d78a5d.e3aa46","wires":[["26b4180c.cd13a8"]]},{"id":"26b4180c.cd13a8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1355.2380199432373,"y":598.1279897689819,"z":"28d78a5d.e3aa46","wires":[["f2d50dd4.2e465"]]},{"id":"f2d50dd4.2e465","type":"returnFailure","name":"return failure","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=\"`'No source capability_role found for UUID ' + $port-mirror-topology-operation-input.configuration-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1526.666597366333,"y":598.1279077529907,"z":"28d78a5d.e3aa46","wires":[]},{"id":"c6d75ff9.ed799","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":884.7618865966797,"y":572.6517314910889,"z":"28d78a5d.e3aa46","wires":[["693d48ed.60ed18","47f223e.0467cdc"]]}]