Add generic-resource-api DG seed code
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_network-topology-operation-unassign.json
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.ecomp-model-information.model-customization-uuid\n  and service_uuid = $service-data.networks.network[$nidx].network-data.service-information.ecomp-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":[]}]