aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json
blob: b4efe18f1ed485759597859645bb93807fdb0c64 (plain)
1
[{"id":"25a3d9ae.9d1f86","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":72.41365623474121,"z":"c3de84ea.9a8ab8","wires":[["a794bc78.a6edf"]]},{"id":"a794bc78.a6edf","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":244.28570556640625,"y":112.65176773071289,"z":"c3de84ea.9a8ab8","wires":[["dd306b27.4e9da8"]]},{"id":"dd306b27.4e9da8","type":"method","name":"method vnf-topology-operation-unassign","xml":"<method rpc='vnf-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":226.42862701416016,"y":152.4136562347412,"z":"c3de84ea.9a8ab8","wires":[["baaf7187.65d5e"]]},{"id":"360167fe.0781a8","type":"comment","name":"vnf-topology-operation-unassign","info":"","comments":"","x":524.344856262207,"y":20,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"5e00f7fa.850eb8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":533.523811340332,"y":251.27079391479492,"z":"c3de84ea.9a8ab8","wires":[["30cf4206.50215e","bfb435ad.51cf98"]]},{"id":"30cf4206.50215e","type":"outcome","name":"DeleteVnfInstance","xml":"<outcome value='DeleteVnfInstance'>\n","comments":"","outputs":1,"x":787.2381057739258,"y":228.41367530822754,"z":"c3de84ea.9a8ab8","wires":[["794ef52e.6ad35c"]]},{"id":"bfb435ad.51cf98","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":749.2380714416504,"y":274.12800312042236,"z":"c3de84ea.9a8ab8","wires":[["f48c1d84.4d8eb"]]},{"id":"794ef52e.6ad35c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":972.0952339172363,"y":228.41370487213135,"z":"c3de84ea.9a8ab8","wires":[[]]},{"id":"f48c1d84.4d8eb","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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n","comments":"","x":989.2380790710449,"y":274.12796115875244,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"baaf7187.65d5e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":208.33333587646484,"y":545.7469902038574,"z":"c3de84ea.9a8ab8","wires":[["5e00f7fa.850eb8","62c6e7a.e57df18","b4f388d2.a42de8","afd914be.c5fb58","aa6862f1.3ef89","de1b00d3.d3a54"]]},{"id":"62c6e7a.e57df18","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":519.9999847412109,"y":320.74701976776123,"z":"c3de84ea.9a8ab8","wires":[["8b304d72.d85d4"]]},{"id":"8b304d72.d85d4","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":706.6666641235352,"y":320.0803174972534,"z":"c3de84ea.9a8ab8","wires":[["dd91dd24.9b797"]]},{"id":"dd91dd24.9b797","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n","comments":"","x":888.3332901000977,"y":320.0803174972534,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"afd914be.c5fb58","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":501.66666412353516,"y":369.08033752441406,"z":"c3de84ea.9a8ab8","wires":[["6d4d78d8.367718"]]},{"id":"6d4d78d8.367718","type":"switchNode","name":"switch this vnf-id == input vnf-id","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >\n","comments":"","outputs":1,"x":756.6667518615723,"y":367.7470054626465,"z":"c3de84ea.9a8ab8","wires":[["39215d12.4e7cc2"]]},{"id":"39215d12.4e7cc2","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":995.0000381469727,"y":366.7469835281372,"z":"c3de84ea.9a8ab8","wires":[["6901fdc0.214364"]]},{"id":"6901fdc0.214364","type":"set","name":"set vnf-index","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1163.3332328796387,"y":366.7470054626465,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"aa6862f1.3ef89","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":513.3333282470703,"y":415.7470073699951,"z":"c3de84ea.9a8ab8","wires":[["ece34750.d6d518"]]},{"id":"ece34750.d6d518","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":694.9999465942383,"y":415.08033752441406,"z":"c3de84ea.9a8ab8","wires":[["3641b7e4.9f2118"]]},{"id":"3641b7e4.9f2118","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n","comments":"","x":861.666633605957,"y":414.74696350097656,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"d1cfcf36.4b6a6","type":"returnSuccess","name":"return success","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","comments":"","x":898.5556411743164,"y":1167.4133262634277,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"e3f870b0.94549","type":"for","name":"for each vnf","xml":"<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1419.033218383789,"y":912.9690952301025,"z":"c3de84ea.9a8ab8","wires":[["f3437618.39ead8"]]},{"id":"dcf0bf8f.0fda2","type":"comment","name":"Remove VNF from service data","info":"","comments":"","x":861.1919860839844,"y":871.5407476425171,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"f3437618.39ead8","type":"set","name":"move vnf to remove one","xml":"<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n","comments":"","x":1652.6243515014648,"y":911.9930467605591,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"7412c64.9e64938","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":905.2910804748535,"y":914.5487241744995,"z":"c3de84ea.9a8ab8","wires":[["1e66afef.73db7","abdae1e7.22546"]]},{"id":"1e66afef.73db7","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1082.2911224365234,"y":875.215311050415,"z":"c3de84ea.9a8ab8","wires":[["965034f7.9467d8"]]},{"id":"965034f7.9467d8","type":"set","name":"Remove vnfs","xml":"<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n","comments":"","x":1245.957618713379,"y":875.215410232544,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"abdae1e7.22546","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1083.815013885498,"y":955.6914501190186,"z":"c3de84ea.9a8ab8","wires":[["ec40a25a.a35e8"]]},{"id":"e5e69eb.9c6e76","type":"set","name":"set new vnf length","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n","comments":"","x":1438.5873069763184,"y":1003.5486688613892,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"a935f977.804e08","type":"set","name":"Remove the last vnf in the list","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n","comments":"","x":1474.2909622192383,"y":958.6596899032593,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"ec40a25a.a35e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1249.624355316162,"y":959.2152309417725,"z":"c3de84ea.9a8ab8","wires":[["e3f870b0.94549","a935f977.804e08","e5e69eb.9c6e76"]]},{"id":"5a1a4fee.6ed0b","type":"switchNode","name":"switch current vnf-level-oper-status == Created","xml":"<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'Created'`\">\n","comments":"","outputs":1,"x":612.6666412353516,"y":461.4136772155762,"z":"c3de84ea.9a8ab8","wires":[["963358c8.2325c8"]]},{"id":"963358c8.2325c8","type":"outcomeFalse","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":917.3333587646484,"y":461.0803165435791,"z":"c3de84ea.9a8ab8","wires":[["bc4bdef0.dd68a"]]},{"id":"bc4bdef0.dd68a","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=\"Cannot delete a VNF in a Created state\" />\n","comments":"","x":1075.666633605957,"y":460.41364097595215,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"b4f388d2.a42de8","type":"switchNode","name":"switch current vf-module_length","xml":"<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`\">\n","comments":"","outputs":1,"x":562.9999847412109,"y":547.4136428833008,"z":"c3de84ea.9a8ab8","wires":[["c8e2e757.c7d538","9a55e694.5517b8","3df6c5ea.75f72a"]]},{"id":"c8e2e757.c7d538","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":791.6666259765625,"y":504.08028411865234,"z":"c3de84ea.9a8ab8","wires":[["a8f7fbbb.f4b098"]]},{"id":"9a55e694.5517b8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":790.238037109375,"y":545.5089416503906,"z":"c3de84ea.9a8ab8","wires":[["a8f7fbbb.f4b098"]]},{"id":"a8f7fbbb.f4b098","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":938.8095512390137,"y":525.5089426040649,"z":"c3de84ea.9a8ab8","wires":[[]]},{"id":"3df6c5ea.75f72a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":790.2380867004395,"y":586.9375295639038,"z":"c3de84ea.9a8ab8","wires":[["cd298292.d1eea"]]},{"id":"cd298292.d1eea","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=\"Cannot delete the VNF because there are VFs defined\" />\n","comments":"","x":957.3809814453125,"y":586.5089178085327,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"79ef7bec.600ac4","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1046.6982727050781,"y":1111.190375328064,"z":"c3de84ea.9a8ab8","wires":[[]]},{"id":"27a48ef6.fde062","type":"set","name":"set variables for deleting name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":948.1268920898438,"y":1064.0474462509155,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"de1b00d3.d3a54","type":"switchNode","name":"switch: sdnc-generated-cloud-resources","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>\n","comments":"","outputs":1,"x":587.857177734375,"y":665.1587429046631,"z":"c3de84ea.9a8ab8","wires":[["69497ea1.e2532","ac58b2ea.2ec66"]]},{"id":"69497ea1.e2532","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":838.6072235107422,"y":665.1587448120117,"z":"c3de84ea.9a8ab8","wires":[["5edcf5b1.25b02c"]]},{"id":"5edcf5b1.25b02c","type":"call","name":"call self-serve-vnf-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1057.642837524414,"y":664.9087409973145,"z":"c3de84ea.9a8ab8","wires":[["bd111e6a.bcff3","1bba633a.55d6bd"]]},{"id":"bd111e6a.bcff3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1265.392822265625,"y":665.1587295532227,"z":"c3de84ea.9a8ab8","wires":[["37ba7c4c.74db14"]]},{"id":"37ba7c4c.74db14","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve resources with error: '+ $error-message`\" />\n","comments":"","x":1430.9642486572266,"y":664.8016242980957,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"d40a58e9.b53438","type":"comment","name":"check removed with US622450","info":"","comments":"","x":1282.8570098876953,"y":460.00002670288086,"z":"c3de84ea.9a8ab8","wires":[]},{"id":"ac58b2ea.2ec66","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":840,"y":708.5714111328125,"z":"c3de84ea.9a8ab8","wires":[["c1e42df.44dd2d"]]},{"id":"c1e42df.44dd2d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":655.7142868041992,"y":997.1427898406982,"z":"c3de84ea.9a8ab8","wires":[["7412c64.9e64938","27a48ef6.fde062","79ef7bec.600ac4","d1cfcf36.4b6a6"]]},{"id":"1bba633a.55d6bd","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1269.9999961853027,"y":715.7142639160156,"z":"c3de84ea.9a8ab8","wires":[["1eb8566b.ac430a"]]},{"id":"1eb8566b.ac430a","type":"returnSuccess","name":"return success","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","comments":"","x":1438.5714111328125,"y":715.2857055664062,"z":"c3de84ea.9a8ab8","wires":[]}]