Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_process-eipam-pools.json
1 [{"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":[[]]}]