aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-deactivate.json
blob: 56f49765c259c5387767015db4109364634987be (plain)
1
[{"id":"b1c903a2.01c0c","type":"dgstart","name":"DGSTART","outputs":1,"x":133.3333282470703,"y":87.4136552810669,"z":"7772601e.b7e81","wires":[["fca3e9b5.fe1c38"]]},{"id":"fca3e9b5.fe1c38","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":247.61903381347656,"y":127.65176677703857,"z":"7772601e.b7e81","wires":[["24b0f652.f8130a"]]},{"id":"24b0f652.f8130a","type":"method","name":"method vnf-topology-operation-deactivate","xml":"<method rpc='vnf-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":233.76195526123047,"y":167.4136552810669,"z":"7772601e.b7e81","wires":[["4e5ae64b.983e88"]]},{"id":"3113ba0d.9de336","type":"comment","name":"vnf-topology-operation-deactivate","info":"","comments":"","x":527.6781845092773,"y":34.999999046325684,"z":"7772601e.b7e81","wires":[]},{"id":"a51e0bc6.040218","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":536.8571395874023,"y":266.2707929611206,"z":"7772601e.b7e81","wires":[["8824484e.bd9f78","614f1708.c94548"]]},{"id":"8824484e.bd9f78","type":"outcome","name":"DeleteVnfInstance","xml":"<outcome value='DeleteVnfInstance'>\n","comments":"","outputs":1,"x":763.5714149475098,"y":241.74700927734375,"z":"7772601e.b7e81","wires":[["55807eef.4a133"]]},{"id":"614f1708.c94548","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":727.5713806152344,"y":287.4613370895386,"z":"7772601e.b7e81","wires":[["923ee138.5c82b"]]},{"id":"55807eef.4a133","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":950.4285430908203,"y":241.74703884124756,"z":"7772601e.b7e81","wires":[[]]},{"id":"923ee138.5c82b","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":967.5713882446289,"y":287.46129512786865,"z":"7772601e.b7e81","wires":[]},{"id":"4e5ae64b.983e88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":209.99999237060547,"y":389.0803270339966,"z":"7772601e.b7e81","wires":[["a51e0bc6.040218","1ba570ba.dad57f","e67a4e81.b8876","d051c62a.469d18","5d06866d.f68068","233d2062.bfc2e","214494b2.a8c48c","be7cc1a3.ed487"]]},{"id":"1ba570ba.dad57f","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":523.3333129882812,"y":335.7470188140869,"z":"7772601e.b7e81","wires":[["3cfc4722.731d38"]]},{"id":"3cfc4722.731d38","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":709.9999923706055,"y":335.0803165435791,"z":"7772601e.b7e81","wires":[["655a3c7d.581d14"]]},{"id":"655a3c7d.581d14","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":891.666618347168,"y":335.0803165435791,"z":"7772601e.b7e81","wires":[]},{"id":"e67a4e81.b8876","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":504.99999237060547,"y":384.08033657073975,"z":"7772601e.b7e81","wires":[["9dd35bbb.8b60b8"]]},{"id":"9dd35bbb.8b60b8","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":760.0000801086426,"y":382.74700450897217,"z":"7772601e.b7e81","wires":[["12c9d6c4.8a6149"]]},{"id":"12c9d6c4.8a6149","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":998.333366394043,"y":381.7469825744629,"z":"7772601e.b7e81","wires":[["41a6dedb.99bf6"]]},{"id":"41a6dedb.99bf6","type":"set","name":"set vnf-index","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1166.666561126709,"y":381.74700450897217,"z":"7772601e.b7e81","wires":[]},{"id":"d051c62a.469d18","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":516.6666488647461,"y":430.74700593948364,"z":"7772601e.b7e81","wires":[["5895cda9.4c46c4"]]},{"id":"5895cda9.4c46c4","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":698.3332748413086,"y":430.08033657073975,"z":"7772601e.b7e81","wires":[["157f10d.32798ef"]]},{"id":"157f10d.32798ef","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":864.9999618530273,"y":429.74696254730225,"z":"7772601e.b7e81","wires":[]},{"id":"5d06866d.f68068","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":509.9999771118164,"y":650.746994972229,"z":"7772601e.b7e81","wires":[]},{"id":"233d2062.bfc2e","type":"set","name":"set vnf-level-oper-status to PendingDelete","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n","comments":"","x":597.4800567626953,"y":606.4174242019653,"z":"7772601e.b7e81","wires":[]},{"id":"214494b2.a8c48c","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n","comments":"","x":511.6665573120117,"y":564.080304145813,"z":"7772601e.b7e81","wires":[]},{"id":"eacb2416.f208b8","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 generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1063.3332710266113,"y":516.6666784286499,"z":"7772601e.b7e81","wires":[]},{"id":"8d6adc7b.83eec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":894.3571701049805,"y":472.9524898529053,"z":"7772601e.b7e81","wires":[["527c1385.dfc04c"]]},{"id":"a6b439f3.d11f08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":902.9286003112793,"y":517.238203048706,"z":"7772601e.b7e81","wires":[["eacb2416.f208b8"]]},{"id":"527c1385.dfc04c","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 updating generic-vnf in AAI\" />\n","comments":"","x":1066.0238647460938,"y":473.42888355255127,"z":"7772601e.b7e81","wires":[]},{"id":"be7cc1a3.ed487","type":"save","name":"update generic-vnf orch-status to PendingDelete","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n   resource=\"generic-vnf\"\n   key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n   force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n","comments":"","outputs":1,"x":618.3332366943359,"y":492.6667175292969,"z":"7772601e.b7e81","wires":[["8d6adc7b.83eec","a6b439f3.d11f08"]]}]