aebe40d0257fca7e3889caa2453fe9500c4d4748
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
1 [{"id":"ba18c526.d17c78","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":110,"z":"e4baa5a8.a31318","wires":[["8ba9ecd6.6d936"]]},{"id":"8ba9ecd6.6d936","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":243.85713577270508,"y":149.80953788757324,"z":"e4baa5a8.a31318","wires":[["c7127bd0.ef2fd8"]]},{"id":"c7127bd0.ef2fd8","type":"method","name":"method vf-module-topology-operation-assign","xml":"<method rpc='vf-module-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":243.42862701416016,"y":190,"z":"e4baa5a8.a31318","wires":[["79397c09.ed5274"]]},{"id":"21494016.016","type":"comment","name":"vf-module-topology-operation-assign","info":"","comments":"","x":535.3210983276367,"y":52.97569942474365,"z":"e4baa5a8.a31318","wires":[]},{"id":"624fdfec.bf7d8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":535.1905097961426,"y":365.52382230758667,"z":"e4baa5a8.a31318","wires":[["74eeaa1c.be92e4","134c69ff.005316"]]},{"id":"74eeaa1c.be92e4","type":"outcome","name":"CreateVfModuleInstance","xml":"<outcome value='CreateVfModuleInstance'>\n","comments":"","outputs":1,"x":797.2381248474121,"y":342.66670846939087,"z":"e4baa5a8.a31318","wires":[["cb01b9a9.685a48"]]},{"id":"134c69ff.005316","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":740.9047698974609,"y":388.0476975440979,"z":"e4baa5a8.a31318","wires":[["d9c8e7b5.a66ae8"]]},{"id":"cb01b9a9.685a48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":987.0952892303467,"y":342.6667399406433,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"d9c8e7b5.a66ae8","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 'assign' then request-action must be 'CreateVfModuleInstance'\" />\n","comments":"","x":1005.9047775268555,"y":388.381010055542,"z":"e4baa5a8.a31318","wires":[]},{"id":"76409cce.086344","type":"get-resource","name":"get-resource VF_MODULE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n  pfx='db.vf-module-model'>\n\n","comments":"","outputs":1,"x":582.5237770080566,"y":456.66677236557007,"z":"e4baa5a8.a31318","wires":[["dd68463c.c87178","d3cb4517.ac8c08"]]},{"id":"75201e32.0cf","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 model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1023.9521980285645,"y":481.09524488449097,"z":"e4baa5a8.a31318","wires":[]},{"id":"dd68463c.c87178","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.3094673156738,"y":437.0476031303406,"z":"e4baa5a8.a31318","wires":[["6f89e52b.bf43cc"]]},{"id":"d3cb4517.ac8c08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":856.8808975219727,"y":481.33331632614136,"z":"e4baa5a8.a31318","wires":[["75201e32.0cf"]]},{"id":"6f89e52b.bf43cc","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 reading VF_MODULE_MODEL table\" />\n","comments":"","x":1023.309398651123,"y":436.1905035972595,"z":"e4baa5a8.a31318","wires":[]},{"id":"f5aeb74d.5bf438","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":577.6190414428711,"y":665.2381076812744,"z":"e4baa5a8.a31318","wires":[["6bb339ec.749948","e28c0952.e044a8"]]},{"id":"6bb339ec.749948","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":818.3333129882812,"y":642.3808479309082,"z":"e4baa5a8.a31318","wires":[["f1f5dab6.570ce8"]]},{"id":"e28c0952.e044a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":818.0951538085938,"y":683.333366394043,"z":"e4baa5a8.a31318","wires":[["ecd3b0db.60645"]]},{"id":"79397c09.ed5274","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.99999237060547,"y":2359.9999599456787,"z":"e4baa5a8.a31318","wires":[["624fdfec.bf7d8","76409cce.086344","f5aeb74d.5bf438","b864bec.d46214","c6d3c332.333ff","5a02ed1a.0ee094","fcb2cab8.814f18","67c44cf7.b6baf4","478f6983.a5e0a8","b69a54c5.a45d58","c2526b9f.9838f8","b384890d.a43ff8","7ee29093.2b4b4","706746b8.19a5e8","21781bbf.a9cfb4","dac77f20.01493","f90accfc.bc38","eab0098.e0d50f8","3ec776dc.c4924a","90e381df.54c71","7d2ca2a2.73c80c","388ab739.6c4fe8","9b75b20e.4510a","e8889dec.9dd74","ac1085e3.f13938","319cf957.f6edb6","c811246.d8ba4d8","efa475b7.980ae8","a247b0d0.a589c","f833ef67.9cf92","95db0874.7fa668","b87f9fec.9ac9e","a03bb466.634808","3c8bd226.36546e","f8307ef3.44142","21f945ed.4703fa","4646e366.6582ec","fc1913b.4d832f"]]},{"id":"f1f5dab6.570ce8","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":984.999927520752,"y":641.6666030883789,"z":"e4baa5a8.a31318","wires":[]},{"id":"ecd3b0db.60645","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":980.3332977294922,"y":682.9999847412109,"z":"e4baa5a8.a31318","wires":[["1be32734.9e3679"]]},{"id":"1be32734.9e3679","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":1231.6665153503418,"y":682.6666717529297,"z":"e4baa5a8.a31318","wires":[["2c5659ec.ad3dd6"]]},{"id":"2c5659ec.ad3dd6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1461.6666069030762,"y":682.0000257492065,"z":"e4baa5a8.a31318","wires":[["d38d34bf.3a83a8"]]},{"id":"b864bec.d46214","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":526.6666641235352,"y":596.6666069030762,"z":"e4baa5a8.a31318","wires":[]},{"id":"78e4042f.0ca05c","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1783.3332443237305,"y":652.9999837875366,"z":"e4baa5a8.a31318","wires":[]},{"id":"c6d3c332.333ff","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":516.6666717529297,"y":733.3333034515381,"z":"e4baa5a8.a31318","wires":[["1476b5d.81c794a"]]},{"id":"1476b5d.81c794a","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":695.000057220459,"y":732.6666793823242,"z":"e4baa5a8.a31318","wires":[["ae034b1a.ea5ad8"]]},{"id":"ae034b1a.ea5ad8","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":854.9999656677246,"y":731.9999828338623,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a02ed1a.0ee094","type":"switchNode","name":"switch vnf order status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":539.6666946411133,"y":804.6667003631592,"z":"e4baa5a8.a31318","wires":[["6e55331.17400cc","31914e29.080322"]]},{"id":"6e55331.17400cc","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":739.9999961853027,"y":778.3332843780518,"z":"e4baa5a8.a31318","wires":[["efaa33f.0a25bd"]]},{"id":"efaa33f.0a25bd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":880.0000076293945,"y":778.3333263397217,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"31914e29.080322","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":736.666633605957,"y":819.9999618530273,"z":"e4baa5a8.a31318","wires":[["d09d7b5b.818158"]]},{"id":"d09d7b5b.818158","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=\"`'VNF order status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status + ' but should be Created'`\" />\n","comments":"","x":896.666633605957,"y":819.6666488647461,"z":"e4baa5a8.a31318","wires":[]},{"id":"fcb2cab8.814f18","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":543.333381652832,"y":896.6666212081909,"z":"e4baa5a8.a31318","wires":[["9263cf35.cb3cc","a2f6c209.2980d"]]},{"id":"9263cf35.cb3cc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":800.7143363952637,"y":863.8093948364258,"z":"e4baa5a8.a31318","wires":[["37fa8c70.964c34"]]},{"id":"37fa8c70.964c34","type":"set","name":"set vf-module-index=0","xml":"<set>\n<parameter name='vf-module-index' value='0' />\n","comments":"","x":988.3333740234375,"y":864.4761695861816,"z":"e4baa5a8.a31318","wires":[]},{"id":"a2f6c209.2980d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.142879486084,"y":928.0952529907227,"z":"e4baa5a8.a31318","wires":[["db5c1b7f.efac08"]]},{"id":"632dd1f4.02485","type":"set","name":"set vf-module-index = vf-module_length","xml":"<set>\n<parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n","comments":"","x":1186.3334197998047,"y":908.2856483459473,"z":"e4baa5a8.a31318","wires":[]},{"id":"82872a13.5fe7f8","type":"for","name":"for each existing 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":1145.4285125732422,"y":952.3808784484863,"z":"e4baa5a8.a31318","wires":[["79d6fba6.5029b4"]]},{"id":"db5c1b7f.efac08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":937.8571586608887,"y":928.095178604126,"z":"e4baa5a8.a31318","wires":[["632dd1f4.02485","82872a13.5fe7f8"]]},{"id":"79d6fba6.5029b4","type":"switchNode","name":"switch vf-module-information.vf-module-id == service-data.vnfs.vnf[].vf-modules.vf-module[].vf-module-id","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>\n","comments":"","outputs":1,"x":1649.0476150512695,"y":951.9522895812988,"z":"e4baa5a8.a31318","wires":[["5d658a75.3975d4"]]},{"id":"5d658a75.3975d4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2091.666664123535,"y":951.5237407684326,"z":"e4baa5a8.a31318","wires":[["421b0ac1.c08aa4"]]},{"id":"421b0ac1.c08aa4","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=\"`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id\n       + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`\" />\n","comments":"","x":2243.571544647217,"y":951.5237274169922,"z":"e4baa5a8.a31318","wires":[]},{"id":"2c370c75.fc9a44","type":"comment","name":"make sure this VF module doesn't exist already","info":"","comments":"","x":1675.4999618530273,"y":906.5797815322876,"z":"e4baa5a8.a31318","wires":[]},{"id":"67c44cf7.b6baf4","type":"set","name":"set new vf-module_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />\n","comments":"","x":548.3333206176758,"y":991.6665554046631,"z":"e4baa5a8.a31318","wires":[]},{"id":"478f6983.a5e0a8","type":"set","name":"set vf-module-topology data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />\n<parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />\n<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />\n","comments":"","x":554.8333396911621,"y":1104.1666622161865,"z":"e4baa5a8.a31318","wires":[]},{"id":"9f4a6c82.752a2","type":"set","name":"set aic-clli","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-topology.aic-clli'\n   value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1315.7855987548828,"y":1263.4045886993408,"z":"e4baa5a8.a31318","wires":[]},{"id":"b69a54c5.a45d58","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>\n","comments":"","outputs":1,"x":514.8332595825195,"y":1377.3569288253784,"z":"e4baa5a8.a31318","wires":[["63670893.1e3b68"]]},{"id":"63670893.1e3b68","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":660.1189498901367,"y":1377.3569974899292,"z":"e4baa5a8.a31318","wires":[["d1949d38.26893"]]},{"id":"d1949d38.26893","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 aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`\" />\n","comments":"","x":807.2618103027344,"y":1376.9284315109253,"z":"e4baa5a8.a31318","wires":[]},{"id":"c2526b9f.9838f8","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 = 'Rackspace' AND \n\t\t     cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\"\n        pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":553.6904754638672,"y":1177.5002002716064,"z":"e4baa5a8.a31318","wires":[["2e9679c1.dabc26","556ec535.b1abec"]]},{"id":"556ec535.b1abec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9366683959961,"y":1195.6510562896729,"z":"e4baa5a8.a31318","wires":[["59e25d61.85e274"]]},{"id":"59e25d61.85e274","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 retrieving cloud region from AAI\" />\n","comments":"","x":942.9366416931152,"y":1195.6510925292969,"z":"e4baa5a8.a31318","wires":[]},{"id":"2e9679c1.dabc26","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.8652648925781,"y":1153.9367895126343,"z":"e4baa5a8.a31318","wires":[["7d7ab12a.70ec1"]]},{"id":"7d7ab12a.70ec1","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=\"Cloud region not found in AAI\" />\n","comments":"","x":943.214542388916,"y":1153.2423667907715,"z":"e4baa5a8.a31318","wires":[]},{"id":"b384890d.a43ff8","type":"set","name":"set vf-module-parameters","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-parameters.'\n  value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />\n","comments":"","x":550.595287322998,"y":1826.7860202789307,"z":"e4baa5a8.a31318","wires":[]},{"id":"7ee29093.2b4b4","type":"set","name":"set order-status to PendingCreate","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='PendingCreate' />\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":574.9762725830078,"y":4824.6424016952515,"z":"e4baa5a8.a31318","wires":[]},{"id":"706746b8.19a5e8","type":"get-resource","name":"get-resource VF_MODULE_TO_VFC_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from VF_MODULE_TO_VFC_MAPPING WHERE vf_module_customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n  pfx='db.vf-module-to-vfc-mapping[]'>\n\n","comments":"","outputs":1,"x":623.9286880493164,"y":1880.642807006836,"z":"e4baa5a8.a31318","wires":[["c1f20ca7.f60de","10a18f7e.33e891"]]},{"id":"c1f20ca7.f60de","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":889.7143783569336,"y":1861.0236377716064,"z":"e4baa5a8.a31318","wires":[["4ecc9002.756aa"]]},{"id":"10a18f7e.33e891","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":898.2858085632324,"y":1905.3093509674072,"z":"e4baa5a8.a31318","wires":[["45ef9bd1.40c894"]]},{"id":"4ecc9002.756aa","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 reading VF_MODULE_TO_VFC_MAPPING table\" />\n","comments":"","x":1064.7143096923828,"y":1860.1665382385254,"z":"e4baa5a8.a31318","wires":[]},{"id":"21781bbf.a9cfb4","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$db.vf-module-to-vfc-mapping_length`' >\n","comments":"","outputs":1,"x":524.0476989746094,"y":2509.6430587768555,"z":"e4baa5a8.a31318","wires":[["cabbea55.2886f8"]]},{"id":"d0795bff.bc69c8","type":"get-resource","name":"get-resource VFC_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from VFC_MODEL WHERE customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n  pfx='db.vfc-model'>\n\n","comments":"","outputs":1,"x":965.9524993896484,"y":2001.5477199554443,"z":"e4baa5a8.a31318","wires":[["9c63e2cb.97fb5","8d0e208f.5920d"]]},{"id":"c84a73cd.c4e67","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 entries found in VFC_MODEL table for customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1336.3808479309082,"y":2025.9761123657227,"z":"e4baa5a8.a31318","wires":[]},{"id":"9c63e2cb.97fb5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1161.7381172180176,"y":1981.9284706115723,"z":"e4baa5a8.a31318","wires":[["28822387.baf9cc"]]},{"id":"8d0e208f.5920d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1170.3095474243164,"y":2026.214183807373,"z":"e4baa5a8.a31318","wires":[["c84a73cd.c4e67"]]},{"id":"28822387.baf9cc","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 reading VFC_MODEL table\" />\n","comments":"","x":1336.7380485534668,"y":1981.0713710784912,"z":"e4baa5a8.a31318","wires":[]},{"id":"cabbea55.2886f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":715.9524917602539,"y":2508.214427947998,"z":"e4baa5a8.a31318","wires":[["d0795bff.bc69c8","eca0516a.3fa5d","f1ac110f.7a32d","1d9d491.32bd1b7","7518d7bc.8082b8","d99614b2.38ddf8","79dd1a08.432464","141da799.5b84c8"]]},{"id":"7d2ca2a2.73c80c","type":"set","name":"set vm_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm_length'\n  value='`$db.vf-module-to-vfc-mapping_length`' />\n","comments":"","x":515.833366394043,"y":1940.8334846496582,"z":"e4baa5a8.a31318","wires":[]},{"id":"eca0516a.3fa5d","type":"set","name":"set vm data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type'\n   value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-type`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code'\n   value='`$db.vfc-model.nfc-naming-code`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type-tag'\n   value='`$db.vfc-model.vm-type-tag`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count'\n   value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":916.6667518615723,"y":2127.5001974105835,"z":"e4baa5a8.a31318","wires":[]},{"id":"d38d34bf.3a83a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1610.0000686645508,"y":680.9197244644165,"z":"e4baa5a8.a31318","wires":[["78e4042f.0ca05c","a7ac7b7.2ad2e88"]]},{"id":"a7ac7b7.2ad2e88","type":"break","name":"break","xml":"<break>\n","comments":"","x":1745.0000343322754,"y":702.5863103866577,"z":"e4baa5a8.a31318","wires":[]},{"id":"50cfe9ae.372c38","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n  value='`$db.vf-module-model.invariant-uuid`' />\n","comments":"","x":929.1665992736816,"y":1418.7529220581055,"z":"e4baa5a8.a31318","wires":[]},{"id":"dac77f20.01493","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":573.0236740112305,"y":1441.5773658752441,"z":"e4baa5a8.a31318","wires":[["659c77e9.7f4f18","74de5833.fee938"]]},{"id":"659c77e9.7f4f18","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":778.6903457641602,"y":1418.720329284668,"z":"e4baa5a8.a31318","wires":[["50cfe9ae.372c38"]]},{"id":"74de5833.fee938","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":780.1189422607422,"y":1463.0059204101562,"z":"e4baa5a8.a31318","wires":[["a1fe0326.3a53b"]]},{"id":"a1fe0326.3a53b","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n  value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n","comments":"","x":934.4046783447266,"y":1462.4344925880432,"z":"e4baa5a8.a31318","wires":[]},{"id":"2dd9c208.718fae","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n  value='`$db.vf-module-model.uuid`' />\n","comments":"","x":930.1188697814941,"y":1507.2915983200073,"z":"e4baa5a8.a31318","wires":[]},{"id":"f90accfc.bc38","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":545.642692565918,"y":1530.1161031723022,"z":"e4baa5a8.a31318","wires":[["51f29715.20d0f8","d6f024f9.949348"]]},{"id":"51f29715.20d0f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":779.6426658630371,"y":1507.2590351104736,"z":"e4baa5a8.a31318","wires":[["2dd9c208.718fae"]]},{"id":"d6f024f9.949348","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":781.0712623596191,"y":1551.544626235962,"z":"e4baa5a8.a31318","wires":[["62042fb1.77272"]]},{"id":"62042fb1.77272","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n  value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />\n","comments":"","x":935.3569984436035,"y":1550.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"a6bf8c48.b281b","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n  value='`$db.vf-module-model.version`' />\n","comments":"","x":927.2618026733398,"y":1596.1488056182861,"z":"e4baa5a8.a31318","wires":[]},{"id":"eab0098.e0d50f8","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>\n","comments":"","outputs":1,"x":553.7855644226074,"y":1618.9732503890991,"z":"e4baa5a8.a31318","wires":[["4ccd7.162a832a","518ded3e.75ca04"]]},{"id":"4ccd7.162a832a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1596.1162128448486,"z":"e4baa5a8.a31318","wires":[["a6bf8c48.b281b"]]},{"id":"518ded3e.75ca04","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1640.401803970337,"z":"e4baa5a8.a31318","wires":[["638ada17.7c2584"]]},{"id":"638ada17.7c2584","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n  value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />\n","comments":"","x":932.4998817443848,"y":1639.8303761482239,"z":"e4baa5a8.a31318","wires":[]},{"id":"f4c6962e.75c988","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n  value='`$db.vf-module-model.name`' />\n","comments":"","x":927.2618026733398,"y":1683.2916278839111,"z":"e4baa5a8.a31318","wires":[]},{"id":"3ec776dc.c4924a","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>\n","comments":"","outputs":1,"x":548.7855644226074,"y":1706.1160726547241,"z":"e4baa5a8.a31318","wires":[["7600c1a1.34774","dd561948.d52d48"]]},{"id":"7600c1a1.34774","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1683.2590351104736,"z":"e4baa5a8.a31318","wires":[["f4c6962e.75c988"]]},{"id":"dd561948.d52d48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1727.544626235962,"z":"e4baa5a8.a31318","wires":[["5381543.b5468ac"]]},{"id":"5381543.b5468ac","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n  value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />\n","comments":"","x":932.4998817443848,"y":1726.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"90e381df.54c71","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'\n  value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n","comments":"","x":563.2378997802734,"y":1778.6250619888306,"z":"e4baa5a8.a31318","wires":[]},{"id":"f1ac110f.7a32d","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":918.3332405090332,"y":2236.7531156539917,"z":"e4baa5a8.a31318","wires":[["8e6b243f.583508"]]},{"id":"1d9d491.32bd1b7","type":"set","name":"set vm-name-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length'\n  value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":941.6666946411133,"y":2171.753373146057,"z":"e4baa5a8.a31318","wires":[]},{"id":"18165004.df83","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1384.761863708496,"y":2259.3722620010376,"z":"e4baa5a8.a31318","wires":[["e76d3ba1.b484f8","2a1c5abf.cc7856"]]},{"id":"e76d3ba1.b484f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1680.4761517842617,"y":2232.2295246124268,"z":"e4baa5a8.a31318","wires":[["4baa2d79.9b13e4"]]},{"id":"2a1c5abf.cc7856","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1683.8095016479492,"y":2283.896167755127,"z":"e4baa5a8.a31318","wires":[["8626bbb.4150148"]]},{"id":"1575979f.adc098","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VM_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vm_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VM_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-name + $db.vfc-model.nfc-naming-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='3' />\n","comments":"","x":1341.4285774230957,"y":2207.7055883407593,"z":"e4baa5a8.a31318","wires":[]},{"id":"8626bbb.4150148","type":"set","name":"set generated name","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1868.3332176208496,"y":2283.3721857070923,"z":"e4baa5a8.a31318","wires":[]},{"id":"4baa2d79.9b13e4","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=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1848.3332646687832,"y":2231.6580362319946,"z":"e4baa5a8.a31318","wires":[]},{"id":"388ab739.6c4fe8","type":"set","name":"set vf-module-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'\n   value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n","comments":"","x":516.4285469055176,"y":1047.348237991333,"z":"e4baa5a8.a31318","wires":[]},{"id":"8e6b243f.583508","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1082.738182067871,"y":2236.396019935608,"z":"e4baa5a8.a31318","wires":[["1575979f.adc098","18165004.df83"]]},{"id":"7518d7bc.8082b8","type":"get-resource","name":"get-resource VFC_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from VFC_TO_NETWORK_ROLE_MAPPING WHERE vfc_customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n  pfx='db.vfc-to-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":1045.595329284668,"y":2359.253088951111,"z":"e4baa5a8.a31318","wires":[["71a08ee7.14c92","7a73e707.b51298"]]},{"id":"71a08ee7.14c92","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1332.8095321655273,"y":2339.6339359283447,"z":"e4baa5a8.a31318","wires":[["42a3db7c.c4bde4"]]},{"id":"7a73e707.b51298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1341.3809623718262,"y":2383.9196491241455,"z":"e4baa5a8.a31318","wires":[["d5efedb2.7d60c"]]},{"id":"42a3db7c.c4bde4","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 reading VFC_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1507.8094635009766,"y":2338.7768363952637,"z":"e4baa5a8.a31318","wires":[]},{"id":"d99614b2.38ddf8","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$db.vfc-to-network-role-mapping_length`' >\n","comments":"","outputs":1,"x":938.6906204223633,"y":2670.4439306259155,"z":"e4baa5a8.a31318","wires":[["4bcabc98.ea4e24"]]},{"id":"4bcabc98.ea4e24","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1145.1190719604492,"y":2667.11043548584,"z":"e4baa5a8.a31318","wires":[["36a6c86d.097308","837f1dbf.dff44","35c5bc83.48f7c4","65409122.eeca2","da28f677.f45f78","231dd30.999172e","bdd6810f.244ea","47edc8c7.d583e8"]]},{"id":"36a6c86d.097308","type":"for","name":"for each network","xml":"<for silentFailure='true' index='idx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1354.166633605957,"y":2499.253191947937,"z":"e4baa5a8.a31318","wires":[["89e2ef85.52c62"]]},{"id":"837f1dbf.dff44","type":"set","name":"set network-index to -1","xml":"<set>\n<parameter name='network-index' value='-1' />\n","comments":"","x":1374.1667022705078,"y":2456.396188735962,"z":"e4baa5a8.a31318","wires":[]},{"id":"89e2ef85.52c62","type":"switchNode","name":"switch network-role matches","xml":"<switch test='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-role == $db.vfc-to-network-role-mapping[$network-role-index].network-role`'>\n","comments":"","outputs":1,"x":1582.737907409668,"y":2497.824381828308,"z":"e4baa5a8.a31318","wires":[["16b2e9a3.043416"]]},{"id":"16b2e9a3.043416","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1781.3095741271973,"y":2497.824585914612,"z":"e4baa5a8.a31318","wires":[["db944d5d.b6668"]]},{"id":"db944d5d.b6668","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1922.7381420135498,"y":2496.396014213562,"z":"e4baa5a8.a31318","wires":[["67f3ef04.c0a6c","18ca7106.b738af"]]},{"id":"67f3ef04.c0a6c","type":"set","name":"set network-index to idx","xml":"<set>\n<parameter name='network-index' value='`$idx`' />\n","comments":"","x":2101.30965423584,"y":2473.5390100479126,"z":"e4baa5a8.a31318","wires":[]},{"id":"18ca7106.b738af","type":"break","name":"break","xml":"<break>\n","comments":"","x":2049.8808937072754,"y":2519.2531900405884,"z":"e4baa5a8.a31318","wires":[]},{"id":"35c5bc83.48f7c4","type":"switchNode","name":"switch network-index","xml":"<switch test='`$network-index`'>\n","comments":"","outputs":1,"x":1366.0714721679688,"y":2548.062829017639,"z":"e4baa5a8.a31318","wires":[["170e8f83.a9e23"]]},{"id":"170e8f83.a9e23","type":"outcomeTrue","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1560.3571968078613,"y":2548.062726020813,"z":"e4baa5a8.a31318","wires":[["a6e6e9d9.38e488"]]},{"id":"a6e6e9d9.38e488","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 network found in MD-SAL with network-role ' + $db.vfc-to-network-role-mapping[$network-role-index].network-role`\" />\n","comments":"","x":1717.5000457763672,"y":2546.634196281433,"z":"e4baa5a8.a31318","wires":[]},{"id":"9b75b20e.4510a","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":575.9442901611328,"y":1266.0068836212158,"z":"e4baa5a8.a31318","wires":[["1b8a998c.af1726"]]},{"id":"1b8a998c.af1726","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":823.6228332519531,"y":1265.7568130493164,"z":"e4baa5a8.a31318","wires":[["8a817450.4b3f18"]]},{"id":"8a817450.4b3f18","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":993.0871543884277,"y":1265.1496353149414,"z":"e4baa5a8.a31318","wires":[["30bd9ac8.a95e36"]]},{"id":"5de7c2d5.2e20dc","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n   <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n   <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n   <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1333.1823120117188,"y":1219.5782108306885,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"30bd9ac8.a95e36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1152.8490142822266,"y":1266.2449989318848,"z":"e4baa5a8.a31318","wires":[["5de7c2d5.2e20dc","e5801a20.119d08","9f4a6c82.752a2"]]},{"id":"e5801a20.119d08","type":"break","name":"break","xml":"<break>\n","comments":"","x":1302.848976135254,"y":1309.5782957077026,"z":"e4baa5a8.a31318","wires":[]},{"id":"65409122.eeca2","type":"set","name":"set network-role and tag","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role-tag'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role-tag`' />\n","comments":"","x":1375.8333549499512,"y":2644.2530155181885,"z":"e4baa5a8.a31318","wires":[]},{"id":"79dd1a08.432464","type":"set","name":"set vm-network-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length'\n  value='`$db.vfc-to-network-role-mapping_length`' />\n","comments":"","x":932.4999465942383,"y":3059.2532806396484,"z":"e4baa5a8.a31318","wires":[]},{"id":"da28f677.f45f78","type":"switchNode","name":"switch ipv4-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-ip-version`'>\n","comments":"","outputs":1,"x":1368.452407836914,"y":2727.5863428115845,"z":"e4baa5a8.a31318","wires":[["ba64a787.ba4118","2e9fc1a3.0b9b9e"]]},{"id":"d7307d95.7b8c5","type":"set","name":"set network-information-index to -1","xml":"<set>\n<parameter name='network-information-index' value='-1' />\n\n","comments":"","x":1777.97603225708,"y":2692.5864477157593,"z":"e4baa5a8.a31318","wires":[]},{"id":"ba64a787.ba4118","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1545.1189270019531,"y":2692.586483001709,"z":"e4baa5a8.a31318","wires":[["d7307d95.7b8c5"]]},{"id":"2e9fc1a3.0b9b9e","type":"other","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1543.8808784484863,"y":2758.538625717163,"z":"e4baa5a8.a31318","wires":[["8dd043b4.688fd"]]},{"id":"e6d285da.6bc2f8","type":"set","name":"set network-information-index to 0","xml":"<set>\n<parameter name='network-information-index' value='0' />\n","comments":"","x":1948.4521408081055,"y":2733.0624866485596,"z":"e4baa5a8.a31318","wires":[]},{"id":"8dd043b4.688fd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1711.0713539123535,"y":2757.872091293335,"z":"e4baa5a8.a31318","wires":[["e6d285da.6bc2f8","909b57b.c66aea8"]]},{"id":"909b57b.c66aea8","type":"set","name":"set ip-version 4, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n   value='4' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-count`' />\n","comments":"","x":1965.4047241210938,"y":2779.7294425964355,"z":"e4baa5a8.a31318","wires":[]},{"id":"231dd30.999172e","type":"switchNode","name":"switch ipv6-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-ip-version`'>\n","comments":"","outputs":1,"x":1368.9286041259766,"y":2854.4911251068115,"z":"e4baa5a8.a31318","wires":[["a42f90da.1aa4c","95f6b1ee.0f4d1"]]},{"id":"a42f90da.1aa4c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1547.7380981445312,"y":2824.728937149048,"z":"e4baa5a8.a31318","wires":[["8ebef5b1.d07e78"]]},{"id":"95f6b1ee.0f4d1","type":"other","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":1549.1666526794434,"y":2889.0144939422607,"z":"e4baa5a8.a31318","wires":[["2ae9d1a1.54891e"]]},{"id":"71edbafa.5f48b4","type":"set","name":"increment network-information-index","xml":"<set>\n<parameter name='network-information-index' value='`$network-information-index + 1`' />\n","comments":"","x":1954.880744934082,"y":2863.5385236740112,"z":"e4baa5a8.a31318","wires":[]},{"id":"2ae9d1a1.54891e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1704.4048118591309,"y":2888.0622329711914,"z":"e4baa5a8.a31318","wires":[["71edbafa.5f48b4","a89d1a7f.ee0778"]]},{"id":"8ebef5b1.d07e78","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1690.404727935791,"y":2824.0625553131104,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"bdd6810f.244ea","type":"switchNode","name":"switch network-information-index","xml":"<switch test='`$network-information-index`'>\n","comments":"","outputs":1,"x":1404.166618347168,"y":2990.919370651245,"z":"e4baa5a8.a31318","wires":[["b53bbeec.db42f","b1edd581.077538"]]},{"id":"b53bbeec.db42f","type":"outcome","name":"-1","xml":"<outcome value='-1'>","comments":"","outputs":1,"x":1622.4999752044678,"y":2967.5861167907715,"z":"e4baa5a8.a31318","wires":[["ba350989.b70fd8"]]},{"id":"b1edd581.077538","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1622.2619380950928,"y":3013.5384311676025,"z":"e4baa5a8.a31318","wires":[["9b9cf9cc.6a7228"]]},{"id":"ba350989.b70fd8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1759.166690826416,"y":2965.919776916504,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"9b9cf9cc.6a7228","type":"set","name":"set network-information-item_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length'\n   value='`$network-information-index + 1`' />\n","comments":"","x":1850.8333053588867,"y":3010.919569015503,"z":"e4baa5a8.a31318","wires":[]},{"id":"e8889dec.9dd74","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":531,"y":3157.9194660186768,"z":"e4baa5a8.a31318","wires":[["8b116d7c.65c33"]]},{"id":"8b116d7c.65c33","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":734.5715255737305,"y":3158.1576709747314,"z":"e4baa5a8.a31318","wires":[["7e90f983.18fa18"]]},{"id":"47edc8c7.d583e8","type":"set","name":"save network-id","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id'\n  value='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-id`' />\n","comments":"This isn't a node in MD-SAL, but we need to save this for later when we are doing EIPAM processing","x":1347.9761810302734,"y":2594.253023147583,"z":"e4baa5a8.a31318","wires":[]},{"id":"7e90f983.18fa18","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":935.999885559082,"y":3157.252721786499,"z":"e4baa5a8.a31318","wires":[["a533571e.4db208"]]},{"id":"a533571e.4db208","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1137.9047012329102,"y":3156.490758895874,"z":"e4baa5a8.a31318","wires":[["92a08557.b354a8"]]},{"id":"92a08557.b354a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":1382.6665725708008,"y":3156.0151510238647,"z":"e4baa5a8.a31318","wires":[["1eb5f5e8.6678ba"]]},{"id":"b1e701d0.c2cbd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":627.666633605957,"y":3361.9195766448975,"z":"e4baa5a8.a31318","wires":[["a3c5a1c.0beeb6","d65acdc0.dafd8","c7baae79.a8d3a","1445f578.93789b","c5ac535a.19e0c"]]},{"id":"a3c5a1c.0beeb6","type":"get-resource","name":"get-resource EIPAM_IP_SUBNETS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from EIPAM_IP_SUBNETS WHERE network_id = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n    AND address_family = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version'\n  pfx='db.eipam-ip-subnets[]'>\n\n","comments":"","outputs":1,"x":1007.6666564941406,"y":3323.586072921753,"z":"e4baa5a8.a31318","wires":[["3976fb7d.92d3d4","959768c3.a1d588"]]},{"id":"39fae58.e71ee1a","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 entries found in EIPAM_IP_SUBNETS table for network ID '\n        + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n        + ' and address family ' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`\" />\n","comments":"","x":1397.6665954589844,"y":3345.2528343200684,"z":"e4baa5a8.a31318","wires":[]},{"id":"3976fb7d.92d3d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1223.0238647460938,"y":3301.205192565918,"z":"e4baa5a8.a31318","wires":[["c635b53c.368758"]]},{"id":"959768c3.a1d588","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1231.5952949523926,"y":3345.4909057617188,"z":"e4baa5a8.a31318","wires":[["39fae58.e71ee1a"]]},{"id":"c635b53c.368758","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 reading EIPAM_IP_SUBNETS table\" />\n","comments":"","x":1398.023796081543,"y":3300.348093032837,"z":"e4baa5a8.a31318","wires":[]},{"id":"d65acdc0.dafd8","type":"for","name":"for each record in EIPAM_IP_SUBNETS","xml":"<for index='subnets-index' start='0' end='`$db.eipam-ip-subnets_length`' >\n","comments":"","outputs":1,"x":1026.9524688720703,"y":3628.82426071167,"z":"e4baa5a8.a31318","wires":[["ff66bf7.47f1b4"]]},{"id":"ff66bf7.47f1b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1283.3810195922852,"y":3629.77654838562,"z":"e4baa5a8.a31318","wires":[["367ad5cc.c5a3fa","77c765bc.e6637c","91e102ce.d36e8","3d0c6fc4.e325","82b00d4f.93cbf"]]},{"id":"367ad5cc.c5a3fa","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $db.eipam-ip-subnets[$subnets-index].entity-id'\n  pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1594.809585571289,"y":3466.205156326294,"z":"e4baa5a8.a31318","wires":[["6870a9ce.b3eae8","f0e997ff.17eb08"]]},{"id":"7945f51f.9f762c","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 entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n        + $db.eipam-ip-subnets[$subnets-index].entity-id`\" />","comments":"","x":2009.809585571289,"y":3486.205156326294,"z":"e4baa5a8.a31318","wires":[]},{"id":"6870a9ce.b3eae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1835.1668548583984,"y":3442.1575145721436,"z":"e4baa5a8.a31318","wires":[["ed0022b6.a92c"]]},{"id":"f0e997ff.17eb08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1843.7382850646973,"y":3486.4432277679443,"z":"e4baa5a8.a31318","wires":[["7945f51f.9f762c"]]},{"id":"ed0022b6.a92c","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 reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2010.1667861938477,"y":3441.3004150390625,"z":"e4baa5a8.a31318","wires":[]},{"id":"c7baae79.a8d3a","type":"set","name":"set max-level to -1","xml":"<set>\n<parameter name='max-level' value='-1' />\n","comments":"","x":955.7619323730469,"y":3389.538688659668,"z":"e4baa5a8.a31318","wires":[]},{"id":"77c765bc.e6637c","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='keys-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":1609.3334045410156,"y":3535.2529106140137,"z":"e4baa5a8.a31318","wires":[["263bb568.7e1d3a"]]},{"id":"263bb568.7e1d3a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1896.0000534057617,"y":3533.586248397827,"z":"e4baa5a8.a31318","wires":[["57db1b51.bf7814"]]},{"id":"57db1b51.bf7814","type":"switchNode","name":"switch level > max-level?","xml":"<switch test='`$db.eipam-ip-subnet-keys[$keys-index].level &gt; $max-level`'>\n","comments":"","outputs":1,"x":2112.6666717529297,"y":3533.586166381836,"z":"e4baa5a8.a31318","wires":[["d90f79d9.b32da8"]]},{"id":"d90f79d9.b32da8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2304.333599090576,"y":3533.58616065979,"z":"e4baa5a8.a31318","wires":[["743cc06c.51758"]]},{"id":"743cc06c.51758","type":"set","name":"set max-level, selected-entity-id, selected-plan-name","xml":"<set>\n<parameter name='max-level' value='`$db.eipam-ip-subnet-keys[$keys-index].level`' />\n<parameter name='selected-entity-id' value='`$db.eipam-ip-subnet-keys[$keys-index].entity-id`' />\n<parameter name='selected-plan-name' value='`$db.eipam-ip-subnets[$subnets-index].plan-name`' />\n","comments":"","x":2596.0001068115234,"y":3531.9194173812866,"z":"e4baa5a8.a31318","wires":[]},{"id":"91e102ce.d36e8","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $selected-entity-id order by level'\n  pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1596.000015258789,"y":3607.157615661621,"z":"e4baa5a8.a31318","wires":[["b2349884.088788","f1532f86.e76dd"]]},{"id":"7f0c353a.7f913c","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 entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n        + $selected-entity-id`\" />","comments":"","x":2011.000015258789,"y":3627.157615661621,"z":"e4baa5a8.a31318","wires":[]},{"id":"b2349884.088788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1836.3572845458984,"y":3583.1099739074707,"z":"e4baa5a8.a31318","wires":[["70f90568.aa118c"]]},{"id":"f1532f86.e76dd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1844.9287147521973,"y":3627.3956871032715,"z":"e4baa5a8.a31318","wires":[["7f0c353a.7f913c"]]},{"id":"70f90568.aa118c","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 reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2011.3572158813477,"y":3582.2528743743896,"z":"e4baa5a8.a31318","wires":[]},{"id":"c8da1d6e.45a7a","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='level-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":2041.9523620605469,"y":3675.729072570801,"z":"e4baa5a8.a31318","wires":[["23e299e.e960066"]]},{"id":"2364c25f.16e04e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1734.8093643188477,"y":3759.5385093688965,"z":"e4baa5a8.a31318","wires":[["c8da1d6e.45a7a","5a2be208.b22a9c","deb2167.63080e8","f568d578.388128","7ead2109.820b4"]]},{"id":"3d0c6fc4.e325","type":"for","name":"for each ip in ip-count","xml":"<for index='request-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' >\n","comments":"","outputs":1,"x":1533.142807006836,"y":3759.5401363372803,"z":"e4baa5a8.a31318","wires":[["2364c25f.16e04e"]]},{"id":"23e299e.e960066","type":"set","name":"set eipam data for level","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-name'\n   value='`$db.eipam-ip-subnet-keys[$level-index].key-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-value'\n   value='`$db.eipam-ip-subnet-keys[$level-index].key-value`' />\n","comments":"","x":2348.8571243286133,"y":3675.4918384552,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a2be208.b22a9c","type":"set","name":"set eipam data pools_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools_length'\n   value='`$db.eipam-ip-subnet-keys_length`' />\n","comments":"","x":1988.142677307129,"y":3721.2054557800293,"z":"e4baa5a8.a31318","wires":[]},{"id":"ac1085e3.f13938","type":"set","name":"set plans-index to 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":539.7619171142578,"y":3101.8717365264893,"z":"e4baa5a8.a31318","wires":[]},{"id":"1445f578.93789b","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":971.0952224731445,"y":4020.871983528137,"z":"e4baa5a8.a31318","wires":[]},{"id":"82b00d4f.93cbf","type":"set","name":"set eipam requests_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests_length'\n   value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' />\n","comments":"","x":1543.6191711425781,"y":3901.2055082321167,"z":"e4baa5a8.a31318","wires":[]},{"id":"c5ac535a.19e0c","type":"set","name":"set eipam plan-name, address-family","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].plan-name' value='`$selected-plan-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].address-family'\n   value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`' />\n","comments":"","x":1019.6666564941406,"y":3973.7284650802612,"z":"e4baa5a8.a31318","wires":[]},{"id":"319cf957.f6edb6","type":"set","name":"set eipam plans_length","xml":"<set>\n<parameter name='eipam-ip-block.plans_length' value='`$plans-index`' />\n","comments":"","x":543.4285697937012,"y":4045.919857978821,"z":"e4baa5a8.a31318","wires":[]},{"id":"c811246.d8ba4d8","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":511.5475769042969,"y":4917.2607316970825,"z":"e4baa5a8.a31318","wires":[]},{"id":"efa475b7.980ae8","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":515.8332824707031,"y":4776.990706443787,"z":"e4baa5a8.a31318","wires":[]},{"id":"a247b0d0.a589c","type":"set","name":"copy vf-module-topology data","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-topology.' value='tmp.vf-module-topology.' />\n","comments":"","x":560.7142868041992,"y":4728.776218414307,"z":"e4baa5a8.a31318","wires":[]},{"id":"f833ef67.9cf92","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />\n","comments":"","outputs":1,"x":506.42852783203125,"y":4869.49054813385,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"77ad7e3d.8e3ec","type":"execute","name":"call EIPAM assignIPAddress","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"assignIPAddress\">","comments":"","outputs":1,"x":923.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["9e574032.fe3cb"]]},{"id":"9e574032.fe3cb","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1137.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["6086477b.665d78"]]},{"id":"6086477b.665d78","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\t<parameter name=\"error-message\" value=\"An error occured while obtaining new address blocks from EIPAM.\" />\n","comments":"","x":1276.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[]},{"id":"deb2167.63080e8","type":"set","name":"set eipam client-key, mask","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].client-key'\n   value='`$generate-unique-name-output.generated-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].info'\n   value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].mask'\n   value='32' />\n","comments":"","x":1985.2857284545898,"y":3855.015483856201,"z":"e4baa5a8.a31318","wires":[]},{"id":"b87f9fec.9ac9e","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":523,"y":4244.252558708191,"z":"e4baa5a8.a31318","wires":[["9092afca.a3962"]]},{"id":"9092afca.a3962","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":731.6666831970215,"y":4244.252884864807,"z":"e4baa5a8.a31318","wires":[["6b702819.1ea7a8"]]},{"id":"6b702819.1ea7a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":996.6666717529297,"y":4245.919226646423,"z":"e4baa5a8.a31318","wires":[["83b69613.7b8da8"]]},{"id":"95db0874.7fa668","type":"set","name":"set plans-index = 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":529.9999923706055,"y":4189.252646446228,"z":"e4baa5a8.a31318","wires":[]},{"id":"98047ce0.4a6e9","type":"for","name":"for each eipam request","xml":"<for index='ip-index' start='0' end='`$eipam-ip-block.plans[$plans-index].requests_length`' >\n","comments":"","outputs":1,"x":1766.6666259765625,"y":4217.586531639099,"z":"e4baa5a8.a31318","wires":[["6f14c8cc.226b88"]]},{"id":"6f14c8cc.226b88","type":"set","name":"set ip address","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].network-ips.network-ip[$ip-index]'\n  value='`$eipam-ip-block.plans[$plans-index].requests[$ip-index].ip-prefix`' />\n","comments":"","x":1978.3332633972168,"y":4215.919702529907,"z":"e4baa5a8.a31318","wires":[]},{"id":"5aeee902.7037a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1566.6664581298828,"y":4242.586045265198,"z":"e4baa5a8.a31318","wires":[["98047ce0.4a6e9","a26fc3b8.56c3c"]]},{"id":"a26fc3b8.56c3c","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":1761.66650390625,"y":4264.252387046814,"z":"e4baa5a8.a31318","wires":[]},{"id":"3c8bd226.36546e","type":"save","name":"update vf-module","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=\"vf-module-name\" value=\"`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`\" />\n<parameter name=\"model-invariant-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vf-module-object-path`\" />\n","comments":"","outputs":1,"x":524.9999694824219,"y":4389.252729415894,"z":"e4baa5a8.a31318","wires":[["fb5d5bb7.763c78","e4f07aae.f62f88"]]},{"id":"d2a1fc69.961af","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":1018.3333969116211,"y":4442.585899353027,"z":"e4baa5a8.a31318","wires":[]},{"id":"fb5d5bb7.763c78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.3573303222656,"y":4356.204874038696,"z":"e4baa5a8.a31318","wires":[["383193dd.97ea3c"]]},{"id":"e4f07aae.f62f88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":702.9286842346191,"y":4418.823854446411,"z":"e4baa5a8.a31318","wires":[["bcf4c9e0.38f9c8"]]},{"id":"4c9452bf.c4605c","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":1029.3572845458984,"y":4374.348430633545,"z":"e4baa5a8.a31318","wires":[]},{"id":"a03bb466.634808","type":"set","name":"set vf-module-object-path","xml":"<set>\n<parameter name='vf-module-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-data.service-topology.service-topology-identifier.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n + '/vf-module-data/vf-module-topology/'`\"/>\n\n","comments":"","x":551.666633605957,"y":4314.252715110779,"z":"e4baa5a8.a31318","wires":[]},{"id":"c4679f1a.0f0a2","type":"save","name":"save vf-module relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n   resource=\"vf-module:relationship-list\"\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=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n    <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n    <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`\" />\n","comments":"","outputs":1,"x":984.3094787597656,"y":4517.975717544556,"z":"e4baa5a8.a31318","wires":[["adfe5f0b.ad89b","8c43d965.e517d8"]]},{"id":"adfe5f0b.ad89b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1209.1428108215332,"y":4478.847640037537,"z":"e4baa5a8.a31318","wires":[["be7ce494.4af018"]]},{"id":"8c43d965.e517d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1217.7142639160156,"y":4556.466782569885,"z":"e4baa5a8.a31318","wires":[["1b7e23d5.510b0c"]]},{"id":"fcd02140.3442a","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 relationships in AAI\" />\n","comments":"","x":1544.1429443359375,"y":4498.657536506653,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8307ef3.44142","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":525.3095092773438,"y":4519.642220497131,"z":"e4baa5a8.a31318","wires":[["51e803ad.53b7ac"]]},{"id":"51e803ad.53b7ac","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":735.9761867523193,"y":4517.976043701172,"z":"e4baa5a8.a31318","wires":[["c4679f1a.0f0a2"]]},{"id":"b89ddb3d.45f568","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":1545.9762382507324,"y":4573.642075538635,"z":"e4baa5a8.a31318","wires":[]},{"id":"a89d1a7f.ee0778","type":"set","name":"set ip-version 6, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n   value='6' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n   value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-count`' />\n","comments":"","x":1964.7857208251953,"y":2908.213849067688,"z":"e4baa5a8.a31318","wires":[]},{"id":"1eb5f5e8.6678ba","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1630.500114440918,"y":3155.356598854065,"z":"e4baa5a8.a31318","wires":[["565e7fcb.5478a"]]},{"id":"565e7fcb.5478a","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1800.5000267028809,"y":3153.928201675415,"z":"e4baa5a8.a31318","wires":[["b1e701d0.c2cbd"]]},{"id":"83b69613.7b8da8","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1237.642837524414,"y":4244.642521858215,"z":"e4baa5a8.a31318","wires":[["9fada909.4d9ca8"]]},{"id":"9fada909.4d9ca8","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1407.642749786377,"y":4243.214124679565,"z":"e4baa5a8.a31318","wires":[["5aeee902.7037a8"]]},{"id":"21f945ed.4703fa","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":524.309455871582,"y":4649.642714500427,"z":"e4baa5a8.a31318","wires":[["76ad141b.68002c"]]},{"id":"76ad141b.68002c","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":719.3094863891602,"y":4648.975722312927,"z":"e4baa5a8.a31318","wires":[["5ad6102c.c24c4"]]},{"id":"87d443e8.e1d8d","type":"save","name":"save VIPR_CONFIGURATION","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'Rackspace')\" >","comments":"","outputs":1,"x":1110.976188659668,"y":4671.643372535706,"z":"e4baa5a8.a31318","wires":[["87ac107d.fb4e7"]]},{"id":"cc126082.cba77","type":"comment","name":"Not a failure","info":"","comments":"","x":1630.976089477539,"y":4671.643377304077,"z":"e4baa5a8.a31318","wires":[]},{"id":"87ac107d.fb4e7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1320.976173400879,"y":4671.643522262573,"z":"e4baa5a8.a31318","wires":[["84e3208f.2bb34"]]},{"id":"84e3208f.2bb34","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1464.3096160888672,"y":4671.643360137939,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"7ead2109.820b4","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2074.3094940185547,"y":3809.641947746277,"z":"e4baa5a8.a31318","wires":[["b9a9e488.2e3ce8"]]},{"id":"b9a9e488.2e3ce8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2361.6905364990234,"y":3807.4993686676025,"z":"e4baa5a8.a31318","wires":[["f309c868.34d8b8"]]},{"id":"f568d578.388128","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='EIPAM_CLIENT_KEY_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CLIENT_KEY' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version + ':'`\" />\n<parameter name='generate-unique-name-input.index-length' value='' />\n","comments":"","x":2027.6428260803223,"y":3764.6421089172363,"z":"e4baa5a8.a31318","wires":[]},{"id":"f309c868.34d8b8","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=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2529.547649383545,"y":3806.9278802871704,"z":"e4baa5a8.a31318","wires":[]},{"id":"141da799.5b84c8","type":"switchNode","name":"switch ecomp-generated-naming == 'Y'","xml":"<switch test=\"$db.vfc-model.ecomp-generated-naming == 'Y'\">\n","comments":"","outputs":1,"x":1004.3095626831055,"y":2071.309280395508,"z":"e4baa5a8.a31318","wires":[["72f4c09e.079ae"]]},{"id":"72f4c09e.079ae","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1235.976173400879,"y":2070.3089113235474,"z":"e4baa5a8.a31318","wires":[["677921a6.61315"]]},{"id":"677921a6.61315","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=\"`'ECOMP generated naming is not Y for VFC customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1382.6429138183594,"y":2069.6423664093018,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8d62ff8.4b7f3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.3097381591797,"y":4622.975073814392,"z":"e4baa5a8.a31318","wires":[["9399828b.9d988"]]},{"id":"4f27d06f.de235","type":"comment","name":"Not a failure","info":"","comments":"","x":1817.6427917480469,"y":4621.308896064758,"z":"e4baa5a8.a31318","wires":[]},{"id":"9399828b.9d988","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1640.3096733093262,"y":4622.975707054138,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"5ad6102c.c24c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":887.642879486084,"y":4647.975566864014,"z":"e4baa5a8.a31318","wires":[["d3772815.3ee328","87d443e8.e1d8d"]]},{"id":"d3772815.3ee328","type":"delete","name":"delete any pre-existing records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n     AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n     AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >","comments":"","outputs":1,"x":1200.976203918457,"y":4623.309706687927,"z":"e4baa5a8.a31318","wires":[["f8d62ff8.4b7f3"]]},{"id":"5ded3d38.0d3994","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id\" >","comments":"","outputs":1,"x":2907.6429481506348,"y":4259.64261007309,"z":"e4baa5a8.a31318","wires":[["da3d0ab5.9d7b78"]]},{"id":"e1b11e58.18b71","type":"set","name":"set status variable","xml":"<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`\" />\n","comments":"","x":2777.642910003662,"y":4212.9759821891785,"z":"e4baa5a8.a31318","wires":[]},{"id":"da3d0ab5.9d7b78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3212.6428565979004,"y":4257.97590970993,"z":"e4baa5a8.a31318","wires":[["9eddaf67.b6c3a"]]},{"id":"9eddaf67.b6c3a","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 on rollback\" />\n","comments":"","x":3402.6428833007812,"y":4257.785645008087,"z":"e4baa5a8.a31318","wires":[]},{"id":"1f0f2297.a80cad","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":2842.6429176330566,"y":4304.642653942108,"z":"e4baa5a8.a31318","wires":[["764dc213.434fec"]]},{"id":"764dc213.434fec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3079.309543609619,"y":4304.642596721649,"z":"e4baa5a8.a31318","wires":[["d9d39111.ef82b"]]},{"id":"d9d39111.ef82b","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 in EIPAM unassign IP address on rollback\" />\n","comments":"","x":3269.3095703125,"y":4304.452332019806,"z":"e4baa5a8.a31318","wires":[]},{"id":"3972c7d8.e4e1b8","type":"comment","name":"roll back EIPAM","info":"","comments":"","x":2752.6429481506348,"y":4159.642935593923,"z":"e4baa5a8.a31318","wires":[]},{"id":"663bcdf3.7476b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2584.3095741271973,"y":4262.97610616684,"z":"e4baa5a8.a31318","wires":[["e1b11e58.18b71","5ded3d38.0d3994","1f0f2297.a80cad"]]},{"id":"383193dd.97ea3c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":852.6428985595703,"y":4355.975544929504,"z":"e4baa5a8.a31318","wires":[["4c9452bf.c4605c","f9222e19.45f49"]]},{"id":"bcf4c9e0.38f9c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":857.6428375244141,"y":4418.641888618469,"z":"e4baa5a8.a31318","wires":[["d2a1fc69.961af","f9222e19.45f49"]]},{"id":"be7ce494.4af018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.6428146362305,"y":4478.641909599304,"z":"e4baa5a8.a31318","wires":[["fcd02140.3442a","f9222e19.45f49"]]},{"id":"1b7e23d5.510b0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1372.642734527588,"y":4556.641750335693,"z":"e4baa5a8.a31318","wires":[["b89ddb3d.45f568","f9222e19.45f49"]]},{"id":"45ef9bd1.40c894","type":"set","name":"set vf-module-to-vfc-mapping length to 0","xml":"<set>\n<parameter name='db.vf-module-to-vfc-mapping_length' value='0' />\n","comments":"","x":1151.500099182129,"y":1904.9280138015747,"z":"e4baa5a8.a31318","wires":[]},{"id":"d5efedb2.7d60c","type":"set","name":"set vfc-to-network-role-mapping length to 0","xml":"<set>\n<parameter name='db.vfc-to-network-role-mapping_length' value='0' />\n","comments":"","x":1604.7857818603516,"y":2383.9280395507812,"z":"e4baa5a8.a31318","wires":[]},{"id":"4646e366.6582ec","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":540.5000762939453,"y":4135.356512069702,"z":"e4baa5a8.a31318","wires":[["aa74ce89.4fd3e"]]},{"id":"aa74ce89.4fd3e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":723.3572158813477,"y":4135.356721878052,"z":"e4baa5a8.a31318","wires":[["77ad7e3d.8e3ec"]]},{"id":"f9222e19.45f49","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":2231.6665000915527,"y":4262.261742115021,"z":"e4baa5a8.a31318","wires":[["2a6bae2e.123432"]]},{"id":"2a6bae2e.123432","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2414.523639678955,"y":4262.26195192337,"z":"e4baa5a8.a31318","wires":[["663bcdf3.7476b4"]]},{"id":"fc1913b.4d832f","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":520.6666145324707,"y":4088.92791557312,"z":"e4baa5a8.a31318","wires":[]}]