Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_network-topology-operation-unassign.json
index 3b887c6..5e4576a 100644 (file)
@@ -1 +1 @@
-[{"id":"6fc27e63.df644","type":"dgstart","name":"DGSTART","outputs":1,"x":211.66665649414062,"y":119.99999237060547,"z":"e6d3ce58.fa2c8","wires":[["6a69dde5.372664"]]},{"id":"6a69dde5.372664","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":286.9523620605469,"y":160.23810386657715,"z":"e6d3ce58.fa2c8","wires":[["6774371f.c72918"]]},{"id":"6774371f.c72918","type":"method","name":"network-topology-operation-unassign","xml":"<method rpc='network-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":328.3452911376953,"y":203.74998664855957,"z":"e6d3ce58.fa2c8","wires":[["3b010977.d25f36"]]},{"id":"3b010977.d25f36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":200.1667251586914,"y":450.94350242614746,"z":"e6d3ce58.fa2c8","wires":[["9367d2f0.ac7cd","dccbe93e.635408","5da52b9e.8ab724","8425d631.8915c8","1f202a24.17dfa6","31934beb.434534","2bf9b42d.37f73c","9f6002ee.2d44e","ea07e49d.c44d28","77c21435.c8c26c"]]},{"id":"9367d2f0.ac7cd","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":421.1746063232422,"y":1775.603003501892,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"dccbe93e.635408","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\">","comments":"","outputs":1,"x":429.7142791748047,"y":1671.23788356781,"z":"e6d3ce58.fa2c8","wires":[["1620a04e.1c095"]]},{"id":"5e0ac328.ccf85c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting network from AAI\" />\n\t","comments":"","x":824.0475883483887,"y":1673.23788356781,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1620a04e.1c095","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":639.909481048584,"y":1673.571216583252,"z":"e6d3ce58.fa2c8","wires":[["5e0ac328.ccf85c"]]},{"id":"ff693a96.e53918","type":"for","name":"for snidx..service-data.networks.network[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.nidx + 1`' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1351.5040588378906,"y":1534.4204578399658,"z":"e6d3ce58.fa2c8","wires":[["b6af5793.a513d8"]]},{"id":"34a42575.3d745a","type":"comment","name":"Remove network from service data","info":"","comments":"","x":518.9008865356445,"y":1440.849277496338,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1d9c15e4.8caeba","type":"set","name":"move network to remove one","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.newidx].\" value=\"$service-data.networks.network[$snidx].\" />\n\t\n","comments":"","x":1886.0950469970703,"y":1570.3015813827515,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5da52b9e.8ab724","type":"switchNode","name":"switch $service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":525.666618347168,"y":1388.8573188781738,"z":"e6d3ce58.fa2c8","wires":[["af4a3c9c.17fad","f60f5a83.183488"]]},{"id":"af4a3c9c.17fad","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":828.7142181396484,"y":1385.5238056182861,"z":"e6d3ce58.fa2c8","wires":[["f455e258.ce2b2"]]},{"id":"620ae252.136c7c","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.\" value=\"\"/>\n\n","comments":"","x":1261.333122253418,"y":1389.190631866455,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"f60f5a83.183488","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":795.0951690673828,"y":1537.857123374939,"z":"e6d3ce58.fa2c8","wires":[["5673f37.74a050c"]]},{"id":"b6af5793.a513d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1621.0950317382812,"y":1536.85710811615,"z":"e6d3ce58.fa2c8","wires":[["1d9c15e4.8caeba","c424b3c4.b893"]]},{"id":"1527854.67b9a7b","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\n\t\n","comments":"","x":1290.962890625,"y":1571.1906881332397,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1f202a24.17dfa6","type":"execute","name":"execute EIPAM deallocateAllSubnets","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateAllSubnets\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":526.6296844482422,"y":878.2963314056396,"z":"e6d3ce58.fa2c8","wires":[["cf30078e.ee1458"]]},{"id":"cf30078e.ee1458","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":758.6298065185547,"y":879.0198421478271,"z":"e6d3ce58.fa2c8","wires":[["5696f470.3c1d0c"]]},{"id":"5696f470.3c1d0c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnets in EIPAM.\" />\n\t","comments":"","x":914.6298065185547,"y":879.0198421478271,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"8425d631.8915c8","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$network-topology-operation-input.network-information.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n\t<parameter name=\"eipam-ip-block.entity-id\" value='' />","comments":"","x":544.0581588745117,"y":842.955403804779,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"31934beb.434534","type":"execute","name":"execute deletePoolByNetworkLevel for level 2 by network id","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":593.629638671875,"y":914.4815731048584,"z":"e6d3ce58.fa2c8","wires":[["ebe90e81.d5e8a"]]},{"id":"ebe90e81.d5e8a","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":893.2963409423828,"y":914.2049083709717,"z":"e6d3ce58.fa2c8","wires":[["8fc65822.231948"]]},{"id":"8fc65822.231948","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting level 2 plans in EIPAM.\" />\n\t","comments":"","x":1051.6297760009766,"y":914.5382900238037,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"b2717721.885438","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1270.8093566894531,"y":1609.1586332321167,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5673f37.74a050c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1017.0950469970703,"y":1537.857123374939,"z":"e6d3ce58.fa2c8","wires":[["ff693a96.e53918","b2717721.885438","1527854.67b9a7b","593f35c1.0cb4dc"]]},{"id":"e06cbad4.12aea8","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1277.6664962768555,"y":1423.894289970398,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"f455e258.ce2b2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1008.0475311279297,"y":1386.2276020050049,"z":"e6d3ce58.fa2c8","wires":[["620ae252.136c7c","e06cbad4.12aea8"]]},{"id":"ca1fe8d0.acb968","type":"comment","name":"deallocate level 2 subnet and pool","info":"","comments":"","x":510.7037048339844,"y":804.037260055542,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"2bf9b42d.37f73c","type":"get-resource","name":"get-resource - Get all subnet/subnet keys for networkid ","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.network_id = $network-topology-operation-input.network-information.network-id and s.entity_id = k.entity_id ; \"\n        pfx='tmp.eipam-subnet-row[]'>\n\n","comments":"","outputs":1,"x":600.9657363891602,"y":558.9896192550659,"z":"e6d3ce58.fa2c8","wires":[["4c03ccb1.83dfa4","51a9a0f7.ff71d","53e0949c.105acc"]]},{"id":"a0c6837c.97584","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1147.8705673217773,"y":562.0371742248535,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"4c03ccb1.83dfa4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":999.870719909668,"y":596.0371761322021,"z":"e6d3ce58.fa2c8","wires":[["14d18416.66a7ac"]]},{"id":"51a9a0f7.ff71d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":998.7325248718262,"y":561.7038660049438,"z":"e6d3ce58.fa2c8","wires":[["a0c6837c.97584"]]},{"id":"53e0949c.105acc","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1002.732551574707,"y":629.5372514724731,"z":"e6d3ce58.fa2c8","wires":[["f53c90ed.dd296"]]},{"id":"14d18416.66a7ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1147.492332458496,"y":596.1843366622925,"z":"e6d3ce58.fa2c8","wires":[["181b9ad1.935b45"]]},{"id":"cc99f629.56fc48","type":"comment","name":"Get all subnets for network","info":"","comments":"","x":515.9763031005859,"y":514.9048748016357,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"c424b3c4.b893","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":1835.7987670898438,"y":1532.1164503097534,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"a8da53.1ff3c5b","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":900.0845794677734,"y":1350.1165790557861,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"593f35c1.0cb4dc","type":"set","name":"Set new network length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\t\n\t\n","comments":"","x":1293.7987670898438,"y":1504.1165075302124,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"769c8ef5.20813","type":"get-resource","name":"get-resource - Determine if level 1 in use in other level 2 subnets","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n        WHERE p.level = 2 \n        and p.plan_name = $tmp.plan-name\n        and k.level = 1 \n        and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n        and k.key_value = $tmp.level1-key-value  ; \"\n        pfx='tmp.level2pool[]'>\n\n\n\n","comments":"","outputs":1,"x":2889.1427154541016,"y":1316.1908049583435,"z":"e6d3ce58.fa2c8","wires":[["d19663a0.372ea","35b0a814.7ff6f8","cefed4e1.edee88"]]},{"id":"b6da7ef4.53354","type":"comment","name":"Determine if any other level 2 pool is using level 1 pool","info":"","comments":"","x":567.3809814453125,"y":1087.5239009857178,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"3055bb43.ba84e4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":3367.380699157715,"y":1313.6192660331726,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"35b0a814.7ff6f8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3219.380790710449,"y":1347.6192660331726,"z":"e6d3ce58.fa2c8","wires":[["41518681.495688"]]},{"id":"d19663a0.372ea","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3218.2425956726074,"y":1313.2859559059143,"z":"e6d3ce58.fa2c8","wires":[["3055bb43.ba84e4"]]},{"id":"cefed4e1.edee88","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":3223.909267425537,"y":1380.285921573639,"z":"e6d3ce58.fa2c8","wires":[["c76a8907.a34918"]]},{"id":"41518681.495688","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3381.2883644104004,"y":1346.3380432128906,"z":"e6d3ce58.fa2c8","wires":[["72cfd522.7f4c2c"]]},{"id":"f53c90ed.dd296","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1151.500244140625,"y":630.1668291091919,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"563ca4c8.52338c","type":"switchNode","name":"switch level1poolkeyvalue","xml":"<switch test='`$tmp.level1-key-value`'>\n","comments":"","outputs":1,"x":913.0953674316406,"y":1159.3811874389648,"z":"e6d3ce58.fa2c8","wires":[["b37602d8.cd2a8","9a159b72.b21bf8"]]},{"id":"9a159b72.b21bf8","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1168.0000648498535,"y":1165.3335418701172,"z":"e6d3ce58.fa2c8","wires":[["990e2ddf.e26ba"]]},{"id":"b37602d8.cd2a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1171.3335456848145,"y":1208.4287815093994,"z":"e6d3ce58.fa2c8","wires":[["ea364a04.764748"]]},{"id":"9f6002ee.2d44e","type":"set","name":"set prerequisites","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"\"/>\n\t<parameter name=\"tmp.level1inuse\" value=\"false\" />\n\t<parameter name=\"pidx\" value=\"0\" />\n\t<parameter name=\"pidx-len\" value=\"0\" />\n\t\n","comments":"","x":476.83348846435547,"y":386.16670989990234,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"ea364a04.764748","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1334.0478223164878,"y":1208.8097178141277,"z":"e6d3ce58.fa2c8","wires":[["76e440dc.55429"]]},{"id":"c76a8907.a34918","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3377.047306060791,"y":1379.619264125824,"z":"e6d3ce58.fa2c8","wires":[["60c91be.c368ce4"]]},{"id":"72cfd522.7f4c2c","type":"set","name":"set level1inuse = true","xml":"<set>\n\t<parameter name=\"tmp.level1inuse\" value=\"true\" />\n\t\n","comments":"","x":3617.7615509033203,"y":1346.1906471252441,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"60c91be.c368ce4","type":"get-resource","name":"get-resource - Get level 1 pool and subnet","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n        WHERE p.level = 1 \n        and p.plan_name = $tmp.plan-name\n        and k.level = 1 \n        and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n        and k.key_value = $tmp.level1-key-value  ; \"\n        pfx='tmp.level1pool[]'>\n\n","comments":"","outputs":1,"x":3685.5022468566895,"y":1404.8572969436646,"z":"e6d3ce58.fa2c8","wires":[["625791ca.98209","fea9576b.0b8778","eed682f1.7be6"]]},{"id":"cbfd3973.515b08","type":"comment","name":"Try to clean up the level 1 pool","info":"","comments":"","x":3644.761417388916,"y":1375.8203229904175,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"82dc834a.951ef","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":4131.190410614014,"y":1370.582124710083,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"fea9576b.0b8778","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3983.190502166748,"y":1404.582124710083,"z":"e6d3ce58.fa2c8","wires":[["a6a5ea1b.29fbb8"]]},{"id":"625791ca.98209","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3979.0523071289062,"y":1373.2488145828247,"z":"e6d3ce58.fa2c8","wires":[["82dc834a.951ef"]]},{"id":"eed682f1.7be6","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":3986.052318572998,"y":1440.582124710083,"z":"e6d3ce58.fa2c8","wires":[["7b1dce7d.fb116"]]},{"id":"a6a5ea1b.29fbb8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4130.812114715576,"y":1404.7292852401733,"z":"e6d3ce58.fa2c8","wires":[["c09043c3.8f797"]]},{"id":"7b1dce7d.fb116","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4142.190372467041,"y":1439.9154510498047,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"ddface0d.c9495","type":"execute","name":"execute EIPAM deallocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4847.566329956055,"y":1437.222445487976,"z":"e6d3ce58.fa2c8","wires":[["e40c8d06.d4c8a"]]},{"id":"e40c8d06.d4c8a","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5081.566257476807,"y":1436.6128482818604,"z":"e6d3ce58.fa2c8","wires":[["32450237.7b326e"]]},{"id":"32450237.7b326e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnet in EIPAM.\" />\n\t","comments":"","x":5250.566287994385,"y":1436.6128787994385,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"10424d8a.e25d82","type":"set","name":"set","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='`$tmp.level1pool[$lidx].entity-id`' />\n<parameter name='eipam-ip-block.ip-address' value='`$tmp.level1pool[$lidx].ip-address`' />\n<parameter name='eipam-ip-block.mask' value='`$tmp.level1pool[$lidx].prefix-length`' />\n<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.level1pool[$lidx].network-id`\" />\n<parameter name=\"eipam-ip-block.pool-id\" value=\"`$tmp.level1pool[$lidx].pool-id`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n\n","comments":"","x":4767.566165924072,"y":1407.2224645614624,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"c09043c3.8f797","type":"for","name":"for lidx .. level1pool_length","xml":"<for silentFailure='true' index='lidx' start='0' end='`$tmp.level1pool_length`' >\n","comments":"","outputs":1,"x":4340.581939697266,"y":1405.9365863800049,"z":"e6d3ce58.fa2c8","wires":[["9f0474be.521c98"]]},{"id":"8996414e.07646","type":"execute","name":"execute EIPAM deletePoolByNetworkLevel","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4876.0322265625,"y":1536.508228302002,"z":"e6d3ce58.fa2c8","wires":[["5edc86b0.053708"]]},{"id":"5edc86b0.053708","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5148.603260040283,"y":1526.2318725585938,"z":"e6d3ce58.fa2c8","wires":[["1987167a.d664ba"]]},{"id":"1987167a.d664ba","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5291.413055419922,"y":1524.0414810180664,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"9f0474be.521c98","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4563.248825073242,"y":1406.0476474761963,"z":"e6d3ce58.fa2c8","wires":[["10424d8a.e25d82","ddface0d.c9495","6a4eeffe.8b70f"]]},{"id":"47658288.8bc70c","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":2165.529266357422,"y":1242.2754878997803,"z":"e6d3ce58.fa2c8","wires":[["10367136.0cd76f"]]},{"id":"10367136.0cd76f","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2372.243621826172,"y":1242.7039947509766,"z":"e6d3ce58.fa2c8","wires":[["465bb5a9.3433ac"]]},{"id":"99b561a2.7e8d5","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":2168.465835571289,"y":1281.5611591339111,"z":"e6d3ce58.fa2c8","wires":[["bc9e64a1.aec018"]]},{"id":"bc9e64a1.aec018","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2380.4182319641113,"y":1280.322937965393,"z":"e6d3ce58.fa2c8","wires":[["7bfdd186.4b7d"]]},{"id":"90b2471d.61bb28","type":"set","name":"set tmp.plan-name v4","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v4-address-plan`' />\n\n","comments":"","x":2758.0215377807617,"y":1245.0372776985168,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"92f5da7c.e52b38","type":"set","name":"set tmp.plan-name v6","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v6-address-plan`' />\n\n","comments":"","x":2756.9579849243164,"y":1281.3230781555176,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"465bb5a9.3433ac","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2533.624641418457,"y":1244.9738402366638,"z":"e6d3ce58.fa2c8","wires":[["90b2471d.61bb28","769c8ef5.20813"]]},{"id":"7bfdd186.4b7d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2541.0848693847656,"y":1286.4024066925049,"z":"e6d3ce58.fa2c8","wires":[["92f5da7c.e52b38","769c8ef5.20813"]]},{"id":"ea07e49d.c44d28","type":"get-resource","name":"get-resource NETWORK_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $service-data.networks.network[$nidx].network-data.network-information.onap-model-information.model-customization-uuid\n  and service_uuid = $service-data.networks.network[$nidx].network-data.service-information.onap-model-information.model-uuid'\n  pfx='network-model'>\n\n","comments":"","outputs":1,"x":533.5000381469727,"y":356.49999618530273,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"31dbc2d1.6c75ce","type":"comment","name":"Pull in network model as it is needed for level 1 removal","info":"","comments":"","x":716.6666412353516,"y":104.9999942779541,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"76e440dc.55429","type":"switchNode","name":"switch network-model","xml":"<switch test='`$network-model`'>\n","comments":"","outputs":1,"x":1547.0370953877768,"y":1209.0954424540203,"z":"e6d3ce58.fa2c8","wires":[["baf3d319.da1aa","ea8854e.ae0bca8"]]},{"id":"baf3d319.da1aa","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1745.0373090108237,"y":1196.7621285120647,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"ea8854e.ae0bca8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1743.3704846700034,"y":1231.7620493570964,"z":"e6d3ce58.fa2c8","wires":[["b6b1ecbb.608a6"]]},{"id":"b6b1ecbb.608a6","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1911.7037963867188,"y":1240.3335638046265,"z":"e6d3ce58.fa2c8","wires":[["47658288.8bc70c","99b561a2.7e8d5"]]},{"id":"990e2ddf.e26ba","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1342.629726409912,"y":1164.6668338775635,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"26c77134.bb304e","type":"comment","name":"Get tosca network data","info":"","comments":"","x":494.8000030517578,"y":320.00000953674316,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"3738319f.dac18e","type":"comment","name":"1707 - remove call to AAI for subnets","info":"","comments":"","x":539.6571578979492,"y":417.7142868041992,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"181b9ad1.935b45","type":"for","name":"for 0..subnet-row-length","xml":"<for silentFailure='true' index='esidx' start='0' end='`$tmp.eipam-subnet-row_length`' >\n","comments":"","outputs":1,"x":572.799919128418,"y":716.0001192092896,"z":"e6d3ce58.fa2c8","wires":[["5675ba2a.a19eb4"]]},{"id":"5675ba2a.a19eb4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":797.4666213989258,"y":716.142879486084,"z":"e6d3ce58.fa2c8","wires":[["933440ac.3bb5c"]]},{"id":"933440ac.3bb5c","type":"switchNode","name":"switch level","xml":"<switch test='`$tmp.eipam-subnet-row[$esidx].level`'>\n","comments":"","outputs":1,"x":991.4666290283203,"y":717.4815645217896,"z":"e6d3ce58.fa2c8","wires":[["2dd2061b.14feea","1dd6c81e.b58788"]]},{"id":"2dd2061b.14feea","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1163.1332473754883,"y":715.4815626144409,"z":"e6d3ce58.fa2c8","wires":[["be2d994e.39d748"]]},{"id":"be2d994e.39d748","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1346.4667129516602,"y":713.8148784637451,"z":"e6d3ce58.fa2c8","wires":[["e6b6bab1.c5dc08","97386b74.6dc3d8","5b35da26.7674b4","1cf42296.65b5ad"]]},{"id":"e6b6bab1.c5dc08","type":"set","name":"set level 1 key value","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].key-value`\"/>\n\n\t\n","comments":"","x":1562.3711738586426,"y":654.9577598571777,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1dd6c81e.b58788","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1154.800033569336,"y":750.4815444946289,"z":"e6d3ce58.fa2c8","wires":[["7bbe227c.493acc"]]},{"id":"7bbe227c.493acc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1346.4667129516602,"y":748.8148784637451,"z":"e6d3ce58.fa2c8","wires":[[]]},{"id":"97386b74.6dc3d8","type":"set","name":"increment pidx_len","xml":"<set>\n\t<parameter name=\"pidx\" value=\"`$pidx + 1`\"/>\n\n\t\n","comments":"","x":1559.3715286254883,"y":712.8571500778198,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"77c21435.c8c26c","type":"for","name":"for 0 ... level 1 length","xml":"<for silentFailure='true' index='npidx' start='0' end='`$pidx-len`' >\n","comments":"","outputs":1,"x":472.8571319580078,"y":1129.999997138977,"z":"e6d3ce58.fa2c8","wires":[["d8f81bee.ac72d8"]]},{"id":"d8f81bee.ac72d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":690.8571376800537,"y":1130.999997138977,"z":"e6d3ce58.fa2c8","wires":[["563ca4c8.52338c","2ed54557.59eeca"]]},{"id":"2ed54557.59eeca","type":"set","name":"set level 1 key value/plan name","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"`$tmp.level1-key-value[$npidx]`\" />\n\t<parameter name=\"tmp.plan-name\" value=\"`$tmp.plan-name[$npidx]`\" />\n\t\n","comments":"","x":928.8571166992188,"y":1127.999963760376,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"5b35da26.7674b4","type":"set","name":"set level 1 plan_name","xml":"<set>\n\t<parameter name=\"tmp.plan-name[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].plan-name`\"/>\n\n\t\n","comments":"","x":1566.5714836120605,"y":681.4285335540771,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"6a4eeffe.8b70f","type":"execute","name":"execute EIPAM deletePoolByPoolId","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByPoolId\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":4831.714248657227,"y":1471.4286003112793,"z":"e6d3ce58.fa2c8","wires":[["84b97cc7.29b2c"]]},{"id":"84b97cc7.29b2c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5077.142574310303,"y":1471.152198791504,"z":"e6d3ce58.fa2c8","wires":[["821a1504.8a0b48"]]},{"id":"821a1504.8a0b48","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5272.809608459473,"y":1473.2474827766418,"z":"e6d3ce58.fa2c8","wires":[]},{"id":"1cf42296.65b5ad","type":"set","name":"set length","xml":"<set>\n\t<parameter name=\"pidx-len\" value=\"`$pidx`\"/>\n\n\t\n","comments":"","x":1530.0000457763672,"y":736.0000219345093,"z":"e6d3ce58.fa2c8","wires":[]}]
+[{"id":"dc1fd9f7.e545a","type":"dgstart","name":"DGSTART","outputs":1,"x":139.75,"y":101,"z":"43f4c62f.1fd828","wires":[["29d91179.d10066"]]},{"id":"29d91179.d10066","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":262.81348419189453,"y":170.1269941329956,"z":"43f4c62f.1fd828","wires":[["49549099.2e383"]]},{"id":"49549099.2e383","type":"method","name":"network-topology-operation-unassign","xml":"<method rpc='network-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":271.9841995239258,"y":240.30553722381592,"z":"43f4c62f.1fd828","wires":[["6e94f27d.431264"]]},{"id":"db751f4b.8bc6f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":692.3612060546875,"y":603.6102905273438,"z":"43f4c62f.1fd828","wires":[["b5959608.819dc","a9cd0431.02027","b831e5ee.39b4b","d4cc2b91.b17998","b49913b8.cc5d68","a0bc945f.3b13","159c2061.38289","fc63ae25.4fe498","20e1b7e2.ee7b28","d7820e90.66544","64ac2528.ce87c4"]]},{"id":"bb84b390.807d6","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":357.5635795593262,"y":2815.964029312134,"z":"43f4c62f.1fd828","wires":[]},{"id":"b5959608.819dc","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\">","comments":"","outputs":1,"x":918.9087104797363,"y":1814.4601831436157,"z":"43f4c62f.1fd828","wires":[["39138b.122efc76"]]},{"id":"c4c50a60.6fe508","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting network from AAI\" />\n\t","comments":"","x":1313.2420196533203,"y":1816.4601831436157,"z":"43f4c62f.1fd828","wires":[]},{"id":"39138b.122efc76","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1129.1039123535156,"y":1816.7935161590576,"z":"43f4c62f.1fd828","wires":[["c4c50a60.6fe508"]]},{"id":"c1b46a5.3ad0698","type":"for","name":"for snidx..service-data.networks.network[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.nidx + 1`' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1840.6984901428223,"y":1677.6427574157715,"z":"43f4c62f.1fd828","wires":[["f1368ca.0c41e7"]]},{"id":"52743f74.cd7f88","type":"comment","name":"Remove network from service data","info":"","comments":"","x":1008.0953178405762,"y":1584.0715770721436,"z":"43f4c62f.1fd828","wires":[]},{"id":"91f7b863.62686","type":"set","name":"move network to remove one","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.newidx].\" value=\"$service-data.networks.network[$snidx].\" />\n\t\n","comments":"","x":2375.289478302002,"y":1713.5238809585571,"z":"43f4c62f.1fd828","wires":[]},{"id":"64ac2528.ce87c4","type":"switchNode","name":"switch $service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1014.8610496520996,"y":1532.0796184539795,"z":"43f4c62f.1fd828","wires":[["877ea6c5.d00cc8","491f62c3.47b664"]]},{"id":"877ea6c5.d00cc8","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1317.90864944458,"y":1528.7461051940918,"z":"43f4c62f.1fd828","wires":[["77c99a31.b5dc74"]]},{"id":"b14d5cee.e40bf","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.\" value=\"\"/>\n\n","comments":"","x":1750.5275535583496,"y":1532.4129314422607,"z":"43f4c62f.1fd828","wires":[]},{"id":"491f62c3.47b664","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1284.2896003723145,"y":1681.0794229507446,"z":"43f4c62f.1fd828","wires":[["34b7d009.cae53"]]},{"id":"f1368ca.0c41e7","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2110.289463043213,"y":1680.0794076919556,"z":"43f4c62f.1fd828","wires":[["91f7b863.62686","4e5d0ca9.9cff1c"]]},{"id":"6287f892.a7d6e8","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\n\t\n","comments":"","x":1780.1573219299316,"y":1714.4129877090454,"z":"43f4c62f.1fd828","wires":[]},{"id":"b831e5ee.39b4b","type":"execute","name":"execute EIPAM deallocateAllSubnets","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateAllSubnets\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":1015.8241157531738,"y":1021.5186309814453,"z":"43f4c62f.1fd828","wires":[["fe7dd50e.50b1b8"]]},{"id":"fe7dd50e.50b1b8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1247.8242378234863,"y":1022.2421417236328,"z":"43f4c62f.1fd828","wires":[["3dc54850.44d7e"]]},{"id":"3dc54850.44d7e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnets in EIPAM.\" />\n\t","comments":"","x":1403.8242378234863,"y":1022.2421417236328,"z":"43f4c62f.1fd828","wires":[]},{"id":"a9cd0431.02027","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$network-topology-operation-input.network-information.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n\t<parameter name=\"eipam-ip-block.entity-id\" value='' />","comments":"","x":1033.2525901794434,"y":986.1777033805847,"z":"43f4c62f.1fd828","wires":[]},{"id":"d4cc2b91.b17998","type":"execute","name":"execute deletePoolByNetworkLevel for level 2 by network id","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":1082.8240699768066,"y":1057.703872680664,"z":"43f4c62f.1fd828","wires":[["431c3027.950d4"]]},{"id":"431c3027.950d4","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1382.4907722473145,"y":1057.4272079467773,"z":"43f4c62f.1fd828","wires":[["7766f8e4.72bcf"]]},{"id":"7766f8e4.72bcf","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting level 2 plans in EIPAM.\" />\n\t","comments":"","x":1540.8242073059082,"y":1057.7605895996094,"z":"43f4c62f.1fd828","wires":[]},{"id":"202f4938.e9bb06","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1760.0037879943848,"y":1752.3809328079224,"z":"43f4c62f.1fd828","wires":[]},{"id":"34b7d009.cae53","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1506.289478302002,"y":1681.0794229507446,"z":"43f4c62f.1fd828","wires":[["c1b46a5.3ad0698","202f4938.e9bb06","6287f892.a7d6e8","be2bd733.43ad18"]]},{"id":"b1c24f6a.90d3b8","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1766.860927581787,"y":1567.1165895462036,"z":"43f4c62f.1fd828","wires":[]},{"id":"77c99a31.b5dc74","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1497.2419624328613,"y":1529.4499015808105,"z":"43f4c62f.1fd828","wires":[["b14d5cee.e40bf","b1c24f6a.90d3b8"]]},{"id":"11c9fd9f.70f48a","type":"comment","name":"deallocate level 2 subnet and pool","info":"","comments":"","x":999.898136138916,"y":947.2595596313477,"z":"43f4c62f.1fd828","wires":[]},{"id":"b49913b8.cc5d68","type":"get-resource","name":"get-resource - Get all subnet/subnet keys for networkid ","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k WHERE s.network_id = $network-topology-operation-input.network-information.network-id and s.entity_id = k.entity_id ; \"\n        pfx='tmp.eipam-subnet-row[]'>\n\n","comments":"","outputs":1,"x":1093.4100799560547,"y":749.7119550704956,"z":"43f4c62f.1fd828","wires":[["609405ca.620c74","d8933947.ba4db8","63b4e541.5c11d4"]]},{"id":"4fddabef.34ea4c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1637.064998626709,"y":705.2594738006592,"z":"43f4c62f.1fd828","wires":[]},{"id":"609405ca.620c74","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1489.0651512145996,"y":739.2594757080078,"z":"43f4c62f.1fd828","wires":[["1f55d1ef.bd829e"]]},{"id":"d8933947.ba4db8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1487.9269561767578,"y":704.9261655807495,"z":"43f4c62f.1fd828","wires":[["4fddabef.34ea4c"]]},{"id":"63b4e541.5c11d4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1491.9269828796387,"y":772.7595510482788,"z":"43f4c62f.1fd828","wires":[["2bbe7112.620d8e"]]},{"id":"1f55d1ef.bd829e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1636.6867637634277,"y":739.4066362380981,"z":"43f4c62f.1fd828","wires":[["c65a88e5.41739"]]},{"id":"54f0e170.71356","type":"comment","name":"Get all subnets for network","info":"","comments":"","x":1007.1706466674805,"y":703.1271800994873,"z":"43f4c62f.1fd828","wires":[]},{"id":"4e5d0ca9.9cff1c","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":2324.9931983947754,"y":1675.338749885559,"z":"43f4c62f.1fd828","wires":[]},{"id":"a014a1fe.f199a","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":1389.279010772705,"y":1493.3388786315918,"z":"43f4c62f.1fd828","wires":[]},{"id":"be2bd733.43ad18","type":"set","name":"Set new network length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\t\n\t\n","comments":"","x":1782.9931983947754,"y":1647.338807106018,"z":"43f4c62f.1fd828","wires":[]},{"id":"1ab45d14.8c0033","type":"get-resource","name":"get-resource - Determine if level 1 in use in other level 2 subnets","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n        WHERE p.level = 2 \n        and p.plan_name = $tmp.plan-name\n        and k.level = 1 \n        and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n        and k.key_value = $tmp.level1-key-value  ; \"\n        pfx='tmp.level2pool[]'>\n\n\n\n","comments":"","outputs":1,"x":3378.337146759033,"y":1459.4131045341492,"z":"43f4c62f.1fd828","wires":[["12bcde76.3cbb42","96958e60.5e2e","ae137af0.c6bed"]]},{"id":"7550ea17.f11994","type":"comment","name":"Determine if any other level 2 pool is using level 1 pool","info":"","comments":"","x":1056.5754127502441,"y":1230.7462005615234,"z":"43f4c62f.1fd828","wires":[]},{"id":"c4d31580.52b668","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":3856.5751304626465,"y":1456.8415656089783,"z":"43f4c62f.1fd828","wires":[]},{"id":"96958e60.5e2e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3708.575222015381,"y":1490.8415656089783,"z":"43f4c62f.1fd828","wires":[["521167e9.af1568"]]},{"id":"12bcde76.3cbb42","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3707.437026977539,"y":1456.50825548172,"z":"43f4c62f.1fd828","wires":[["c4d31580.52b668"]]},{"id":"ae137af0.c6bed","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":3713.1036987304688,"y":1523.5082211494446,"z":"43f4c62f.1fd828","wires":[["21d00080.5d0aa8"]]},{"id":"521167e9.af1568","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3870.482795715332,"y":1489.5603427886963,"z":"43f4c62f.1fd828","wires":[["f2b691d4.b440f"]]},{"id":"2bbe7112.620d8e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1640.6946754455566,"y":773.3891286849976,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"d14d4fa5.24ff3","type":"switchNode","name":"switch level1poolkeyvalue","xml":"<switch test='`$tmp.level1-key-value`'>\n","comments":"","outputs":1,"x":1402.2897987365723,"y":1302.6034870147705,"z":"43f4c62f.1fd828","wires":[["3f7110a3.27c0f","1ea7f701.55ede1"]]},{"id":"1ea7f701.55ede1","type":"outcome","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1657.1944961547852,"y":1308.5558414459229,"z":"43f4c62f.1fd828","wires":[["440a027.2d0cffc"]]},{"id":"3f7110a3.27c0f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1660.527976989746,"y":1351.651081085205,"z":"43f4c62f.1fd828","wires":[["9213f8b5.3fb228"]]},{"id":"a0bc945f.3b13","type":"set","name":"set prerequisites","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"\"/>\n\t<parameter name=\"tmp.level1inuse\" value=\"false\" />\n\t<parameter name=\"pidx\" value=\"0\" />\n\t<parameter name=\"pidx-len\" value=\"0\" />\n\t\n","comments":"","x":973.02783203125,"y":629.3890380859375,"z":"43f4c62f.1fd828","wires":[]},{"id":"9213f8b5.3fb228","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1823.2422536214194,"y":1352.0320173899333,"z":"43f4c62f.1fd828","wires":[["ee89ef7d.859c6"]]},{"id":"21d00080.5d0aa8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":3866.2417373657227,"y":1522.8415637016296,"z":"43f4c62f.1fd828","wires":[["92cb3670.2c1918"]]},{"id":"f2b691d4.b440f","type":"set","name":"set level1inuse = true","xml":"<set>\n\t<parameter name=\"tmp.level1inuse\" value=\"true\" />\n\t\n","comments":"","x":4106.955982208252,"y":1489.4129467010498,"z":"43f4c62f.1fd828","wires":[]},{"id":"92cb3670.2c1918","type":"get-resource","name":"get-resource - Get level 1 pool and subnet","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * from EIPAM_IP_POOLS p, EIPAM_IP_SUBNETS s, EIPAM_IP_SUBNET_KEYS k \n        WHERE p.level = 1 \n        and p.plan_name = $tmp.plan-name\n        and k.level = 1 \n        and p.pool_id = s.pool_id and s.entity_id = k.entity_id \n        and k.key_value = $tmp.level1-key-value  ; \"\n        pfx='tmp.level1pool[]'>\n\n","comments":"","outputs":1,"x":4174.696678161621,"y":1548.0795965194702,"z":"43f4c62f.1fd828","wires":[["211ddee7.6afc7a","2a705d08.95934a","b65babea.9af9e8"]]},{"id":"b7ebad3c.fdff58","type":"comment","name":"Try to clean up the level 1 pool","info":"","comments":"","x":4133.955848693848,"y":1519.0426225662231,"z":"43f4c62f.1fd828","wires":[]},{"id":"800c78ee.3f475","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":4620.384841918945,"y":1513.8044242858887,"z":"43f4c62f.1fd828","wires":[]},{"id":"2a705d08.95934a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":4472.38493347168,"y":1547.8044242858887,"z":"43f4c62f.1fd828","wires":[["194ffcf4.22c8cb"]]},{"id":"211ddee7.6afc7a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4468.246738433838,"y":1516.4711141586304,"z":"43f4c62f.1fd828","wires":[["800c78ee.3f475"]]},{"id":"b65babea.9af9e8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":4475.24674987793,"y":1583.8044242858887,"z":"43f4c62f.1fd828","wires":[["5aa36081.447ee"]]},{"id":"194ffcf4.22c8cb","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4620.006546020508,"y":1547.951584815979,"z":"43f4c62f.1fd828","wires":[["cb941085.f5e398"]]},{"id":"5aa36081.447ee","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":4631.384803771973,"y":1583.1377506256104,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"ce0bf737.56534","type":"execute","name":"execute EIPAM deallocateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deallocateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":5336.760761260986,"y":1580.4447450637817,"z":"43f4c62f.1fd828","wires":[["3491152b.cc5692"]]},{"id":"3491152b.cc5692","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5570.760688781738,"y":1579.835147857666,"z":"43f4c62f.1fd828","wires":[["c1d0112a.1c407"]]},{"id":"c1d0112a.1c407","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deallocating subnet in EIPAM.\" />\n\t","comments":"","x":5739.760719299316,"y":1579.8351783752441,"z":"43f4c62f.1fd828","wires":[]},{"id":"f5f8ebf2.ab7f08","type":"set","name":"set","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='`$tmp.level1pool[$lidx].entity-id`' />\n<parameter name='eipam-ip-block.ip-address' value='`$tmp.level1pool[$lidx].ip-address`' />\n<parameter name='eipam-ip-block.mask' value='`$tmp.level1pool[$lidx].prefix-length`' />\n<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.level1pool[$lidx].network-id`\" />\n<parameter name=\"eipam-ip-block.pool-id\" value=\"`$tmp.level1pool[$lidx].pool-id`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n\n","comments":"","x":5256.760597229004,"y":1550.444764137268,"z":"43f4c62f.1fd828","wires":[]},{"id":"cb941085.f5e398","type":"for","name":"for lidx .. level1pool_length","xml":"<for silentFailure='true' index='lidx' start='0' end='`$tmp.level1pool_length`' >\n","comments":"","outputs":1,"x":4829.776371002197,"y":1549.1588859558105,"z":"43f4c62f.1fd828","wires":[["f16231fb.4b1f3"]]},{"id":"eebfb239.346a08","type":"execute","name":"execute EIPAM deletePoolByNetworkLevel","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByNetworkLevel\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":5365.226657867432,"y":1679.7305278778076,"z":"43f4c62f.1fd828","wires":[["68f38914.d2e988"]]},{"id":"68f38914.d2e988","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5637.797691345215,"y":1669.4541721343994,"z":"43f4c62f.1fd828","wires":[["9f70667e.99cb78"]]},{"id":"9f70667e.99cb78","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5780.6074867248535,"y":1667.263780593872,"z":"43f4c62f.1fd828","wires":[]},{"id":"f16231fb.4b1f3","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":5052.443256378174,"y":1549.269947052002,"z":"43f4c62f.1fd828","wires":[["f5f8ebf2.ab7f08","ce0bf737.56534","d3591315.886188"]]},{"id":"902b0baa.add328","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":2654.7236976623535,"y":1385.497787475586,"z":"43f4c62f.1fd828","wires":[["9ca2c4c3.60ee2"]]},{"id":"9ca2c4c3.60ee2","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2861.4380531311035,"y":1385.9262943267822,"z":"43f4c62f.1fd828","wires":[["65be9681.293558"]]},{"id":"fc3d633d.a705b8","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":2657.6602668762207,"y":1424.7834587097168,"z":"43f4c62f.1fd828","wires":[["feb0dea0.adbff"]]},{"id":"feb0dea0.adbff","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2869.612663269043,"y":1423.5452375411987,"z":"43f4c62f.1fd828","wires":[["3c2a3e53.94df92"]]},{"id":"5f18e2e5.85f2bc","type":"set","name":"set tmp.plan-name v4","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v4-address-plan`' />\n\n","comments":"","x":3247.2159690856934,"y":1388.2595772743225,"z":"43f4c62f.1fd828","wires":[]},{"id":"52b1683d.fe8c8","type":"set","name":"set tmp.plan-name v6","xml":"<set>\n<parameter name='tmp.plan-name' value='`$network-model.eipam-v6-address-plan`' />\n\n","comments":"","x":3246.152416229248,"y":1424.5453777313232,"z":"43f4c62f.1fd828","wires":[]},{"id":"65be9681.293558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3022.8190727233887,"y":1388.1961398124695,"z":"43f4c62f.1fd828","wires":[["5f18e2e5.85f2bc","1ab45d14.8c0033"]]},{"id":"3c2a3e53.94df92","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3030.2793006896973,"y":1429.6247062683105,"z":"43f4c62f.1fd828","wires":[["52b1683d.fe8c8","1ab45d14.8c0033"]]},{"id":"159c2061.38289","type":"get-resource","name":"get-resource NETWORK_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $service-data.networks.network[$nidx].network-data.network-information.onap-model-information.model-customization-uuid\n  and service_uuid = $service-data.networks.network[$nidx].network-data.service-information.onap-model-information.model-uuid'\n  pfx='network-model'>\n\n","comments":"","outputs":1,"x":1029.6943817138672,"y":599.7223243713379,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"ee89ef7d.859c6","type":"switchNode","name":"switch network-model","xml":"<switch test='`$network-model`'>\n","comments":"","outputs":1,"x":2036.2315266927085,"y":1352.317742029826,"z":"43f4c62f.1fd828","wires":[["c633bb67.5d953","88f3bac5.fb0368"]]},{"id":"c633bb67.5d953","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2234.2317403157554,"y":1339.9844280878704,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"88f3bac5.fb0368","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2232.564915974935,"y":1374.984348932902,"z":"43f4c62f.1fd828","wires":[["f4cbd9d5.7261f8"]]},{"id":"f4cbd9d5.7261f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2400.8982276916504,"y":1383.5558633804321,"z":"43f4c62f.1fd828","wires":[["902b0baa.add328","fc3d633d.a705b8"]]},{"id":"440a027.2d0cffc","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1831.8241577148438,"y":1307.8891334533691,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"f0bee7cd.c50298","type":"comment","name":"Get tosca network data","info":"","comments":"","x":996.5499458312988,"y":560.4444608688354,"z":"43f4c62f.1fd828","wires":[]},{"id":"e014c799.ccb71","type":"comment","name":"1707 - remove call to AAI for subnets","info":"","comments":"","x":1035.8515014648438,"y":660.9366149902344,"z":"43f4c62f.1fd828","wires":[]},{"id":"c65a88e5.41739","type":"for","name":"for 0..subnet-row-length","xml":"<for silentFailure='true' index='esidx' start='0' end='`$tmp.eipam-subnet-row_length`' >\n","comments":"","outputs":1,"x":1061.9943504333496,"y":859.2224187850952,"z":"43f4c62f.1fd828","wires":[["168f4319.51ff0d"]]},{"id":"168f4319.51ff0d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1286.6610527038574,"y":859.3651790618896,"z":"43f4c62f.1fd828","wires":[["c6d87522.f557d8"]]},{"id":"c6d87522.f557d8","type":"switchNode","name":"switch level","xml":"<switch test='`$tmp.eipam-subnet-row[$esidx].level`'>\n","comments":"","outputs":1,"x":1480.661060333252,"y":860.7038640975952,"z":"43f4c62f.1fd828","wires":[["2b8c5d52.7c0d12","d04a0c95.ae503"]]},{"id":"2b8c5d52.7c0d12","type":"outcome","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1652.32767868042,"y":858.7038621902466,"z":"43f4c62f.1fd828","wires":[["f50b81a6.8be318"]]},{"id":"f50b81a6.8be318","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1835.6611442565918,"y":857.0371780395508,"z":"43f4c62f.1fd828","wires":[["1490f72f.590771","9e34d962.11b0b","bb837925.a8523","427058e5.b0cc9"]]},{"id":"1490f72f.590771","type":"set","name":"set level 1 key value","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].key-value`\"/>\n\n\t\n","comments":"","x":2051.565605163574,"y":798.1800594329834,"z":"43f4c62f.1fd828","wires":[]},{"id":"d04a0c95.ae503","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1643.9944648742676,"y":893.7038440704346,"z":"43f4c62f.1fd828","wires":[["42298e3b.bebd78"]]},{"id":"42298e3b.bebd78","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1835.6611442565918,"y":892.0371780395508,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"9e34d962.11b0b","type":"set","name":"increment pidx_len","xml":"<set>\n\t<parameter name=\"pidx\" value=\"`$pidx + 1`\"/>\n\n\t\n","comments":"","x":2048.56595993042,"y":856.0794496536255,"z":"43f4c62f.1fd828","wires":[]},{"id":"fc63ae25.4fe498","type":"for","name":"for 0 ... level 1 length","xml":"<for silentFailure='true' index='npidx' start='0' end='`$pidx-len`' >\n","comments":"","outputs":1,"x":962.0515632629395,"y":1273.2222967147827,"z":"43f4c62f.1fd828","wires":[["b14859a5.c61ce8"]]},{"id":"b14859a5.c61ce8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1180.0515689849854,"y":1274.2222967147827,"z":"43f4c62f.1fd828","wires":[["d14d4fa5.24ff3","be1e294d.7bca7"]]},{"id":"be1e294d.7bca7","type":"set","name":"set level 1 key value/plan name","xml":"<set>\n\t<parameter name=\"tmp.level1-key-value\" value=\"`$tmp.level1-key-value[$npidx]`\" />\n\t<parameter name=\"tmp.plan-name\" value=\"`$tmp.plan-name[$npidx]`\" />\n\t\n","comments":"","x":1418.0515480041504,"y":1271.2222633361816,"z":"43f4c62f.1fd828","wires":[]},{"id":"bb837925.a8523","type":"set","name":"set level 1 plan_name","xml":"<set>\n\t<parameter name=\"tmp.plan-name[$pidx]\" value=\"`$tmp.eipam-subnet-row[$esidx].plan-name`\"/>\n\n\t\n","comments":"","x":2055.765914916992,"y":824.6508331298828,"z":"43f4c62f.1fd828","wires":[]},{"id":"d3591315.886188","type":"execute","name":"execute EIPAM deletePoolByPoolId","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePoolByPoolId\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":5320.908679962158,"y":1614.650899887085,"z":"43f4c62f.1fd828","wires":[["ea0e131c.2a0418"]]},{"id":"ea0e131c.2a0418","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5566.337005615234,"y":1614.3744983673096,"z":"43f4c62f.1fd828","wires":[["a2997071.0f0458"]]},{"id":"a2997071.0f0458","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"tmp.eipam-error\" value=\"true\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting pool in EIPAM.\" />\n\t","comments":"","x":5762.004039764404,"y":1616.4697823524475,"z":"43f4c62f.1fd828","wires":[]},{"id":"427058e5.b0cc9","type":"set","name":"set length","xml":"<set>\n\t<parameter name=\"pidx-len\" value=\"`$pidx`\"/>\n\n\t\n","comments":"","x":2019.1944770812988,"y":879.2223215103149,"z":"43f4c62f.1fd828","wires":[]},{"id":"d7820e90.66544","type":"call","name":"call naming-policy-generate-name to rollback name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1021.8612060546875,"y":1917.7220458984375,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"20e1b7e2.ee7b28","type":"set","name":"set parameters for generate-unique-name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.context-id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='naming-policy-generate-name-input.naming-type' value='NETWORK' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n\n\n","comments":"","x":999.8612022399902,"y":1874.2222995758057,"z":"43f4c62f.1fd828","wires":[]},{"id":"7ed7aafc.2d4d04","type":"switchNode","name":"switch from-preload","xml":"<switch test='`$service-data.networks.network[$nidx].network-data.network-information.from-preload`'>\n","comments":"","outputs":1,"x":213.0833740234375,"y":493.1666555404663,"z":"43f4c62f.1fd828","wires":[["743d13a6.d23e0c","edfdb890.827c18"]]},{"id":"6e94f27d.431264","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":199.6127471923828,"y":355.72381114959717,"z":"43f4c62f.1fd828","wires":[["7ed7aafc.2d4d04","bb84b390.807d6","ad06e8e8.f15fe8"]]},{"id":"743d13a6.d23e0c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":438.49943923950195,"y":474.7217025756836,"z":"43f4c62f.1fd828","wires":[["776634c2.52d27c"]]},{"id":"c070a6d7.f5a95","type":"for","name":"for snidx..service-data.networks.network[]","xml":"<for silentFailure='true' index='snidx' start='`$tmp.nidx + 1`' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1301.6454162597656,"y":2659.5203886032104,"z":"43f4c62f.1fd828","wires":[["b05e875c.477a8"]]},{"id":"fb6c5bbf.641c8","type":"comment","name":"Remove network from service data","info":"","comments":"","x":469.04224395751953,"y":2565.9492082595825,"z":"43f4c62f.1fd828","wires":[]},{"id":"c8bec92c.539b98","type":"set","name":"move network to remove one","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.newidx].\" value=\"$service-data.networks.network[$snidx].\" />\n\t\n","comments":"","x":1836.2364044189453,"y":2695.401512145996,"z":"43f4c62f.1fd828","wires":[]},{"id":"ad06e8e8.f15fe8","type":"switchNode","name":"switch $service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":475.8079833984375,"y":2517.290771484375,"z":"43f4c62f.1fd828","wires":[["b81c15f1.52213","b6141ea3.f4683"]]},{"id":"b81c15f1.52213","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":778.8555755615234,"y":2510.6237363815308,"z":"43f4c62f.1fd828","wires":[["ec37c587.0d4f6"]]},{"id":"773c6cdf.b55564","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.\" value=\"\"/>\n\n","comments":"","x":1211.474479675293,"y":2514.2905626296997,"z":"43f4c62f.1fd828","wires":[]},{"id":"b6141ea3.f4683","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":745.2365264892578,"y":2662.9570541381836,"z":"43f4c62f.1fd828","wires":[["aafb7b4b.b69678"]]},{"id":"b05e875c.477a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1571.2363891601562,"y":2661.9570388793945,"z":"43f4c62f.1fd828","wires":[["c8bec92c.539b98","cd3d04c6.2597"]]},{"id":"588894e.b52e46c","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\n\t\n","comments":"","x":1241.104248046875,"y":2696.2906188964844,"z":"43f4c62f.1fd828","wires":[]},{"id":"68cbbbc.67fe2c4","type":"set","name":"Remove networks","xml":"<set>\n\t<parameter name=\"service-data.networks.network[$tmp.new_length].\" value=\"\"/>\n\n","comments":"","x":1220.9507141113281,"y":2734.2585639953613,"z":"43f4c62f.1fd828","wires":[]},{"id":"aafb7b4b.b69678","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":967.2364044189453,"y":2662.9570541381836,"z":"43f4c62f.1fd828","wires":[["c070a6d7.f5a95","68cbbbc.67fe2c4","588894e.b52e46c","32319d17.9bbc5a"]]},{"id":"38f99654.0d5802","type":"set","name":"set new network length","xml":"<set>\n\t<parameter name=\"service-data.networks.network_length\" value=\"0\"/>\n\n\t\n","comments":"","x":1227.8078536987305,"y":2548.9942207336426,"z":"43f4c62f.1fd828","wires":[]},{"id":"ec37c587.0d4f6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":958.1888885498047,"y":2511.3275327682495,"z":"43f4c62f.1fd828","wires":[["773c6cdf.b55564","38f99654.0d5802"]]},{"id":"cd3d04c6.2597","type":"set","name":"Set new index","xml":"<set>\n\t<parameter name=\"tmp.newidx\" value=\"`$snidx - 1`\"/>\n\t\n\t\n","comments":"","x":1785.9401245117188,"y":2657.216381072998,"z":"43f4c62f.1fd828","wires":[]},{"id":"a033816e.cf4cc","type":"comment","name":"If only one remove all networks","info":"","comments":"","x":850.2259368896484,"y":2475.2165098190308,"z":"43f4c62f.1fd828","wires":[]},{"id":"32319d17.9bbc5a","type":"set","name":"Set new network length","xml":"<set>\n\t<parameter name=\"tmp.new_length\" value=\"`$service-data.networks.network_length - 1`\"/>\n\t\n\t\n","comments":"","x":1243.9401245117188,"y":2629.216438293457,"z":"43f4c62f.1fd828","wires":[]},{"id":"776634c2.52d27c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":618.4994430541992,"y":473.27720069885254,"z":"43f4c62f.1fd828","wires":[["7782efc5.34f988"]]},{"id":"ceb870dc.083b6","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1121.4961547851562,"y":469.74610900878906,"z":"43f4c62f.1fd828","wires":[[]]},{"id":"7782efc5.34f988","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":886.21826171875,"y":474.230712890625,"z":"43f4c62f.1fd828","wires":[["ceb870dc.083b6","98125954.779138","7bfdf529.fba05c"]]},{"id":"98125954.779138","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1116.2181396484375,"y":505.230712890625,"z":"43f4c62f.1fd828","wires":[["3ef86cb1.56946c"]]},{"id":"3ef86cb1.56946c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + 'from AnAI'\" />","comments":"","x":1270.3292236328125,"y":504.45294189453125,"z":"43f4c62f.1fd828","wires":[]},{"id":"7bfdf529.fba05c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1118.4961547851562,"y":436.74610900878906,"z":"43f4c62f.1fd828","wires":[["d829c8ae.d057e8"]]},{"id":"e67658da.9f76c8","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $network-topology-operation-input.network-information.network-id\">","comments":"","outputs":1,"x":1553.4961547851562,"y":435.74610900878906,"z":"43f4c62f.1fd828","wires":[["ace37b9c.4aec"]]},{"id":"3e3025c.a0524da","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while deleting network from AAI\" />\n\t","comments":"","x":1947.8294639587402,"y":437.74610900878906,"z":"43f4c62f.1fd828","wires":[]},{"id":"ace37b9c.4aec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1763.6913566589355,"y":438.07944202423096,"z":"43f4c62f.1fd828","wires":[["3e3025c.a0524da"]]},{"id":"d829c8ae.d057e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1310.1627807617188,"y":436.7402296066284,"z":"43f4c62f.1fd828","wires":[["e67658da.9f76c8"]]},{"id":"1cd97ae8.5c530d","type":"comment","name":"18.06 - add logic for preload","info":"","comments":"","x":498.49609375,"y":436.74609375,"z":"43f4c62f.1fd828","wires":[]},{"id":"aceab2fb.526c8","type":"switchNode","name":"switch network-instance-group-id","xml":"<switch test='`$network-data.network-topology.network-topology-identifier-structure.network-instance-group-id`'>\n","comments":"","outputs":1,"x":253.49609375,"y":606.74609375,"z":"43f4c62f.1fd828","wires":[["f4412ab1.02ebf8","c7d61085.9ff83"]]},{"id":"f4412ab1.02ebf8","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":487.49609375,"y":605.24609375,"z":"43f4c62f.1fd828","wires":[["db751f4b.8bc6f"]]},{"id":"c7d61085.9ff83","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":387.49609375,"y":2035.24609375,"z":"43f4c62f.1fd828","wires":[["2778d41a.5e846c"]]},{"id":"2778d41a.5e846c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":577.49609375,"y":2033.24609375,"z":"43f4c62f.1fd828","wires":[["9ab09f4f.71df98"]]},{"id":"9ab09f4f.71df98","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=\"network collection activate failed\" />\n","comments":"","x":785.49609375,"y":2033.24609375,"z":"43f4c62f.1fd828","wires":[]},{"id":"6f0fe7b4.c62b08","type":"comment","name":"need to implement this","info":"","comments":"","x":812.49609375,"y":2000.24609375,"z":"43f4c62f.1fd828","wires":[]},{"id":"edfdb890.827c18","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":438.49609375,"y":517.74609375,"z":"43f4c62f.1fd828","wires":[["aceab2fb.526c8"]]}]
\ No newline at end of file