aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_aai-get-aic-zone.json
blob: ed4a532cec54d7716dd7a7cc23ed4654e213c42a (plain)
1
[{"id":"b3991b61.976178","type":"dgstart","name":"DGSTART","outputs":1,"x":215.00390625,"y":136.00390625,"z":"58df01c0.f4ce1","wires":[["3df31865.df33c8"]]},{"id":"3df31865.df33c8","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":426.86101722717285,"y":241.4801082611084,"z":"58df01c0.f4ce1","wires":[["b710e6a7.b77ac8"]]},{"id":"b710e6a7.b77ac8","type":"method","name":"aai-get-aic-zone","xml":"<method rpc='aai-get-aic-zone' mode='sync'>\n","comments":"","outputs":1,"x":404.77781677246094,"y":322.99200439453125,"z":"58df01c0.f4ce1","wires":[["b2a9af7.4b45d5"]]},{"id":"44822186.7c8d5","type":"switchNode","name":"switch aaiapi.input.cloud-owner","xml":"<switch test='`$aaiapi.input.cloud-owner`'>\n","comments":"","outputs":1,"x":692.5753479003906,"y":409.2896385192871,"z":"58df01c0.f4ce1","wires":[["1255367.966edca"]]},{"id":"b2a9af7.4b45d5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":430.7181854248047,"y":410.2896385192871,"z":"58df01c0.f4ce1","wires":[["44822186.7c8d5","d0853696.4e9ec8","79c31fe7.a9df7","ce3898e3.1e1888","36587093.62e9c","284effd4.0325b","33e1dacc.79a006","af00f1bf.451d7"]]},{"id":"1255367.966edca","type":"other","name":"outcome NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":962.7182006835938,"y":409.0039176940918,"z":"58df01c0.f4ce1","wires":[["6e7dbda.1dfa844"]]},{"id":"6e7dbda.1dfa844","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"Error aaiapi.input.network-instance-group-id is NULL\" />\n","comments":"","x":1173.0039291381836,"y":409.0039339065552,"z":"58df01c0.f4ce1","wires":[]},{"id":"d0853696.4e9ec8","type":"set","name":"clear output variables","xml":"<set>\n<parameter name='aaiapi.output.cloud-zone' value='' />\n<parameter name='aaiapi.output.complex-name' value='' />\n<parameter name='aaiapi.output.aic-clli' value='' />\n\n","comments":"","x":661.8610687255859,"y":378.86112213134766,"z":"58df01c0.f4ce1","wires":[]},{"id":"1cf77eaa.c12641","type":"comment","name":"Input/Output","info":"Input:\n\taaiapi.input.cloud-owner\n\taaiapi.input.cloud-region-id\nOutput:\n\taaiapi.output.cloud-zone","comments":"","x":414.14508056640625,"y":171.71651458740234,"z":"58df01c0.f4ce1","wires":[]},{"id":"79c31fe7.a9df7","type":"switchNode","name":"switch aaiapi.input.cloud-region-id","xml":"<switch test='`$aaiapi.input.cloud-region-id`'>\n","comments":"","outputs":1,"x":699.0039215087891,"y":443.0039339065552,"z":"58df01c0.f4ce1","wires":[["1255367.966edca"]]},{"id":"ce3898e3.1e1888","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = $aaiapi.input.cloud-owner AND \n\t\t     cloud-region.cloud-region-id = $aaiapi.input.cloud-region-id AND \n\t\t     depth = '0'\"\n        pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":674.00390625,"y":488.00390625,"z":"58df01c0.f4ce1","wires":[["9b95689a.708798","928f15d3.960de8"]]},{"id":"928f15d3.960de8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":896.3930130004883,"y":524.72607421875,"z":"58df01c0.f4ce1","wires":[["92d2316.c22efd"]]},{"id":"9b95689a.708798","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":902.893009185791,"y":488.72613525390625,"z":"58df01c0.f4ce1","wires":[["181e9426.a181ac"]]},{"id":"181e9426.a181ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1108.2246704101562,"y":485.0920696258545,"z":"58df01c0.f4ce1","wires":[["7e3472e1.aa065c","19d6391e.6cdb97"]]},{"id":"92d2316.c22efd","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1104.4746704101562,"y":525.0920696258545,"z":"58df01c0.f4ce1","wires":[["46bacc5d.a28ef4","19d6391e.6cdb97"]]},{"id":"7e3472e1.aa065c","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Cloud region not found in AAI\"/>","comments":"","x":1336.9748992919922,"y":482.8420991897583,"z":"58df01c0.f4ce1","wires":[]},{"id":"46bacc5d.a28ef4","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Error retrieving cloud region from AAI\"/>","comments":"","x":1341.9748229980469,"y":525.0919666290283,"z":"58df01c0.f4ce1","wires":[]},{"id":"19d6391e.6cdb97","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$tmp.error-message`\" />\n","comments":"","x":1308.0039520263672,"y":571.0039129257202,"z":"58df01c0.f4ce1","wires":[]},{"id":"36587093.62e9c","type":"set","name":"set cloud zone and complex-name","xml":"<set>\n<parameter name='aaiapi.output.cloud-zone' value='`$aai.cloud-region.cloud-zone`' />\n<parameter name='aaiapi.output.complex-name' value='`$aai.cloud-region.complex-name`' />\n\n","comments":"","x":672.0039672851562,"y":882.003927230835,"z":"58df01c0.f4ce1","wires":[]},{"id":"18df9acc.21d935","type":"get-resource","name":"get-resource complex","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"complex\" \n\t\tkey=\"complex.physical-location-id = $aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value\"\n        pfx='aai.complex' local-only='false' >\n        \n\n\n","comments":"","outputs":1,"x":1747.4483261108398,"y":740.1151838302612,"z":"58df01c0.f4ce1","wires":[[]]},{"id":"33e1dacc.79a006","type":"for","name":"for relationship list","xml":"<for silentFailure='false' index='ridx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":623.4210357666016,"y":695.2343463897705,"z":"58df01c0.f4ce1","wires":[["c402b857.f2fac8"]]},{"id":"77105e7.0dbf6a","type":"switchNode","name":"switch","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":1028.9207000732422,"y":698.9484577178955,"z":"58df01c0.f4ce1","wires":[["c3e2ce03.285be"]]},{"id":"c402b857.f2fac8","type":"for","name":"for relationship data","xml":"<for silentFailure='false' index='rdidx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`\" >\n","comments":"","outputs":1,"x":846.3374786376953,"y":696.198579788208,"z":"58df01c0.f4ce1","wires":[["77105e7.0dbf6a"]]},{"id":"c3e2ce03.285be","type":"other","name":"complex.physical-location-id","xml":"<outcome value='complex.physical-location-id'>\n","comments":"","outputs":1,"x":1251.4207611083984,"y":697.365083694458,"z":"58df01c0.f4ce1","wires":[["c83e8f8b.573a1"]]},{"id":"c83e8f8b.573a1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1490.8370819091797,"y":695.1152057647705,"z":"58df01c0.f4ce1","wires":[["18df9acc.21d935","49f9ce98.59417","b52fe5e8.aafe28"]]},{"id":"49f9ce98.59417","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='aaiapi.output.aic-clli' value='`$aai.complex.physical-location-id`' />\n\n","comments":"","x":1715.3376388549805,"y":702.059591293335,"z":"58df01c0.f4ce1","wires":[]},{"id":"284effd4.0325b","type":"switchNode","name":"switch relationship_length","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship_length`'>\n","comments":"","outputs":1,"x":653.4484710693359,"y":618.2817707061768,"z":"58df01c0.f4ce1","wires":[["bd9af3be.4abcb","5fc7e377.df64dc"]]},{"id":"bd9af3be.4abcb","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":847.4485431247285,"y":617.281859503852,"z":"58df01c0.f4ce1","wires":[["ba47e05c.cb65e"]]},{"id":"5fc7e377.df64dc","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":849.4485397338867,"y":656.2818908691406,"z":"58df01c0.f4ce1","wires":[["ba47e05c.cb65e"]]},{"id":"b52fe5e8.aafe28","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='true' />\n\n","comments":"","x":1753.6706466674805,"y":670.3929653167725,"z":"58df01c0.f4ce1","wires":[]},{"id":"af00f1bf.451d7","type":"switchNode","name":"switch tmp.complex-found","xml":"<switch test='`$tmp.complex-found`'>\n","comments":"","outputs":1,"x":651.4485931396484,"y":778.503999710083,"z":"58df01c0.f4ce1","wires":[["f21da410.59bab8"]]},{"id":"f21da410.59bab8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":868.9485931396484,"y":777.865083694458,"z":"58df01c0.f4ce1","wires":[["dd940e48.7c569"]]},{"id":"ba47e05c.cb65e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1042.4745712280273,"y":634.8421478271484,"z":"58df01c0.f4ce1","wires":[["4e451cb5.795ce4","a26309a3.69ff38"]]},{"id":"4e451cb5.795ce4","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Cloud region missing relationships in AAI\"/>","comments":"","x":1285.974697113037,"y":615.592173576355,"z":"58df01c0.f4ce1","wires":[]},{"id":"dd940e48.7c569","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1057.4745712280273,"y":777.3421478271484,"z":"58df01c0.f4ce1","wires":[["3b8c939e.d0ca5c","a93a33d9.e9c42"]]},{"id":"3b8c939e.d0ca5c","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"Complex not found in AAI\"/>","comments":"","x":1289.9747161865234,"y":777.342188835144,"z":"58df01c0.f4ce1","wires":[]},{"id":"a26309a3.69ff38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$tmp.error-message`\" />\n","comments":"","x":1249.00390625,"y":647.00390625,"z":"58df01c0.f4ce1","wires":[]},{"id":"a93a33d9.e9c42","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`$tmp.error-message`\" />\n","comments":"","x":1267.00390625,"y":811.00390625,"z":"58df01c0.f4ce1","wires":[]}]