aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-activate.json
blob: 42740f03d2f0f4228c1a51a7e14f5c14ed4ff2ad (plain)
1
[{"id":"c5d6a69c.db78c8","type":"dgstart","name":"DGSTART","outputs":1,"x":200,"y":140.4136562347412,"z":"334fe7a0.c84bc","wires":[["c2c51821.c20608"]]},{"id":"c2c51821.c20608","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":275.28570556640625,"y":180.6517677307129,"z":"334fe7a0.c84bc","wires":[["b24dd100.124548"]]},{"id":"b24dd100.124548","type":"method","name":"method vnf-topology-operation-activate","xml":"<method rpc='vnf-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":296.42862701416016,"y":220.4136562347412,"z":"334fe7a0.c84bc","wires":[["db4a0b9a.bf6ff"]]},{"id":"810d8dc5.92b518","type":"comment","name":"vnf-topology-operation-activate","info":"","comments":"","x":594.344856262207,"y":88,"z":"334fe7a0.c84bc","wires":[]},{"id":"501964cc.7c6bcc","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":603.523811340332,"y":319.2707939147949,"z":"334fe7a0.c84bc","wires":[["2f1d5bb9.19b7d4","f9e88ec2.19fcb8"]]},{"id":"2f1d5bb9.19b7d4","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":821.9047737121582,"y":296.4136781692505,"z":"334fe7a0.c84bc","wires":[["e5ae3a13.eafaa8"]]},{"id":"f9e88ec2.19fcb8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":785.9047393798828,"y":342.1280059814453,"z":"334fe7a0.c84bc","wires":[["c91fbfe6.90e8d8"]]},{"id":"e5ae3a13.eafaa8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1008.7619018554688,"y":296.4137077331543,"z":"334fe7a0.c84bc","wires":[[]]},{"id":"c91fbfe6.90e8d8","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 'activate' then request-action must be 'CreateVnfInstance'\" />\n","comments":"","x":1025.9047470092773,"y":342.1279640197754,"z":"334fe7a0.c84bc","wires":[]},{"id":"db4a0b9a.bf6ff","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":276.66666412353516,"y":442.0803279876709,"z":"334fe7a0.c84bc","wires":[["501964cc.7c6bcc","159a6c44.02a004","7496f5f4.dc6bbc","b197481f.a31d3","2548432d.b81fa4","ea7b6098.3506a","f7f0ed67.ce5d4","4e36aef1.d9ae8","8809d77a.d71fc8","60803d45.5b21ec","dc1ce2b8.5b9d7"]]},{"id":"159a6c44.02a004","type":"switchNode","name":"switch vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":589.9999847412109,"y":388.74701976776123,"z":"334fe7a0.c84bc","wires":[["a7fc69e7.0b7d4"]]},{"id":"a7fc69e7.0b7d4","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":776.6666641235352,"y":388.0803174972534,"z":"334fe7a0.c84bc","wires":[["b1895ef9.e59b8"]]},{"id":"b1895ef9.e59b8","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":958.3332901000977,"y":388.0803174972534,"z":"334fe7a0.c84bc","wires":[]},{"id":"7496f5f4.dc6bbc","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":571.6666641235352,"y":437.08033752441406,"z":"334fe7a0.c84bc","wires":[["3e4b9195.f70c06"]]},{"id":"3e4b9195.f70c06","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":826.6667518615723,"y":435.7470054626465,"z":"334fe7a0.c84bc","wires":[["d5798231.873158"]]},{"id":"d5798231.873158","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1065.0000381469727,"y":434.7469835281372,"z":"334fe7a0.c84bc","wires":[["ef9088f5.0fddd8"]]},{"id":"ef9088f5.0fddd8","type":"set","name":"set vnf-index","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1233.3332328796387,"y":434.7470054626465,"z":"334fe7a0.c84bc","wires":[]},{"id":"b197481f.a31d3","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":583.3333282470703,"y":483.7470073699951,"z":"334fe7a0.c84bc","wires":[["47f1022f.88563c"]]},{"id":"47f1022f.88563c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":764.9999465942383,"y":483.08033752441406,"z":"334fe7a0.c84bc","wires":[["a85a1ea4.f1c298"]]},{"id":"a85a1ea4.f1c298","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":931.666633605957,"y":482.74696350097656,"z":"334fe7a0.c84bc","wires":[]},{"id":"f7f0ed67.ce5d4","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":569.333251953125,"y":905.4136962890625,"z":"334fe7a0.c84bc","wires":[]},{"id":"ea7b6098.3506a","type":"set","name":"set vnf-level-oper-status to Created","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\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":635.8133544921875,"y":775.7507934570312,"z":"334fe7a0.c84bc","wires":[]},{"id":"2548432d.b81fa4","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":581.6665191650391,"y":653.7469711303711,"z":"334fe7a0.c84bc","wires":[]},{"id":"4e36aef1.d9ae8","type":"switchNode","name":"switch current vnf-level-oper-status == PendingCreate","xml":"<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'PendingCreate'`\">\n","comments":"","outputs":1,"x":705.0000381469727,"y":527.0802927017212,"z":"334fe7a0.c84bc","wires":[["b1595438.135ba8"]]},{"id":"b1595438.135ba8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":991.333381652832,"y":526.746940612793,"z":"334fe7a0.c84bc","wires":[["c5d1d81b.6fa78"]]},{"id":"c5d1d81b.6fa78","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=\"`'Order status must be PendingCreate, but is currently '\n      + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`\" />\n","comments":"","x":1149.6666564941406,"y":526.080265045166,"z":"334fe7a0.c84bc","wires":[]},{"id":"2fd59a02.0cc2de","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":1095.0000038146973,"y":614.4135789871216,"z":"334fe7a0.c84bc","wires":[]},{"id":"5f693728.5c74c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":926.0239028930664,"y":570.699390411377,"z":"334fe7a0.c84bc","wires":[["7d76396f.a8f8f8"]]},{"id":"2f7f9774.bec95","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":934.5953330993652,"y":614.9851036071777,"z":"334fe7a0.c84bc","wires":[["2fd59a02.0cc2de"]]},{"id":"7d76396f.a8f8f8","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":1097.6905975341797,"y":571.175784111023,"z":"334fe7a0.c84bc","wires":[]},{"id":"8809d77a.d71fc8","type":"save","name":"update generic-vnf prov-status to NVTPROV","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=\"prov-status\" value=\"NVTPROV\" />\n","comments":"","outputs":1,"x":673.3333282470703,"y":590.413646697998,"z":"334fe7a0.c84bc","wires":[["5f693728.5c74c8","2f7f9774.bec95"]]},{"id":"60803d45.5b21ec","type":"set","name":"set service-object-path","xml":"<set>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $tunnelxconn-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n","comments":"","x":608,"y":706,"z":"334fe7a0.c84bc","wires":[]},{"id":"b5fdcb35.ac3eb","type":"returnFailure","name":"MARKER ->","xml":"","comments":"","x":310,"y":702,"z":"334fe7a0.c84bc","wires":[]},{"id":"dc1ce2b8.5b9d7","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/vnf-top-act.log' />\n","comments":"","outputs":1,"x":571,"y":829,"z":"334fe7a0.c84bc","wires":[[]]}]