aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_process-eipam-pools.json
blob: 44fe02256f592e608b7cbf451e26962537f0dace (plain)
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.sli.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.sli.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.sli.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.sli.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":[]}]