Dublin release
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_process-eipam-pools.json
index 57c7860..8147d64 100644 (file)
@@ -1 +1 @@
-[{"id":"b67dacc5.0d756","type":"dgstart","name":"DGSTART","outputs":1,"x":207.99989318847656,"y":99.36906051635742,"z":"f952bc99.2d7ef","wires":[["c49255fa.d97648"]]},{"id":"c49255fa.d97648","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":270.5713233947754,"y":151.3333444595337,"z":"f952bc99.2d7ef","wires":[["3a0b7ea0.7c1512"]]},{"id":"3a0b7ea0.7c1512","type":"method","name":"process-eipam-pools","xml":"<method rpc=\"process-eipam-pools\" mode=\"sync\">","comments":"","outputs":1,"x":204.9046401977539,"y":242.75002574920654,"z":"f952bc99.2d7ef","wires":[["3a4ac45e.70cf9c"]]},{"id":"215818d3.3de248","type":"comment","name":"GENERIC-RESOURCE-API: PROCESS-EIPAM-POOLS","info":"","comments":"","x":666.4046936035156,"y":93.00000953674316,"z":"f952bc99.2d7ef","wires":[]},{"id":"1b779ba4.babaa4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":396.6546745300293,"y":401.5834274291992,"z":"f952bc99.2d7ef","wires":[["1679194b.17c9c7","f4dce5f3.320ae8","8f666f4c.792","a46cbfe1.320c","e8caf88b.999398","d94b078d.3bf3a8","32912400.2c8a1c","984c8c29.958c6","a96ade11.7c13d","4ad3e9cf.db5138"]]},{"id":"cd4e10fa.b05c6","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":747.0117416381836,"y":187.34528636932373,"z":"f952bc99.2d7ef","wires":[]},{"id":"a46cbfe1.320c","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.region' value='`$aai.complex.region`' />\n<parameter name='tmp.cloud-region-id' value=\"`$aai.cloud-region.cloud-region-id`\" />\n<parameter name='tmp.physical-location-id' value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.clli\" value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.zone\" value=\"`$aai.cloud-region.cloud-zone`\" />\n<parameter name=\"tmp.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.service-type\" value=\"`$network-topology-operation-input.service-information.subscription-service-type`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n<parameter name=\"tmp.level1-key-value\" value=\"`$aai.complex.physical-location-id + ':' + $aai.cloud-region.cloud-region-id`\" />\n<parameter name=\"tmp.level2-key-value\" value=\"`$network-model.network-role + ':' + $tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.ipv4-cidr-mask\" value=\"`$network-model.ipv4-cidr-mask`\" />\n<parameter name=\"tmp.ipv6-cidr-mask\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"","x":689.9589309692383,"y":253.2447919845581,"z":"f952bc99.2d7ef","wires":[]},{"id":"1f46cdd5.3ab782","type":"comment","name":"Process level 1 pool - works v4 and v6","info":"","comments":"","x":711.8956756591797,"y":443.6019515991211,"z":"f952bc99.2d7ef","wires":[]},{"id":"1679194b.17c9c7","type":"call","name":"call eipam-create-network-role-pool for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":759.5146484375,"y":483.1733283996582,"z":"f952bc99.2d7ef","wires":[["71ac165c.911f28","9a05e4cc.4f8b08"]]},{"id":"dc84bed9.0f66f","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2261.407512664795,"y":633.7925186157227,"z":"f952bc99.2d7ef","wires":[["7b320795.7564e8","215b2255.65126e"]]},{"id":"7b320795.7564e8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2682.967109680176,"y":707.8354949951172,"z":"f952bc99.2d7ef","wires":[["f2fa55c6.6d3af8"]]},{"id":"71ac165c.911f28","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1048.1928901672363,"y":484.50205993652344,"z":"f952bc99.2d7ef","wires":[["aa1d5c4f.68acc"]]},{"id":"aa1d5c4f.68acc","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 allocating subnet in EIPAM.  Error creating level 1 pool. ' + $error-message`\" />\n\t","comments":"","x":1221.443000793457,"y":483.7043914794922,"z":"f952bc99.2d7ef","wires":[]},{"id":"e1539b17.4fe6e8","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":4254.394844055176,"y":793.3521280288696,"z":"f952bc99.2d7ef","wires":[["1dfbdbc5.996cd4","a34de3f2.f8a7e"]]},{"id":"1dfbdbc5.996cd4","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4527.5618324279785,"y":790.9922323226929,"z":"f952bc99.2d7ef","wires":[["f2a221b4.015d2"]]},{"id":"f2a221b4.015d2","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 allocating subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4701.811347961426,"y":789.4088582992554,"z":"f952bc99.2d7ef","wires":[]},{"id":"4045d178.2db3c","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4126.339134216309,"y":719.4632081985474,"z":"f952bc99.2d7ef","wires":[]},{"id":"f2fa55c6.6d3af8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2872.7101516723633,"y":705.9723358154297,"z":"f952bc99.2d7ef","wires":[["f0f78b84.6897b8","181af87e.ac39e8"]]},{"id":"b55eba07.112298","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4204.181602478027,"y":756.6947755813599,"z":"f952bc99.2d7ef","wires":[]},{"id":"3a4af118.c4e1ae","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 allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4700.931427001953,"y":830.9447584152222,"z":"f952bc99.2d7ef","wires":[]},{"id":"a34de3f2.f8a7e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4532.181419372559,"y":830.9447946548462,"z":"f952bc99.2d7ef","wires":[["3a4af118.c4e1ae"]]},{"id":"3a4ac45e.70cf9c","type":"switchNode","name":"switch","xml":"<switch test='`$tmp.process-eipam-action`'>\n","comments":"","outputs":1,"x":160.1824836730957,"y":323.69446563720703,"z":"f952bc99.2d7ef","wires":[["6a3c2e6.90c98d","1950da9.29e6f25","260c039a.83c7cc"]]},{"id":"6a3c2e6.90c98d","type":"other","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":217.09911727905273,"y":402.52779388427734,"z":"f952bc99.2d7ef","wires":[["1b779ba4.babaa4"]]},{"id":"1950da9.29e6f25","type":"other","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":176.42317962646484,"y":2742.009256839752,"z":"f952bc99.2d7ef","wires":[["5f392f83.9ef9b"]]},{"id":"260c039a.83c7cc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":166.42319679260254,"y":2812.009350299835,"z":"f952bc99.2d7ef","wires":[["c342f238.9831"]]},{"id":"c342f238.9831","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=\"Invalid option to process-eipam\" />\n\t","comments":"","x":376.42317962646484,"y":2812.009256839752,"z":"f952bc99.2d7ef","wires":[]},{"id":"e8caf88b.999398","type":"set","name":"clean up local variables","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='' />\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='' />\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='' />\n<parameter name='tmp.l3-network.level2.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='' />\n<parameter name='tmp.l3-network.level2.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='false' />\n\n","comments":"","x":674.1254425048828,"y":224.03045272827148,"z":"f952bc99.2d7ef","wires":[]},{"id":"5f392f83.9ef9b","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=\"Invalid option to process-eipam\" />\n\t","comments":"","x":374.7565231323242,"y":2732.009256839752,"z":"f952bc99.2d7ef","wires":[]},{"id":"9c730d35.31f75","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1402.2059860229492,"y":487.4008026123047,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"9a05e4cc.4f8b08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1051.3488960266113,"y":518.7182769775391,"z":"f952bc99.2d7ef","wires":[["cc821fe6.cd72f"]]},{"id":"215b2255.65126e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2678.3967208862305,"y":624.0040683746338,"z":"f952bc99.2d7ef","wires":[["71b1901e.8a53c"]]},{"id":"2c44c339.bcfe4c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3046.587127685547,"y":623.1469631195068,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"f4dce5f3.320ae8","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":702.6823616027832,"y":596.9247398376465,"z":"f952bc99.2d7ef","wires":[["11cf4595.d04cda"]]},{"id":"11cf4595.d04cda","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":917.6824951171875,"y":595.6866140365601,"z":"f952bc99.2d7ef","wires":[["9250fe2.19568"]]},{"id":"9250fe2.19568","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1098.5870895385742,"y":596.1152439117432,"z":"f952bc99.2d7ef","wires":[["58f6d3c8.72fbac"]]},{"id":"33f1dd7e.590052","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2185.9681816101074,"y":593.7818984985352,"z":"f952bc99.2d7ef","wires":[]},{"id":"9595f2c9.cea8a","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3114.3008575439453,"y":662.4486179351807,"z":"f952bc99.2d7ef","wires":[]},{"id":"71b1901e.8a53c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2843.422897338867,"y":622.6019897460938,"z":"f952bc99.2d7ef","wires":[["2c44c339.bcfe4c","9595f2c9.cea8a"]]},{"id":"cc821fe6.cd72f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1222.793098449707,"y":518.6389312744141,"z":"f952bc99.2d7ef","wires":[["9c730d35.31f75","b4f598b2.142618"]]},{"id":"b4f598b2.142618","type":"set","name":"Save return values from eipam level 1 pool","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1505.126480102539,"y":517.305585861206,"z":"f952bc99.2d7ef","wires":[]},{"id":"c09959cb.7d7228","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2316.126724243164,"y":873.8610801696777,"z":"f952bc99.2d7ef","wires":[["ce7f3982.658828","d176dbca.9f6898"]]},{"id":"ce7f3982.658828","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2643.3530807495117,"y":939.9039907455444,"z":"f952bc99.2d7ef","wires":[["b67d44ba.680b88"]]},{"id":"d184018d.b9a27","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":4173.448627471924,"y":993.7538566589355,"z":"f952bc99.2d7ef","wires":[["455af08a.adb86","51c110c5.707fb"]]},{"id":"455af08a.adb86","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4483.282020568848,"y":999.7273271083832,"z":"f952bc99.2d7ef","wires":[["b58aa487.353488"]]},{"id":"b58aa487.353488","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 allocating subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4637.53137588501,"y":999.1439731121063,"z":"f952bc99.2d7ef","wires":[]},{"id":"b67d44ba.680b88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2833.096122741699,"y":938.0408315658569,"z":"f952bc99.2d7ef","wires":[["dbe92352.fa718","262b4940.672706"]]},{"id":"28e3d2dc.6d980e","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4121.568744659424,"y":950.4297587871552,"z":"f952bc99.2d7ef","wires":[]},{"id":"200d17f7.3bcdf8","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 allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4636.652282714844,"y":967.6797797679901,"z":"f952bc99.2d7ef","wires":[]},{"id":"51c110c5.707fb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4482.901950836182,"y":968.0132148265839,"z":"f952bc99.2d7ef","wires":[["200d17f7.3bcdf8"]]},{"id":"d176dbca.9f6898","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2654.116050720215,"y":873.4059839248657,"z":"f952bc99.2d7ef","wires":[["1fdda468.d7a17c"]]},{"id":"f8019f13.9e46","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2997.306407928467,"y":834.2155246734619,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"8f666f4c.792","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":705.4019470214844,"y":796.9933710098267,"z":"f952bc99.2d7ef","wires":[["4dcca263.b0f71c"]]},{"id":"4dcca263.b0f71c","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1000.544807434082,"y":796.7552556991577,"z":"f952bc99.2d7ef","wires":[["a0a6b416.6b7e48"]]},{"id":"a0a6b416.6b7e48","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1159.5448532104492,"y":797.4218816757202,"z":"f952bc99.2d7ef","wires":[["54ef1626.295eb8"]]},{"id":"8603aaa6.0967d8","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2234.687370300293,"y":837.8504018783569,"z":"f952bc99.2d7ef","wires":[]},{"id":"9efc4172.79ebb","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3065.020275115967,"y":871.5172214508057,"z":"f952bc99.2d7ef","wires":[]},{"id":"1fdda468.d7a17c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2819.1422271728516,"y":872.0039052963257,"z":"f952bc99.2d7ef","wires":[["f8019f13.9e46","9efc4172.79ebb"]]},{"id":"58f6d3c8.72fbac","type":"get-resource","name":"get-resource V4 - validate if level 1 subnet does not exists","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.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1434.745864868164,"y":595.6706838607788,"z":"f952bc99.2d7ef","wires":[["9ef700ca.0d4c8","1344a1eb.80ac2e"]]},{"id":"9ef700ca.0d4c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1752.745864868164,"y":566.0872745513916,"z":"f952bc99.2d7ef","wires":[["d60acc9e.ea03d"]]},{"id":"1344a1eb.80ac2e","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1752.857925415039,"y":595.837306022644,"z":"f952bc99.2d7ef","wires":[["4a5fcaaa.0bc904"]]},{"id":"4a5fcaaa.0bc904","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1909.3241157531738,"y":592.551233291626,"z":"f952bc99.2d7ef","wires":[["33f1dd7e.590052","dc84bed9.0f66f"]]},{"id":"d60acc9e.ea03d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1909.7180366516113,"y":566.5873048305511,"z":"f952bc99.2d7ef","wires":[["7fe861f0.6441c","c8cf33c9.77119"]]},{"id":"7fe861f0.6441c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2120.134552001953,"y":526.0040121078491,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"c8cf33c9.77119","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n\n","comments":"","x":2213.598663330078,"y":558.8056793212891,"z":"f952bc99.2d7ef","wires":[]},{"id":"54ef1626.295eb8","type":"get-resource","name":"get-resource V6 - validate if level 1 subnet does not exists","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.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1476.6824798583984,"y":797.0831346511841,"z":"f952bc99.2d7ef","wires":[["c3bac977.4661a8","3db24e26.1b8ac2"]]},{"id":"c3bac977.4661a8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1798.0155334472656,"y":800.4165077209473,"z":"f952bc99.2d7ef","wires":[["9c73f5a5.87c408"]]},{"id":"3db24e26.1b8ac2","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1806.8776626586914,"y":846.416538476944,"z":"f952bc99.2d7ef","wires":[["d2ddd942.d1d868"]]},{"id":"d2ddd942.d1d868","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1957.0938339233398,"y":844.3804972171783,"z":"f952bc99.2d7ef","wires":[["8603aaa6.0967d8","c09959cb.7d7228"]]},{"id":"954c65f8.d15228","type":"comment","name":"Check if level1 ipv6 subnet exists","info":"","comments":"","x":1392.0475616455078,"y":765.4165515899658,"z":"f952bc99.2d7ef","wires":[]},{"id":"9c73f5a5.87c408","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1981.2377014160156,"y":800.4165077209473,"z":"f952bc99.2d7ef","wires":[["e14979b6.d0cfd8","74f6cba0.e206a4"]]},{"id":"e14979b6.d0cfd8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2179.237617492676,"y":758.4165878295898,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"74f6cba0.e206a4","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2270.9515686035156,"y":797.718204498291,"z":"f952bc99.2d7ef","wires":[]},{"id":"d94b078d.3bf3a8","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n","comments":"","x":703.4510650634766,"y":936.0464601516724,"z":"f952bc99.2d7ef","wires":[]},{"id":"c312d18.e12303","type":"comment","name":"Process level 2 pool - works v4 and v6","info":"","comments":"","x":804.0068283081055,"y":1043.8797640800476,"z":"f952bc99.2d7ef","wires":[]},{"id":"32912400.2c8a1c","type":"call","name":"call eipam-create-network-role-pool for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":767.6258239746094,"y":971.3083038330078,"z":"f952bc99.2d7ef","wires":[["a0afe554.2785e8","2c268f2c.e0546"]]},{"id":"a7cb1cfa.0f549","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2448.6016960144043,"y":1396.847885131836,"z":"f952bc99.2d7ef","wires":[["8cff1c2d.4bb0c","a802819d.d0e34"]]},{"id":"8cff1c2d.4bb0c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2793.827995300293,"y":1442.890947341919,"z":"f952bc99.2d7ef","wires":[["36ed6e2.ff4fe92"]]},{"id":"a0afe554.2785e8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1070.3874588012695,"y":972.1130695343018,"z":"f952bc99.2d7ef","wires":[["43ffa10a.8453d"]]},{"id":"e00163e7.419ee","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 allocating subnet in EIPAM.  Error creating level 2 pool\" />\n\t","comments":"","x":1433.4472427368164,"y":968.7915554046631,"z":"f952bc99.2d7ef","wires":[]},{"id":"851486f7.ef53b8","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":4245.256484985352,"y":1471.9630699157715,"z":"f952bc99.2d7ef","wires":[["6c5dac7.20e7854","baf01a29.ea1028"]]},{"id":"6c5dac7.20e7854","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4550.423843383789,"y":1467.6031036376953,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"770097ef.308fe8","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4117.200759887695,"y":1396.0740814208984,"z":"f952bc99.2d7ef","wires":[]},{"id":"36ed6e2.ff4fe92","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2983.5710372924805,"y":1441.0277881622314,"z":"f952bc99.2d7ef","wires":[["fd0daacd.dcb218","6bf71b9b.45dac4"]]},{"id":"4b72c28b.ed33cc","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4195.043228149414,"y":1433.305648803711,"z":"f952bc99.2d7ef","wires":[]},{"id":"baf01a29.ea1028","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4551.043472290039,"y":1505.5557403564453,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"5ac5e3dd.2f03bc","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1422.067237854004,"y":1004.011833190918,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"2c268f2c.e0546","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1070.2100067138672,"y":1003.6625504493713,"z":"f952bc99.2d7ef","wires":[["c4f7ad92.93b9b"]]},{"id":"a802819d.d0e34","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2802.591018676758,"y":1392.392807006836,"z":"f952bc99.2d7ef","wires":[["56cf4de3.7ffac4"]]},{"id":"2bf3b759.27ba98","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3247.1151275634766,"y":1333.535629272461,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"984c8c29.958c6","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":703.2100944519043,"y":1321.3136434555054,"z":"f952bc99.2d7ef","wires":[["e00b80a1.32095"]]},{"id":"e00b80a1.32095","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1047.019817352295,"y":1318.4088668823242,"z":"f952bc99.2d7ef","wires":[["3cda4212.fe039e"]]},{"id":"3cda4212.fe039e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1201.019760131836,"y":1317.4088706970215,"z":"f952bc99.2d7ef","wires":[["13a69cae.ff05c3"]]},{"id":"6b9c56d8.d3ab78","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v4`\" />\n","comments":"","x":2363.162395477295,"y":1354.837142944336,"z":"f952bc99.2d7ef","wires":[]},{"id":"d7cedcb0.0f074","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3316.8287506103516,"y":1368.8375091552734,"z":"f952bc99.2d7ef","wires":[]},{"id":"56cf4de3.7ffac4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2967.6171951293945,"y":1390.990728378296,"z":"f952bc99.2d7ef","wires":[["2bf3b759.27ba98","d7cedcb0.0f074"]]},{"id":"c4f7ad92.93b9b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1239.3210945129395,"y":1002.9166197776794,"z":"f952bc99.2d7ef","wires":[["5ac5e3dd.2f03bc","52e7f03b.a8622"]]},{"id":"52e7f03b.a8622","type":"set","name":"Save return values from eipam level 2 pool","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level2.v6.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1528.3211097717285,"y":1035.9165506362915,"z":"f952bc99.2d7ef","wires":[]},{"id":"39556357.9dce0c","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2692.988052368164,"y":1870.7125091552734,"z":"f952bc99.2d7ef","wires":[["d3587f17.0022d","d2a4e238.b8b64"]]},{"id":"d3587f17.0022d","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":3070.881118774414,"y":1899.2557220458984,"z":"f952bc99.2d7ef","wires":[["bf4e9f3e.356de"]]},{"id":"3b1c6b3c.bdb1e4","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":4448.309951782227,"y":1980.3278045654297,"z":"f952bc99.2d7ef","wires":[["cb2b5938.735178","16e8f110.41380f"]]},{"id":"cb2b5938.735178","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4763.4767417907715,"y":1937.9679737091064,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"3067d347.4166fc","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":3556.253890991211,"y":1874.4389905929565,"z":"f952bc99.2d7ef","wires":[]},{"id":"bf4e9f3e.356de","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3230.624282836914,"y":1895.392562866211,"z":"f952bc99.2d7ef","wires":[["43d4715c.229a7","ea23f939.5b11b8"]]},{"id":"5bded456.68894c","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4398.096725463867,"y":1943.6704864501953,"z":"f952bc99.2d7ef","wires":[]},{"id":"16e8f110.41380f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4768.096488952637,"y":1977.9205493927002,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"d2a4e238.b8b64","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3069.6441345214844,"y":1862.75777053833,"z":"f952bc99.2d7ef","wires":[["dbede8bf.788e58"]]},{"id":"861e4276.f3848","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":3434.1677474975586,"y":1799.9007358551025,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"a96ade11.7c13d","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":472.5963897705078,"y":1879.3453130722046,"z":"f952bc99.2d7ef","wires":[["400bdd27.60c6c4"]]},{"id":"400bdd27.60c6c4","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1286.072597503662,"y":1880.773796081543,"z":"f952bc99.2d7ef","wires":[["3c398abd.52b596"]]},{"id":"3c398abd.52b596","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1453.4058952331543,"y":1878.1071949005127,"z":"f952bc99.2d7ef","wires":[["7c82d8bf.aa37c8"]]},{"id":"d5a0936c.26784","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v6`\" />\n\n","comments":"","x":2616.215347290039,"y":1835.202133178711,"z":"f952bc99.2d7ef","wires":[]},{"id":"58cd1d81.5e80a4","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3501.881607055664,"y":1833.202377319336,"z":"f952bc99.2d7ef","wires":[]},{"id":"dbede8bf.788e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3234.670310974121,"y":1861.35569190979,"z":"f952bc99.2d7ef","wires":[["861e4276.f3848","58cd1d81.5e80a4"]]},{"id":"33a121ac.c45b4e","type":"comment","name":"Allocate ipv4 subnet for level 2","info":"","comments":"","x":814.6547698974609,"y":1257.250023735894,"z":"f952bc99.2d7ef","wires":[]},{"id":"5f27a619.801138","type":"comment","name":"Allocate ipv6 subnet for level 1","info":"","comments":"","x":975.6546173095703,"y":1829.2130088806152,"z":"f952bc99.2d7ef","wires":[]},{"id":"13a69cae.ff05c3","type":"get-resource","name":"get-resource V4 - validate if level 2 subnet does not exists","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.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1579.3213958740234,"y":1317.9167461395264,"z":"f952bc99.2d7ef","wires":[["3c187ca6.bd91b4","38f089df.affb66"]]},{"id":"3c187ca6.bd91b4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1921.654598236084,"y":1315.2499845027924,"z":"f952bc99.2d7ef","wires":[["e15a7aa9.2b9be8"]]},{"id":"38f089df.affb66","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1930.5167274475098,"y":1361.250015258789,"z":"f952bc99.2d7ef","wires":[["831568d9.d0ba18"]]},{"id":"831568d9.d0ba18","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2080.732898712158,"y":1359.2139739990234,"z":"f952bc99.2d7ef","wires":[["6b9c56d8.d3ab78","a7cb1cfa.0f549"]]},{"id":"bb9558e5.f99c68","type":"comment","name":"Check if level2 ipv4 subnet exists","info":"","comments":"","x":1548.8769149780273,"y":1221.2499961853027,"z":"f952bc99.2d7ef","wires":[]},{"id":"e15a7aa9.2b9be8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2104.876766204834,"y":1315.2499845027924,"z":"f952bc99.2d7ef","wires":[["21d1d3ff.53e55c","42e8047d.9a082c"]]},{"id":"21d1d3ff.53e55c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2304.876766204834,"y":1267.2499845027924,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"42e8047d.9a082c","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2394.590633392334,"y":1312.551681280136,"z":"f952bc99.2d7ef","wires":[]},{"id":"7c82d8bf.aa37c8","type":"get-resource","name":"get-resource V6 - validate if level 2 subnet does not exists","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.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1793.876823425293,"y":1839.4350967407227,"z":"f952bc99.2d7ef","wires":[["af837910.e47218","d3c4bc3.f10a64"]]},{"id":"af837910.e47218","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2216.8767013549805,"y":1789.4350967407227,"z":"f952bc99.2d7ef","wires":[["650a354.ce721cc"]]},{"id":"d3c4bc3.f10a64","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2225.7388305664062,"y":1835.4351274967194,"z":"f952bc99.2d7ef","wires":[["e7e192ea.8a1f3"]]},{"id":"e7e192ea.8a1f3","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2375.9550018310547,"y":1833.3990862369537,"z":"f952bc99.2d7ef","wires":[["d5a0936c.26784","39556357.9dce0c"]]},{"id":"89b66d1e.8fdb3","type":"comment","name":"Check if level2 ipv6 subnet exists","info":"","comments":"","x":1712.0990753173828,"y":1799.4350547790527,"z":"f952bc99.2d7ef","wires":[]},{"id":"650a354.ce721cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2400.0988693237305,"y":1789.4350967407227,"z":"f952bc99.2d7ef","wires":[["fc0330f9.cfdd6","aac5588c.1aac58"]]},{"id":"fc0330f9.cfdd6","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2560.098808288574,"y":1749.4350624084473,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"aac5588c.1aac58","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2651.812759399414,"y":1788.7366790771484,"z":"f952bc99.2d7ef","wires":[]},{"id":"f0f78b84.6897b8","type":"switchNode","name":"switch: tmp.l3-network.level1.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3174.745864868164,"y":737.6072845458984,"z":"f952bc99.2d7ef","wires":[["38c4ba0d.cf5796","9f8a87cf.2d90c8","690ff915.aa6a28"]]},{"id":"dbe92352.fa718","type":"switchNode","name":"switch: tmp.l3-network.level1.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3128.9045906066895,"y":970.527670621872,"z":"f952bc99.2d7ef","wires":[["a3d0a1cb.9d8fd","37d94e45.b2e192","c202d046.5bdbe"]]},{"id":"2bb67e85.513072","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3923.793228149414,"y":756.0836448669434,"z":"f952bc99.2d7ef","wires":[["b55eba07.112298","e1539b17.4fe6e8"]]},{"id":"fd0daacd.dcb218","type":"switchNode","name":"switch: tmp.l3-network.level2.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3380.6822662353516,"y":1441.8609466552734,"z":"f952bc99.2d7ef","wires":[["539676f8.1bb8a8","2cbab948.12a936","de33ed91.f2e23"]]},{"id":"539676f8.1bb8a8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3749.0157890319824,"y":1432.527868270874,"z":"f952bc99.2d7ef","wires":[["bd6948f0.ee5558"]]},{"id":"bd6948f0.ee5558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3899.9047088623047,"y":1432.7501583099365,"z":"f952bc99.2d7ef","wires":[["4b72c28b.ed33cc","851486f7.ef53b8","1749c073.f9a32"]]},{"id":"43d4715c.229a7","type":"switchNode","name":"switch: tmp.l3-network.level2.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3565.682632446289,"y":1925.8240814208984,"z":"f952bc99.2d7ef","wires":[["8603fa44.4ac018","5d10faed.7c4fc4","a7751f96.0afc9"]]},{"id":"de2406b6.935868","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4055.9048805236816,"y":1960.0463666915894,"z":"f952bc99.2d7ef","wires":[["5bded456.68894c","3b1c6b3c.bdb1e4","28b9496d.d124d6"]]},{"id":"2cbab948.12a936","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3748.793502807617,"y":1463.861120223999,"z":"f952bc99.2d7ef","wires":[["bd6948f0.ee5558"]]},{"id":"a3d0a1cb.9d8fd","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3436.126968383789,"y":1003.8608856201172,"z":"f952bc99.2d7ef","wires":[["fe337b12.aa2bc8"]]},{"id":"fe337b12.aa2bc8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3850.3494148254395,"y":983.0832011699677,"z":"f952bc99.2d7ef","wires":[["28e3d2dc.6d980e","d184018d.b9a27"]]},{"id":"37d94e45.b2e192","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3439.238052368164,"y":1041.8607652187347,"z":"f952bc99.2d7ef","wires":[["fe337b12.aa2bc8"]]},{"id":"38c4ba0d.cf5796","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3532.126724243164,"y":754.6390228271484,"z":"f952bc99.2d7ef","wires":[["2bb67e85.513072"]]},{"id":"9f8a87cf.2d90c8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3531.904438018799,"y":785.9722747802734,"z":"f952bc99.2d7ef","wires":[["2bb67e85.513072"]]},{"id":"8603fa44.4ac018","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3864.127000808716,"y":1958.4907836914062,"z":"f952bc99.2d7ef","wires":[["de2406b6.935868"]]},{"id":"5d10faed.7c4fc4","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3863.9047145843506,"y":1989.8240356445312,"z":"f952bc99.2d7ef","wires":[["de2406b6.935868"]]},{"id":"181af87e.ac39e8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3050.0633277893066,"y":702.4642543792725,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"43ffa10a.8453d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1239.079231262207,"y":964.1309933662415,"z":"f952bc99.2d7ef","wires":[["e00163e7.419ee","9d2793f.2e0c17"]]},{"id":"9d2793f.2e0c17","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Error creating level 2 pool, need to attempt rollback\"/>\n\n\n","comments":"","outputs":1,"x":1416.698299407959,"y":934.5277805328369,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"262b4940.672706","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3004.2699127197266,"y":937.8292694091797,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"6bf71b9b.45dac4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3254.206008911133,"y":1403.3213958740234,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"ea23f939.5b11b8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3432.0953521728516,"y":1893.1890716552734,"z":"f952bc99.2d7ef","wires":[[]]},{"id":"c202d046.5bdbe","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3434.407030105591,"y":968.8875029087067,"z":"f952bc99.2d7ef","wires":[["4f412c0b.853a44"]]},{"id":"4f412c0b.853a44","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3599.7403831481934,"y":969.220671415329,"z":"f952bc99.2d7ef","wires":[]},{"id":"690ff915.aa6a28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3526.740394592285,"y":722.406120300293,"z":"f952bc99.2d7ef","wires":[["ef38fdaf.f6f95"]]},{"id":"ef38fdaf.f6f95","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3696.407127380371,"y":724.4059133529663,"z":"f952bc99.2d7ef","wires":[]},{"id":"de33ed91.f2e23","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3748.7405395507812,"y":1400.7763605117798,"z":"f952bc99.2d7ef","wires":[["cf9f56ca.cc60a8"]]},{"id":"cf9f56ca.cc60a8","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3912.0738792419434,"y":1399.1095304489136,"z":"f952bc99.2d7ef","wires":[]},{"id":"a7751f96.0afc9","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3869.740753173828,"y":1924.776427268982,"z":"f952bc99.2d7ef","wires":[["86f36263.e24d8"]]},{"id":"86f36263.e24d8","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4033.0740928649902,"y":1923.1095972061157,"z":"f952bc99.2d7ef","wires":[]},{"id":"6f631f1b.e5302","type":"comment","name":"If preexisting, check to see if there are any level 2 pools whose parent is the level 1, if not remove level 1 pool","info":"","comments":"","x":5221.518356323242,"y":571.2209243774414,"z":"f952bc99.2d7ef","wires":[]},{"id":"5e76fb0f.aae584","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":4927.926284790039,"y":1630.0728302001953,"z":"f952bc99.2d7ef","wires":[["4cea94c4.5ace1c","d344b9bd.898c08"]]},{"id":"4cea94c4.5ace1c","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5237.759677886963,"y":1636.046300649643,"z":"f952bc99.2d7ef","wires":[["54bc6c39.509e84"]]},{"id":"fe5b021d.95d6c","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4872.046646118164,"y":1594.748764038086,"z":"f952bc99.2d7ef","wires":[]},{"id":"d344b9bd.898c08","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5237.379608154297,"y":1604.3321883678436,"z":"f952bc99.2d7ef","wires":[["d462e2e2.f246"]]},{"id":"1749c073.f9a32","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4155.382095336914,"y":1566.8466339111328,"z":"f952bc99.2d7ef","wires":[["da7188b4.85a168","c8ee2aed.d1d1f8","a846b402.dba418"]]},{"id":"da7188b4.85a168","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4416.604019165039,"y":1602.1798858642578,"z":"f952bc99.2d7ef","wires":[["2034a050.d1795"]]},{"id":"2034a050.d1795","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4604.827072143555,"y":1619.4021747112274,"z":"f952bc99.2d7ef","wires":[["fe5b021d.95d6c","5e76fb0f.aae584"]]},{"id":"c8ee2aed.d1d1f8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4419.715103149414,"y":1640.1797654628754,"z":"f952bc99.2d7ef","wires":[["2034a050.d1795"]]},{"id":"a846b402.dba418","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4414.884292602539,"y":1567.2064971923828,"z":"f952bc99.2d7ef","wires":[["bfd1edc6.cdf45"]]},{"id":"bfd1edc6.cdf45","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4562.217788696289,"y":1565.5396270751953,"z":"f952bc99.2d7ef","wires":[]},{"id":"a41b37e0.ff6d18","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":5131.259048461914,"y":2084.7394256591797,"z":"f952bc99.2d7ef","wires":[["1cf60cf2.a24793","943b8edf.5e2ca"]]},{"id":"1cf60cf2.a24793","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5441.092441558838,"y":2090.7128961086273,"z":"f952bc99.2d7ef","wires":[["43ac3bdf.58d534"]]},{"id":"43ac3bdf.58d534","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 allocating level 2 ipv6 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5595.341796875,"y":2090.1295421123505,"z":"f952bc99.2d7ef","wires":[]},{"id":"77c85f5b.a8397","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":5075.379409790039,"y":2049.4153594970703,"z":"f952bc99.2d7ef","wires":[]},{"id":"81111598.7b5d98","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 allocating level 2 ipv6 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5594.462703704834,"y":2058.6653487682343,"z":"f952bc99.2d7ef","wires":[]},{"id":"943b8edf.5e2ca","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5440.712371826172,"y":2058.998783826828,"z":"f952bc99.2d7ef","wires":[["81111598.7b5d98"]]},{"id":"28b9496d.d124d6","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4358.714859008789,"y":2021.5132293701172,"z":"f952bc99.2d7ef","wires":[["6ee92545.ca530c","d02ef2e9.1915","c4c2834a.2f88b"]]},{"id":"6ee92545.ca530c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4619.936782836914,"y":2056.846481323242,"z":"f952bc99.2d7ef","wires":[["c1d6e6f8.fbd478"]]},{"id":"c1d6e6f8.fbd478","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4808.15983581543,"y":2074.068770170212,"z":"f952bc99.2d7ef","wires":[["77c85f5b.a8397","a41b37e0.ff6d18"]]},{"id":"d02ef2e9.1915","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4623.047866821289,"y":2094.8463609218597,"z":"f952bc99.2d7ef","wires":[["c1d6e6f8.fbd478"]]},{"id":"c4c2834a.2f88b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4618.217056274414,"y":2021.8730926513672,"z":"f952bc99.2d7ef","wires":[["bd9b036e.d38c1"]]},{"id":"bd9b036e.d38c1","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4765.550552368164,"y":2020.2062225341797,"z":"f952bc99.2d7ef","wires":[]},{"id":"54bc6c39.509e84","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 allocating level 2 ipv4 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5392.009033203125,"y":1635.462946653366,"z":"f952bc99.2d7ef","wires":[]},{"id":"d462e2e2.f246","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 allocating level 2 ipv4 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5391.129940032959,"y":1603.9987533092499,"z":"f952bc99.2d7ef","wires":[]},{"id":"d6d05e96.2a1d9","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 allocating level 2 ipv4 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4114.370376586914,"y":1710.2949676513672,"z":"f952bc99.2d7ef","wires":[]},{"id":"968cba1b.6591b8","type":"comment","name":"Check for mask override","info":"","comments":"","x":679.4285278320312,"y":310.7976264953613,"z":"f952bc99.2d7ef","wires":[]},{"id":"f066a056.88e02","type":"for","name":"for pidx..$network-topology-operation-input.network-request-input.network-input-parameters[]","xml":"<for index='pidx' start='0' end='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":1892.2857666015625,"y":376.36910581588745,"z":"f952bc99.2d7ef","wires":[["29675950.07bd36"]]},{"id":"4ad3e9cf.db5138","type":"switchNode","name":"network-topology-operation-input.network-request-input.network-input-parameters.param_length","xml":"<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">","comments":"","outputs":1,"x":905.1427917480469,"y":343.65476417541504,"z":"f952bc99.2d7ef","wires":[["bde1f4c2.7b0f68","c3a89e3b.da7ed"]]},{"id":"bde1f4c2.7b0f68","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1336.5712642669678,"y":344.08334732055664,"z":"f952bc99.2d7ef","wires":[["6707b611.7d4008"]]},{"id":"6707b611.7d4008","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1501.9998953683034,"y":344.2262050083705,"z":"f952bc99.2d7ef","wires":[["fbcf20a2.8d01d"]]},{"id":"c3a89e3b.da7ed","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1320.8569374084473,"y":376.5119152069092,"z":"f952bc99.2d7ef","wires":[["85e306cd.346a18"]]},{"id":"85e306cd.346a18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1492.857048034668,"y":376.51190757751465,"z":"f952bc99.2d7ef","wires":[["f066a056.88e02"]]},{"id":"29675950.07bd36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2327.42822265625,"y":376.6071472167969,"z":"f952bc99.2d7ef","wires":[["db0dae6d.e44c7","29e7a409.d906cc"]]},{"id":"db0dae6d.e44c7","type":"execute","name":"SliStringUtils - check v4 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains'  emitsOutcome='true' >\n    <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n    <parameter name=\"target\" value=\"network_assignments_ipv4_subnet_default_assignment_cidr_mask\"/>\n  \n","comments":"","outputs":1,"x":2591.7615509033203,"y":376.27378845214844,"z":"f952bc99.2d7ef","wires":[["efd3997c.b56db8","807884aa.4d3f48"]]},{"id":"efd3997c.b56db8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2819.0951194763184,"y":376.273832321167,"z":"f952bc99.2d7ef","wires":[["17f753f8.49b80c"]]},{"id":"17f753f8.49b80c","type":"set","name":"set subnet override for v4","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v4' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3027.428394317627,"y":376.27378273010254,"z":"f952bc99.2d7ef","wires":[]},{"id":"807884aa.4d3f48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2822.428451538086,"y":411.27381896972656,"z":"f952bc99.2d7ef","wires":[["526fe82a.18d528"]]},{"id":"526fe82a.18d528","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v4\" value=\"`$network-model.ipv4-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":3039.094970703125,"y":411.2738037109375,"z":"f952bc99.2d7ef","wires":[]},{"id":"29e7a409.d906cc","type":"execute","name":"SliStringUtils - check v4 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains'  emitsOutcome='true' >\n    <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n    <parameter name=\"target\" value=\"network_assignments_ipv6_subnet_default_assignment_cidr_mask\"/>\n  \n","comments":"","outputs":1,"x":2595.76171875,"y":457.9404602050781,"z":"f952bc99.2d7ef","wires":[["b5bfb5c2.97ab28","fe68cfd8.e16af"]]},{"id":"b5bfb5c2.97ab28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2823.095287322998,"y":457.9405040740967,"z":"f952bc99.2d7ef","wires":[["6746fdb3.eceef4"]]},{"id":"6746fdb3.eceef4","type":"set","name":"set subnet override for v6","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v6' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3031.428436279297,"y":462.94046354293823,"z":"f952bc99.2d7ef","wires":[]},{"id":"fe68cfd8.e16af","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2826.4286193847656,"y":492.94049072265625,"z":"f952bc99.2d7ef","wires":[["aafa7dcb.dff8c"]]},{"id":"aafa7dcb.dff8c","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v6\" value=\"`$network-model.ipv6-cidr-mask`\" />\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":3043.0951385498047,"y":492.9404754638672,"z":"f952bc99.2d7ef","wires":[]},{"id":"fbcf20a2.8d01d","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v4\" value=\"`$network-model.ipv4-cidr-mask`\" />\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v6\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":1716.4283752441406,"y":341.27379512786865,"z":"f952bc99.2d7ef","wires":[]}]
+[{"id":"26a5ca6.1c01336","type":"dgstart","name":"DGSTART","outputs":1,"x":330.0048828125,"y":106.2548828125,"z":"13273219.a2462e","wires":[["74e1a712.f43b48"]]},{"id":"74e1a712.f43b48","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":392.5763130187988,"y":158.21916675567627,"z":"13273219.a2462e","wires":[["a13ee1a0.aff3b"]]},{"id":"a13ee1a0.aff3b","type":"method","name":"process-eipam-pools","xml":"<method rpc=\"process-eipam-pools\" mode=\"sync\">","comments":"","outputs":1,"x":326.90962982177734,"y":249.63584804534912,"z":"13273219.a2462e","wires":[["decca8b7.d137d8"]]},{"id":"ca8cc337.0ec27","type":"comment","name":"GENERIC-RESOURCE-API: PROCESS-EIPAM-POOLS","info":"","comments":"","x":788.4096832275391,"y":99.88583183288574,"z":"13273219.a2462e","wires":[]},{"id":"9e716ee7.6d1a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":518.6596641540527,"y":408.4692497253418,"z":"13273219.a2462e","wires":[["8835f153.a604c","a0c28b8c.701b58","971f07f1.cc61b8","510fe372.d8df2c","4cc7733a.da8a4c","bbb3baa4.d38678","49a676db.497248","5efc09b8.c40c58","b43df66.6f46008","5af4e899.fd1ad8","41091a95.2f2404","40348bbc.184364"]]},{"id":"929b8679.970fa8","type":"comment","name":"CLEANUP LOCAL VARIABLES TO BE USED","info":"","comments":"","x":859.0167236328125,"y":132.23112392425537,"z":"13273219.a2462e","wires":[]},{"id":"510fe372.d8df2c","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.region' value='`$aai.complex.region`' />\n<parameter name='tmp.cloud-region-id' value=\"`$aai.cloud-region.cloud-region-id`\" />\n<parameter name='tmp.physical-location-id' value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.clli\" value=\"`$aai.complex.physical-location-id`\" />\n<parameter name=\"tmp.zone\" value=\"`$aai.cloud-region.cloud-zone`\" />\n<parameter name=\"tmp.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.service-type\" value=\"`$network-topology-operation-input.service-information.subscription-service-type`\" />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n<parameter name=\"tmp.level1-key-value\" value=\"`$tmp.location8 + ':' + $aai.cloud-region.cloud-region-id`\" />\n<parameter name=\"tmp.level2-key-value\" value=\"`$network-model.network-role + ':' + $tmp.l3-network.network-id`\" />\n<parameter name=\"tmp.ipv4-cidr-mask\" value=\"`$network-model.ipv4-cidr-mask`\" />\n<parameter name=\"tmp.ipv6-cidr-mask\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"","x":810.9639434814453,"y":260.13062715530396,"z":"13273219.a2462e","wires":[]},{"id":"81093b35.926608","type":"comment","name":"Process level 1 pool - works v4 and v6","info":"","comments":"","x":833.9006652832031,"y":450.4877738952637,"z":"13273219.a2462e","wires":[]},{"id":"8835f153.a604c","type":"call","name":"call eipam-create-network-role-pool for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":881.5196380615234,"y":490.0591506958008,"z":"13273219.a2462e","wires":[["be0f5d3d.999be","bf64d71a.01b678"]]},{"id":"821df4f7.68f4b8","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2383.4125022888184,"y":640.6783409118652,"z":"13273219.a2462e","wires":[["a0a2c0af.38716","578b6235.e398bc"]]},{"id":"a0a2c0af.38716","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2804.972099304199,"y":714.7213172912598,"z":"13273219.a2462e","wires":[["bbd0b56.6f62848"]]},{"id":"be0f5d3d.999be","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1170.1978797912598,"y":491.387882232666,"z":"13273219.a2462e","wires":[["cf338f9d.20013"]]},{"id":"cf338f9d.20013","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 allocating subnet in EIPAM.  Error creating level 1 pool. ' + $error-message`\" />\n\t","comments":"","x":1343.4479904174805,"y":490.59021377563477,"z":"13273219.a2462e","wires":[]},{"id":"f2592640.3b1438","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":4376.399833679199,"y":800.2379503250122,"z":"13273219.a2462e","wires":[["e8553677.862948","c29653be.ac7cc"]]},{"id":"e8553677.862948","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4649.566822052002,"y":797.8780546188354,"z":"13273219.a2462e","wires":[["113aa130.3128ff"]]},{"id":"113aa130.3128ff","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 allocating subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4823.816337585449,"y":796.294680595398,"z":"13273219.a2462e","wires":[]},{"id":"ec60a377.0783b","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4248.344123840332,"y":726.3490304946899,"z":"13273219.a2462e","wires":[]},{"id":"bbd0b56.6f62848","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2994.7151412963867,"y":712.8581581115723,"z":"13273219.a2462e","wires":[["a4b3682.cadc198","ee5fcb95.7a1fc8"]]},{"id":"2bc2eb0b.32d0c4","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4326.186592102051,"y":763.5805978775024,"z":"13273219.a2462e","wires":[]},{"id":"e1ed1cc.fbec7e","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 allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4822.936416625977,"y":837.8305807113647,"z":"13273219.a2462e","wires":[]},{"id":"c29653be.ac7cc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4654.186408996582,"y":837.8306169509888,"z":"13273219.a2462e","wires":[["e1ed1cc.fbec7e"]]},{"id":"decca8b7.d137d8","type":"switchNode","name":"switch","xml":"<switch test='`$tmp.process-eipam-action`'>\n","comments":"","outputs":1,"x":282.18747329711914,"y":330.5802879333496,"z":"13273219.a2462e","wires":[["a516bf77.c80e8","d5fbf628.c1c488","f67aa8de.8c0578"]]},{"id":"a516bf77.c80e8","type":"other","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":339.1041069030762,"y":409.4136161804199,"z":"13273219.a2462e","wires":[["9e716ee7.6d1a"]]},{"id":"d5fbf628.c1c488","type":"other","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":298.4281692504883,"y":2748.895079135895,"z":"13273219.a2462e","wires":[["1c42d9e6.7b1b46"]]},{"id":"f67aa8de.8c0578","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":288.428186416626,"y":2818.895172595978,"z":"13273219.a2462e","wires":[["1e63660f.426e7a"]]},{"id":"1e63660f.426e7a","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=\"Invalid option to process-eipam\" />\n\t","comments":"","x":498.4281692504883,"y":2818.895079135895,"z":"13273219.a2462e","wires":[]},{"id":"4cc7733a.da8a4c","type":"set","name":"clean up local variables","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name='tmp.location8' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='' />\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='' />\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='' />\n<parameter name='tmp.l3-network.level2.v4.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='' />\n<parameter name='tmp.l3-network.level2.v6.pool.pre-existing' value='false' />\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='false' />\n\n","comments":"","x":798.1304626464844,"y":195.9162826538086,"z":"13273219.a2462e","wires":[]},{"id":"1c42d9e6.7b1b46","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=\"Invalid option to process-eipam\" />\n\t","comments":"","x":496.76151275634766,"y":2738.895079135895,"z":"13273219.a2462e","wires":[]},{"id":"51f43cfc.dddeb4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1524.2109756469727,"y":494.28662490844727,"z":"13273219.a2462e","wires":[[]]},{"id":"bf64d71a.01b678","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1173.3538856506348,"y":525.6040992736816,"z":"13273219.a2462e","wires":[["9ea6458b.4ba778"]]},{"id":"578b6235.e398bc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2800.401710510254,"y":630.8898906707764,"z":"13273219.a2462e","wires":[["97b6ef9c.ea63"]]},{"id":"bf91aa56.8eb818","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3168.5921173095703,"y":630.0327854156494,"z":"13273219.a2462e","wires":[[]]},{"id":"a0c28b8c.701b58","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":824.6873512268066,"y":603.8105621337891,"z":"13273219.a2462e","wires":[["ae3d966a.c9c648"]]},{"id":"ae3d966a.c9c648","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1039.687484741211,"y":602.5724363327026,"z":"13273219.a2462e","wires":[["43bbc76a.c3f6b8"]]},{"id":"43bbc76a.c3f6b8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1220.5920791625977,"y":603.0010662078857,"z":"13273219.a2462e","wires":[["af7f6527.edb5c8"]]},{"id":"8825b922.356dc8","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2307.973171234131,"y":600.6677207946777,"z":"13273219.a2462e","wires":[]},{"id":"fc1d4e.48cd62b","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3236.3058471679688,"y":669.3344402313232,"z":"13273219.a2462e","wires":[]},{"id":"97b6ef9c.ea63","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2965.4278869628906,"y":629.4878120422363,"z":"13273219.a2462e","wires":[["bf91aa56.8eb818","fc1d4e.48cd62b"]]},{"id":"9ea6458b.4ba778","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1344.7980880737305,"y":525.5247535705566,"z":"13273219.a2462e","wires":[["51f43cfc.dddeb4","3ba64f1d.b8549"]]},{"id":"3ba64f1d.b8549","type":"set","name":"Save return values from eipam level 1 pool","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.pool.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level1.v6.pool.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1627.1314697265625,"y":524.1914081573486,"z":"13273219.a2462e","wires":[]},{"id":"c10611d3.6d382","type":"call","name":"call eipam-allocate-network-role-subnet for level 1 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2438.1317138671875,"y":880.7469024658203,"z":"13273219.a2462e","wires":[["3443f1a6.7f03ce","d27f450.b62b6b8"]]},{"id":"3443f1a6.7f03ce","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2765.358070373535,"y":946.789813041687,"z":"13273219.a2462e","wires":[["4f6f9cb9.a07924"]]},{"id":"37233d85.e67162","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":4295.453617095947,"y":1000.6396789550781,"z":"13273219.a2462e","wires":[["57b5862f.1058c8","ea103017.440e8"]]},{"id":"57b5862f.1058c8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4605.287010192871,"y":1006.6131494045258,"z":"13273219.a2462e","wires":[["68b2fca.6643404"]]},{"id":"68b2fca.6643404","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 allocating subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4759.536365509033,"y":1006.0297954082489,"z":"13273219.a2462e","wires":[]},{"id":"4f6f9cb9.a07924","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2955.1011123657227,"y":944.9266538619995,"z":"13273219.a2462e","wires":[["9390a183.d5941","e26666fa.6a5278"]]},{"id":"c2e2769.3bad588","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4243.573734283447,"y":957.3155810832977,"z":"13273219.a2462e","wires":[]},{"id":"4770b69.349e548","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 allocating subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":4758.657272338867,"y":974.5656020641327,"z":"13273219.a2462e","wires":[]},{"id":"ea103017.440e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4604.906940460205,"y":974.8990371227264,"z":"13273219.a2462e","wires":[["4770b69.349e548"]]},{"id":"d27f450.b62b6b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2776.1210403442383,"y":880.2918062210083,"z":"13273219.a2462e","wires":[["9d36a9ac.fef518"]]},{"id":"8a97ab57.38cf98","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":3119.3113975524902,"y":841.1013469696045,"z":"13273219.a2462e","wires":[[]]},{"id":"971f07f1.cc61b8","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":827.4069366455078,"y":803.8791933059692,"z":"13273219.a2462e","wires":[["f3e1324c.6612e"]]},{"id":"f3e1324c.6612e","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1122.5497970581055,"y":803.6410779953003,"z":"13273219.a2462e","wires":[["12147367.4a8bdd"]]},{"id":"12147367.4a8bdd","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1281.5498428344727,"y":804.3077039718628,"z":"13273219.a2462e","wires":[["2ff782e5.e2ab0e"]]},{"id":"a6235f03.e315","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='1' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n\n","comments":"","x":2354.6925048828125,"y":845.7362957000732,"z":"13273219.a2462e","wires":[]},{"id":"62308253.bd37fc","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3187.0252647399902,"y":878.4030437469482,"z":"13273219.a2462e","wires":[]},{"id":"9d36a9ac.fef518","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2941.147216796875,"y":878.8897275924683,"z":"13273219.a2462e","wires":[["8a97ab57.38cf98","62308253.bd37fc"]]},{"id":"af7f6527.edb5c8","type":"get-resource","name":"get-resource V4 - validate if level 1 subnet does not exists","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.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1556.7508544921875,"y":602.5565061569214,"z":"13273219.a2462e","wires":[["f8f9d373.532b","72e91999.024938"]]},{"id":"f8f9d373.532b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1874.7508544921875,"y":572.9730968475342,"z":"13273219.a2462e","wires":[["ef161a9c.0d0c68"]]},{"id":"72e91999.024938","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1874.8629150390625,"y":602.7231283187866,"z":"13273219.a2462e","wires":[["b674f36a.1a068"]]},{"id":"b674f36a.1a068","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2031.3291053771973,"y":599.4370555877686,"z":"13273219.a2462e","wires":[["8825b922.356dc8","821df4f7.68f4b8"]]},{"id":"ef161a9c.0d0c68","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2031.7230262756348,"y":573.4731271266937,"z":"13273219.a2462e","wires":[["bc822129.93202","5d6a12e4.f7367c"]]},{"id":"bc822129.93202","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2242.1395416259766,"y":532.8898344039917,"z":"13273219.a2462e","wires":[[]]},{"id":"5d6a12e4.f7367c","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n\n","comments":"","x":2335.6036529541016,"y":565.6915016174316,"z":"13273219.a2462e","wires":[]},{"id":"2ff782e5.e2ab0e","type":"get-resource","name":"get-resource V6 - validate if level 1 subnet does not exists","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.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 1 and k.key_value = $tmp.level1-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1598.6874694824219,"y":803.9689569473267,"z":"13273219.a2462e","wires":[["73286b3d.7c3de4","b9f2f0d3.63cbb"]]},{"id":"73286b3d.7c3de4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1920.020523071289,"y":807.3023300170898,"z":"13273219.a2462e","wires":[["f45581d4.512d6"]]},{"id":"b9f2f0d3.63cbb","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1928.8826522827148,"y":853.3023607730865,"z":"13273219.a2462e","wires":[["e7b8d744.8ea788"]]},{"id":"e7b8d744.8ea788","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2079.0988235473633,"y":851.2663195133209,"z":"13273219.a2462e","wires":[["a6235f03.e315","c10611d3.6d382"]]},{"id":"36abb80c.f7d488","type":"comment","name":"Check if level1 ipv6 subnet exists","info":"","comments":"","x":1514.0525512695312,"y":772.3023738861084,"z":"13273219.a2462e","wires":[]},{"id":"f45581d4.512d6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2103.242691040039,"y":807.3023300170898,"z":"13273219.a2462e","wires":[["5e1dfaca.7d1de4","8692643b.73b088"]]},{"id":"5e1dfaca.7d1de4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2301.242607116699,"y":765.3024101257324,"z":"13273219.a2462e","wires":[[]]},{"id":"8692643b.73b088","type":"set","name":"set pre-existing for l3subnet for level1","xml":"<set>\n<parameter name='tmp.l3-network.level1.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level1.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level1.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level1.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2392.956558227539,"y":804.6040267944336,"z":"13273219.a2462e","wires":[]},{"id":"bbb3baa4.d38678","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name='eipam-pool.v4.pre-existing' value='false' />\n<parameter name='eipam-pool.v6.pre-existing' value='false' />\n","comments":"","x":825.4560546875,"y":942.9322824478149,"z":"13273219.a2462e","wires":[]},{"id":"84167862.8d4608","type":"comment","name":"Process level 2 pool - works v4 and v6","info":"","comments":"","x":926.0118179321289,"y":1050.7655863761902,"z":"13273219.a2462e","wires":[]},{"id":"49a676db.497248","type":"call","name":"call eipam-create-network-role-pool for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-create-network-role-pool' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":889.6308135986328,"y":978.1941261291504,"z":"13273219.a2462e","wires":[["e2699b39.b4f1b8","855112f1.7ac38"]]},{"id":"b8a9a3d0.bcc68","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2570.6066856384277,"y":1403.7337074279785,"z":"13273219.a2462e","wires":[["3a4d7362.3951cc","daecaf42.f4517"]]},{"id":"3a4d7362.3951cc","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":2915.8329849243164,"y":1449.7767696380615,"z":"13273219.a2462e","wires":[["2aa7a17.8253c5e"]]},{"id":"e2699b39.b4f1b8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1192.392448425293,"y":978.9988918304443,"z":"13273219.a2462e","wires":[["d1bdae81.46c86"]]},{"id":"d3bdbb5f.8fad18","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 allocating subnet in EIPAM.  Error creating level 2 pool\" />\n\t","comments":"","x":1555.4522323608398,"y":975.6773777008057,"z":"13273219.a2462e","wires":[]},{"id":"b390984b.905dc8","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":4367.261474609375,"y":1478.848892211914,"z":"13273219.a2462e","wires":[["367c3d33.3aa6f2","e03da82.9460b58"]]},{"id":"367c3d33.3aa6f2","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4672.4288330078125,"y":1474.488925933838,"z":"13273219.a2462e","wires":[[]]},{"id":"308acba1.d8b8e4","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":4239.205749511719,"y":1402.959903717041,"z":"13273219.a2462e","wires":[]},{"id":"2aa7a17.8253c5e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3105.576026916504,"y":1447.913610458374,"z":"13273219.a2462e","wires":[["83fbd2ff.3f684","f7621f6a.bcfcd"]]},{"id":"d38997f6.9e0988","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4317.0482177734375,"y":1440.1914710998535,"z":"13273219.a2462e","wires":[]},{"id":"e03da82.9460b58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4673.0484619140625,"y":1512.441562652588,"z":"13273219.a2462e","wires":[[]]},{"id":"ac8fe90.639de18","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field5\" value=\"`$eipam-pool.v4.pre-existing`\"/>\n<parameter name=\"field6\" value=\"eipam-pool.v4.pre-existing\"/>\n<parameter name=\"field7\" value=\"`$eipam-pool.v6.pre-existing`\"/>\n<parameter name=\"field8\" value=\"tmp.create-v4-pool-flag\" />\n<parameter name=\"field9\" value=\"`$tmp.create-v4-pool-flag`\" />\n<parameter name=\"field10\" value=\"tmp.create-v6-pool-flag\" />\n<parameter name=\"field11\" value=\"`$tmp.create-v6-pool-flag`\" />\n\n","comments":"","outputs":1,"x":1544.0722274780273,"y":1010.8976554870605,"z":"13273219.a2462e","wires":[[]]},{"id":"855112f1.7ac38","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1192.2149963378906,"y":1010.5483727455139,"z":"13273219.a2462e","wires":[["699ee235.f1dbfc"]]},{"id":"daecaf42.f4517","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2924.5960083007812,"y":1399.2786293029785,"z":"13273219.a2462e","wires":[["715d357a.98f3ac"]]},{"id":"59c01406.8fcf5c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":3369.1201171875,"y":1340.4214515686035,"z":"13273219.a2462e","wires":[[]]},{"id":"5efc09b8.c40c58","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":825.2150840759277,"y":1328.199465751648,"z":"13273219.a2462e","wires":[["c72f2288.0a2f5"]]},{"id":"c72f2288.0a2f5","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1169.0248069763184,"y":1325.2946891784668,"z":"13273219.a2462e","wires":[["a9493ce.e3e59c"]]},{"id":"a9493ce.e3e59c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1323.0247497558594,"y":1324.294692993164,"z":"13273219.a2462e","wires":[["25d3a2dc.2588ce"]]},{"id":"b98d84fb.d73f78","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv4' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v4`\" />\n","comments":"","x":2485.1673851013184,"y":1361.7229652404785,"z":"13273219.a2462e","wires":[]},{"id":"ea0e7273.2d7a1","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3438.833740234375,"y":1375.723331451416,"z":"13273219.a2462e","wires":[]},{"id":"715d357a.98f3ac","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3089.622184753418,"y":1397.8765506744385,"z":"13273219.a2462e","wires":[["59c01406.8fcf5c","ea0e7273.2d7a1"]]},{"id":"699ee235.f1dbfc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1361.326084136963,"y":1009.802442073822,"z":"13273219.a2462e","wires":[["ac8fe90.639de18","e8050219.af8cb"]]},{"id":"e8050219.af8cb","type":"set","name":"Save return values from eipam level 2 pool","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.pre-existing' value='`$eipam-pool.v4.pre-existing`'/>\n<parameter name='tmp.l3-network.level2.v6.pre-existing' value='`$eipam-pool.v6.pre-existing`'/>\n","comments":"","x":1650.326099395752,"y":1042.802372932434,"z":"13273219.a2462e","wires":[]},{"id":"a8bd6055.9077c","type":"call","name":"call eipam-allocate-network-role-subnet for level 2 pool","xml":"<call module='GENERIC-RESOURCE-API' rpc='eipam-allocate-network-role-subnet' mode='sync' >\n","comments":"","outputs":1,"x":2814.9930419921875,"y":1877.598331451416,"z":"13273219.a2462e","wires":[["d5830192.64037","dd267a76.2bed88"]]},{"id":"d5830192.64037","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":3192.8861083984375,"y":1906.141544342041,"z":"13273219.a2462e","wires":[["2f7196d8.47f47a"]]},{"id":"e89c3ffe.854bc","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":4570.31494140625,"y":1987.2136268615723,"z":"13273219.a2462e","wires":[["fe4065e1.db6d38","40ff689.0e45898"]]},{"id":"fe4065e1.db6d38","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":4885.481731414795,"y":1944.853796005249,"z":"13273219.a2462e","wires":[[]]},{"id":"9fc036f4.3c53b8","type":"comment","name":"Rollback level 1 pool","info":"","comments":"","x":3678.2588806152344,"y":1881.3248128890991,"z":"13273219.a2462e","wires":[]},{"id":"2f7196d8.47f47a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3352.6292724609375,"y":1902.2783851623535,"z":"13273219.a2462e","wires":[["433c3e71.52ba2","4d0efd6c.1776a4"]]},{"id":"ee3babc0.1cd638","type":"set","name":"set: network-id to deallocate level 2 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='2' />\n","comments":"","x":4520.101715087891,"y":1950.556308746338,"z":"13273219.a2462e","wires":[]},{"id":"40ff689.0e45898","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":4890.10147857666,"y":1984.8063716888428,"z":"13273219.a2462e","wires":[[]]},{"id":"dd267a76.2bed88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3191.649124145508,"y":1869.6435928344727,"z":"13273219.a2462e","wires":[["f64cf0d3.40786"]]},{"id":"8a91df5f.08d47","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ip-prefix`\"/>\n<parameter name=\"field6\" value=\"eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.mask`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":3556.172737121582,"y":1806.7865581512451,"z":"13273219.a2462e","wires":[[]]},{"id":"b43df66.6f46008","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":594.6013793945312,"y":1886.2311353683472,"z":"13273219.a2462e","wires":[["d4112f60.f8379"]]},{"id":"d4112f60.f8379","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1408.0775871276855,"y":1887.6596183776855,"z":"13273219.a2462e","wires":[["eea0303a.7f9a5"]]},{"id":"eea0303a.7f9a5","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1575.4108848571777,"y":1884.9930171966553,"z":"13273219.a2462e","wires":[["98edb47c.7103a8"]]},{"id":"15c0f5d5.df77ea","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='eipam-ip-block.entity-id' value='' />\n<parameter name='eipam-ip-block.ip-prefix' value='' />\n<parameter name='eipam-ip-block.mask' value='' />\n<parameter name=\"eipam-ip-block.allocate-version\" value='ipv6' />\n<parameter name=\"eipam-ip-block.level\" value='2' />\n<parameter name='eipam-ip-block.plans_length' value='0' />\n<parameter name=\"eipam-ip-block.subnet-size-override\" value=\"`$eipam-ip-block.subnet-size-override-v6`\" />\n\n","comments":"","x":2738.2203369140625,"y":1842.0879554748535,"z":"13273219.a2462e","wires":[]},{"id":"280c41ff.c8bfee","type":"set","name":"set values needed for eipam","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$eipam-ip-block.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$eipam-ip-block.mask`' />\n","comments":"","x":3623.8865966796875,"y":1840.0881996154785,"z":"13273219.a2462e","wires":[]},{"id":"f64cf0d3.40786","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3356.6753005981445,"y":1868.2415142059326,"z":"13273219.a2462e","wires":[["8a91df5f.08d47","280c41ff.c8bfee"]]},{"id":"279b22b8.18538e","type":"comment","name":"Allocate ipv4 subnet for level 2","info":"","comments":"","x":936.6597595214844,"y":1264.1358460320366,"z":"13273219.a2462e","wires":[]},{"id":"c2cddcdc.fdb41","type":"comment","name":"Allocate ipv6 subnet for level 1","info":"","comments":"","x":1097.6596069335938,"y":1836.0988311767578,"z":"13273219.a2462e","wires":[]},{"id":"25d3a2dc.2588ce","type":"get-resource","name":"get-resource V4 - validate if level 2 subnet does not exists","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.plan_name = $network-model.eipam-v4-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1701.3263854980469,"y":1324.802568435669,"z":"13273219.a2462e","wires":[["1952016e.3f672f","3db8dd8.554bc22"]]},{"id":"1952016e.3f672f","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2043.6595878601074,"y":1322.135806798935,"z":"13273219.a2462e","wires":[["dc729d74.3017e"]]},{"id":"3db8dd8.554bc22","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2052.521717071533,"y":1368.1358375549316,"z":"13273219.a2462e","wires":[["ad57044b.6c28a8"]]},{"id":"ad57044b.6c28a8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2202.7378883361816,"y":1366.099796295166,"z":"13273219.a2462e","wires":[["b98d84fb.d73f78","b8a9a3d0.bcc68"]]},{"id":"b228f721.dfa6d8","type":"comment","name":"Check if level2 ipv4 subnet exists","info":"","comments":"","x":1670.8819046020508,"y":1228.1358184814453,"z":"13273219.a2462e","wires":[]},{"id":"dc729d74.3017e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2226.8817558288574,"y":1322.135806798935,"z":"13273219.a2462e","wires":[["b0532c9.9f729d","63d7e576.ad29ec"]]},{"id":"b0532c9.9f729d","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level2\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level2\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv4\"/>\n\n\n","comments":"","outputs":1,"x":2426.8817558288574,"y":1274.135806798935,"z":"13273219.a2462e","wires":[[]]},{"id":"63d7e576.ad29ec","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v4.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v4.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v4.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v4.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2516.5956230163574,"y":1319.4375035762787,"z":"13273219.a2462e","wires":[]},{"id":"98edb47c.7103a8","type":"get-resource","name":"get-resource V6 - validate if level 2 subnet does not exists","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.plan_name = $network-model.eipam-v6-address-plan and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value ; \"\n        pfx='tmp.eipam-subnet-row'>\n\n","comments":"","outputs":1,"x":1915.8818130493164,"y":1846.3209190368652,"z":"13273219.a2462e","wires":[["4d9abe6f.03723","5fa34d71.41e264"]]},{"id":"4d9abe6f.03723","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2338.881690979004,"y":1796.3209190368652,"z":"13273219.a2462e","wires":[["6d74200f.9a21b"]]},{"id":"5fa34d71.41e264","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":2347.7438201904297,"y":1842.320949792862,"z":"13273219.a2462e","wires":[["2355885b.84f818"]]},{"id":"2355885b.84f818","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2497.959991455078,"y":1840.2849085330963,"z":"13273219.a2462e","wires":[["15c0f5d5.df77ea","a8bd6055.9077c"]]},{"id":"67fe0d24.77b704","type":"comment","name":"Check if level2 ipv6 subnet exists","info":"","comments":"","x":1834.1040649414062,"y":1806.3208770751953,"z":"13273219.a2462e","wires":[]},{"id":"6d74200f.9a21b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2522.103858947754,"y":1796.3209190368652,"z":"13273219.a2462e","wires":[["723b2abc.e7dcd4","bca9455b.dabdc8"]]},{"id":"723b2abc.e7dcd4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Existing eipam-ip-block.ip-prefix for level1\"/>\n<parameter name=\"field5\" value=\"`$tmp.eipam-subnet-row.ip-address`\"/>\n<parameter name=\"field6\" value=\"Existing eipam-ip-block.mask for level1\"/>\n<parameter name=\"field7\" value=\"`$tmp.eipam-subnet-row.prefix-length`\"/>\n<parameter name=\"field8\" value=\"ipv6\"/>\n\n\n","comments":"","outputs":1,"x":2682.1037979125977,"y":1756.3208847045898,"z":"13273219.a2462e","wires":[[]]},{"id":"bca9455b.dabdc8","type":"set","name":"set pre-existing for l3subnet for level2","xml":"<set>\n<parameter name='tmp.l3-network.level2.v6.subnet.pre-existing' value='true' />\n<parameter name='tmp.l3-network.level2.v6.entity-id' value='`$tmp.eipam-row.entity-id`' />\n<parameter name='tmp.l3-network.level2.v6.ip-prefix' value='`$tmp.eipam-row.ip-address`' />\n<parameter name='tmp.l3-network.level2.v6.mask' value='`$tmp.eipam-row.prefix-length`' />\n\n","comments":"","x":2773.8177490234375,"y":1795.622501373291,"z":"13273219.a2462e","wires":[]},{"id":"a4b3682.cadc198","type":"switchNode","name":"switch: tmp.l3-network.level1.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3296.7508544921875,"y":744.493106842041,"z":"13273219.a2462e","wires":[["e499cd71.43c93","587fff8a.27e9e","cb4647b0.201b38"]]},{"id":"9390a183.d5941","type":"switchNode","name":"switch: tmp.l3-network.level1.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level1.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3250.909580230713,"y":977.4134929180145,"z":"13273219.a2462e","wires":[["97cce460.b59978","c45d0ade.64a628","bcaf0131.0c991"]]},{"id":"8effc3ff.6e142","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4045.7982177734375,"y":762.9694671630859,"z":"13273219.a2462e","wires":[["2bc2eb0b.32d0c4","f2592640.3b1438"]]},{"id":"83fbd2ff.3f684","type":"switchNode","name":"switch: tmp.l3-network.level2.v4.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v4.pool.pre-existing`\">","comments":"","outputs":1,"x":3502.687255859375,"y":1448.746768951416,"z":"13273219.a2462e","wires":[["8cb10eb0.1e01d","75013018.c42ca","e9669fbd.776b7"]]},{"id":"8cb10eb0.1e01d","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3871.020778656006,"y":1439.4136905670166,"z":"13273219.a2462e","wires":[["b1fb1e2.c5d5de"]]},{"id":"b1fb1e2.c5d5de","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4021.909698486328,"y":1439.635980606079,"z":"13273219.a2462e","wires":[["d38997f6.9e0988","b390984b.905dc8","53cff857.660688"]]},{"id":"433c3e71.52ba2","type":"switchNode","name":"switch: tmp.l3-network.level2.v6.pool.pre-existing","xml":"<switch test=\"`$tmp.l3-network.level2.v6.pool.pre-existing`\">","comments":"","outputs":1,"x":3687.6876220703125,"y":1932.709903717041,"z":"13273219.a2462e","wires":[["29ecf01a.181cd","e27e2625.ab3528","988b417d.71bc"]]},{"id":"aa9ed2f7.49cc6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4177.909870147705,"y":1966.932188987732,"z":"13273219.a2462e","wires":[["ee3babc0.1cd638","e89c3ffe.854bc","8fc0591a.42f498"]]},{"id":"75013018.c42ca","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3870.7984924316406,"y":1470.7469425201416,"z":"13273219.a2462e","wires":[["b1fb1e2.c5d5de"]]},{"id":"97cce460.b59978","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3558.1319580078125,"y":1010.7467079162598,"z":"13273219.a2462e","wires":[["29338655.3bb4aa"]]},{"id":"29338655.3bb4aa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":3972.354404449463,"y":989.9690234661102,"z":"13273219.a2462e","wires":[["c2e2769.3bad588","37233d85.e67162"]]},{"id":"c45d0ade.64a628","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3561.2430419921875,"y":1048.7465875148773,"z":"13273219.a2462e","wires":[["29338655.3bb4aa"]]},{"id":"e499cd71.43c93","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3654.1317138671875,"y":761.524845123291,"z":"13273219.a2462e","wires":[["8effc3ff.6e142"]]},{"id":"587fff8a.27e9e","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3653.9094276428223,"y":792.858097076416,"z":"13273219.a2462e","wires":[["8effc3ff.6e142"]]},{"id":"29ecf01a.181cd","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3986.1319904327393,"y":1965.3766059875488,"z":"13273219.a2462e","wires":[["aa9ed2f7.49cc6"]]},{"id":"e27e2625.ab3528","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":3985.909704208374,"y":1996.7098579406738,"z":"13273219.a2462e","wires":[["aa9ed2f7.49cc6"]]},{"id":"ee5fcb95.7a1fc8","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3172.06831741333,"y":709.350076675415,"z":"13273219.a2462e","wires":[[]]},{"id":"d1bdae81.46c86","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1361.0842208862305,"y":971.016815662384,"z":"13273219.a2462e","wires":[["d3bdbb5f.8fad18","3568caa1.e24ec6"]]},{"id":"3568caa1.e24ec6","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Error creating level 2 pool, need to attempt rollback\"/>\n\n\n","comments":"","outputs":1,"x":1538.7032890319824,"y":941.4136028289795,"z":"13273219.a2462e","wires":[[]]},{"id":"e26666fa.6a5278","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level1 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3126.27490234375,"y":944.7150917053223,"z":"13273219.a2462e","wires":[[]]},{"id":"f7621f6a.bcfcd","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv4 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3376.2109985351562,"y":1410.207218170166,"z":"13273219.a2462e","wires":[[]]},{"id":"4d0efd6c.1776a4","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to allocate level2 ipv6 subnet - failure from eipam-allocate-network-role-subnet\"/>\n\n\n\n","comments":"","outputs":1,"x":3554.100341796875,"y":1900.074893951416,"z":"13273219.a2462e","wires":[[]]},{"id":"bcaf0131.0c991","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3556.4120197296143,"y":975.7733252048492,"z":"13273219.a2462e","wires":[["9ebe1aa6.192e88"]]},{"id":"9ebe1aa6.192e88","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3721.745372772217,"y":976.1064937114716,"z":"13273219.a2462e","wires":[]},{"id":"cb4647b0.201b38","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3648.7453842163086,"y":729.2919425964355,"z":"13273219.a2462e","wires":[["92f5bb4d.61dfd8"]]},{"id":"92f5bb4d.61dfd8","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":3818.4121170043945,"y":731.2917356491089,"z":"13273219.a2462e","wires":[]},{"id":"e9669fbd.776b7","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3870.7455291748047,"y":1407.6621828079224,"z":"13273219.a2462e","wires":[["c4d26b8d.b092f8"]]},{"id":"c4d26b8d.b092f8","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4034.078868865967,"y":1405.9953527450562,"z":"13273219.a2462e","wires":[]},{"id":"988b417d.71bc","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3991.7457427978516,"y":1931.6622495651245,"z":"13273219.a2462e","wires":[["6cd0f2c.47b5c0c"]]},{"id":"6cd0f2c.47b5c0c","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4155.079082489014,"y":1929.9954195022583,"z":"13273219.a2462e","wires":[]},{"id":"5c72eb0.0aed714","type":"comment","name":"If preexisting, check to see if there are any level 2 pools whose parent is the level 1, if not remove level 1 pool","info":"","comments":"","x":5343.523345947266,"y":578.106746673584,"z":"13273219.a2462e","wires":[]},{"id":"a1079cc2.e2ee8","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":5049.9312744140625,"y":1636.958652496338,"z":"13273219.a2462e","wires":[["6f04d1d5.5f9ba","540060d6.b2021"]]},{"id":"6f04d1d5.5f9ba","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5359.764667510986,"y":1642.9321229457855,"z":"13273219.a2462e","wires":[["c2ca0fa.2bdc5f"]]},{"id":"d889ce3a.e9edb","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":4994.0516357421875,"y":1601.6345863342285,"z":"13273219.a2462e","wires":[]},{"id":"540060d6.b2021","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5359.38459777832,"y":1611.2180106639862,"z":"13273219.a2462e","wires":[["18bef9ee.c4f286"]]},{"id":"53cff857.660688","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4277.3870849609375,"y":1573.7324562072754,"z":"13273219.a2462e","wires":[["63318349.4d837c","a5cfa2e1.d93ab","b3a7b935.51bae8"]]},{"id":"63318349.4d837c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4538.6090087890625,"y":1609.0657081604004,"z":"13273219.a2462e","wires":[["94a98109.1a794"]]},{"id":"94a98109.1a794","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4726.832061767578,"y":1626.28799700737,"z":"13273219.a2462e","wires":[["d889ce3a.e9edb","a1079cc2.e2ee8"]]},{"id":"a5cfa2e1.d93ab","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4541.7200927734375,"y":1647.065587759018,"z":"13273219.a2462e","wires":[["94a98109.1a794"]]},{"id":"b3a7b935.51bae8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4536.8892822265625,"y":1574.0923194885254,"z":"13273219.a2462e","wires":[["b0d1a533.811538"]]},{"id":"b0d1a533.811538","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4684.2227783203125,"y":1572.425449371338,"z":"13273219.a2462e","wires":[]},{"id":"47a8f869.cbdf48","type":"execute","name":"execute deletePoolByNetworkLevel for level 1 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":5253.2640380859375,"y":2091.6252479553223,"z":"13273219.a2462e","wires":[["9ca9efd1.dd319","e255d0e.1574d3"]]},{"id":"9ca9efd1.dd319","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":5563.097431182861,"y":2097.59871840477,"z":"13273219.a2462e","wires":[["b12f56c1.f36bb8"]]},{"id":"b12f56c1.f36bb8","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 allocating level 2 ipv6 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5717.346786499023,"y":2097.015364408493,"z":"13273219.a2462e","wires":[]},{"id":"76aa1a43.f7cbd4","type":"set","name":"set: network-id to deallocate level 1 subnets","xml":"<set>\n\t<parameter name=\"eipam-ip-block.network-id\" value=\"`$tmp.l3-network.network-id`\" />\n\t<parameter name=\"eipam-ip-block.level\" value='1' />\n","comments":"","x":5197.3843994140625,"y":2056.301181793213,"z":"13273219.a2462e","wires":[]},{"id":"10018766.0764c9","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 allocating level 2 ipv6 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5716.467693328857,"y":2065.551171064377,"z":"13273219.a2462e","wires":[]},{"id":"e255d0e.1574d3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":5562.717361450195,"y":2065.8846061229706,"z":"13273219.a2462e","wires":[["10018766.0764c9"]]},{"id":"8fc0591a.42f498","type":"switchNode","name":"switch: v4 or v6 is preexisting","xml":"<switch test=\"`$tmp.l3-network.level1.v4.pool.pre-existing == true or $tmp.l3-network.level1.v4.pool.pre-existing == true`\">","comments":"","outputs":1,"x":4480.7198486328125,"y":2028.3990516662598,"z":"13273219.a2462e","wires":[["51a738a5.eb4508","5cd9bf93.11988","5afc75b4.b63d4c"]]},{"id":"51a738a5.eb4508","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":4741.9417724609375,"y":2063.7323036193848,"z":"13273219.a2462e","wires":[["ea2401f0.93e87"]]},{"id":"ea2401f0.93e87","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":4930.164825439453,"y":2080.9545924663544,"z":"13273219.a2462e","wires":[["76aa1a43.f7cbd4","47a8f869.cbdf48"]]},{"id":"5cd9bf93.11988","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":4745.0528564453125,"y":2101.7321832180023,"z":"13273219.a2462e","wires":[["ea2401f0.93e87"]]},{"id":"5afc75b4.b63d4c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":4740.2220458984375,"y":2028.7589149475098,"z":"13273219.a2462e","wires":[["e9ecf5a6.862ab8"]]},{"id":"e9ecf5a6.862ab8","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 allocating subnet in EIPAM. Pre-existing pool, no rollback.\" />\n\t","comments":"","x":4887.5555419921875,"y":2027.0920448303223,"z":"13273219.a2462e","wires":[]},{"id":"c2ca0fa.2bdc5f","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 allocating level 2 ipv4 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":5514.014022827148,"y":1642.3487689495087,"z":"13273219.a2462e","wires":[]},{"id":"18bef9ee.c4f286","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 allocating level 2 ipv4 subnet in EIPAM. Rollback complete.\" />\n\t","comments":"","x":5513.134929656982,"y":1610.8845756053925,"z":"13273219.a2462e","wires":[]},{"id":"cc4b6f7a.b133f","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 allocating level 2 ipv4 subnet in EIPAM.  Error rolling back EIPAM level 1 pool.\" />\n\t","comments":"","x":4236.3753662109375,"y":1717.1807899475098,"z":"13273219.a2462e","wires":[]},{"id":"1b1b39d.6e1f5c6","type":"comment","name":"Check for mask override","info":"","comments":"","x":801.4335174560547,"y":317.6834487915039,"z":"13273219.a2462e","wires":[]},{"id":"53d875b9.e25a0c","type":"for","name":"for pidx..$network-topology-operation-input.network-request-input.network-input-parameters[]","xml":"<for index='pidx' start='0' end='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":2014.290756225586,"y":383.25492811203003,"z":"13273219.a2462e","wires":[["12b86022.9f3c9"]]},{"id":"5af4e899.fd1ad8","type":"switchNode","name":"network-topology-operation-input.network-request-input.network-input-parameters.param_length","xml":"<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">","comments":"","outputs":1,"x":1027.1477813720703,"y":350.5405864715576,"z":"13273219.a2462e","wires":[["b56e9929.0631f8","77d0882a.eba8a8"]]},{"id":"b56e9929.0631f8","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1458.5762538909912,"y":350.9691696166992,"z":"13273219.a2462e","wires":[["98af4284.40a5d"]]},{"id":"98af4284.40a5d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1624.0048849923269,"y":351.11202730451305,"z":"13273219.a2462e","wires":[[]]},{"id":"77d0882a.eba8a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1442.8619270324707,"y":383.39773750305176,"z":"13273219.a2462e","wires":[["9e36687d.b7bc78"]]},{"id":"9e36687d.b7bc78","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1614.8620376586914,"y":383.3977298736572,"z":"13273219.a2462e","wires":[["53d875b9.e25a0c"]]},{"id":"12b86022.9f3c9","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2449.4332122802734,"y":383.49296951293945,"z":"13273219.a2462e","wires":[["d16ce2be.ed367","9e089bc0.790198"]]},{"id":"d16ce2be.ed367","type":"execute","name":"SliStringUtils - check v4 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains'  emitsOutcome='true' >\n    <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n    <parameter name=\"target\" value=\"network_assignments_ipv4_subnet_default_assignment_cidr_mask\"/>\n  \n","comments":"","outputs":1,"x":2713.7665405273438,"y":383.159610748291,"z":"13273219.a2462e","wires":[["2ed358db.e30918"]]},{"id":"2ed358db.e30918","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2941.100109100342,"y":383.15965461730957,"z":"13273219.a2462e","wires":[["2e214c0e.51b7d4"]]},{"id":"2e214c0e.51b7d4","type":"set","name":"set subnet override for v4","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v4' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3147.4334564208984,"y":383.15959548950195,"z":"13273219.a2462e","wires":[]},{"id":"9e089bc0.790198","type":"execute","name":"SliStringUtils - check v6 override","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains'  emitsOutcome='true' >\n    <parameter name=\"source\" value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].name`\" />\n    <parameter name=\"target\" value=\"network_assignments_ipv6_subnet_default_assignment_cidr_mask\"/>\n  \n","comments":"","outputs":1,"x":2712.0167541503906,"y":426.32629013061523,"z":"13273219.a2462e","wires":[["ce2eaebf.051b"]]},{"id":"ce2eaebf.051b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2941.3503227233887,"y":427.3263339996338,"z":"13273219.a2462e","wires":[["d902235b.05114"]]},{"id":"d902235b.05114","type":"set","name":"set subnet override for v6","xml":"<set>\n<parameter name='eipam-ip-block.subnet-size-override-v6' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx].value`' />\n\n","comments":"","x":3147.183547973633,"y":427.32629680633545,"z":"13273219.a2462e","wires":[]},{"id":"41091a95.2f2404","type":"set","name":"set subnet override if not set","xml":"<set>\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v4\" value=\"`$network-model.ipv4-cidr-mask`\" />\n\t<parameter name=\"eipam-ip-block.subnet-size-override-v6\" value=\"`$network-model.ipv6-cidr-mask`\" />","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","x":808.4333419799805,"y":293.15962982177734,"z":"13273219.a2462e","wires":[]},{"id":"40348bbc.184364","type":"execute","name":"SliStringUtils - substring clli","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='substring'>\n    <parameter name=\"string\" value=\"`$aai.complex.physical-location-id`\" />\n    <parameter name=\"result\" value=\"tmp.location8\"/>\n    <parameter name=\"begin-index\" value=\"0\" />\n    <parameter name=\"end-index\" value=\"8\" />\n","comments":"","outputs":1,"x":809.0049133300781,"y":229.88975143432617,"z":"13273219.a2462e","wires":[[]]}]
\ No newline at end of file