Fixes from DG testing
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_vf-module-topology-operation-activate.json
1 [{"id":"a454005.ca0d08","type":"dgstart","name":"DGSTART","outputs":1,"x":147,"y":142.4136562347412,"z":"3a458d77.799552","wires":[["297a72c7.cc4fae"]]},{"id":"297a72c7.cc4fae","type":"service-logic","name":"GENERIC-RESOURCE-API 1.2.0-SNAPSHOT-111501","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":222.28570556640625,"y":182.6517677307129,"z":"3a458d77.799552","wires":[["217ac7fc.349988"]]},{"id":"217ac7fc.349988","type":"method","name":"method vf-module-topology-operation-activate","xml":"<method rpc='vf-module-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":260.42862701416016,"y":222.4136562347412,"z":"3a458d77.799552","wires":[["d0460fcb.62f0c"]]},{"id":"5b00e29b.70560c","type":"comment","name":"vf-module-topology-operation-activate","info":"","comments":"","x":541.344856262207,"y":90,"z":"3a458d77.799552","wires":[]},{"id":"387117c9.5e2b3","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":550.523811340332,"y":321.2707939147949,"z":"3a458d77.799552","wires":[["d1423fc.e72c4c","fb57f016.f69d48"]]},{"id":"d1423fc.e72c4c","type":"outcome","name":"CreateVfModuleInstance","xml":"<outcome value='CreateVfModuleInstance'>\n","comments":"","outputs":1,"x":801.5714263916016,"y":298.4136800765991,"z":"3a458d77.799552","wires":[["e13b99e3.f45468"]]},{"id":"fb57f016.f69d48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":745.2380714416504,"y":343.79466915130615,"z":"3a458d77.799552","wires":[["9c5fd099.236998"]]},{"id":"e13b99e3.f45468","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":991.4285907745361,"y":298.41371154785156,"z":"3a458d77.799552","wires":[[]]},{"id":"9c5fd099.236998","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 'CreateVfModuleInstance'\" />\n","comments":"","x":1010.2380790710449,"y":344.12798166275024,"z":"3a458d77.799552","wires":[]},{"id":"d0460fcb.62f0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":192,"y":550.7469501495361,"z":"3a458d77.799552","wires":[["387117c9.5e2b3","3a0073c0.2e62cc","65d44223.2afd14","e0d2a645.0d4a2","387e34d5.491ec4","41797325.2223c4","cebddafc.8ed5a8","df6bf686.e80248","31ad38a9.2d7408","19d65cb8.0950e3","ddfb9f67.b327f","480235fd.ba7594","6d867071.7e0d98"]]},{"id":"65d44223.2afd14","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":595.3333282470703,"y":452.4136209487915,"z":"3a458d77.799552","wires":[["71b1d6b3.6d695","fd2dae38.13491"]]},{"id":"71b1d6b3.6d695","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":836.0475997924805,"y":429.5563611984253,"z":"3a458d77.799552","wires":[["314fc4d9.da81dc"]]},{"id":"fd2dae38.13491","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":835.809440612793,"y":470.50887966156006,"z":"3a458d77.799552","wires":[["b60820e7.9b9398"]]},{"id":"314fc4d9.da81dc","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=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":1002.7142143249512,"y":428.842116355896,"z":"3a458d77.799552","wires":[]},{"id":"b60820e7.9b9398","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":998.0475845336914,"y":470.175498008728,"z":"3a458d77.799552","wires":[["2c271d7a.99b29a"]]},{"id":"2c271d7a.99b29a","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1249.380802154541,"y":469.8421850204468,"z":"3a458d77.799552","wires":[["27abd74b.47753"]]},{"id":"27abd74b.47753","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1479.3808937072754,"y":469.17553901672363,"z":"3a458d77.799552","wires":[["6f4c7da5.fe666c"]]},{"id":"3a0073c0.2e62cc","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":539.3809280395508,"y":390.50879287719727,"z":"3a458d77.799552","wires":[]},{"id":"bb86543b.58f298","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1801.0475311279297,"y":440.1754970550537,"z":"3a458d77.799552","wires":[]},{"id":"e0d2a645.0d4a2","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":531.0476112365723,"y":517.1754951477051,"z":"3a458d77.799552","wires":[["4776a96c.bbeef"]]},{"id":"4776a96c.bbeef","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":709.3809967041016,"y":516.5088710784912,"z":"3a458d77.799552","wires":[["87a72ed3.6ce43"]]},{"id":"87a72ed3.6ce43","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 VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":869.3809051513672,"y":515.8421745300293,"z":"3a458d77.799552","wires":[]},{"id":"6f4c7da5.fe666c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1627.71435546875,"y":468.0952377319336,"z":"3a458d77.799552","wires":[["bb86543b.58f298","7faae1b5.98e048"]]},{"id":"7faae1b5.98e048","type":"break","name":"break","xml":"<break>","comments":"","x":1762.7143211364746,"y":489.7618236541748,"z":"3a458d77.799552","wires":[]},{"id":"41797325.2223c4","type":"switchNode","name":"switch service-data...vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":603.6666412353516,"y":615.746992111206,"z":"3a458d77.799552","wires":[["6c3a919a.1704a8","da7c9426.3ae398"]]},{"id":"6c3a919a.1704a8","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":854.3809509277344,"y":594.5563955307007,"z":"3a458d77.799552","wires":[["38385810.f15548"]]},{"id":"da7c9426.3ae398","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":854.1427917480469,"y":635.5089139938354,"z":"3a458d77.799552","wires":[["72f0a8be.095748"]]},{"id":"38385810.f15548","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=\"`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`\" />\n","comments":"","x":1021.0475654602051,"y":593.8421506881714,"z":"3a458d77.799552","wires":[]},{"id":"72f0a8be.095748","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1016.3809356689453,"y":635.1755323410034,"z":"3a458d77.799552","wires":[["5098b1f7.57aa2"]]},{"id":"5098b1f7.57aa2","type":"switchNode","name":"switch service data vf-module == input vf-module","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\n","comments":"","outputs":1,"x":1322.714096069336,"y":634.8422679901123,"z":"3a458d77.799552","wires":[["7c9c4c3e.dbedbc"]]},{"id":"7c9c4c3e.dbedbc","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1592.7141494750977,"y":632.5088729858398,"z":"3a458d77.799552","wires":[["4597fd99.cc396c"]]},{"id":"387e34d5.491ec4","type":"set","name":"set vf-module-index to -1","xml":"<set>\n<parameter name='vf-module-index' value='-1' />\n","comments":"","x":559.3809127807617,"y":565.5088310241699,"z":"3a458d77.799552","wires":[]},{"id":"afc00e44.c54f4","type":"set","name":"set vf-module-index to idx","xml":"<set>\n<parameter name='vf-module-index' value='`$idx`' />\n","comments":"","x":1922.714241027832,"y":603.5088520050049,"z":"3a458d77.799552","wires":[]},{"id":"cebddafc.8ed5a8","type":"switchNode","name":"switch vf-module-index","xml":"<switch test='`$vf-module-index`'>\n","comments":"","outputs":1,"x":556.0476150512695,"y":683.8422508239746,"z":"3a458d77.799552","wires":[["fe303f22.65e0f"]]},{"id":"fe303f22.65e0f","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":734.3810005187988,"y":683.1756267547607,"z":"3a458d77.799552","wires":[["b33902ff.a3cd48"]]},{"id":"b33902ff.a3cd48","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 VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`\" />\n","comments":"","x":894.3809089660645,"y":682.5089302062988,"z":"3a458d77.799552","wires":[]},{"id":"4597fd99.cc396c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1726.0476913452148,"y":631.4286127090454,"z":"3a458d77.799552","wires":[["afc00e44.c54f4","1082c2c8.10a48d"]]},{"id":"1082c2c8.10a48d","type":"break","name":"break","xml":"<break>","comments":"","x":1861.0476570129395,"y":653.0951986312866,"z":"3a458d77.799552","wires":[]},{"id":"df6bf686.e80248","type":"set","name":"set order-status to Created","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'\n  value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'\n  value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'\n  value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n","comments":"","x":573.6667327880859,"y":1002.4136734008789,"z":"3a458d77.799552","wires":[]},{"id":"31ad38a9.2d7408","type":"switchNode","name":"switch order-status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":546.9999618530273,"y":753.0803127288818,"z":"3a458d77.799552","wires":[["926f0d8c.38aa08","adabddde.06da48"]]},{"id":"926f0d8c.38aa08","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":758.6667060852051,"y":731.4136371612549,"z":"3a458d77.799552","wires":[["d25461f3.78a17"]]},{"id":"adabddde.06da48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":735.6666946411133,"y":776.7946090698242,"z":"3a458d77.799552","wires":[["f6a77785.5b0f58"]]},{"id":"d25461f3.78a17","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":913.5238418579102,"y":730.7470397949219,"z":"3a458d77.799552","wires":[[]]},{"id":"f6a77785.5b0f58","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 is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status + ' instead of PendingCreate'`\" />\n","comments":"","x":932.9999923706055,"y":776.7946691513062,"z":"3a458d77.799552","wires":[]},{"id":"19d65cb8.0950e3","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n   value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n   value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n   value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n   value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n   value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n   value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n","comments":"","x":538.6666717529297,"y":954.0803184509277,"z":"3a458d77.799552","wires":[]},{"id":"ddfb9f67.b327f","type":"save","name":"update vf-module to Active","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n   resource=\"vf-module\"\n   key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n      AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n   force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"orchestration-status\" value=\"Active\" />\n","comments":"","outputs":1,"x":571.9999389648438,"y":840.7469387054443,"z":"3a458d77.799552","wires":[["13ce15f.10b7a6a","68cd8ae8.715364"]]},{"id":"70609e54.5270d8","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 vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\" />\n","comments":"","x":968.6666984558105,"y":864.0803079605103,"z":"3a458d77.799552","wires":[]},{"id":"13ce15f.10b7a6a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":781.3572654724121,"y":821.0327777862549,"z":"3a458d77.799552","wires":[["fd18e75b.d48ac8"]]},{"id":"68cd8ae8.715364","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":789.9286956787109,"y":865.3184909820557,"z":"3a458d77.799552","wires":[["70609e54.5270d8"]]},{"id":"fd18e75b.d48ac8","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 vf-module in AAI\" />\n","comments":"","x":971.357292175293,"y":820.8425130844116,"z":"3a458d77.799552","wires":[]},{"id":"480235fd.ba7594","type":"update","name":"Update EIPAM_IP_ASSIGNMENTS to ACTIVE","xml":"<update resource='SQL' force='true' plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n  key='UPDATE EIPAM_IP_ASSIGNMENTS SET status = \"ACTIVE\" WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'>\n","comments":"","outputs":1,"x":635.3333282470703,"y":910.7469625473022,"z":"3a458d77.799552","wires":[["9bce782d.b650b8"]]},{"id":"9bce782d.b650b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":902,"y":909.0803022384644,"z":"3a458d77.799552","wires":[["54742454.0a8a7c"]]},{"id":"54742454.0a8a7c","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 EIPAM_IP_ASSIGNMENTS table\" />\n","comments":"","x":1052,"y":907.4136152267456,"z":"3a458d77.799552","wires":[]},{"id":"6d867071.7e0d98","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":533.6666412353516,"y":1050.7469692230225,"z":"3a458d77.799552","wires":[]}]