Fix error in SqlResource name
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / SUBNET-API_subnet-allocated-notification.json
index 0cb2768..9922821 100755 (executable)
@@ -1 +1 @@
-[{"id":"a9213005.00cca","type":"dgstart","name":"DGSTART","outputs":1,"x":98.5714340209961,"y":81.42857360839844,"z":"27680826.c34468","wires":[["65d9132d.dd809c"]]},{"id":"e622bdcc.42acc","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":666.2379531860352,"y":195.70635223388672,"z":"27680826.c34468","wires":[["3f075783.e441e8"]]},{"id":"82f4ac79.53fcc","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":659.2380752563477,"y":344.5952682495117,"z":"27680826.c34468","wires":[["5356707.3c69f9"]]},{"id":"7e9ea036.3fddd","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \n","x":1179.7378616333008,"y":257.4286117553711,"z":"27680826.c34468","wires":[]},{"id":"ed648022.197df","type":"save","name":"save: EIPAM IP Subnets PendingActive","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n        <parameter name=\"status\" value=\"PENDING-ACTIVE\" />\n       \n","outputs":1,"x":1623.688247680664,"y":115.29525184631348,"z":"27680826.c34468","wires":[[]]},{"id":"dd2ccccd.fbd74","type":"method","name":"subnet-allocated-notification","xml":"<method rpc='subnet-allocated-notification' mode='sync'>\n","comments":"","outputs":1,"x":668.4381484985352,"y":81.29524612426758,"z":"27680826.c34468","wires":[["1d020804.ffe728"]]},{"id":"1d020804.ffe728","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":122.68812561035156,"y":169.7952480316162,"z":"27680826.c34468","wires":[["710e1c1e.4120b4","c02428aa.992358"]]},{"id":"710e1c1e.4120b4","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":277.8310012817383,"y":172.38293743133545,"z":"27680826.c34468","wires":[[]]},{"id":"1fe611b1.8156ae","type":"configure","name":"configure ncs SNIIR ","xml":"<configure adaptor=\"com.att.sdnctl.sli.adaptor.ncs.ncsAdaptor\" key=\"SNIIR\" activate=\"true\">\n\t<parameter name=\"input.request-id\" value=\"`$eipam-ip-block.request-id`\" />\n\t<parameter name=\"input.source\" value=\"SDNC\" />\n\t<parameter name=\"input.ptnii-name\" value=\"`$eipam-ip-block.ptnii-name`\" />\n\t<parameter name=\"input.ip-address\" value=\"`$eipam-ip-block.ip-address`\" />\n\t<parameter name=\"input.mask\" value=\"`$eipam-ip-block.prefix-length`\" />","outputs":1,"x":416.7381057739258,"y":274.3452682495117,"z":"27680826.c34468","wires":[["e622bdcc.42acc","82f4ac79.53fcc"]]},{"id":"22ec13a0.6a868c","type":"save","name":"save: EIPAM IP Subnets ERROR","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n        <parameter name=\"status\" value=\"ERROR\" />\n       \n","outputs":1,"x":1675.2381210327148,"y":479.78968620300293,"z":"27680826.c34468","wires":[[]]},{"id":"3f075783.e441e8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":880.5713577270508,"y":195.23967742919922,"z":"27680826.c34468","wires":[["57e63c8f.0955b4","26b12811.2f48c8","7e9ea036.3fddd","4939e504.9f364c"]]},{"id":"57e63c8f.0955b4","type":"set","name":"set: status = Pending Active","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","x":1212.0381546020508,"y":165.79524993896484,"z":"27680826.c34468","wires":[]},{"id":"26b12811.2f48c8","type":"save","name":"save: status = Pending Active","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","outputs":1,"x":1221.0380935668945,"y":211.79521942138672,"z":"27680826.c34468","wires":[[]]},{"id":"dd7e082.29230f8","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1304.538459777832,"y":516.6062850952148,"z":"27680826.c34468","wires":[]},{"id":"197a8f9d.0aba4","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1309.538703918457,"y":564.6062850952148,"z":"27680826.c34468","wires":[[]]},{"id":"65d9132d.dd809c","type":"service-logic","name":"SUBNET-API ${project.version}","module":"SUBNET-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='SUBNET-API' version='${project.version}'>","outputs":1,"x":336.5214614868164,"y":81.74525833129883,"z":"27680826.c34468","wires":[["dd2ccccd.fbd74"]]},{"id":"ed7e5b43.0a4c88","type":"comment","name":"ChangeLog","info":"1.0.0: Release 1504\n2.0.0: Release 1507 - Remove Update Inventory\n9/16: update record node format\nRelease 1710 - update to include VIPR & SRIOV address plans","comments":"","x":84.52143096923828,"y":28.745243072509766,"z":"27680826.c34468","wires":[]},{"id":"5356707.3c69f9","type":"execute","name":"execute EIPAM deletePool","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePool\">\n\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":878.0896682739258,"y":344.0625534057617,"z":"27680826.c34468","wires":[["b4c80bc2.8ed758","c3cd7f2c.ff58b"]]},{"id":"d7bb127f.ac3d1","type":"set","name":"set: status = Deleted","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"DELETED\" />","comments":"","x":1569.089485168457,"y":278.50691986083984,"z":"27680826.c34468","wires":[]},{"id":"b4c80bc2.8ed758","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":1163.6450881958008,"y":398.39583587646484,"z":"27680826.c34468","wires":[["4a9084e7.17a3fc"]]},{"id":"4a9084e7.17a3fc","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":1064.0055618286133,"y":493.5070114135742,"z":"27680826.c34468","wires":[["dd7e082.29230f8","197a8f9d.0aba4","737ff142.6bf88","6586b53f.f980cc","268c791.e069e86","f38846a2.f8b938"]]},{"id":"737ff142.6bf88","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"1000\" />\n              <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool failed in EIPAM, need to manually delete\" />\n","comments":"","x":1276.339012145996,"y":707.3958234786987,"z":"27680826.c34468","wires":[]},{"id":"c3cd7f2c.ff58b","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":1172.8146438598633,"y":345.5396041870117,"z":"27680826.c34468","wires":[["ab627f0f.dca16"]]},{"id":"eba669ea.07a7f8","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"1000\" />\n              <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool deleted in EIPAM\" />\n","comments":"","x":1543.7034378051758,"y":423.76171112060547,"z":"27680826.c34468","wires":[]},{"id":"ab627f0f.dca16","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1369.919734954834,"y":345.3755683898926,"z":"27680826.c34468","wires":[["d7bb127f.ac3d1","eba669ea.07a7f8","ea42344d.d237c8","d02d0150.a724a"]]},{"id":"ea42344d.d237c8","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" key=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1697.8214797973633,"y":377.8452682495117,"z":"27680826.c34468","wires":[[]]},{"id":"6586b53f.f980cc","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" key=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1430.738166809082,"y":658.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"d02d0150.a724a","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deleted in EIPAM.\"/>\n","comments":"","outputs":1,"x":1639.9047927856445,"y":328.42858123779297,"z":"27680826.c34468","wires":[[]]},{"id":"268c791.e069e86","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deletion failed in EIPAM, need to manually delete.\"/>","comments":"","outputs":1,"x":1369.9047927856445,"y":612.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"c02428aa.992358","type":"switchNode","name":"switch: ptnii_name","xml":"<switch test=\"`$eipam-ip-block.ptnii-name`\">","comments":"Need to know which ipv version to get the plan name from the network-model.","outputs":1,"x":133.75003814697266,"y":365.0000057220459,"z":"27680826.c34468","wires":[["4235b5fd.e7ef8c","ff5e0fec.f83"]]},{"id":"ff5e0fec.f83","type":"other","name":"Null","xml":"<outcome value=''>","comments":"If no ptnii-name, check if VIPR or SRIOV","outputs":1,"x":216.25000381469727,"y":903.7500133514404,"z":"27680826.c34468","wires":[["16b88750.f9c8d9"]]},{"id":"4235b5fd.e7ef8c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"If there's ptnii-name, then it's Gamma service","outputs":1,"x":307.5,"y":370,"z":"27680826.c34468","wires":[["1fe611b1.8156ae"]]},{"id":"16b88750.f9c8d9","type":"execute","name":"execute plan-name startsWith AIC","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils\" method=\"startsWith\" emitsOutcome='true' >\n<parameter name=\"source\" value=\"`toUpperCase($eipam-ip-block.plan-name)`\" />\n<parameter name=\"target\" value=\"AIC_\" />\n\n","comments":"","outputs":1,"x":426.25,"y":905.0000133514404,"z":"27680826.c34468","wires":[["c12a3c05.77a7e","dc94ae1a.b883b"]]},{"id":"dc94ae1a.b883b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":638.7500076293945,"y":948.7500143051147,"z":"27680826.c34468","wires":[["f33c279d.2febe8"]]},{"id":"c12a3c05.77a7e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":640.0000076293945,"y":906.0000143051147,"z":"27680826.c34468","wires":[["31d3b5fe.60650a"]]},{"id":"f33c279d.2febe8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":786.25,"y":950,"z":"27680826.c34468","wires":[["a8cc4566.2651c8","38234086.77091","4224697.a835298","f328336d.7aa25","e0a23068.1cd1d","8c266346.4aa95","b6ace914.73b9d8","f442ffc.02fce","c5fea6e2.5cab28","b04c73f0.45b0b","d2892fb8.7bfeb","1af2e25b.5fee7e","fd184fae.e89c8","26a134a2.70c20c","ae651bed.d8efd8","96859417.102828","68692ef8.36ba2","9248d319.32eca","24a55a09.887c56","13340fb3.29bbe","2de8cdee.c921f2","56727955.005b28","d5474dab.60238"]]},{"id":"31d3b5fe.60650a","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown Address Plan - not supported!\" />\n","comments":"","x":781.25,"y":907.5,"z":"27680826.c34468","wires":[]},{"id":"a8cc4566.2651c8","type":"get-resource","name":"get-resource - validate pool exists already","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * FROM EIPAM_IP_POOLS where plan_name = $eipam-ip-block.plan-name and level = 2 and key_value = $tmp.level2-key-value ;\"\n        pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1047.500015258789,"y":951.2500133514404,"z":"27680826.c34468","wires":[["e188d1ab.f8a76","eda35d93.e4aa6"]]},{"id":"eda35d93.e4aa6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1313.8618354797363,"y":904.0000133514404,"z":"27680826.c34468","wires":[["8d68e84b.5f04d8"]]},{"id":"e188d1ab.f8a76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1321.1119575500488,"y":979.2500143051147,"z":"27680826.c34468","wires":[["c4feedd0.1551e"]]},{"id":"3076888e.6800b8","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"This record is not found in DB!\"/>","comments":"","outputs":1,"x":1676.2500228881836,"y":950.0000143051147,"z":"27680826.c34468","wires":[[]]},{"id":"9f5f51a3.da836","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n  \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n  \t\t<parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":988.7500143051147,"z":"27680826.c34468","wires":[]},{"id":"c4feedd0.1551e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":980.0000143051147,"z":"27680826.c34468","wires":[["3076888e.6800b8","9f5f51a3.da836"]]},{"id":"a2822b09.e97578","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"Failed to find this record in DB!\"/>\n\n","comments":"","outputs":1,"x":1676.2500228881836,"y":871.2500162124634,"z":"27680826.c34468","wires":[[]]},{"id":"f8a866d.2dd3298","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n              <parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":910.0000162124634,"z":"27680826.c34468","wires":[]},{"id":"8d68e84b.5f04d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":901.2500162124634,"z":"27680826.c34468","wires":[["a2822b09.e97578","f8a866d.2dd3298"]]},{"id":"38234086.77091","type":"get-resource","name":"get-resource - validate if initial level 2 subnet 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 = $eipam-ip-block.plan-name and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value and s.address_family = $tmp.version ; \"\n        pfx='pfx.eipam-initial-subnet'>\n\n","comments":"initial subnet should exists","outputs":1,"x":1073.750015258789,"y":1016.2500152587891,"z":"27680826.c34468","wires":[["aa455c78.415d6","9927da1b.afdbe8"]]},{"id":"38b7e10f.3fa15e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1495.9999771118164,"y":1014.5000057220459,"z":"27680826.c34468","wires":[]},{"id":"aa455c78.415d6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1344.3618392944336,"y":1019.0000152587891,"z":"27680826.c34468","wires":[["38b7e10f.3fa15e"]]},{"id":"9927da1b.afdbe8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1344.611904144287,"y":1053.5000095367432,"z":"27680826.c34468","wires":[["38b75ce1.66d3e4"]]},{"id":"5e22e900.93b228","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":2347.5,"y":952.5,"z":"27680826.c34468","wires":[[]]},{"id":"f328336d.7aa25","type":"save","name":"insert new EIPAM_IP_SUBNETS for level 2","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNETS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             service_type = $pfx.eipam-initial-subnet.service-type ,\n             ip_address = $eipam-ip-block.ip-prefix ,\n             prefix_length = $eipam-ip-block.mask ,\n             plan_name = $eipam-ip-block.plan-name ,\n             status = 'PENDING_ACTIVE' ,\n             pool_id = $pfx.eipam-initial-subnet.pool-id ,\n             address_family = $pfx.eipam-initial-subnet.address-family ,\n             network_id = $pfx.eipam-initial-subnet.network-id ; \"\n    force='true'\n        pfx='pfx.eipam-new-subnet'>\n","comments":"","outputs":1,"x":1058.750015258789,"y":1280.0000457763672,"z":"27680826.c34468","wires":[["48e1df43.58257","e6d53458.acac88"]]},{"id":"e0a23068.1cd1d","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNET_KEYS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             key_name = $tmp.level1-key-name ,\n             key_value = $tmp.level1-key-value ,\n             level = 1 ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-level1'>\n","comments":"","outputs":1,"x":1073.7498321533203,"y":1321.9999885559082,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"8c266346.4aa95","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 2","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNET_KEYS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             key_name = $tmp.level2-key-name ,\n             key_value = $tmp.level2-key-value ,\n             level = 2 ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-level2'>\n","comments":"","outputs":1,"x":1072.7499542236328,"y":1368.0000190734863,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"48e1df43.58257","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1394.0333442687988,"y":1293.5000448226929,"z":"27680826.c34468","wires":[["c2fa8922.5c3898"]]},{"id":"e6d53458.acac88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1394.8762969970703,"y":1331.150188446045,"z":"27680826.c34468","wires":[[]]},{"id":"b1ea1da0.31a88","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1395.5894966125488,"y":1367.0000457763672,"z":"27680826.c34468","wires":[["8f8cdbf1.ac7df8"]]},{"id":"4224697.a835298","type":"get-resource","name":"get-resource - validate if subnet with same ip 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 WHERE s.plan_name = $eipam-ip-block.plan-name and s.entity_id = $eipam-ip-block.entity-id and s.ip_address = $eipam-ip-block.ip-address ; \"\n        pfx='pfx.eipam-subnet-with-same-ip'>\n\n","comments":"check if new subnet already exists, possibly from previous attempt.","outputs":1,"x":1077.5000305175781,"y":1092.5000171661377,"z":"27680826.c34468","wires":[["1079d4f3.12d78b","31bcf812.d665c8"]]},{"id":"1bfe7dc9.67a752","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1501.0000953674316,"y":1090.7500066757202,"z":"27680826.c34468","wires":[]},{"id":"1079d4f3.12d78b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1349.3619575500488,"y":1095.2500162124634,"z":"27680826.c34468","wires":[["1bfe7dc9.67a752"]]},{"id":"31bcf812.d665c8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1360.8620529174805,"y":1137.2500276565552,"z":"27680826.c34468","wires":[[]]},{"id":"5be1f04e.3c946","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1391.2500839233398,"y":1436.2500324249268,"z":"27680826.c34468","wires":[["a49fec09.f6009"]]},{"id":"a49fec09.f6009","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' is Not found in AnAI'\" />","comments":"","x":1554.444480895996,"y":1436.3612537384033,"z":"27680826.c34468","wires":[]},{"id":"b6ace914.73b9d8","type":"get-resource","name":"get AnAI - l3-network subnet by network-id and subnet-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\"\n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.aai-initial-subnet\">\n","comments":"","outputs":1,"x":1094.7221374511719,"y":1444.4846668243408,"z":"27680826.c34468","wires":[["5be1f04e.3c946","1ef3bc16.d15f44"]]},{"id":"1ef3bc16.d15f44","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1383.9721908569336,"y":1474.7346363067627,"z":"27680826.c34468","wires":[["e393bf01.64fed"]]},{"id":"e393bf01.64fed","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' from AnAI'\" />","comments":"","x":1536.0832748413086,"y":1474.956865310669,"z":"27680826.c34468","wires":[]},{"id":"38b75ce1.66d3e4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Initial subnet not found, cannot auto extend.\" />\n\t","comments":"","x":1498.7499694824219,"y":1052.5000076293945,"z":"27680826.c34468","wires":[]},{"id":"c2fa8922.5c3898","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1531.25,"y":1296.2500267028809,"z":"27680826.c34468","wires":[]},{"id":"8f8cdbf1.ac7df8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNET_KEYS failed.\" />\n\t","comments":"","x":1535,"y":1365.0000267028809,"z":"27680826.c34468","wires":[]},{"id":"599ea898.d06128","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1264.590389251709,"y":1860.2259755134583,"z":"27680826.c34468","wires":[["e6406ac5.f60e88"]]},{"id":"6669d1c3.d883c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1273.313533782959,"y":1897.8691639900208,"z":"27680826.c34468","wires":[[]]},{"id":"f442ffc.02fce","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$pfx.eipam-initial-subnet.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$eipam-ip-block.entity-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet.subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$eipam-ip-block.ip-prefix`\" />\n<parameter name=\"cidr-mask\" value=\"`$eipam-ip-block.prefix-length`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet.dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet.dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet.dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1005.111400604248,"y":1877.2617650032043,"z":"27680826.c34468","wires":[["6669d1c3.d883c","599ea898.d06128"]]},{"id":"b5c88c1d.637ad","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":1802.500015258789,"y":1472.5000495910645,"z":"27680826.c34468","wires":[[]]},{"id":"9664fc27.56f38","type":"comment","name":"Get service_type from initial subnet","info":"","comments":"","x":787.5,"y":1062.5,"z":"27680826.c34468","wires":[]},{"id":"7df8a691.f40778","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='true' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />\n\n\n","comments":"","x":1661.2500495910645,"y":1776.2500457763672,"z":"27680826.c34468","wires":[]},{"id":"c5fea6e2.5cab28","type":"execute","name":"execute getSubnetAddresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getSubnetAddresses\">\n\t<parameter name=\"ipAddress\" value=\"`$eipam-ip-block.ip-prefix`\" />\n\t<parameter name=\"ipVersion\" value=\"`tmp.version`\" />\n\t<parameter name=\"subnet\" value=\"`$eipam-ip-block.prefix-length`\" />\n\t<parameter name=\"ctxGateway\" value=\"tmp.return.generate.gateway-address\" />\n\t<parameter name=\"ctxDhcpStart\" value=\"tmp.return.generate.dhcp-start-address\" />\n\t<parameter name=\"ctxDhcpEnd\" value=\"tmp.return.generate.dhcp-end-address\" />\n\n","comments":"","outputs":1,"x":1014.1072311401367,"y":1704.5357484817505,"z":"27680826.c34468","wires":[["3f5f9dcf.9a0822"]]},{"id":"1af2e25b.5fee7e","type":"switchNode","name":"switch tmp.aai-initial-subnet.dhcp-enabled","xml":"<switch test='`$tmp.aai-initial-subnet.dhcp-enabled`'>\n","comments":"","outputs":1,"x":1045.7582550048828,"y":1767.6151399612427,"z":"27680826.c34468","wires":[["6800941e.557aac","bc0c9d86.36f89"]]},{"id":"6800941e.557aac","type":"other","name":"Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1301.4722843170166,"y":1777.6151151657104,"z":"27680826.c34468","wires":[["af454cc5.3dff4"]]},{"id":"af454cc5.3dff4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1461.9485206604004,"y":1777.61510181427,"z":"27680826.c34468","wires":[["7df8a691.f40778"]]},{"id":"3f5f9dcf.9a0822","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1246.0226211547852,"y":1704.308232307434,"z":"27680826.c34468","wires":[["81b31e6.00a07e"]]},{"id":"81b31e6.00a07e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to generate gateway addresses using IpAddressTools\" />","comments":"","x":1417.6891708374023,"y":1704.308232307434,"z":"27680826.c34468","wires":[]},{"id":"83d25c76.606f4","type":"set","name":"set l3network.subnet","xml":"<set>\n<parameter name='tmp.l3-network.subnet.subnet-name' value=\"`$aai.l3-network.network-name + '_S' + $aai.l3-network.subnets.subnet_length`\" />\n","comments":"","x":1407.9010620117188,"y":1587.6151309013367,"z":"27680826.c34468","wires":[]},{"id":"bc0c9d86.36f89","type":"other","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1304.012077331543,"y":1813.3293962478638,"z":"27680826.c34468","wires":[["b0650ab4.c65d58"]]},{"id":"3cc8bc14.294884","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='false' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='' />\n\n\n","comments":"","x":1664.012077331543,"y":1811.9008378982544,"z":"27680826.c34468","wires":[]},{"id":"b0650ab4.c65d58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1464.710548400879,"y":1813.2658939361572,"z":"27680826.c34468","wires":[["3cc8bc14.294884"]]},{"id":"4c9ac4aa.90bf8c","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1296.9642486572266,"y":1177.1428413391113,"z":"27680826.c34468","wires":[["acd17d5f.d00c1"]]},{"id":"b04c73f0.45b0b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":1061.6863555908203,"y":1181.6274452209473,"z":"27680826.c34468","wires":[["4c9ac4aa.90bf8c","7fda0cb.614c2f4"]]},{"id":"7fda0cb.614c2f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1289.6863555908203,"y":1215.6274452209473,"z":"27680826.c34468","wires":[["9af11c3.0761ce"]]},{"id":"d2892fb8.7bfeb","type":"switchNode","name":"switch get current # of subnets","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":1028.0000534057617,"y":1550.5000176429749,"z":"27680826.c34468","wires":[["137556cc.df0609","9df4adf.d74095"]]},{"id":"137556cc.df0609","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1251.7500610351562,"y":1549.2500176429749,"z":"27680826.c34468","wires":[["f751331c.00143"]]},{"id":"9df4adf.d74095","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1237.7500457763672,"y":1588.0000224113464,"z":"27680826.c34468","wires":[["83d25c76.606f4"]]},{"id":"9af11c3.0761ce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'from AnAI'\" />","comments":"","x":1440.7142715454102,"y":1217.142864227295,"z":"27680826.c34468","wires":[]},{"id":"acd17d5f.d00c1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'Not found in AnAI'\" />","comments":"","x":1453.2142486572266,"y":1175.8928413391113,"z":"27680826.c34468","wires":[]},{"id":"f751331c.00143","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'No subnets found in AAI for network-id=' + $pfx.eipam-initial-subnet.network-id\" />","comments":"","x":1418.7500610351562,"y":1548.7499871253967,"z":"27680826.c34468","wires":[]},{"id":"e6406ac5.f60e88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Cannot save subnet with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' in AnAI'\" />","comments":"","x":1407.500057220459,"y":1860.000020980835,"z":"27680826.c34468","wires":[]},{"id":"fd184fae.e89c8","type":"execute","name":"execute Contrail API create subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='add' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='ip-prefix-len' value='`$eipam-ip-block.prefix-length`' />\n<parameter name='dns-server-address' value='0.0.0.0' />\n<parameter name='enable-dhcp' value='`$tmp.l3-network.subnet.dhcp-enabled`' />\n<parameter name='default-gateway' value='`$tmp.return.generate.gateway-address`' />\n<parameter name='subnet-name' value='`$tmp.l3-network.subnet.subnet-name`' />\n<parameter name='start' value='`$tmp.l3-network.subnet.dhcp-start`' />\n<parameter name='end' value='`$tmp.l3-network.subnet.dhcp-end`' />\n","comments":"","outputs":1,"x":1025.0000762939453,"y":1993.7500295639038,"z":"27680826.c34468","wires":[["281bfd7.8f87a02","d85d1e3.00c05e"]]},{"id":"281bfd7.8f87a02","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1330.1309204101562,"y":1970.6422888375819,"z":"27680826.c34468","wires":[["72da5ff6.7162b"]]},{"id":"d85d1e3.00c05e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1328.2262420654297,"y":2003.642228603363,"z":"27680826.c34468","wires":[["69394ab1.5080c4"]]},{"id":"7bb00cdc.52f324","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Failed to create subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1625.6310081481934,"y":2142.9756145477295,"z":"27680826.c34468","wires":[]},{"id":"72da5ff6.7162b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1482.321403503418,"y":1971.3090138435364,"z":"27680826.c34468","wires":[[]]},{"id":"26a134a2.70c20c","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=\"Added an entry for subnet-allocated-notification in EIPAM_IP_SUBNETS and EIPAM_IP_SUBNET_KEYS\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":961.25,"y":1406.2500267028809,"z":"27680826.c34468","wires":[[]]},{"id":"ae651bed.d8efd8","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=\"Added a subnetin AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":935.0000381469727,"y":1927.4999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"96859417.102828","type":"set","name":"set request-id","xml":"<set>\n<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":1004.4642639160156,"y":1229.642858505249,"z":"27680826.c34468","wires":[]},{"id":"68692ef8.36ba2","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=\"Added a subnet in Contrail\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":933.7500381469727,"y":2054.9999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"69394ab1.5080c4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1452.5000228881836,"y":2030.0000305175781,"z":"27680826.c34468","wires":[["8d827339.1c42b","464fd495.cf609c","a20fd9fb.925b28","7bb00cdc.52f324","7b0ec3aa.9f133c"]]},{"id":"13340fb3.29bbe","type":"execute","name":"execute EIPAM activateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":914.9999847412109,"y":2392.5000524520874,"z":"27680826.c34468","wires":[["e36e1b6d.7c89a8"]]},{"id":"e36e1b6d.7c89a8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1125.000015258789,"y":2393.8904180526733,"z":"27680826.c34468","wires":[["ada6dfba.c5e93"]]},{"id":"ada6dfba.c5e93","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while activating subnet in EIPAM.\" />\n\t","comments":"","x":1288.9999961853027,"y":2392.6047105789185,"z":"27680826.c34468","wires":[]},{"id":"2de8cdee.c921f2","type":"save","name":"Update subnet to Active in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ACTIVE'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":913.5714874267578,"y":2432.4999990463257,"z":"27680826.c34468","wires":[["5f8cd719.040538","cc0e8d04.1dd76","1175c433.7e6f8c"]]},{"id":"26c7656e.af300a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1282.1428680419922,"y":2439.6428747177124,"z":"27680826.c34468","wires":[]},{"id":"1175c433.7e6f8c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1132.7144622802734,"y":2507.6428451538086,"z":"27680826.c34468","wires":[[]]},{"id":"5f8cd719.040538","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1133.0047454833984,"y":2441.6428747177124,"z":"27680826.c34468","wires":[["26c7656e.af300a"]]},{"id":"cc0e8d04.1dd76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1133.8618545532227,"y":2475.9285953342915,"z":"27680826.c34468","wires":[["e27f3250.a90fd"]]},{"id":"e27f3250.a90fd","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1281.142707824707,"y":2471.9286258518696,"z":"27680826.c34468","wires":[]},{"id":"56727955.005b28","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":891.9642696380615,"y":2568.5515909194946,"z":"27680826.c34468","wires":[["4e91d6f8.33a8a8","8dbce961.ba9108"]]},{"id":"614081e5.693ec","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1283.7104396820068,"y":2558.3928356170654,"z":"27680826.c34468","wires":[]},{"id":"2a7aff42.09c3d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1134.282033920288,"y":2626.3928060531616,"z":"27680826.c34468","wires":[["3e75f1f6.c1d44e"]]},{"id":"4e91d6f8.33a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1123.1436805725098,"y":2564.678565979004,"z":"27680826.c34468","wires":[["614081e5.693ec"]]},{"id":"8dbce961.ba9108","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1135.4294261932373,"y":2594.6785562336445,"z":"27680826.c34468","wires":[["20ed0c21.a3cea4"]]},{"id":"3e75f1f6.c1d44e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1286.9961223602295,"y":2627.8214263916016,"z":"27680826.c34468","wires":[[]]},{"id":"20ed0c21.a3cea4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.  Subnet not found.\" />\n\t","comments":"","x":1282.7102794647217,"y":2590.6785867512226,"z":"27680826.c34468","wires":[]},{"id":"d5474dab.60238","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":871.2500114440918,"y":2653.750039100647,"z":"27680826.c34468","wires":[]},{"id":"8d827339.1c42b","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1645,"y":2030,"z":"27680826.c34468","wires":[["8cbeccd1.f9f09","8f247d12.836b4"]]},{"id":"762b5c85.0a9c64","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2013.5713806152344,"y":2037.1428756713867,"z":"27680826.c34468","wires":[]},{"id":"8cbeccd1.f9f09","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1864.4332580566406,"y":2039.1428756713867,"z":"27680826.c34468","wires":[["762b5c85.0a9c64"]]},{"id":"8f247d12.836b4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1865.2903671264648,"y":2073.428596287966,"z":"27680826.c34468","wires":[["a0381945.6d59b8"]]},{"id":"a0381945.6d59b8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2012.5712203979492,"y":2069.428626805544,"z":"27680826.c34468","wires":[]},{"id":"464fd495.cf609c","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1620.0000228881836,"y":2072.500030517578,"z":"27680826.c34468","wires":[[]]},{"id":"a20fd9fb.925b28","type":"save","name":"save MDSAL: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","comments":"","outputs":1,"x":1648.7500305175781,"y":2108.7500324249268,"z":"27680826.c34468","wires":[[]]},{"id":"9248d319.32eca","type":"save","name":"update AnAI - subnet with status Created","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n\t<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":987.5,"y":2148.75,"z":"27680826.c34468","wires":[["e721afd8.6b7fd","a840e96b.b77e58"]]},{"id":"e721afd8.6b7fd","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1218.750015258789,"y":2146.2500324249268,"z":"27680826.c34468","wires":[["6b63f80c.bf9f48"]]},{"id":"a840e96b.b77e58","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1222.473159790039,"y":2107.6430988311768,"z":"27680826.c34468","wires":[[]]},{"id":"254d88c0.e33728","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Cannot save subnet status to Created with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' in AnAI'\" />","comments":"","x":1501.8383026123047,"y":2387.630959510803,"z":"27680826.c34468","wires":[]},{"id":"49bd89dd.347df8","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1548.7500228881836,"y":2206.250032901764,"z":"27680826.c34468","wires":[["d689da68.0fe738","c156daaa.557638"]]},{"id":"674a1d7e.5ff8a4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1917.321403503418,"y":2213.3929085731506,"z":"27680826.c34468","wires":[]},{"id":"d689da68.0fe738","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1768.1832809448242,"y":2215.3929085731506,"z":"27680826.c34468","wires":[["674a1d7e.5ff8a4"]]},{"id":"c156daaa.557638","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1769.0403900146484,"y":2249.6786291897297,"z":"27680826.c34468","wires":[["ea4dac01.f7adf"]]},{"id":"ea4dac01.f7adf","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1916.3212432861328,"y":2245.678659707308,"z":"27680826.c34468","wires":[]},{"id":"7aee0fd2.86834","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1523.7500457763672,"y":2248.750063419342,"z":"27680826.c34468","wires":[[]]},{"id":"ceb28977.cdbe68","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=\"Update status to Created failed in AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":1467.5000076293945,"y":2169.999999523163,"z":"27680826.c34468","wires":[[]]},{"id":"6b63f80c.bf9f48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1333.7500190734863,"y":2170.0000324249268,"z":"27680826.c34468","wires":[["ceb28977.cdbe68","49bd89dd.347df8","7aee0fd2.86834","254d88c0.e33728","ea9252e3.5d502","51cffb75.2a5354"]]},{"id":"ea9252e3.5d502","type":"execute","name":"execute Contrail API delete subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n","comments":"","outputs":1,"x":1555,"y":2292.5,"z":"27680826.c34468","wires":[["384875a9.cdbcaa"]]},{"id":"384875a9.cdbcaa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1770,"y":2288.75,"z":"27680826.c34468","wires":[["5e6cec1c.8f8184"]]},{"id":"5e6cec1c.8f8184","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Failed to delete subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1926.25,"y":2290,"z":"27680826.c34468","wires":[]},{"id":"24a55a09.887c56","type":"save","name":"Update subnet to CREATED in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'CREATED'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":922.5,"y":2258.75,"z":"27680826.c34468","wires":[["1e94d227.4eeefe","ef4471e5.aa12e"]]},{"id":"37c7ceb5.4681d2","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1291.0713806152344,"y":2265.8928756713867,"z":"27680826.c34468","wires":[]},{"id":"1e94d227.4eeefe","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1141.9332580566406,"y":2267.8928756713867,"z":"27680826.c34468","wires":[["37c7ceb5.4681d2"]]},{"id":"ef4471e5.aa12e","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1142.7903671264648,"y":2302.178596287966,"z":"27680826.c34468","wires":[["f2e46833.bbd3f8"]]},{"id":"f2e46833.bbd3f8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1290.0712203979492,"y":2298.178626805544,"z":"27680826.c34468","wires":[]},{"id":"4939e504.9f364c","type":"save","name":"Update subnet to PENDING-ACTIVE in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'PENDING-ACTIVE'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1227.5,"y":112.5,"z":"27680826.c34468","wires":[[]]},{"id":"f38846a2.f8b938","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1337.142822265625,"y":471.4285888671875,"z":"27680826.c34468","wires":[[]]},{"id":"7b0ec3aa.9f133c","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1647.1429138183594,"y":1992.8571271896362,"z":"27680826.c34468","wires":[]},{"id":"51cffb75.2a5354","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1517.142822265625,"y":2338.571533203125,"z":"27680826.c34468","wires":[]}]
+[{"id":"a9213005.00cca","type":"dgstart","name":"DGSTART","outputs":1,"x":98.5714340209961,"y":81.42857360839844,"z":"27680826.c34468","wires":[["65d9132d.dd809c"]]},{"id":"e622bdcc.42acc","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":666.2379531860352,"y":195.70635223388672,"z":"27680826.c34468","wires":[["3f075783.e441e8"]]},{"id":"82f4ac79.53fcc","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":659.2380752563477,"y":344.5952682495117,"z":"27680826.c34468","wires":[["5356707.3c69f9"]]},{"id":"7e9ea036.3fddd","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \n","x":1179.7378616333008,"y":257.4286117553711,"z":"27680826.c34468","wires":[]},{"id":"ed648022.197df","type":"save","name":"save: EIPAM IP Subnets PendingActive","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n        <parameter name=\"status\" value=\"PENDING-ACTIVE\" />\n       \n","outputs":1,"x":1623.688247680664,"y":115.29525184631348,"z":"27680826.c34468","wires":[[]]},{"id":"dd2ccccd.fbd74","type":"method","name":"subnet-allocated-notification","xml":"<method rpc='subnet-allocated-notification' mode='sync'>\n","comments":"","outputs":1,"x":668.4381484985352,"y":81.29524612426758,"z":"27680826.c34468","wires":[["1d020804.ffe728"]]},{"id":"1d020804.ffe728","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":122.68812561035156,"y":169.7952480316162,"z":"27680826.c34468","wires":[["710e1c1e.4120b4","c02428aa.992358"]]},{"id":"710e1c1e.4120b4","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":277.8310012817383,"y":172.38293743133545,"z":"27680826.c34468","wires":[[]]},{"id":"1fe611b1.8156ae","type":"configure","name":"configure ncs SNIIR ","xml":"<configure adaptor=\"com.att.sdnctl.sli.adaptor.ncs.ncsAdaptor\" key=\"SNIIR\" activate=\"true\">\n\t<parameter name=\"input.request-id\" value=\"`$eipam-ip-block.request-id`\" />\n\t<parameter name=\"input.source\" value=\"SDNC\" />\n\t<parameter name=\"input.ptnii-name\" value=\"`$eipam-ip-block.ptnii-name`\" />\n\t<parameter name=\"input.ip-address\" value=\"`$eipam-ip-block.ip-address`\" />\n\t<parameter name=\"input.mask\" value=\"`$eipam-ip-block.prefix-length`\" />","outputs":1,"x":416.7381057739258,"y":274.3452682495117,"z":"27680826.c34468","wires":[["e622bdcc.42acc","82f4ac79.53fcc"]]},{"id":"22ec13a0.6a868c","type":"save","name":"save: EIPAM IP Subnets ERROR","xml":"<save plugin=\"com.att.sdnctl.sli.resource.gamma.GammaResource\" resource=\"eipam-ip-subnets\"\n\tkey=\"entity-id = $eipam-ip-block.entity-id\" force=\"true\">\n        <parameter name=\"status\" value=\"ERROR\" />\n       \n","outputs":1,"x":1675.2381210327148,"y":479.78968620300293,"z":"27680826.c34468","wires":[[]]},{"id":"3f075783.e441e8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":880.5713577270508,"y":195.23967742919922,"z":"27680826.c34468","wires":[["57e63c8f.0955b4","26b12811.2f48c8","7e9ea036.3fddd","4939e504.9f364c"]]},{"id":"57e63c8f.0955b4","type":"set","name":"set: status = Pending Active","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","x":1212.0381546020508,"y":165.79524993896484,"z":"27680826.c34468","wires":[]},{"id":"26b12811.2f48c8","type":"save","name":"save: status = Pending Active","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"PENDING-ACTIVE\" />","outputs":1,"x":1221.0380935668945,"y":211.79521942138672,"z":"27680826.c34468","wires":[[]]},{"id":"dd7e082.29230f8","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1304.538459777832,"y":516.6062850952148,"z":"27680826.c34468","wires":[]},{"id":"197a8f9d.0aba4","type":"save","name":"save: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","outputs":1,"x":1309.538703918457,"y":564.6062850952148,"z":"27680826.c34468","wires":[[]]},{"id":"65d9132d.dd809c","type":"service-logic","name":"SUBNET-API ${project.version}","module":"SUBNET-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='SUBNET-API' version='${project.version}'>","outputs":1,"x":336.5214614868164,"y":81.74525833129883,"z":"27680826.c34468","wires":[["dd2ccccd.fbd74"]]},{"id":"ed7e5b43.0a4c88","type":"comment","name":"ChangeLog","info":"1.0.0: Release 1504\n2.0.0: Release 1507 - Remove Update Inventory\n9/16: update record node format\nRelease 1710 - update to include VIPR & SRIOV address plans","comments":"","x":84.52143096923828,"y":28.745243072509766,"z":"27680826.c34468","wires":[]},{"id":"5356707.3c69f9","type":"execute","name":"execute EIPAM deletePool","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"deletePool\">\n\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":878.0896682739258,"y":344.0625534057617,"z":"27680826.c34468","wires":[["b4c80bc2.8ed758","c3cd7f2c.ff58b"]]},{"id":"d7bb127f.ac3d1","type":"set","name":"set: status = Deleted","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"DELETED\" />","comments":"","x":1569.089485168457,"y":278.50691986083984,"z":"27680826.c34468","wires":[]},{"id":"b4c80bc2.8ed758","type":"other","name":"outcome Other ","xml":"<outcome value=\"Other\"> \n\n","outputs":1,"x":1163.6450881958008,"y":398.39583587646484,"z":"27680826.c34468","wires":[["4a9084e7.17a3fc"]]},{"id":"4a9084e7.17a3fc","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":1064.0055618286133,"y":493.5070114135742,"z":"27680826.c34468","wires":[["dd7e082.29230f8","197a8f9d.0aba4","737ff142.6bf88","6586b53f.f980cc","268c791.e069e86","f38846a2.f8b938"]]},{"id":"737ff142.6bf88","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"1000\" />\n              <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool failed in EIPAM, need to manually delete\" />\n","comments":"","x":1276.339012145996,"y":707.3958234786987,"z":"27680826.c34468","wires":[]},{"id":"c3cd7f2c.ff58b","type":"success","name":"outcome success","xml":"<outcome value=\"success\">\n","outputs":1,"x":1172.8146438598633,"y":345.5396041870117,"z":"27680826.c34468","wires":[["ab627f0f.dca16"]]},{"id":"eba669ea.07a7f8","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"1000\" />\n              <parameter name=\"error-message\" value=\"IpBlockInstall failure and deletePool deleted in EIPAM\" />\n","comments":"","x":1543.7034378051758,"y":423.76171112060547,"z":"27680826.c34468","wires":[]},{"id":"ab627f0f.dca16","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1369.919734954834,"y":345.3755683898926,"z":"27680826.c34468","wires":[["d7bb127f.ac3d1","eba669ea.07a7f8","ea42344d.d237c8","d02d0150.a724a"]]},{"id":"ea42344d.d237c8","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" key=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1697.8214797973633,"y":377.8452682495117,"z":"27680826.c34468","wires":[[]]},{"id":"6586b53f.f980cc","type":"save","name":"Update AAI: NCS_IP_SUBNET_INSTALL_ERROR, PREPROV","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"vpe\" key=\"vnf-id = $data-change-notification-input.key-data[0].key-value\" pfx=\"vpe-after\">\n\t<parameter name=\"operational-state\" value=\"NCS_IP_SUBNET_INSTALL_ERROR\" />\n\t<parameter name=\"summary-status\" value=\"`$aai-summary-status-message`\" />\n\t<parameter name=\"prov-status\" value=\"PREPROV\" />\n","comments":"","outputs":1,"x":1430.738166809082,"y":658.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"d02d0150.a724a","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deleted in EIPAM.\"/>\n","comments":"","outputs":1,"x":1639.9047927856445,"y":328.42858123779297,"z":"27680826.c34468","wires":[[]]},{"id":"268c791.e069e86","type":"execute","name":"execute: set aai-summary-status-message","xml":"<execute plugin='org.onap.ccsdk.sli.adaptors.sli.aai.AAIService' method='setStatusMethod' >\n<parameter name=\"key1\" value=\"IpBlockInstall failure and pool deletion failed in EIPAM, need to manually delete.\"/>","comments":"","outputs":1,"x":1369.9047927856445,"y":612.4285507202148,"z":"27680826.c34468","wires":[[]]},{"id":"c02428aa.992358","type":"switchNode","name":"switch: ptnii_name","xml":"<switch test=\"`$eipam-ip-block.ptnii-name`\">","comments":"Need to know which ipv version to get the plan name from the network-model.","outputs":1,"x":133.75003814697266,"y":365.0000057220459,"z":"27680826.c34468","wires":[["4235b5fd.e7ef8c","ff5e0fec.f83"]]},{"id":"ff5e0fec.f83","type":"other","name":"Null","xml":"<outcome value=''>","comments":"If no ptnii-name, check if VIPR or SRIOV","outputs":1,"x":216.25000381469727,"y":903.7500133514404,"z":"27680826.c34468","wires":[["16b88750.f9c8d9"]]},{"id":"4235b5fd.e7ef8c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"If there's ptnii-name, then it's Gamma service","outputs":1,"x":307.5,"y":370,"z":"27680826.c34468","wires":[["1fe611b1.8156ae"]]},{"id":"16b88750.f9c8d9","type":"execute","name":"execute plan-name startsWith AIC","xml":"<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils\" method=\"startsWith\" emitsOutcome='true' >\n<parameter name=\"source\" value=\"`toUpperCase($eipam-ip-block.plan-name)`\" />\n<parameter name=\"target\" value=\"AIC_\" />\n\n","comments":"","outputs":1,"x":426.25,"y":905.0000133514404,"z":"27680826.c34468","wires":[["c12a3c05.77a7e","dc94ae1a.b883b"]]},{"id":"dc94ae1a.b883b","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":638.7500076293945,"y":948.7500143051147,"z":"27680826.c34468","wires":[["f33c279d.2febe8"]]},{"id":"c12a3c05.77a7e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":640.0000076293945,"y":906.0000143051147,"z":"27680826.c34468","wires":[["31d3b5fe.60650a"]]},{"id":"f33c279d.2febe8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":786.25,"y":950,"z":"27680826.c34468","wires":[["a8cc4566.2651c8","38234086.77091","4224697.a835298","f328336d.7aa25","e0a23068.1cd1d","8c266346.4aa95","b6ace914.73b9d8","f442ffc.02fce","c5fea6e2.5cab28","b04c73f0.45b0b","d2892fb8.7bfeb","1af2e25b.5fee7e","fd184fae.e89c8","26a134a2.70c20c","ae651bed.d8efd8","96859417.102828","68692ef8.36ba2","9248d319.32eca","24a55a09.887c56","13340fb3.29bbe","2de8cdee.c921f2","56727955.005b28","d5474dab.60238"]]},{"id":"31d3b5fe.60650a","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n              <parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown Address Plan - not supported!\" />\n","comments":"","x":781.25,"y":907.5,"z":"27680826.c34468","wires":[]},{"id":"a8cc4566.2651c8","type":"get-resource","name":"get-resource - validate pool exists already","xml":"<get-resource\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"SELECT * FROM EIPAM_IP_POOLS where plan_name = $eipam-ip-block.plan-name and level = 2 and key_value = $tmp.level2-key-value ;\"\n        pfx='tmp.eipam-pool-row'>\n\n","comments":"","outputs":1,"x":1047.500015258789,"y":951.2500133514404,"z":"27680826.c34468","wires":[["e188d1ab.f8a76","eda35d93.e4aa6"]]},{"id":"eda35d93.e4aa6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1313.8618354797363,"y":904.0000133514404,"z":"27680826.c34468","wires":[["8d68e84b.5f04d8"]]},{"id":"e188d1ab.f8a76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1321.1119575500488,"y":979.2500143051147,"z":"27680826.c34468","wires":[["c4feedd0.1551e"]]},{"id":"3076888e.6800b8","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"This record is not found in DB!\"/>","comments":"","outputs":1,"x":1676.2500228881836,"y":950.0000143051147,"z":"27680826.c34468","wires":[[]]},{"id":"9f5f51a3.da836","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n  \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n  \t\t<parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":988.7500143051147,"z":"27680826.c34468","wires":[]},{"id":"c4feedd0.1551e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":980.0000143051147,"z":"27680826.c34468","wires":[["3076888e.6800b8","9f5f51a3.da836"]]},{"id":"a2822b09.e97578","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"Failed to find this record in DB!\"/>\n\n","comments":"","outputs":1,"x":1676.2500228881836,"y":871.2500162124634,"z":"27680826.c34468","wires":[[]]},{"id":"f8a866d.2dd3298","type":"returnFailure","name":"return failure ","xml":"  <return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n              <parameter name=\"error-code\" value=\"500\" />\n              <parameter name=\"error-message\" value=\"Unknown EIPAM pool - not found in DB!\" />\n","comments":"","x":1695.0000267028809,"y":910.0000162124634,"z":"27680826.c34468","wires":[]},{"id":"8d68e84b.5f04d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1498.7500228881836,"y":901.2500162124634,"z":"27680826.c34468","wires":[["a2822b09.e97578","f8a866d.2dd3298"]]},{"id":"38234086.77091","type":"get-resource","name":"get-resource - validate if initial level 2 subnet 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 = $eipam-ip-block.plan-name and s.entity_id = k.entity_id and k.level = 2 and k.key_value = $tmp.level2-key-value and s.address_family = $tmp.version ; \"\n        pfx='pfx.eipam-initial-subnet'>\n\n","comments":"initial subnet should exists","outputs":1,"x":1073.750015258789,"y":1016.2500152587891,"z":"27680826.c34468","wires":[["aa455c78.415d6","9927da1b.afdbe8"]]},{"id":"38b7e10f.3fa15e","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1495.9999771118164,"y":1014.5000057220459,"z":"27680826.c34468","wires":[]},{"id":"aa455c78.415d6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1344.3618392944336,"y":1019.0000152587891,"z":"27680826.c34468","wires":[["38b7e10f.3fa15e"]]},{"id":"9927da1b.afdbe8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1344.611904144287,"y":1053.5000095367432,"z":"27680826.c34468","wires":[["38b75ce1.66d3e4"]]},{"id":"5e22e900.93b228","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=\"subnet-allocated-notification\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$eipam-ip-block.ptnii-name`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":2347.5,"y":952.5,"z":"27680826.c34468","wires":[[]]},{"id":"f328336d.7aa25","type":"save","name":"insert new EIPAM_IP_SUBNETS for level 2","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNETS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             service_type = $pfx.eipam-initial-subnet.service-type ,\n             ip_address = $eipam-ip-block.ip-prefix ,\n             prefix_length = $eipam-ip-block.mask ,\n             plan_name = $eipam-ip-block.plan-name ,\n             status = 'PENDING_ACTIVE' ,\n             pool_id = $pfx.eipam-initial-subnet.pool-id ,\n             address_family = $pfx.eipam-initial-subnet.address-family ,\n             network_id = $pfx.eipam-initial-subnet.network-id ; \"\n    force='true'\n        pfx='pfx.eipam-new-subnet'>\n","comments":"","outputs":1,"x":1058.750015258789,"y":1280.0000457763672,"z":"27680826.c34468","wires":[["48e1df43.58257","e6d53458.acac88"]]},{"id":"e0a23068.1cd1d","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 1","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNET_KEYS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             key_name = $tmp.level1-key-name ,\n             key_value = $tmp.level1-key-value ,\n             level = 1 ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-level1'>\n","comments":"","outputs":1,"x":1073.7498321533203,"y":1321.9999885559082,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"8c266346.4aa95","type":"save","name":"insert EIPAM_IP_SUBNET_KEYS for level 2","xml":"<save\n        plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n        resource='SQL'\n        key=\"INSERT EIPAM_IP_SUBNET_KEYS\n             SET\n             entity_id = $eipam-ip-block.entity-id ,\n             key_name = $tmp.level2-key-name ,\n             key_value = $tmp.level2-key-value ,\n             level = 2 ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-level2'>\n","comments":"","outputs":1,"x":1072.7499542236328,"y":1368.0000190734863,"z":"27680826.c34468","wires":[["e6d53458.acac88","b1ea1da0.31a88"]]},{"id":"48e1df43.58257","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1394.0333442687988,"y":1293.5000448226929,"z":"27680826.c34468","wires":[["c2fa8922.5c3898"]]},{"id":"e6d53458.acac88","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1394.8762969970703,"y":1331.150188446045,"z":"27680826.c34468","wires":[[]]},{"id":"b1ea1da0.31a88","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1395.5894966125488,"y":1367.0000457763672,"z":"27680826.c34468","wires":[["8f8cdbf1.ac7df8"]]},{"id":"4224697.a835298","type":"get-resource","name":"get-resource - validate if subnet with same ip 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 WHERE s.plan_name = $eipam-ip-block.plan-name and s.entity_id = $eipam-ip-block.entity-id and s.ip_address = $eipam-ip-block.ip-address ; \"\n        pfx='pfx.eipam-subnet-with-same-ip'>\n\n","comments":"check if new subnet already exists, possibly from previous attempt.","outputs":1,"x":1077.5000305175781,"y":1092.5000171661377,"z":"27680826.c34468","wires":[["1079d4f3.12d78b","31bcf812.d665c8"]]},{"id":"1bfe7dc9.67a752","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Query to DB table EIPAM_IP_SUBNET_KEYS and EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1501.0000953674316,"y":1090.7500066757202,"z":"27680826.c34468","wires":[]},{"id":"1079d4f3.12d78b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1349.3619575500488,"y":1095.2500162124634,"z":"27680826.c34468","wires":[["1bfe7dc9.67a752"]]},{"id":"31bcf812.d665c8","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1360.8620529174805,"y":1137.2500276565552,"z":"27680826.c34468","wires":[[]]},{"id":"5be1f04e.3c946","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1391.2500839233398,"y":1436.2500324249268,"z":"27680826.c34468","wires":[["a49fec09.f6009"]]},{"id":"a49fec09.f6009","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id + ' is Not found in AnAI'\" />","comments":"","x":1554.444480895996,"y":1436.3612537384033,"z":"27680826.c34468","wires":[]},{"id":"b6ace914.73b9d8","type":"get-resource","name":"get AnAI - l3-network subnet by network-id and subnet-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\"\n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.aai-initial-subnet\">\n","comments":"","outputs":1,"x":1094.7221374511719,"y":1444.4846668243408,"z":"27680826.c34468","wires":[["5be1f04e.3c946","1ef3bc16.d15f44"]]},{"id":"1ef3bc16.d15f44","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1383.9721908569336,"y":1474.7346363067627,"z":"27680826.c34468","wires":[["e393bf01.64fed"]]},{"id":"e393bf01.64fed","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' from AnAI'\" />","comments":"","x":1536.0832748413086,"y":1474.956865310669,"z":"27680826.c34468","wires":[]},{"id":"38b75ce1.66d3e4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Initial subnet not found, cannot auto extend.\" />\n\t","comments":"","x":1498.7499694824219,"y":1052.5000076293945,"z":"27680826.c34468","wires":[]},{"id":"c2fa8922.5c3898","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNETS failed.\" />\n\t","comments":"","x":1531.25,"y":1296.2500267028809,"z":"27680826.c34468","wires":[]},{"id":"8f8cdbf1.ac7df8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Insert to DB table EIPAM_IP_SUBNET_KEYS failed.\" />\n\t","comments":"","x":1535,"y":1365.0000267028809,"z":"27680826.c34468","wires":[]},{"id":"599ea898.d06128","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1264.590389251709,"y":1860.2259755134583,"z":"27680826.c34468","wires":[["e6406ac5.f60e88"]]},{"id":"6669d1c3.d883c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1273.313533782959,"y":1897.8691639900208,"z":"27680826.c34468","wires":[[]]},{"id":"f442ffc.02fce","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$pfx.eipam-initial-subnet.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$eipam-ip-block.entity-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet.subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$eipam-ip-block.ip-prefix`\" />\n<parameter name=\"cidr-mask\" value=\"`$eipam-ip-block.prefix-length`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet.dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet.dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet.dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1005.111400604248,"y":1877.2617650032043,"z":"27680826.c34468","wires":[["6669d1c3.d883c","599ea898.d06128"]]},{"id":"b5c88c1d.637ad","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":1802.500015258789,"y":1472.5000495910645,"z":"27680826.c34468","wires":[[]]},{"id":"9664fc27.56f38","type":"comment","name":"Get service_type from initial subnet","info":"","comments":"","x":787.5,"y":1062.5,"z":"27680826.c34468","wires":[]},{"id":"7df8a691.f40778","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='true' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='`$tmp.return.generate.dhcp-start-address`' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='`$tmp.return.generate.dhcp-end-address`' />\n\n\n","comments":"","x":1661.2500495910645,"y":1776.2500457763672,"z":"27680826.c34468","wires":[]},{"id":"c5fea6e2.5cab28","type":"execute","name":"execute getSubnetAddresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getSubnetAddresses\">\n\t<parameter name=\"ipAddress\" value=\"`$eipam-ip-block.ip-prefix`\" />\n\t<parameter name=\"ipVersion\" value=\"`tmp.version`\" />\n\t<parameter name=\"subnet\" value=\"`$eipam-ip-block.prefix-length`\" />\n\t<parameter name=\"ctxGateway\" value=\"tmp.return.generate.gateway-address\" />\n\t<parameter name=\"ctxDhcpStart\" value=\"tmp.return.generate.dhcp-start-address\" />\n\t<parameter name=\"ctxDhcpEnd\" value=\"tmp.return.generate.dhcp-end-address\" />\n\n","comments":"","outputs":1,"x":1014.1072311401367,"y":1704.5357484817505,"z":"27680826.c34468","wires":[["3f5f9dcf.9a0822"]]},{"id":"1af2e25b.5fee7e","type":"switchNode","name":"switch tmp.aai-initial-subnet.dhcp-enabled","xml":"<switch test='`$tmp.aai-initial-subnet.dhcp-enabled`'>\n","comments":"","outputs":1,"x":1045.7582550048828,"y":1767.6151399612427,"z":"27680826.c34468","wires":[["6800941e.557aac","bc0c9d86.36f89"]]},{"id":"6800941e.557aac","type":"other","name":"Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1301.4722843170166,"y":1777.6151151657104,"z":"27680826.c34468","wires":[["af454cc5.3dff4"]]},{"id":"af454cc5.3dff4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1461.9485206604004,"y":1777.61510181427,"z":"27680826.c34468","wires":[["7df8a691.f40778"]]},{"id":"3f5f9dcf.9a0822","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1246.0226211547852,"y":1704.308232307434,"z":"27680826.c34468","wires":[["81b31e6.00a07e"]]},{"id":"81b31e6.00a07e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failed to generate gateway addresses using IpAddressTools\" />","comments":"","x":1417.6891708374023,"y":1704.308232307434,"z":"27680826.c34468","wires":[]},{"id":"83d25c76.606f4","type":"set","name":"set l3network.subnet","xml":"<set>\n<parameter name='tmp.l3-network.subnet.subnet-name' value=\"`$aai.l3-network.network-name + '_S' + $aai.l3-network.subnets.subnet_length`\" />\n","comments":"","x":1407.9010620117188,"y":1587.6151309013367,"z":"27680826.c34468","wires":[]},{"id":"bc0c9d86.36f89","type":"other","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1304.012077331543,"y":1813.3293962478638,"z":"27680826.c34468","wires":[["b0650ab4.c65d58"]]},{"id":"3cc8bc14.294884","type":"set","name":"set dhcp data","xml":"<set>\n<parameter name='tmp.l3-network.subnet.dhcp-enabled' value='false' />\n<parameter name='tmp.l3-network.subnet.dhcp-start' value='' />\n<parameter name='tmp.l3-network.subnet.dhcp-end' value='' />\n\n\n","comments":"","x":1664.012077331543,"y":1811.9008378982544,"z":"27680826.c34468","wires":[]},{"id":"b0650ab4.c65d58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1464.710548400879,"y":1813.2658939361572,"z":"27680826.c34468","wires":[["3cc8bc14.294884"]]},{"id":"4c9ac4aa.90bf8c","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1296.9642486572266,"y":1177.1428413391113,"z":"27680826.c34468","wires":[["acd17d5f.d00c1"]]},{"id":"b04c73f0.45b0b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.l3-network\">\n","comments":"","outputs":1,"x":1061.6863555908203,"y":1181.6274452209473,"z":"27680826.c34468","wires":[["4c9ac4aa.90bf8c","7fda0cb.614c2f4"]]},{"id":"7fda0cb.614c2f4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1289.6863555908203,"y":1215.6274452209473,"z":"27680826.c34468","wires":[["9af11c3.0761ce"]]},{"id":"d2892fb8.7bfeb","type":"switchNode","name":"switch get current # of subnets","xml":"<switch test='`$aai.l3-network.subnets.subnet_length`'>\n","comments":"","outputs":1,"x":1028.0000534057617,"y":1550.5000176429749,"z":"27680826.c34468","wires":[["137556cc.df0609","9df4adf.d74095"]]},{"id":"137556cc.df0609","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1251.7500610351562,"y":1549.2500176429749,"z":"27680826.c34468","wires":[["f751331c.00143"]]},{"id":"9df4adf.d74095","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1237.7500457763672,"y":1588.0000224113464,"z":"27680826.c34468","wires":[["83d25c76.606f4"]]},{"id":"9af11c3.0761ce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error retrieving l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'from AnAI'\" />","comments":"","x":1440.7142715454102,"y":1217.142864227295,"z":"27680826.c34468","wires":[]},{"id":"acd17d5f.d00c1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'l3-network with network-id=' + $pfx.eipam-initial-subnet.network-id + 'Not found in AnAI'\" />","comments":"","x":1453.2142486572266,"y":1175.8928413391113,"z":"27680826.c34468","wires":[]},{"id":"f751331c.00143","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"'No subnets found in AAI for network-id=' + $pfx.eipam-initial-subnet.network-id\" />","comments":"","x":1418.7500610351562,"y":1548.7499871253967,"z":"27680826.c34468","wires":[]},{"id":"e6406ac5.f60e88","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Cannot save subnet with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' in AnAI'\" />","comments":"","x":1407.500057220459,"y":1860.000020980835,"z":"27680826.c34468","wires":[]},{"id":"fd184fae.e89c8","type":"execute","name":"execute Contrail API create subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='add' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n<parameter name='ip-prefix-len' value='`$eipam-ip-block.prefix-length`' />\n<parameter name='dns-server-address' value='0.0.0.0' />\n<parameter name='enable-dhcp' value='`$tmp.l3-network.subnet.dhcp-enabled`' />\n<parameter name='default-gateway' value='`$tmp.return.generate.gateway-address`' />\n<parameter name='subnet-name' value='`$tmp.l3-network.subnet.subnet-name`' />\n<parameter name='start' value='`$tmp.l3-network.subnet.dhcp-start`' />\n<parameter name='end' value='`$tmp.l3-network.subnet.dhcp-end`' />\n","comments":"","outputs":1,"x":1025.0000762939453,"y":1993.7500295639038,"z":"27680826.c34468","wires":[["281bfd7.8f87a02","d85d1e3.00c05e"]]},{"id":"281bfd7.8f87a02","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1330.1309204101562,"y":1970.6422888375819,"z":"27680826.c34468","wires":[["72da5ff6.7162b"]]},{"id":"d85d1e3.00c05e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1328.2262420654297,"y":2003.642228603363,"z":"27680826.c34468","wires":[["69394ab1.5080c4"]]},{"id":"7bb00cdc.52f324","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Failed to create subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1625.6310081481934,"y":2142.9756145477295,"z":"27680826.c34468","wires":[]},{"id":"72da5ff6.7162b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1482.321403503418,"y":1971.3090138435364,"z":"27680826.c34468","wires":[[]]},{"id":"26a134a2.70c20c","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=\"Added an entry for subnet-allocated-notification in EIPAM_IP_SUBNETS and EIPAM_IP_SUBNET_KEYS\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":961.25,"y":1406.2500267028809,"z":"27680826.c34468","wires":[[]]},{"id":"ae651bed.d8efd8","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=\"Added a subnetin AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":935.0000381469727,"y":1927.4999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"96859417.102828","type":"set","name":"set request-id","xml":"<set>\n<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":1004.4642639160156,"y":1229.642858505249,"z":"27680826.c34468","wires":[]},{"id":"68692ef8.36ba2","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=\"Added a subnet in Contrail\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":933.7500381469727,"y":2054.9999928474426,"z":"27680826.c34468","wires":[[]]},{"id":"69394ab1.5080c4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1452.5000228881836,"y":2030.0000305175781,"z":"27680826.c34468","wires":[["8d827339.1c42b","464fd495.cf609c","a20fd9fb.925b28","7bb00cdc.52f324","7b0ec3aa.9f133c"]]},{"id":"13340fb3.29bbe","type":"execute","name":"execute EIPAM activateSubnet","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"activateSubnet\">\n","comments":"subnet and subnet_keys are deleted in the EIPAMPlugin","outputs":1,"x":914.9999847412109,"y":2392.5000524520874,"z":"27680826.c34468","wires":[["e36e1b6d.7c89a8"]]},{"id":"e36e1b6d.7c89a8","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1125.000015258789,"y":2393.8904180526733,"z":"27680826.c34468","wires":[["ada6dfba.c5e93"]]},{"id":"ada6dfba.c5e93","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while activating subnet in EIPAM.\" />\n\t","comments":"","x":1288.9999961853027,"y":2392.6047105789185,"z":"27680826.c34468","wires":[]},{"id":"2de8cdee.c921f2","type":"save","name":"Update subnet to Active in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ACTIVE'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":913.5714874267578,"y":2432.4999990463257,"z":"27680826.c34468","wires":[["5f8cd719.040538","cc0e8d04.1dd76","1175c433.7e6f8c"]]},{"id":"26c7656e.af300a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1282.1428680419922,"y":2439.6428747177124,"z":"27680826.c34468","wires":[]},{"id":"1175c433.7e6f8c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1132.7144622802734,"y":2507.6428451538086,"z":"27680826.c34468","wires":[[]]},{"id":"5f8cd719.040538","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1133.0047454833984,"y":2441.6428747177124,"z":"27680826.c34468","wires":[["26c7656e.af300a"]]},{"id":"cc0e8d04.1dd76","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1133.8618545532227,"y":2475.9285953342915,"z":"27680826.c34468","wires":[["e27f3250.a90fd"]]},{"id":"e27f3250.a90fd","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to active in mysql.\" />\n\t","comments":"","x":1281.142707824707,"y":2471.9286258518696,"z":"27680826.c34468","wires":[]},{"id":"56727955.005b28","type":"save","name":"update AnAI - subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $aai.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":891.9642696380615,"y":2568.5515909194946,"z":"27680826.c34468","wires":[["4e91d6f8.33a8a8","8dbce961.ba9108"]]},{"id":"614081e5.693ec","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.\" />\n\t","comments":"","x":1283.7104396820068,"y":2558.3928356170654,"z":"27680826.c34468","wires":[]},{"id":"2a7aff42.09c3d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1134.282033920288,"y":2626.3928060531616,"z":"27680826.c34468","wires":[["3e75f1f6.c1d44e"]]},{"id":"4e91d6f8.33a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1123.1436805725098,"y":2564.678565979004,"z":"27680826.c34468","wires":[["614081e5.693ec"]]},{"id":"8dbce961.ba9108","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1135.4294261932373,"y":2594.6785562336445,"z":"27680826.c34468","wires":[["20ed0c21.a3cea4"]]},{"id":"3e75f1f6.c1d44e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1286.9961223602295,"y":2627.8214263916016,"z":"27680826.c34468","wires":[[]]},{"id":"20ed0c21.a3cea4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"Failure updating orchestration-status in AAI for subnet.  Subnet not found.\" />\n\t","comments":"","x":1282.7102794647217,"y":2590.6785867512226,"z":"27680826.c34468","wires":[]},{"id":"d5474dab.60238","type":"returnSuccess","name":"return success","xml":" <return status=\"success\">\n \t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n","comments":"","x":871.2500114440918,"y":2653.750039100647,"z":"27680826.c34468","wires":[]},{"id":"8d827339.1c42b","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1645,"y":2030,"z":"27680826.c34468","wires":[["8cbeccd1.f9f09","8f247d12.836b4"]]},{"id":"762b5c85.0a9c64","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2013.5713806152344,"y":2037.1428756713867,"z":"27680826.c34468","wires":[]},{"id":"8cbeccd1.f9f09","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1864.4332580566406,"y":2039.1428756713867,"z":"27680826.c34468","wires":[["762b5c85.0a9c64"]]},{"id":"8f247d12.836b4","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1865.2903671264648,"y":2073.428596287966,"z":"27680826.c34468","wires":[["a0381945.6d59b8"]]},{"id":"a0381945.6d59b8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":2012.5712203979492,"y":2069.428626805544,"z":"27680826.c34468","wires":[]},{"id":"464fd495.cf609c","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1620.0000228881836,"y":2072.500030517578,"z":"27680826.c34468","wires":[[]]},{"id":"a20fd9fb.925b28","type":"save","name":"save MDSAL: status = ERROR","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource\" resource=\"eipam-ip-block\">\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","comments":"","outputs":1,"x":1648.7500305175781,"y":2108.7500324249268,"z":"27680826.c34468","wires":[[]]},{"id":"9248d319.32eca","type":"save","name":"update AnAI - subnet with status Created","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id \n\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\" >\n\t<parameter name=\"orchestration-status\" value=\"Created\" />\n\t\t","comments":"","outputs":1,"x":987.5,"y":2148.75,"z":"27680826.c34468","wires":[["e721afd8.6b7fd","a840e96b.b77e58"]]},{"id":"e721afd8.6b7fd","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1218.750015258789,"y":2146.2500324249268,"z":"27680826.c34468","wires":[["6b63f80c.bf9f48"]]},{"id":"a840e96b.b77e58","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1222.473159790039,"y":2107.6430988311768,"z":"27680826.c34468","wires":[[]]},{"id":"254d88c0.e33728","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Cannot save subnet status to Created with l3 network-id=' + $pfx.eipam-initial-subnet.network-id + ' And subnet-id=' + $eipam-ip-block.entity-id  + ' in AnAI'\" />","comments":"","x":1501.8383026123047,"y":2387.630959510803,"z":"27680826.c34468","wires":[]},{"id":"49bd89dd.347df8","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1548.7500228881836,"y":2206.250032901764,"z":"27680826.c34468","wires":[["d689da68.0fe738","c156daaa.557638"]]},{"id":"674a1d7e.5ff8a4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1917.321403503418,"y":2213.3929085731506,"z":"27680826.c34468","wires":[]},{"id":"d689da68.0fe738","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1768.1832809448242,"y":2215.3929085731506,"z":"27680826.c34468","wires":[["674a1d7e.5ff8a4"]]},{"id":"c156daaa.557638","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1769.0403900146484,"y":2249.6786291897297,"z":"27680826.c34468","wires":[["ea4dac01.f7adf"]]},{"id":"ea4dac01.f7adf","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to ERROR in mysql.\" />\n\t","comments":"","x":1916.3212432861328,"y":2245.678659707308,"z":"27680826.c34468","wires":[]},{"id":"7aee0fd2.86834","type":"delete","name":"delete subnet from AAI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\tkey=\"l3-network.network-id = $pfx.eipam-initial-subnet.network-id\n\t\t\t\tAND subnet.subnet-id = $eipam-ip-block.entity-id\">","comments":"","outputs":1,"x":1523.7500457763672,"y":2248.750063419342,"z":"27680826.c34468","wires":[[]]},{"id":"ceb28977.cdbe68","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=\"Update status to Created failed in AAI\"/>\n<parameter name=\"field3\" value=\"`$eipam-ip-block.request-id`\"/>\n<parameter name=\"field4\" value=\"`$eipam-ip-block.entity-id`\"/>\n<parameter name=\"field5\" value=\"`$pfx.eipam-initial-subnet.network-id`\"/>\n<parameter name=\"field6\" value=\"`$eipam-ip-block.ip-address`\"/>\n<parameter name=\"field7\" value=\"`$eipam-ip-block.prefix-length`\"/>\n<parameter name=\"field8\" value=\"`$eipam-ip-block.status`\"/>\n<parameter name=\"field9\" value=\"`$tmp.key-value`\"/>","comments":"","outputs":1,"x":1467.5000076293945,"y":2169.999999523163,"z":"27680826.c34468","wires":[[]]},{"id":"6b63f80c.bf9f48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1333.7500190734863,"y":2170.0000324249268,"z":"27680826.c34468","wires":[["ceb28977.cdbe68","49bd89dd.347df8","7aee0fd2.86834","254d88c0.e33728","ea9252e3.5d502","51cffb75.2a5354"]]},{"id":"ea9252e3.5d502","type":"execute","name":"execute Contrail API delete subnet","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='subnet' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='contrail-virtual-network-id' value='`$pfx.eipam-initial-subnet.network-id`' />\n<parameter name='ip-prefix' value='`$eipam-ip-block.ip-prefix`' />\n","comments":"","outputs":1,"x":1555,"y":2292.5,"z":"27680826.c34468","wires":[["384875a9.cdbcaa"]]},{"id":"384875a9.cdbcaa","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1770,"y":2288.75,"z":"27680826.c34468","wires":[["5e6cec1c.8f8184"]]},{"id":"5e6cec1c.8f8184","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'Failed to delete subnet in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1926.25,"y":2290,"z":"27680826.c34468","wires":[]},{"id":"24a55a09.887c56","type":"save","name":"Update subnet to CREATED in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'CREATED'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":922.5,"y":2258.75,"z":"27680826.c34468","wires":[["1e94d227.4eeefe","ef4471e5.aa12e"]]},{"id":"37c7ceb5.4681d2","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1291.0713806152344,"y":2265.8928756713867,"z":"27680826.c34468","wires":[]},{"id":"1e94d227.4eeefe","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1141.9332580566406,"y":2267.8928756713867,"z":"27680826.c34468","wires":[["37c7ceb5.4681d2"]]},{"id":"ef4471e5.aa12e","type":"not-found","name":"not-found","xml":"<outcome value=\"not-found\">","comments":"","outputs":1,"x":1142.7903671264648,"y":2302.178596287966,"z":"27680826.c34468","wires":[["f2e46833.bbd3f8"]]},{"id":"f2e46833.bbd3f8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name='eipam-ip-block.request-id' value=\"`$eipam-ip-block.entity-id + '-' + $aai.l3-network.contrail-network-fqdn`\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while updating subnet to CREATED in mysql.\" />\n\t","comments":"","x":1290.0712203979492,"y":2298.178626805544,"z":"27680826.c34468","wires":[]},{"id":"4939e504.9f364c","type":"save","name":"Update subnet to PENDING-ACTIVE in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'PENDING-ACTIVE'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1227.5,"y":112.5,"z":"27680826.c34468","wires":[[]]},{"id":"f38846a2.f8b938","type":"save","name":"Update subnet to ERROR in DB","xml":"<save \n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"UPDATE EIPAM_IP_SUBNETS\n             SET status = 'ERROR'\n             WHERE entity_id = $eipam-ip-block.entity-id ; \"\n    force='true'\n        pfx='pfx.eipam-subnet-row'>\n","comments":"","outputs":1,"x":1337.142822265625,"y":471.4285888671875,"z":"27680826.c34468","wires":[[]]},{"id":"7b0ec3aa.9f133c","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1647.1429138183594,"y":1992.8571271896362,"z":"27680826.c34468","wires":[]},{"id":"51cffb75.2a5354","type":"set","name":"set: status = ERROR","xml":"<set>\n\t<parameter name=\"eipam-ip-block.status\" value=\"ERROR\" />","x":1517.142822265625,"y":2338.571533203125,"z":"27680826.c34468","wires":[]}]