summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-changeassign.json
blob: 94de3de4bba25038b18a57ca1333833e948a055d (plain)
1
[{"id":"78cb8595.ca2464","type":"dgstart","name":"DGSTART","outputs":1,"x":147.5,"y":112,"z":"99faf548.31fd3","wires":[["8cb2b66b.81bcd8"]]},{"id":"8cb2b66b.81bcd8","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>","outputs":1,"x":290.7856903076172,"y":175.09525775909424,"z":"99faf548.31fd3","wires":[["4040c418.7fc174"]]},{"id":"4040c418.7fc174","type":"method","name":"network-topology-operation-changeassign","xml":"<method rpc='network-topology-operation-changeassign' mode='sync'>\n","comments":"","outputs":1,"x":264.46437072753906,"y":250.89285469055176,"z":"99faf548.31fd3","wires":[["fdca899b.1c557"]]},{"id":"fdca899b.1c557","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":163.2857437133789,"y":430.9078121185303,"z":"99faf548.31fd3","wires":[["84b36df2.25e65","84ee1670.5f0a7","aeb06755.a7872","fd434a74.035768","5872c2e1.fd902c","151d8dc1.30e372","4cf6fa1f.47b03c","203bed4.3354e12","f2c572bd.81ebb","1011fe25.8dc6ca","3fed421d.e63e86","b8e99272.6fe8b","3991c105.213bc6","f7643660.4bcd8","95446770.fe01d8","ee3e375d.3ff768","2a9c6277.2cb43e","af7b04ae.883c9","d6bd7579.410f98","5606ead2.76c2b4"]]},{"id":"b3e6283f.d4bc","type":"comment","name":"Changelog","info":"1806: new DG for changeassign for preload","comments":"","x":360.3571472167969,"y":112.00000667572021,"z":"99faf548.31fd3","wires":[]},{"id":"84b36df2.25e65","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n","comments":"","outputs":1,"x":602.678596496582,"y":443.2896785736084,"z":"99faf548.31fd3","wires":[[]]},{"id":"aeb06755.a7872","type":"get-resource","name":"get AnAI - l3-network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $network-topology-operation-input.network-request-information.network-id\n\t\t\tAND depth='all'\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"tmp.AnAI.l3network\">\n","comments":"","outputs":1,"x":542.1846008300781,"y":694.247106552124,"z":"99faf548.31fd3","wires":[["a46bd08e.5da5a","5c1a94fd.e35f64"]]},{"id":"151d8dc1.30e372","type":"switchNode","name":"switch: AnAI == PRELOAD - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $preload-data.preload-network-topology-information.network-topology-identifier.network-name`\">","comments":"","outputs":1,"x":611.8473815917969,"y":926.4177303314209,"z":"99faf548.31fd3","wires":[["a8efc187.30f838"]]},{"id":"1011fe25.8dc6ca","type":"for","name":"for loop k - tmp.AnAI.l3network.subnets.subnet","xml":"<for index=\"k\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":621.8988800048828,"y":1186.4765882492065,"z":"99faf548.31fd3","wires":[["b0f7d04e.f6228"]]},{"id":"5c01494c.b5ff3","type":"for","name":"for loop i - PRELOAD subnets","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":1004.8394660949707,"y":2504.9333333969116,"z":"99faf548.31fd3","wires":[["c8f11916.cc498"]]},{"id":"5f010c7f.3fb644","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":490.6006507873535,"y":7526.331782341003,"z":"99faf548.31fd3","wires":[]},{"id":"a46bd08e.5da5a","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":729.0895500183105,"y":735.4414100646973,"z":"99faf548.31fd3","wires":[["577c5c6.eef4ea4"]]},{"id":"577c5c6.eef4ea4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'network-id: ' + $network-topology-operation-input.network-request-information.network-id + 'not found in AnAI'`\" />","comments":"","x":891.7283248901367,"y":735.330397605896,"z":"99faf548.31fd3","wires":[]},{"id":"2c0b312d.fcb97e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":764.2245063781738,"y":1342.4961166381836,"z":"99faf548.31fd3","wires":[["9abbbbfa.53807","f2815bd8.a2a3e8"]]},{"id":"8097d12.27e8db","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name='tmp.start-address-match' value='0' />\n","comments":"","x":836.7513465881348,"y":1234.0304651260376,"z":"99faf548.31fd3","wires":[]},{"id":"318783fb.42fd1c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1459.8359107971191,"y":2569.1835403442383,"z":"99faf548.31fd3","wires":[["284ced49.664fa2","c7a5fe9e.78c0c"]]},{"id":"c233c3d1.d2adc","type":"set","name":"initialize tmp.start-address-match = 0","xml":"<set>\n<parameter name=\"tmp.start-address-match\" value=\"0\" />\n","comments":"","x":1527.651569366455,"y":2505.419786453247,"z":"99faf548.31fd3","wires":[]},{"id":"9abbbbfa.53807","type":"for","name":"for loop n PRELOAD subnets","xml":"<for index=\"n\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.subnets_length`\">\n","comments":"","outputs":1,"x":996.955078125,"y":1343.0199851989746,"z":"99faf548.31fd3","wires":[["fa146218.ec01a8"]]},{"id":"be029b56.cf1df","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":1403.3373908996582,"y":2038.0627098083496,"z":"99faf548.31fd3","wires":[["de23edc2.3b0c28"]]},{"id":"284ced49.664fa2","type":"for","name":"for loop j - AnAI l3subnet","xml":"<for index=\"j\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1681.0319175720215,"y":2569.5992250442505,"z":"99faf548.31fd3","wires":[["afdd26c6.cae418"]]},{"id":"de23edc2.3b0c28","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1640.7497215270996,"y":2037.6302165985107,"z":"99faf548.31fd3","wires":[["5ee496da.7cbdc8"]]},{"id":"37fb1c35.831964","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1955.8168830871582,"y":2623.7336387634277,"z":"99faf548.31fd3","wires":[["a9319a23.6cb84"]]},{"id":"fa146218.ec01a8","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n start-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].network-start-address == $preload-data.preload-network-topology-information.subnets[$n].start-address`\">","comments":"","outputs":1,"x":1333.034423828125,"y":1342.8733177185059,"z":"99faf548.31fd3","wires":[["53d9bc33.649454"]]},{"id":"afdd26c6.cae418","type":"switchNode","name":"switch: PRELOAD-i == AnAI-j start-address","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$i].start-address == $tmp.AnAI.l3network.subnets.subnet[$j].network-start-address`\">","comments":"","outputs":1,"x":1995.0833473205566,"y":2570.1826963424683,"z":"99faf548.31fd3","wires":[["b36ddf7d.2b52b8"]]},{"id":"a9319a23.6cb84","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2135.956226348877,"y":2624.2042837142944,"z":"99faf548.31fd3","wires":[["1b52fec9.004729","4a073530.673444","b69dabd1.9cf9c8","6e6f182b.08ba18","b941f229.313c28","9fa0a0b1.0a386","6499a1da.9e778"]]},{"id":"53d9bc33.649454","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1617.6036109924316,"y":1015.5789260864258,"z":"99faf548.31fd3","wires":[["f2efaecb.a4c288"]]},{"id":"5ee496da.7cbdc8","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 = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n\t\t","comments":"","outputs":1,"x":1824.2445945739746,"y":2037.0247611999512,"z":"99faf548.31fd3","wires":[["c11c2553.d05c4","d170de98.954d98","791db7cd.110f5"]]},{"id":"b36ddf7d.2b52b8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2246.285015106201,"y":2569.6224908828735,"z":"99faf548.31fd3","wires":[["84c63af2.77852"]]},{"id":"c11c2553.d05c4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2061.2204360961914,"y":2036.905517578125,"z":"99faf548.31fd3","wires":[["85718701.a91ff"]]},{"id":"cad3b8b9.df2fb8","type":"comment","name":"foreach AnAI l3subnet not found in PRELOAD, set pending-delete","info":"","comments":"","x":1116.9951782226562,"y":1991.508466720581,"z":"99faf548.31fd3","wires":[]},{"id":"a6a0b46e.ea3b68","type":"comment","name":"foreach PRELOAD subnet not found in AnAI l3subnet, create subnet in AnAI","info":"","comments":"","x":738.895751953125,"y":2457.522095680237,"z":"99faf548.31fd3","wires":[]},{"id":"7ba20b9c.bf119c","type":"comment","name":"start-addr matched, compare other subnet attrs","info":"","comments":"","x":1324.1495208740234,"y":1294.1844925880432,"z":"99faf548.31fd3","wires":[]},{"id":"8a28bf8a.ec8a78","type":"comment","name":"foreach AnAI subnet attr different from PRELOAD, update AnAI and set pending-update","info":"","comments":"","x":2017.4664039611816,"y":616.4829177856445,"z":"99faf548.31fd3","wires":[]},{"id":"1b52fec9.004729","type":"switchNode","name":"switch : PRELOAD dhcp-enabled","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$i].dhcp-enabled`\">","comments":"","outputs":1,"x":2441.034351348877,"y":2623.851176261902,"z":"99faf548.31fd3","wires":[["9bb2de7a.c88328","55d656da.00646"]]},{"id":"55d656da.00646","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":2688.5899085998535,"y":2624.77188205719,"z":"99faf548.31fd3","wires":[["517d00af.9ef16"]]},{"id":"9bb2de7a.c88328","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2689.256649017334,"y":2671.2163791656494,"z":"99faf548.31fd3","wires":[["4fd23755.392b2"]]},{"id":"b0f7d04e.f6228","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":575.0187950134277,"y":1234.314980506897,"z":"99faf548.31fd3","wires":[["8097d12.27e8db","2c0b312d.fcb97e","62ed2b02.abed04"]]},{"id":"62ed2b02.abed04","type":"set","name":"initialize tmp.subnetUpdate = 0","xml":"<set>\n<parameter name='tmp.subnetUpdate' value='0' />\n","comments":"","x":817.5111503601074,"y":1279.6883325576782,"z":"99faf548.31fd3","wires":[]},{"id":"c8f11916.cc498","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1265.625675201416,"y":2505.3988723754883,"z":"99faf548.31fd3","wires":[["c233c3d1.d2adc","318783fb.42fd1c"]]},{"id":"d170de98.954d98","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2067.9432945251465,"y":2190.7074871063232,"z":"99faf548.31fd3","wires":[["27921b9c.80f68c"]]},{"id":"9e85f245.d4b0e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2736.5464935302734,"y":3193.0616664886475,"z":"99faf548.31fd3","wires":[["51b0e536.da0e8c"]]},{"id":"f89e3ebf.b351","type":"set","name":"set tmp.subnetRollback: orchestraton-status","xml":"<set>\n  <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n  <parameter name=\"tmp.subnetRollback[$x].orchestration-status\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].orchestration-status`\" />\n  <parameter name=\"tmp.subnetRollback[$x].type\" value = \"delete\"  />\n  \n\n\n","comments":"","x":2511.9457664489746,"y":2189.898748397827,"z":"99faf548.31fd3","wires":[]},{"id":"27921b9c.80f68c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2204.8030548095703,"y":2190.470316886902,"z":"99faf548.31fd3","wires":[["f89e3ebf.b351","72749e8c.4d3648","b21b63dd.91c4d"]]},{"id":"51b0e536.da0e8c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2878.9909286499023,"y":3193.107374191284,"z":"99faf548.31fd3","wires":[["5c1d7222.a0c1a4","6a26699.aef9d18","6b5d4ec3.3c3e58","5348546b.a906bc"]]},{"id":"5c1d7222.a0c1a4","type":"set","name":"set tmp.subnetRollback for create","xml":"<set>\n  <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n  <parameter name=\"tmp.subnetRollback[$x].type\" value = \"create\"  />","comments":"","x":3149.2768363952637,"y":3193.8219709396362,"z":"99faf548.31fd3","wires":[]},{"id":"72749e8c.4d3648","type":"set","name":"$x++","xml":"<set>\n  <parameter name=\"x\" value = \"`$x + 1`\"  />\n\n","comments":"","x":2395.650722503662,"y":2235.94939994812,"z":"99faf548.31fd3","wires":[]},{"id":"6a26699.aef9d18","type":"set","name":"$x++","xml":"<set>\n  <parameter name=\"x\" value = \"`$x + 1`\"  />\n\n","comments":"","x":3066.2131156921387,"y":3239.386336326599,"z":"99faf548.31fd3","wires":[]},{"id":"5c1a94fd.e35f64","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":722.045768737793,"y":694.6399879455566,"z":"99faf548.31fd3","wires":[["805f4ce3.7858f8"]]},{"id":"805f4ce3.7858f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"`'Error retrieving l3-network with network-id=' + $network-topology-operation-input.network-request-information.network-id + ' from AnAI'`\" />","comments":"","x":881.156852722168,"y":694.8622169494629,"z":"99faf548.31fd3","wires":[]},{"id":"a8efc187.30f838","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":866.0973815917969,"y":926.421727180481,"z":"99faf548.31fd3","wires":[["bb3c93c4.2f3f6"]]},{"id":"bb3c93c4.2f3f6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-name = ' + $tmp.AnAI.l3network.network-name + ' in SDNC'`\" />","comments":"","x":1028.736156463623,"y":926.3107147216797,"z":"99faf548.31fd3","wires":[]},{"id":"ce72f11c.50bff8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2497.061740875244,"y":2123.707365989685,"z":"99faf548.31fd3","wires":[]},{"id":"b941f229.313c28","type":"save","name":"save AnAI - l3-network.subnets.subnet","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid\" >\n\t<!-- Create l3-network object -->\n\t<parameter name=\"network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n\t<parameter name=\"subnet-id\" value=\"`$tmp.return.generate-subnets-subnet-id.uuid`\" />\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\" />\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].subnet-name`\" />\t\t\n\t<parameter name=\"network-start-address\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ip-version\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].dhcp-start-address`\" />\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].dhcp-end-address`\" />\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\" />\n\t<parameter name=\"ip-assignment-direction\" value=\"`$tmp.addrFromStart.boolean`\" />\n\t<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":2453.2047595977783,"y":3053.3509311676025,"z":"99faf548.31fd3","wires":[["5cbf09b9.68eac8","9e85f245.d4b0e","48e77510.8d6f74"]]},{"id":"5cbf09b9.68eac8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2730.821033477783,"y":3053.6994342803955,"z":"99faf548.31fd3","wires":[["7ed587ce.58bb7"]]},{"id":"b69dabd1.9cf9c8","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$i].gateway-address`\">","comments":"","outputs":1,"x":2452.0707359313965,"y":2918.6447286605835,"z":"99faf548.31fd3","wires":[["fd829caf.94df28"]]},{"id":"fd829caf.94df28","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":2675.5707359313965,"y":2918.6447286605835,"z":"99faf548.31fd3","wires":[["ca740c1.333a3f"]]},{"id":"5df53d20.23f0d4","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":3048.8207511901855,"y":2918.394736289978,"z":"99faf548.31fd3","wires":[[]]},{"id":"ca740c1.333a3f","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2817.320743560791,"y":2918.644739151001,"z":"99faf548.31fd3","wires":[["5df53d20.23f0d4","5d6ff69d.f979f8"]]},{"id":"4a073530.673444","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name='tmp.gateway-address' value='`$preload-data.preload-network-topology-information.subnets[$i].gateway-address`' />\n","comments":"","x":2414.5707511901855,"y":2874.8947353363037,"z":"99faf548.31fd3","wires":[]},{"id":"5d6ff69d.f979f8","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":3015.3207511901855,"y":2960.3947381973267,"z":"99faf548.31fd3","wires":[]},{"id":"6e6f182b.08ba18","type":"call","name":"call generate-subnets-subnet-id","xml":"<call module=\"VNF-API\" rpc=\"generate-subnets-subnet-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":2432.1857147216797,"y":3006.501851081848,"z":"99faf548.31fd3","wires":[["df1c94ad.d58c2"]]},{"id":"df1c94ad.d58c2","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2695.9356994628906,"y":3006.751841545105,"z":"99faf548.31fd3","wires":[["7ed587ce.58bb7"]]},{"id":"85718701.a91ff","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2265.5258407592773,"y":2037.171579360962,"z":"99faf548.31fd3","wires":[["ce72f11c.50bff8","7539d8e7.6520d8","c1e8109.33219f"]]},{"id":"517d00af.9ef16","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":2944.7283668518066,"y":2624.3148374557495,"z":"99faf548.31fd3","wires":[]},{"id":"4fd23755.392b2","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":2946.5101585388184,"y":2670.929913520813,"z":"99faf548.31fd3","wires":[]},{"id":"53eb3226.6cd5d4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3175.343620300293,"y":3142.5335903167725,"z":"99faf548.31fd3","wires":[]},{"id":"7ed587ce.58bb7","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2930.5578079223633,"y":3053.3907718658447,"z":"99faf548.31fd3","wires":[["53eb3226.6cd5d4","3ff5481d.28183","3060e5d9.8b532a"]]},{"id":"3ff5481d.28183","type":"set","name":"set i, j max + 1","xml":"<set>\n\t<parameter name='j' value='`$tmp.AnAI.l3subnet_length + 1`' />\n\t<parameter name='i' value='`$preload-data.preload-network-topology-information.subnets_length + 1`' />","comments":"","x":3139.057846069336,"y":3053.3907890319824,"z":"99faf548.31fd3","wires":[]},{"id":"d982bcdf.e05c5","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='error-code' value='500'/>\n\t<parameter name='error-message' value=\"`'Error updating l3-network in AnAI with network-id = ' + $tmp.AnAI.l3network.network-id + ' - ' + $tmp.error-message + ' - ' + $tmp.rollback.error-message`\"/>","comments":"","x":1116.36665725708,"y":7374.491377830505,"z":"99faf548.31fd3","wires":[]},{"id":"d6bd7579.410f98","type":"set","name":"Set final indicator to Y","xml":"<set>\n<parameter name=\"ack-final\" value=\"Y\"/>","comments":"","x":503.46631622314453,"y":7430.028269767761,"z":"99faf548.31fd3","wires":[]},{"id":"6b5d4ec3.3c3e58","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name='tmp.l3networkUpdate' value='1' />\n","comments":"","x":3135.60945892334,"y":3285.910446166992,"z":"99faf548.31fd3","wires":[]},{"id":"d20488b7.54f5f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1737.8528366088867,"y":6141.0212779045105,"z":"99faf548.31fd3","wires":[["f5491b15.8a826"]]},{"id":"c9a6b2f7.6419f","type":"switchNode","name":"switch : tmp.l3networkUpdate = 1","xml":"<switch test=\"`$tmp.l3networkUpdate == 1`\">\n","comments":"","outputs":1,"x":977.0615577697754,"y":6141.137383937836,"z":"99faf548.31fd3","wires":[["53f56d25.6348ac"]]},{"id":"53f56d25.6348ac","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1190.7282218933105,"y":6140.914918422699,"z":"99faf548.31fd3","wires":[["f5387c8b.6ac678"]]},{"id":"f5387c8b.6ac678","type":"save","name":"update AnAI - l3-network.orchestration-status","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"PendingUpdate\" />","comments":"","outputs":1,"x":1445.77592086792,"y":6141.0418581962585,"z":"99faf548.31fd3","wires":[["d20488b7.54f5f8","6832d8a7.75e9e8","46e1f204.12633c"]]},{"id":"f5491b15.8a826","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1912.9187965393066,"y":6141.327346324921,"z":"99faf548.31fd3","wires":[["97748f15.931678","3e0459f9.200e1e"]]},{"id":"97748f15.931678","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while updating l3-network.orchestration-status in AnAI\"/>","comments":"","x":2160.0628776550293,"y":6141.129821300507,"z":"99faf548.31fd3","wires":[]},{"id":"36a15b72.a0658c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":610.5582847595215,"y":3710.5745153427124,"z":"99faf548.31fd3","wires":[["6b5eeaf8.68d51c","dbd29e8d.9dd118"]]},{"id":"f3afb4a0.398f6","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":564.033878326416,"y":4565.322596788406,"z":"99faf548.31fd3","wires":[["4222d324.4898b4","461742ab.1d3484"]]},{"id":"f59af4d8.685088","type":"save","name":"Rollback AnAI - l3-network.orchestration-status","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.orchestration-status`\" />","comments":"","outputs":1,"x":1727.0260772705078,"y":7277.312352180481,"z":"99faf548.31fd3","wires":[["a00f453a.858988","ff448016.b11eb8"]]},{"id":"b21b63dd.91c4d","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":2463.418788909912,"y":2281.064504623413,"z":"99faf548.31fd3","wires":[]},{"id":"c7a5fe9e.78c0c","type":"switchNode","name":"switch: tmp.start-address-match = 0","xml":"<switch test=\"`$tmp.start-address-match == 0`\">","comments":"","outputs":1,"x":1716.2402076721191,"y":2624.0289993286133,"z":"99faf548.31fd3","wires":[["37fb1c35.831964"]]},{"id":"84c63af2.77852","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":2467.7402305603027,"y":2569.279040336609,"z":"99faf548.31fd3","wires":[]},{"id":"6b5eeaf8.68d51c","type":"save","name":"delete relationship: vpn_binding","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\tAND related-to = vpn-binding\" >","comments":"","outputs":1,"x":882.1806716918945,"y":3710.862449645996,"z":"99faf548.31fd3","wires":[["e3e61d44.abb2f"]]},{"id":"5dfb8fb6.f3579","type":"for","name":"for loop i - PRELOAD vpn-bindings","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.vpn-bindings_length`\">\n","comments":"","outputs":1,"x":1534.9068624708389,"y":3856.0290934244786,"z":"99faf548.31fd3","wires":[["76217cb4.f91a3c"]]},{"id":"76217cb4.f91a3c","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1773.6846410963271,"y":3856.279095331827,"z":"99faf548.31fd3","wires":[["95a5f85e.7040b","2ccf674.f327f98","4f6f9141.e4ee6","49ced0c0.0d0a6"]]},{"id":"3a17d689.c8bcea","type":"save","name":"save relationship: vpn_bindings","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vpn-binding-id`\" />","comments":"","outputs":1,"x":2924.879108428955,"y":4204.251133918762,"z":"99faf548.31fd3","wires":[["23d5f47a.fc9304","66ece968.e2a5f","980e97ec.e3025"]]},{"id":"5cfc33fd.ad0c9c","type":"switchNode","name":"switch ... PRELOAD vpn-bindings[]","xml":"<switch test=\"`$preload-data.preload-network-topology-information.vpn-bindings_length`\">","comments":"","outputs":1,"x":1535.2843055725098,"y":3812.6104068756104,"z":"99faf548.31fd3","wires":[["6446b344.0b3694"]]},{"id":"6446b344.0b3694","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1761.7287559509277,"y":3812.3881425857544,"z":"99faf548.31fd3","wires":[["7ee8f2a.3360e8c"]]},{"id":"7ee8f2a.3360e8c","type":"set","name":"set vpn-bindings[] = 0","xml":"<set>\n<parameter name=\"preload-data.preload-network-topology-information.vpn-bindings_length\" value=\"0\" />\n","comments":"","x":1950.284364912245,"y":3812.3881632486973,"z":"99faf548.31fd3","wires":[]},{"id":"eff4b893.59d03","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2326.4190237257217,"y":3949.8783976236973,"z":"99faf548.31fd3","wires":[["4fe98a6a.aca81c"]]},{"id":"4fe98a6a.aca81c","type":"save","name":"query AnAI - vpn-bindings","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.global-route-target = $preload-data.preload-network-topology-information.vpn-bindings[$i].global-route-target\" \n\t\tpfx=\"tmp.AnAI.vpn-binding\">","comments":"","outputs":1,"x":2530.9190199110244,"y":3949.6283985773716,"z":"99faf548.31fd3","wires":[["b501292d.6ed1d8","965ac69e.2f8b68","5693a5ae.52f284"]]},{"id":"b501292d.6ed1d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2772.669058057997,"y":3997.128366152445,"z":"99faf548.31fd3","wires":[["6d1eda91.2e6a1c"]]},{"id":"965ac69e.2f8b68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2778.1690618726943,"y":3949.6283651987706,"z":"99faf548.31fd3","wires":[["6d1eda91.2e6a1c"]]},{"id":"6d1eda91.2e6a1c","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2925.6690618726943,"y":3996.878367106119,"z":"99faf548.31fd3","wires":[["6b6c53ae.e7e78c","85345bb9.7023d8"]]},{"id":"6b6c53ae.e7e78c","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query vpn-bindings n AnAI where global-route-target = ' + $preload-data.preload-network-topology-information.vpn-bindings[$i].global-route-target`\"/>","comments":"","x":3166.7686025831435,"y":3996.6282660166416,"z":"99faf548.31fd3","wires":[]},{"id":"95a5f85e.7040b","type":"switchNode","name":"switch: PRELOAD vpn-binding-id","xml":"<switch test=\"`$preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`\">","comments":"","outputs":1,"x":2069.169027540419,"y":3904.1283375422154,"z":"99faf548.31fd3","wires":[["1d812b6.bb0a9d5"]]},{"id":"1d812b6.bb0a9d5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2289.6690351698135,"y":3903.8783384958897,"z":"99faf548.31fd3","wires":[["3d5e08d1.854308"]]},{"id":"3d5e08d1.854308","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`\" />\n","comments":"","x":2485.1690351698135,"y":3903.878339449564,"z":"99faf548.31fd3","wires":[]},{"id":"5693a5ae.52f284","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2778.0859031677246,"y":4098.294943809509,"z":"99faf548.31fd3","wires":[["a1289d1c.ed3668"]]},{"id":"a1289d1c.ed3668","type":"set","name":"set tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"`$tmp.AnAI.vpn-binding.vpn-id`\" />\n","comments":"","x":2968.5859031677246,"y":4098.294943809509,"z":"99faf548.31fd3","wires":[]},{"id":"23d5f47a.fc9304","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3184.9519844055176,"y":4203.7267208099365,"z":"99faf548.31fd3","wires":[["122ef45b.214554"]]},{"id":"122ef45b.214554","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":3341.8448638916016,"y":4203.3628282547,"z":"99faf548.31fd3","wires":[["d0dbeeeb.6ef02","fb4e9cd8.b15bc","3651c046.062be"]]},{"id":"d0dbeeeb.6ef02","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.vpn-binding-id`\"/>","comments":"","x":3561.944404602051,"y":4203.112727165222,"z":"99faf548.31fd3","wires":[]},{"id":"94c7a9eb.736488","type":"switchNode","name":"switch: tmp.vpn-binding-id != NULL","xml":"<switch test=\"`$tmp.vpn-binding-id != ''`\">","comments":"","outputs":1,"x":2482.419101715088,"y":4204.294880867004,"z":"99faf548.31fd3","wires":[["5ec692d1.023e34"]]},{"id":"5ec692d1.023e34","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2704.669105529785,"y":4204.294880867004,"z":"99faf548.31fd3","wires":[["3a17d689.c8bcea"]]},{"id":"d0a5b457.98849","type":"switchNode","name":"switch ... PRELOAD network-policy[]","xml":"<switch test=\"`$preload-data.preload-network-topology-information.network-policy_length`\">","comments":"","outputs":1,"x":1480.0854606628418,"y":4703.695333242416,"z":"99faf548.31fd3","wires":[["89fe2912.b7d1c"]]},{"id":"89fe2912.b7d1c","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1709.5299110412598,"y":4703.47306895256,"z":"99faf548.31fd3","wires":[["a56ffb2b.b423e8"]]},{"id":"a56ffb2b.b423e8","type":"set","name":"set network-policy[] = 0","xml":"<set>\n<parameter name='preload-data.preload-network-topology-information.network-policy_length' value='0' />\n","comments":"","x":1904.0855200025771,"y":4703.473089615503,"z":"99faf548.31fd3","wires":[]},{"id":"aeefcea0.4d5f5","type":"for","name":"for loop i - PRELOAD network-policy","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.network-policy_length`\">\n","comments":"","outputs":1,"x":1479.4427223205566,"y":4749.266724348068,"z":"99faf548.31fd3","wires":[["b24a775e.99b738"]]},{"id":"91e9b173.465ed","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.network-policy.network-policy-id`\" />","comments":"","outputs":1,"x":2812.8556327819824,"y":4948.453424215317,"z":"99faf548.31fd3","wires":[["a1914926.c0666","71f2c219.19753c","e8b59d42.c0eab8"]]},{"id":"b24a775e.99b738","type":"switchNode","name":"switch: PRELOAD network-policy-fqdn != NULL","xml":"<switch test=\"`$preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn != NULL`\">","comments":"","outputs":1,"x":1837.9549200269912,"y":4749.3659786383305,"z":"99faf548.31fd3","wires":[["671f99c0.ad63b"]]},{"id":"671f99c0.ad63b","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2118.704920026991,"y":4749.6159786383305,"z":"99faf548.31fd3","wires":[["8729b44c.2d0be8"]]},{"id":"8729b44c.2d0be8","type":"save","name":"query AnAI - network-policy","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-fqdn = $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn\"  \n\t\tpfx=\"tmp.AnAI.network-policy\" >","comments":"","outputs":1,"x":2318.7049560546875,"y":4749.61589884758,"z":"99faf548.31fd3","wires":[["3ffbea82.fd9536","12ae7a61.8768ee","ca38600c.0020d8"]]},{"id":"3ffbea82.fd9536","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2582.7049882676865,"y":4790.365820964178,"z":"99faf548.31fd3","wires":[["9457d779.d039a8"]]},{"id":"12ae7a61.8768ee","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2588.204992082384,"y":4749.865820010504,"z":"99faf548.31fd3","wires":[["9457d779.d039a8"]]},{"id":"9457d779.d039a8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2737.704992082384,"y":4790.115821917852,"z":"99faf548.31fd3","wires":[["9163a003.11c3a","1d9e30c4.0c4247"]]},{"id":"9163a003.11c3a","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":2953.804532792833,"y":4789.865720828375,"z":"99faf548.31fd3","wires":[]},{"id":"a1914926.c0666","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3055.928508758545,"y":4947.929011106491,"z":"99faf548.31fd3","wires":[["f21e8ec.4a2e97"]]},{"id":"f21e8ec.4a2e97","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":3196.821388244629,"y":4947.565118551254,"z":"99faf548.31fd3","wires":[["d905fa8b.6faa88","113e310a.374617"]]},{"id":"d905fa8b.6faa88","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`\"/>","comments":"","x":3427.920928955078,"y":4947.315017461777,"z":"99faf548.31fd3","wires":[]},{"id":"4222d324.4898b4","type":"save","name":"delete relationship: network-policy","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = network-policy\" >","comments":"","outputs":1,"x":852.2481575012207,"y":4565.131925106049,"z":"99faf548.31fd3","wires":[["f621a0f6.517d5"]]},{"id":"9fa0a0b1.0a386","type":"set","name":"set tmp.local.network-id","xml":"<set>\n<parameter name=\"tmp.local.network-id\" value=\"`$tmp.AnAI.l3network.network-id`\" />\n","comments":"","x":2411.7919311523438,"y":2961.6719512939453,"z":"99faf548.31fd3","wires":[]},{"id":"9e765f6.18a54a","type":"comment","name":"query l3-network gets all the subnets and relationships for free","info":"","comments":"","x":668.3274421691895,"y":652.7670316696167,"z":"99faf548.31fd3","wires":[]},{"id":"2ccf674.f327f98","type":"switchNode","name":"switch: PRELOAD route-target != NULL","xml":"<switch test=\"`$preload-data.preload-network-topology-information.vpn-bindings[$i].global-route-target != ''`\" >","comments":"","outputs":1,"x":2090.506101820204,"y":3949.4339024225865,"z":"99faf548.31fd3","wires":[["eff4b893.59d03"]]},{"id":"203bed4.3354e12","type":"set","name":"initialize tmp variables, x, tmp.error-message, tmp.l3networkUpdate, execute_failure","xml":"<set>\n\t<parameter name='x' value='0' />\n\t<parameter name='tmp.error-message' value='' />\n\t<parameter name='execute_failure' value='false' />\n\t<parameter name='tmp.l3networkUpdate' value='0' />","comments":"","x":735.9704895019531,"y":1014.6836652755737,"z":"99faf548.31fd3","wires":[]},{"id":"ca38600c.0020d8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2587.4705848693848,"y":4947.957292318344,"z":"99faf548.31fd3","wires":[["91e9b173.465ed"]]},{"id":"4f6f9141.e4ee6","type":"set","name":"unset tmp.vpn-binding-id","xml":"<set>\n<parameter name=\"tmp.vpn-binding-id\" value=\"\" />\n","comments":"","x":2043.2918379041885,"y":3856.362458864847,"z":"99faf548.31fd3","wires":[]},{"id":"e3e61d44.abb2f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1113.4584884643555,"y":3710.445677757263,"z":"99faf548.31fd3","wires":[["350799e9.fe8dae"]]},{"id":"350799e9.fe8dae","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1273.1952629089355,"y":3711.1370153427124,"z":"99faf548.31fd3","wires":[["33acc231.92afd6","3695e1f7.f39ba6"]]},{"id":"33acc231.92afd6","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network vpn-binding relationship from AnAI\"/>","comments":"","x":1491.8752326965332,"y":3711.445852279663,"z":"99faf548.31fd3","wires":[]},{"id":"f621a0f6.517d5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1076.383129119873,"y":4564.715136051178,"z":"99faf548.31fd3","wires":[["8b976e5b.81b298"]]},{"id":"8b976e5b.81b298","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1253.1199035644531,"y":4564.406473636627,"z":"99faf548.31fd3","wires":[["1802fcbe.a809bb","ab2d703d.ad753"]]},{"id":"1802fcbe.a809bb","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network network-policy relationship from AnAI in preparation to regenerate the network-policy relationship from PRELOAD.\"/>","comments":"","x":1477.133129119873,"y":4564.715136051178,"z":"99faf548.31fd3","wires":[]},{"id":"a17c212d.6d8c98","type":"switchNode","name":"switch : tmp.l3network.status.updated = 1","xml":"<switch test=\"`$tmp.l3network.status.updated == 1`\">\n","comments":"","outputs":1,"x":1210.9943389892578,"y":7277.22934627533,"z":"99faf548.31fd3","wires":[["e944b625.a0c928"]]},{"id":"e944b625.a0c928","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1463.6609725952148,"y":7277.506934165955,"z":"99faf548.31fd3","wires":[["f59af4d8.685088"]]},{"id":"602e376c.c4711","type":"set","name":"set tmp.l3network.status.updated = 1","xml":"<set>\n<parameter name='tmp.l3network.status.updated' value='1' />\n","comments":"","x":1994.0300331115723,"y":6244.672054767609,"z":"99faf548.31fd3","wires":[]},{"id":"6832d8a7.75e9e8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1741.958667755127,"y":6244.945868015289,"z":"99faf548.31fd3","wires":[["602e376c.c4711"]]},{"id":"76253b37.b24f94","type":"for","name":"for loop z - tmp.AnAI.l3network.relationship-list.relationship[]","xml":"<for index=\"z\" start=\"0\" end=\"`$tmp.AnAI.l3network.relationship-list.relationship_length`\">\n","comments":"","outputs":1,"x":1264.92280960083,"y":6370.695941925049,"z":"99faf548.31fd3","wires":[["c1e34c4f.182718"]]},{"id":"c1e34c4f.182718","type":"switchNode","name":"switch: relationship[].related-to","xml":"<switch test=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].related-to`\">","comments":"","outputs":1,"x":1689.1727485656738,"y":6370.4459409713745,"z":"99faf548.31fd3","wires":[["b3135a2c.45dc","e3320fe5.f246","56bfd6a9.df74c8"]]},{"id":"b3135a2c.45dc","type":"other","name":"vpn-binding","xml":"<outcome value='vpn-binding'>\n","comments":"","outputs":1,"x":1964.6727485656738,"y":6370.6959409713745,"z":"99faf548.31fd3","wires":[["edb8cf05.bcac58"]]},{"id":"cb67a904.b6e338","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":931.9227409362793,"y":6370.195941925049,"z":"99faf548.31fd3","wires":[["76253b37.b24f94","1397b2f8.aa246d","a17c212d.6d8c98","d982bcdf.e05c5","ccdc8502.0da05"]]},{"id":"338ee831.4b10d8","type":"save","name":"Rollback to save relationship: vpn_binding","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-binding\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-binding.vpn-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":2721.7561378479004,"y":6370.6959409713745,"z":"99faf548.31fd3","wires":[["e47e5a64.5dd5b8","c8eb5da8.a0d2f8"]]},{"id":"e47e5a64.5dd5b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2974.829013824463,"y":6370.171527862549,"z":"99faf548.31fd3","wires":[["c9b0d245.a678c8"]]},{"id":"c9b0d245.a678c8","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork vpn-binding relationship in AnAI where vpn-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":3214.8214149475098,"y":6369.557363510132,"z":"99faf548.31fd3","wires":[]},{"id":"15d373be.656d44","type":"set","name":"set tmp.network-policy.updated = 1","xml":"<set>\n<parameter name='tmp.network-policy.updated' value='1' />\n","comments":"","x":3301.2560691833496,"y":5038.136010885239,"z":"99faf548.31fd3","wires":[]},{"id":"6b825d42.c37bfc","type":"set","name":"set tmp.vpn-binding.updated = 1","xml":"<set>\n<parameter name='tmp.vpn-binding.updated' value='1' />\n","comments":"","x":3411.803798675537,"y":4346.278992652893,"z":"99faf548.31fd3","wires":[]},{"id":"71f2c219.19753c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3062.5060691833496,"y":5038.386010885239,"z":"99faf548.31fd3","wires":[["15d373be.656d44"]]},{"id":"66ece968.e2a5f","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3188.0537910461426,"y":4346.278992652893,"z":"99faf548.31fd3","wires":[["6b825d42.c37bfc"]]},{"id":"e3320fe5.f246","type":"other","name":"network-policy","xml":"<outcome value='network-policy'>\n","comments":"","outputs":1,"x":1975.6250190734863,"y":6519.51709651947,"z":"99faf548.31fd3","wires":[["380a603e.477d1"]]},{"id":"87fc3a57.8fef78","type":"save","name":"Rollback to save relationship: network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-policy\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-policy.network-policy-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":2770.7082862854004,"y":6518.85072851181,"z":"99faf548.31fd3","wires":[["9087c57b.d4e668","8d4f07c3.f8ed6"]]},{"id":"9087c57b.d4e668","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3030.781162261963,"y":6518.326315402985,"z":"99faf548.31fd3","wires":[["15f4af6d.bab1f9"]]},{"id":"15f4af6d.bab1f9","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork network-policy relationship in AnAI where network-policy-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":3246.7734870910645,"y":6518.71190404892,"z":"99faf548.31fd3","wires":[]},{"id":"380a603e.477d1","type":"switchNode","name":"switch:  tmp.network-policy.updated == 1","xml":"<switch test=\"`$tmp.network-policy.updated == 1`\">","comments":"","outputs":1,"x":2246.958507537842,"y":6519.517298698425,"z":"99faf548.31fd3","wires":[["518200d0.33825"]]},{"id":"edb8cf05.bcac58","type":"switchNode","name":"switch:  tmp.vpn-binding.updated == 1","xml":"<switch test=\"`$tmp.vpn-binding.updated == 1`\">","comments":"","outputs":1,"x":2206.9585151672363,"y":6370.517340660095,"z":"99faf548.31fd3","wires":[["c05563d0.07e468"]]},{"id":"c05563d0.07e468","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2440.9585151672363,"y":6370.517340660095,"z":"99faf548.31fd3","wires":[["338ee831.4b10d8"]]},{"id":"518200d0.33825","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2491.9585151672363,"y":6519.517340660095,"z":"99faf548.31fd3","wires":[["87fc3a57.8fef78"]]},{"id":"acaf4bf.d8e9e38","type":"for","name":"for loop i - tmp.AnAI.l3network.subnets.subnet[]","xml":"<for index=\"i\" start=\"0\" end=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">\n","comments":"","outputs":1,"x":1770.934658050537,"y":6874.695291519165,"z":"99faf548.31fd3","wires":[["4c0539c1.07c51"]]},{"id":"3e3f642b.b4579c","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":3087.7078819274902,"y":6874.983587265015,"z":"99faf548.31fd3","wires":[["51c12107.579138","4b1b03f5.a74b4c"]]},{"id":"51c12107.579138","type":"outcomeTrue","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":3326.4223594665527,"y":6874.832225799561,"z":"99faf548.31fd3","wires":[["6d2c5b80.49b5ac"]]},{"id":"4b1b03f5.a74b4c","type":"outcomeTrue","name":"update","xml":"<outcome value='update'>\n","comments":"","outputs":1,"x":3327.9936866760254,"y":6920.404623031616,"z":"99faf548.31fd3","wires":[["4783b0f7.1268"]]},{"id":"6d2c5b80.49b5ac","type":"save","name":"Rollback AnAI delete - l3network.subnets.subnet","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":3608.8510246276855,"y":6874.4051876068115,"z":"99faf548.31fd3","wires":[["7c973dca.78763c","d960b59c.11f63"]]},{"id":"1e801387.42aacc","type":"outcomeTrue","name":"create","xml":"<outcome value='create'>\n","comments":"","outputs":1,"x":2409.4002265930176,"y":7107.0330419540405,"z":"99faf548.31fd3","wires":[["f1fa3232.1abd7"]]},{"id":"f1fa3232.1abd7","type":"delete","name":"Rollback AnAI create -  l3-network.subnets.subnet","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnetRollback[$j].subnet-id\" >","comments":"","outputs":1,"x":2695.685634613037,"y":7106.010865211487,"z":"99faf548.31fd3","wires":[["9271cba0.7e82a8","ddfcf45f.b6b89"]]},{"id":"1397b2f8.aa246d","type":"for","name":"for loop j - subnetRollback[]","xml":"<for index=\"j\" start=\"0\" end=\"`$x`\">\n","comments":"","outputs":1,"x":1175.220417022705,"y":6825.765031814575,"z":"99faf548.31fd3","wires":[["882aa706.c87ac"]]},{"id":"4c0539c1.07c51","type":"switchNode","name":"switch: subnet-id  tmp.AnAI.l3network.subnets.subnet[] == tmp.subnetRollback[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-id == $tmp.subnetRollback[$j].subnet-id`\">","comments":"","outputs":1,"x":2273.934825897217,"y":6874.98072719574,"z":"99faf548.31fd3","wires":[["b72f3ec7.5c0c58"]]},{"id":"b72f3ec7.5c0c58","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2651.6492233276367,"y":6875.40908908844,"z":"99faf548.31fd3","wires":[["f921cbd2.fc183"]]},{"id":"4783b0f7.1268","type":"save","name":"rollback AnAI update - l3-network.subnets.subnet ","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$j].subnet-id\" >\n<parameter name=\"subnet-name\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].subnet-name`\"/>\n<parameter name=\"gateway-address\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].gateway-address`\"/>\n<parameter name=\"cidr-mask\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].cidr-mask`\"/>\n<parameter name=\"dhcp-start\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-start`\"/>\n<parameter name=\"dhcp-end\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-end`\"/>\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].dhcp-enabled`\"/>\n<parameter name=\"orchestration-status\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$i].orchestration-status`\" />\n\t\t","comments":"","outputs":1,"x":3610.6495933532715,"y":6919.765399932861,"z":"99faf548.31fd3","wires":[["59a58bb0.48d64c","88059f52.82953"]]},{"id":"3e0459f9.200e1e","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2169.5656242370605,"y":6184.648462772369,"z":"99faf548.31fd3","wires":[]},{"id":"7c735817.29606","type":"outcomeTrue","name":"true","xml":"<outcome value=\"true\">","outputs":1,"x":720.5178565979004,"y":6370.183808326721,"z":"99faf548.31fd3","wires":[["cb67a904.b6e338"]]},{"id":"3991c105.213bc6","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":577.9109382629395,"y":2504.4221019744873,"z":"99faf548.31fd3","wires":[["102e2893.d19faf"]]},{"id":"102e2893.d19faf","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":780.625186920166,"y":2504.422124862671,"z":"99faf548.31fd3","wires":[["5c01494c.b5ff3"]]},{"id":"f2815bd8.a2a3e8","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":978.9467010498047,"y":2038.136121749878,"z":"99faf548.31fd3","wires":[["7ad92bd4.cef314"]]},{"id":"7ad92bd4.cef314","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1175.9108619689941,"y":2038.3860549926758,"z":"99faf548.31fd3","wires":[["be029b56.cf1df"]]},{"id":"7539d8e7.6520d8","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.preload-network-topology-information.subnets_length + 1`' />","comments":"","x":2466.911075592041,"y":2036.386194229126,"z":"99faf548.31fd3","wires":[]},{"id":"f7643660.4bcd8","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":534.875186920166,"y":3648.529046058655,"z":"99faf548.31fd3","wires":[["f692f6df.50d63"]]},{"id":"f692f6df.50d63","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":737.5894355773926,"y":3648.5290689468384,"z":"99faf548.31fd3","wires":[["36a15b72.a0658c"]]},{"id":"af7b04ae.883c9","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":513.9584999084473,"y":6370.612001419067,"z":"99faf548.31fd3","wires":[["7c735817.29606"]]},{"id":"2a9c6277.2cb43e","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":520.8871040344238,"y":6140.076347351074,"z":"99faf548.31fd3","wires":[["8525e190.d98848"]]},{"id":"8525e190.d98848","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":723.6013526916504,"y":6140.076370239258,"z":"99faf548.31fd3","wires":[["c9a6b2f7.6419f"]]},{"id":"95446770.fe01d8","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":546.680736541748,"y":4488.695550203323,"z":"99faf548.31fd3","wires":[["b7a849c7.6c009"]]},{"id":"b7a849c7.6c009","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":749.3949851989746,"y":4488.695573091507,"z":"99faf548.31fd3","wires":[["f3afb4a0.398f6"]]},{"id":"dbd29e8d.9dd118","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":866.1252174377441,"y":3812.6955308914185,"z":"99faf548.31fd3","wires":[["286dd957.a2c98e"]]},{"id":"286dd957.a2c98e","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1068.8394660949707,"y":3812.695553779602,"z":"99faf548.31fd3","wires":[["12b40a45.433596"]]},{"id":"12b40a45.433596","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1247.7918434143066,"y":3812.529022216797,"z":"99faf548.31fd3","wires":[["5cfc33fd.ad0c9c","5dfb8fb6.f3579"]]},{"id":"3695e1f7.f39ba6","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1496.696475982666,"y":3753.6480884552,"z":"99faf548.31fd3","wires":[]},{"id":"85345bb9.7023d8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3172.458599090576,"y":4040.8621883392334,"z":"99faf548.31fd3","wires":[]},{"id":"49ced0c0.0d0a6","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":2036.6253547668457,"y":4203.029056549072,"z":"99faf548.31fd3","wires":[["62af2ab9.276e04"]]},{"id":"62af2ab9.276e04","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2239.3396034240723,"y":4203.029079437256,"z":"99faf548.31fd3","wires":[["94c7a9eb.736488"]]},{"id":"fb4e9cd8.b15bc","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3568.5535316467285,"y":4288.909888267517,"z":"99faf548.31fd3","wires":[]},{"id":"3651c046.062be","type":"set","name":"set i = max + 1","xml":"<set>\n  <parameter name=\"i\" value = \"`$preload-data.preload-network-topology-information.vpn-bindings_length + 1`\"  />\n\n","comments":"","x":3535.696491241455,"y":4245.814639091492,"z":"99faf548.31fd3","wires":[]},{"id":"461742ab.1d3484","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":827.5140342712402,"y":4705.084690332413,"z":"99faf548.31fd3","wires":[["30bb23db.ab8e5c"]]},{"id":"30bb23db.ab8e5c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1030.2282829284668,"y":4705.084713220596,"z":"99faf548.31fd3","wires":[["f76e423b.ce48b"]]},{"id":"f76e423b.ce48b","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1216.4029350280762,"y":4704.0288207530975,"z":"99faf548.31fd3","wires":[["d0a5b457.98849","aeefcea0.4d5f5"]]},{"id":"ab2d703d.ad753","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1482.7360343933105,"y":4610.877638101578,"z":"99faf548.31fd3","wires":[]},{"id":"1d9e30c4.0c4247","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":2962.291820526123,"y":4834.029151678085,"z":"99faf548.31fd3","wires":[]},{"id":"113e310a.374617","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3438.5779151916504,"y":4991.3148629665375,"z":"99faf548.31fd3","wires":[]},{"id":"882aa706.c87ac","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1434.8396949768066,"y":6824.0276737213135,"z":"99faf548.31fd3","wires":[["acaf4bf.d8e9e38","d4f31adc.46316","c9de33ed.33cd18"]]},{"id":"1ed364f.3bfd91b","type":"set","name":"set: tmp.rollbck.match = 1","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"1\"/>","comments":"","x":3069.9826698303223,"y":6999.813808441162,"z":"99faf548.31fd3","wires":[]},{"id":"f921cbd2.fc183","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2818.9824028015137,"y":6874.813808441162,"z":"99faf548.31fd3","wires":[["3e3f642b.b4579c","1ed364f.3bfd91b"]]},{"id":"d4f31adc.46316","type":"switchNode","name":"switch: tmp.rollback.match == 0","xml":"<switch test=\"`$tmp.rollback.match == 0`\">","comments":"","outputs":1,"x":1723.2680702209473,"y":7107.600283622742,"z":"99faf548.31fd3","wires":[["ab4ed8f.d749728"]]},{"id":"c53e5930.c23958","type":"switchNode","name":"switch: tmp.subnetRollback[].type","xml":"<switch test=\"`$tmp.subnetRollback[$j].type`\">","comments":"","outputs":1,"x":2175.982410430908,"y":7106.885443687439,"z":"99faf548.31fd3","wires":[["1e801387.42aacc"]]},{"id":"7c973dca.78763c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3898.6967964172363,"y":6874.67115688324,"z":"99faf548.31fd3","wires":[["21f8d2e6.30fa16"]]},{"id":"21f8d2e6.30fa16","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":4163.689208984375,"y":6874.056761741638,"z":"99faf548.31fd3","wires":[]},{"id":"bfc1e7fc.7a9658","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback the subnet attributes update in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":4166.554096221924,"y":6919.528549194336,"z":"99faf548.31fd3","wires":[]},{"id":"12a29993.21784e","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback to delete subnet from AnAI where subnet-id = ' + $tmp.subnetRollback[$j].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":3214.696720123291,"y":7106.170809745789,"z":"99faf548.31fd3","wires":[]},{"id":"59a58bb0.48d64c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3898.6966133117676,"y":6919.813876152039,"z":"99faf548.31fd3","wires":[["bfc1e7fc.7a9658"]]},{"id":"9271cba0.7e82a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2983.8396492004395,"y":7105.599450111389,"z":"99faf548.31fd3","wires":[["12a29993.21784e"]]},{"id":"34cb7d8.6b99182","type":"set","name":"set: tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'failed to rollback l3network.orchestration-status in AnAI where subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$i].subnet-id + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":2240.839527130127,"y":7276.099722862244,"z":"99faf548.31fd3","wires":[]},{"id":"a00f453a.858988","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2002.9824562072754,"y":7276.528363227844,"z":"99faf548.31fd3","wires":[["34cb7d8.6b99182"]]},{"id":"72b3fa21.56287c","type":"comment","name":"----  ROLLBACK STARTS HERE  ----","info":"","comments":"","x":578.1489372253418,"y":6323.409649848938,"z":"99faf548.31fd3","wires":[]},{"id":"3060e5d9.8b532a","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving new subnet in AnAI with subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`\"/>","comments":"","x":3167.220527648926,"y":3095.624238014221,"z":"99faf548.31fd3","wires":[]},{"id":"c1e8109.33219f","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating subnet status to PendingDelete in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":2488.1965522766113,"y":2079.1003017425537,"z":"99faf548.31fd3","wires":[]},{"id":"c9de33ed.33cd18","type":"set","name":"set: tmp.rollbck.match = 0","xml":"<set>\n\t<parameter name=\"tmp.rollback.match\" value=\"0\"/>","comments":"","x":1703.2681007385254,"y":6824.314642906189,"z":"99faf548.31fd3","wires":[]},{"id":"48e77510.8d6f74","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2739.0777473449707,"y":3098.957498550415,"z":"99faf548.31fd3","wires":[["7ed587ce.58bb7"]]},{"id":"791db7cd.110f5","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2070.0537147521973,"y":2080.719367980957,"z":"99faf548.31fd3","wires":[["85718701.a91ff"]]},{"id":"980e97ec.e3025","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3193.982349395752,"y":4246.576512336731,"z":"99faf548.31fd3","wires":[["122ef45b.214554"]]},{"id":"e8b59d42.c0eab8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3064.4823265075684,"y":4993.933755636215,"z":"99faf548.31fd3","wires":[[]]},{"id":"46e1f204.12633c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1746.1489906311035,"y":6183.100154399872,"z":"99faf548.31fd3","wires":[["f5491b15.8a826"]]},{"id":"fd434a74.035768","type":"switchNode","name":"switch: AnAI == INPUT - network-name","xml":"<switch test=\"`$tmp.AnAI.l3network.network-name == $network-data.network-topology.network-topology-identifier-structure.network-name`\">","comments":"","outputs":1,"x":600.8037414550781,"y":836.7987289428711,"z":"99faf548.31fd3","wires":[["b58edb46.eb0908"]]},{"id":"b58edb46.eb0908","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":848.0537414550781,"y":836.8027257919312,"z":"99faf548.31fd3","wires":[["f18b0c90.7bbd6"]]},{"id":"f18b0c90.7bbd6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-name,' + network-topology-operation-input.network-request-information.network-name + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":1010.6925163269043,"y":836.6917133331299,"z":"99faf548.31fd3","wires":[]},{"id":"5872c2e1.fd902c","type":"switchNode","name":"switch: AnAI == INPUT - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $network-data.network-topology.network-topology-identifier-structure.network-type`\">","comments":"","outputs":1,"x":594.517993927002,"y":880.0844306945801,"z":"99faf548.31fd3","wires":[["2e62ccf9.7369f4"]]},{"id":"2e62ccf9.7369f4","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":848.767993927002,"y":880.0884275436401,"z":"99faf548.31fd3","wires":[["86d72b8.7dd3d58"]]},{"id":"86d72b8.7dd3d58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'The input network-type,' + network-topology-operation-input.network-request-information.network-type + ', does not match what is returned from AnAI with network-id = ' + $network-topology-operation-input.network-request-information.network-id`\" />","comments":"","x":1011.4067687988281,"y":879.9774150848389,"z":"99faf548.31fd3","wires":[]},{"id":"4cf6fa1f.47b03c","type":"switchNode","name":"switch: AnAI == PRELOAD - network-type","xml":"<switch test=\"`$tmp.AnAI.l3network.network-type == $preload-data.preload-network-topology-information.network-topology-identifier.network-type`\">","comments":"","outputs":1,"x":609.6609191894531,"y":970.0844240188599,"z":"99faf548.31fd3","wires":[["f0a901b3.35778"]]},{"id":"f0a901b3.35778","type":"not-found","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":865.9109191894531,"y":970.0884208679199,"z":"99faf548.31fd3","wires":[["b4a265e7.43d6b8"]]},{"id":"b4a265e7.43d6b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"404\" />\n\t<parameter name=\"error-message\" value=\"`'No preload network found with network-type = ' + $tmp.AnAI.l3network.network-type + ' in SDNC'`\" />","comments":"","x":1028.5496940612793,"y":969.9774084091187,"z":"99faf548.31fd3","wires":[]},{"id":"ab4ed8f.d749728","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1943.0896186828613,"y":7107.655534744263,"z":"99faf548.31fd3","wires":[["c53e5930.c23958"]]},{"id":"8d4f07c3.f8ed6","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3039.041706085205,"y":6557.945352077484,"z":"99faf548.31fd3","wires":[["15f4af6d.bab1f9"]]},{"id":"c8eb5da8.a0d2f8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2982.041706085205,"y":6410.611609458923,"z":"99faf548.31fd3","wires":[["c9b0d245.a678c8"]]},{"id":"d960b59c.11f63","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3906.708564758301,"y":6829.4445104599,"z":"99faf548.31fd3","wires":[["21f8d2e6.30fa16"]]},{"id":"88059f52.82953","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3906.3751907348633,"y":6964.77800655365,"z":"99faf548.31fd3","wires":[["bfc1e7fc.7a9658"]]},{"id":"ddfcf45f.b6b89","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2992.3752784729004,"y":7147.944578170776,"z":"99faf548.31fd3","wires":[["12a29993.21784e"]]},{"id":"ff448016.b11eb8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2010.7084999084473,"y":7318.777847290039,"z":"99faf548.31fd3","wires":[["34cb7d8.6b99182"]]},{"id":"f2c572bd.81ebb","type":"switchNode","name":"switch ... tmp.AnAI.l3network.subnets.subnet[]","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet_length`\">","comments":"","outputs":1,"x":617.8037414550781,"y":1056.219388961792,"z":"99faf548.31fd3","wires":[["fb903b2f.603ee8"]]},{"id":"fb903b2f.603ee8","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":888.2481918334961,"y":1055.997124671936,"z":"99faf548.31fd3","wires":[["a45e56d9.99242"]]},{"id":"a45e56d9.99242","type":"set","name":"set tmp.AnAI.l3network.subnets.subnet[] = 0","xml":"<set>\n<parameter name=\"tmp.AnAI.l3network.subnets.subnet_length\" value=\"0\" />\n","comments":"","x":1145.8038007948135,"y":1055.9971453348794,"z":"99faf548.31fd3","wires":[]},{"id":"c14d77b1.f2f7c8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":557.9108467102051,"y":5487.767111301422,"z":"99faf548.31fd3","wires":[["3956dd79.c084b2","425f0d8c.c1ee44"]]},{"id":"aedd7d7d.b1ce78","type":"switchNode","name":"switch ... PRELOAD route-table-reference[]","xml":"<switch test=\"`$preload-data.preload-network-topology-information.route-table-reference_length`\">","comments":"","outputs":1,"x":1505.2124519348145,"y":5626.140190601349,"z":"99faf548.31fd3","wires":[["17dc8ddf.09e272"]]},{"id":"17dc8ddf.09e272","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":1761.9068794250488,"y":5625.917680263519,"z":"99faf548.31fd3","wires":[["aacd6fd8.a16c2"]]},{"id":"aacd6fd8.a16c2","type":"set","name":"set route-table-reference[] = 0","xml":"<set>\n<parameter name='preload-data.preload-network-topology-information.route-table-reference_length' value='0' />\n","comments":"","x":1976.4624883863662,"y":5625.917700926462,"z":"99faf548.31fd3","wires":[]},{"id":"e0f430f6.63b6a8","type":"for","name":"for loop i - PRELOAD route-table-reference","xml":"<for index=\"i\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.route-table-reference_length`\">\n","comments":"","outputs":1,"x":1504.8197059631348,"y":5671.711480617523,"z":"99faf548.31fd3","wires":[["a8fb8dec.01b2c"]]},{"id":"b7c9330.00b54d","type":"save","name":"save relationship: network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.route-table-reference.route-table-reference-id`\" />","comments":"","outputs":1,"x":2937.2326011657715,"y":5870.898035526276,"z":"99faf548.31fd3","wires":[["eb723736.ee1f9","48189378.2e324c","2bcbf9cd.81d636"]]},{"id":"a8fb8dec.01b2c","type":"switchNode","name":"switch: PRELOAD route-table-reference-fqdn != NULL","xml":"<switch test=\"`$preload-data.preload-network-topology-information.route-table-reference[$i].route-table-reference-fqdn != NULL`\">","comments":"","outputs":1,"x":1915.5819129943848,"y":5671.810601711273,"z":"99faf548.31fd3","wires":[["76fa4efe.1b099"]]},{"id":"76fa4efe.1b099","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2201.3319206237793,"y":5672.060601711273,"z":"99faf548.31fd3","wires":[["e2be0c8c.4da208"]]},{"id":"e2be0c8c.4da208","type":"save","name":"query AnAI - route-table-reference","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"route-table-reference\" \n\t\tkey=\"route-table-reference.route-table-reference-fqdn = $preload-data.preload-network-topology-information.route-table-reference[$i].route-table-reference-fqdn\" \n\t\tpfx=\"tmp.AnAI.route-table-reference\">","comments":"","outputs":1,"x":2419.510711669922,"y":5672.060549736023,"z":"99faf548.31fd3","wires":[["eea7c76d.c86c","73b0557f.a6c464","37524b00.463986"]]},{"id":"eea7c76d.c86c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2707.0819566514756,"y":5712.810432275137,"z":"99faf548.31fd3","wires":[["4d042141.6192b"]]},{"id":"73b0557f.a6c464","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2712.581960466173,"y":5672.310431321463,"z":"99faf548.31fd3","wires":[["4d042141.6192b"]]},{"id":"4d042141.6192b","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":2862.081960466173,"y":5712.560433228811,"z":"99faf548.31fd3","wires":[["9c651ed9.3c54e8","d4bd34a1.1cbc28"]]},{"id":"9c651ed9.3c54e8","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`\"/>","comments":"","x":3078.181501176622,"y":5712.310332139334,"z":"99faf548.31fd3","wires":[]},{"id":"eb723736.ee1f9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3198.305477142334,"y":5870.37362241745,"z":"99faf548.31fd3","wires":[["faac9695.a14ad"]]},{"id":"faac9695.a14ad","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":3339.198356628418,"y":5870.009729862213,"z":"99faf548.31fd3","wires":[["6adb7f2c.ca6ff","71ef52d7.590ce4"]]},{"id":"6adb7f2c.ca6ff","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`\"/>","comments":"","x":3570.297897338867,"y":5869.759628772736,"z":"99faf548.31fd3","wires":[]},{"id":"3956dd79.c084b2","type":"save","name":"delete relationship: route-table-reference","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id \n\t\t AND related-to = route-table-reference\" >","comments":"","outputs":1,"x":846.1251258850098,"y":5487.576439619064,"z":"99faf548.31fd3","wires":[["ba84caf1.b95928"]]},{"id":"37524b00.463986","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2711.847553253174,"y":5870.401903629303,"z":"99faf548.31fd3","wires":[["b7c9330.00b54d"]]},{"id":"ba84caf1.b95928","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1139.260097503662,"y":5487.159650564194,"z":"99faf548.31fd3","wires":[["1b8ed9c.0dd75a6"]]},{"id":"1b8ed9c.0dd75a6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1315.9968719482422,"y":5486.850988149643,"z":"99faf548.31fd3","wires":[["d0eb7413.c21e8","d5b9f2ce.b30ff8"]]},{"id":"d0eb7413.c21e8","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"An error occurred while deleting l3-network route-table-reference relationship from AnAI prior to regenerate the route-table-reference relationship from PRELOAD.\"/>","comments":"","x":1540.010097503662,"y":5487.159650564194,"z":"99faf548.31fd3","wires":[]},{"id":"dc67c501.47d9d8","type":"set","name":"set tmp.route-table-reference.updated = 1","xml":"<set>\n<parameter name='tmp.route-table-reference.updated' value='1' />\n","comments":"","x":3443.6330375671387,"y":5960.5806221961975,"z":"99faf548.31fd3","wires":[]},{"id":"48189378.2e324c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3204.8830375671387,"y":5960.8306221961975,"z":"99faf548.31fd3","wires":[["dc67c501.47d9d8"]]},{"id":"ee3e375d.3ff768","type":"switchNode","name":"switch: texecute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":536.5576972961426,"y":5411.140158176422,"z":"99faf548.31fd3","wires":[["e116631a.73ac68"]]},{"id":"e116631a.73ac68","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":743.2719535827637,"y":5411.140087604523,"z":"99faf548.31fd3","wires":[["c14d77b1.f2f7c8"]]},{"id":"425f0d8c.c1ee44","type":"switchNode","name":"switch: execute_failure","xml":"<switch test=\"`$execute_failure`\">","comments":"","outputs":1,"x":821.3910026550293,"y":5627.5292048454285,"z":"99faf548.31fd3","wires":[["ed5dc0c0.0ccf8"]]},{"id":"ed5dc0c0.0ccf8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1024.1052513122559,"y":5627.529227733612,"z":"99faf548.31fd3","wires":[["65de5abb.394444"]]},{"id":"65de5abb.394444","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1222.7799034118652,"y":5626.473432064056,"z":"99faf548.31fd3","wires":[["aedd7d7d.b1ce78","e0f430f6.63b6a8"]]},{"id":"d5b9f2ce.b30ff8","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":1545.6130027770996,"y":5533.3221526145935,"z":"99faf548.31fd3","wires":[]},{"id":"d4bd34a1.1cbc28","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3086.668788909912,"y":5756.473762989044,"z":"99faf548.31fd3","wires":[]},{"id":"71ef52d7.590ce4","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3580.9548835754395,"y":5913.759474277496,"z":"99faf548.31fd3","wires":[]},{"id":"2bcbf9cd.81d636","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3206.8592948913574,"y":5916.378366947174,"z":"99faf548.31fd3","wires":[[]]},{"id":"56bfd6a9.df74c8","type":"other","name":"route-table-reference","xml":"<outcome value='route-table-reference'>\n","comments":"","outputs":1,"x":1990.8275451660156,"y":6671.933737754822,"z":"99faf548.31fd3","wires":[["36b863a.f55881c"]]},{"id":"14f6d939.1ddf87","type":"save","name":"Rollback to save relationship: route-table-reference","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"route-table-reference\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"route-table-reference.route-table-reference-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value`\" />","comments":"","outputs":1,"x":2805.910820007324,"y":6671.267318725586,"z":"99faf548.31fd3","wires":[["4636255c.b23d6c","d1aa7b77.e97c2"]]},{"id":"4636255c.b23d6c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3065.9836959838867,"y":6670.74290561676,"z":"99faf548.31fd3","wires":[["1d67e3e9.81fba4"]]},{"id":"1d67e3e9.81fba4","type":"set","name":"tmp.rollback.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.rollback.error-message\" value=\"`'An error occurred during rollback of l3-newtork route-table-reference relationship in AnAI where route-table-reference-id = ' + $tmp.AnAI.l3network.relationship-list.relationship[$z].relationship-data[0].relationship-value + ' MANUAL ROLLBACK IS REQUIRED.'`\"/>","comments":"","x":3281.9760208129883,"y":6671.128494262695,"z":"99faf548.31fd3","wires":[]},{"id":"36b863a.f55881c","type":"switchNode","name":"switch:  tmp.route-table-reference.updated == 1","xml":"<switch test=\"`$tmp.route-table-reference.updated == 1`\">","comments":"","outputs":1,"x":2262.161033630371,"y":6671.933939933777,"z":"99faf548.31fd3","wires":[["f9643ab8.53c508"]]},{"id":"f9643ab8.53c508","type":"other","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2507.1610412597656,"y":6671.933981895447,"z":"99faf548.31fd3","wires":[["14f6d939.1ddf87"]]},{"id":"d1aa7b77.e97c2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3074.244239807129,"y":6710.36194229126,"z":"99faf548.31fd3","wires":[["1d67e3e9.81fba4"]]},{"id":"41a365fc.f77acc","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n cidr-mask","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].cidr-mask == $preload-data.preload-network-topology-information.subnets[$n].cidr-mask`\">","comments":"","outputs":1,"x":2129.291877746582,"y":737.5843949317932,"z":"99faf548.31fd3","wires":[["ff7eb4dc.c16978"]]},{"id":"3ba5a771.321f1","type":"set","name":"set tmp.start-address-match = 1","xml":"<set>\n<parameter name='tmp.start-address-match' value='1' />\n","comments":"","x":2101.5798416137695,"y":689.059859752655,"z":"99faf548.31fd3","wires":[]},{"id":"f2efaecb.a4c288","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1798.5235328674316,"y":1015.5294876098633,"z":"99faf548.31fd3","wires":[["3ba5a771.321f1","41a365fc.f77acc","101a7415.05b704","8fb775eb.d0728","84204b69.12019","39a0fd5.09c1302","9cfdad47.74479","358d7a72.66f4b6","fed208d7.282448","d65c60ca.e54b08","7d24ad9b.e9cd44","601da03.e985be"]]},{"id":"ff7eb4dc.c16978","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2375.872570037842,"y":738.038284778595,"z":"99faf548.31fd3","wires":[["3f393593.252182"]]},{"id":"a4ef9b17.97de1","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 = $tmp.AnAI.l3network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id\" >\n\t<!-- Update l3network.subnet -->\n\t<parameter name=\"gateway-address\" value=\"`$tmp.gateway-address`\"/>\n\t<parameter name=\"subnet-name\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].subnet-name`\"/>\n\t<parameter name=\"cidr-mask\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].cidr-mask`\"/>\n\t<parameter name=\"dhcp-start\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].dhcp-start-address`\"/>\n\t<parameter name=\"dhcp-end\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].dhcp-end-address`\"/>\n\t<parameter name=\"dhcp-enabled\" value=\"`$tmp.dhcpEnabled.boolean`\"/>\n\t<parameter name=\"ip-assignment-direction\" value=\"`$tmp.addrFromStart.boolean`\" />\n\t<parameter name=\"orchestration-status\" value=\"PendingUpdate\" />\n\t\t","comments":"","outputs":1,"x":2525.152286529541,"y":1588.4918403625488,"z":"99faf548.31fd3","wires":[["b9906b65.eab918","de2a40b4.84aaa","3cdc30fb.83fab"]]},{"id":"358d7a72.66f4b6","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n dhcp-enabled.boolean","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-enabled == $tmp.dhcpEnabled.boolean`\">","comments":"","outputs":1,"x":2174.1975631713867,"y":1265.7128739356995,"z":"99faf548.31fd3","wires":[["1dc403ed.214874"]]},{"id":"1dc403ed.214874","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2457.031467437744,"y":1265.6850504875183,"z":"99faf548.31fd3","wires":[["de20db38.3b0d1"]]},{"id":"af40b8ec.a37c18","type":"set","name":"set tmp.dhcpEnabled.bolean=false","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"false\" />\n","comments":"","x":2569.852550506592,"y":1014.8456635475159,"z":"99faf548.31fd3","wires":[]},{"id":"be7dcc15.da6e","type":"set","name":"set tmp.dhcpEnabled.boolean=true","xml":"<set>\n<parameter name=\"tmp.dhcpEnabled.boolean\" value=\"true\" />\n","comments":"","x":2571.4915885925293,"y":1056.3178334236145,"z":"99faf548.31fd3","wires":[]},{"id":"9cfdad47.74479","type":"switchNode","name":"switch : PRELOAD-n dhcp-enabled","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$n].dhcp-enabled`\">","comments":"","outputs":1,"x":2120.759777069092,"y":1014.6109833717346,"z":"99faf548.31fd3","wires":[["d840bbd8.c5951","da2f001f.887f6"]]},{"id":"da2f001f.887f6","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":2350.815441131592,"y":1014.8888154029846,"z":"99faf548.31fd3","wires":[["af40b8ec.a37c18"]]},{"id":"d840bbd8.c5951","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2350.2322425842285,"y":1056.0833287239075,"z":"99faf548.31fd3","wires":[["be7dcc15.da6e"]]},{"id":"101a7415.05b704","type":"switchNode","name":"switch: tmp.subnetUpdate = 1","xml":"<switch test=\"`$tmp.subnetUpdate == 1`\">","comments":"","outputs":1,"x":2095.6028785705566,"y":1589.8112993240356,"z":"99faf548.31fd3","wires":[["28ca435b.4d4e2c"]]},{"id":"28ca435b.4d4e2c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2322.031482696533,"y":1589.478144645691,"z":"99faf548.31fd3","wires":[["a4ef9b17.97de1"]]},{"id":"1c47a89d.311727","type":"set","name":"set tmp.l3networkUpdate = 1","xml":"<set>\n<parameter name=\"tmp.l3networkUpdate\" value=\"1\" />\n","comments":"","x":3132.9122314453125,"y":1833.2711534500122,"z":"99faf548.31fd3","wires":[]},{"id":"8fb775eb.d0728","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-start","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-start == $preload-data.preload-network-topology-information.subnets[$n].dhcp-start-address`\">","comments":"","outputs":1,"x":2175.833984375,"y":1313.736750125885,"z":"99faf548.31fd3","wires":[["28752c5a.b879bc"]]},{"id":"28752c5a.b879bc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2456.7504920959473,"y":1313.4589648246765,"z":"99faf548.31fd3","wires":[["29ebe2f8.a64166"]]},{"id":"84204b69.12019","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] dhcp-end","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].dhcp-end == $preload-data.preload-network-topology-information.subnets[$n].dhcp-end-address`\">","comments":"","outputs":1,"x":2173.05615234375,"y":1361.0701241493225,"z":"99faf548.31fd3","wires":[["48afca80.0eb22c"]]},{"id":"48afca80.0eb22c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2455.9726600646973,"y":1360.792338848114,"z":"99faf548.31fd3","wires":[["f6b46141.4699d8"]]},{"id":"b086b6c5.b9fd08","type":"GenericXML","name":"Execute: generate gateway-address","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool\" method=\"getGatewayAddress\">\n\t<parameter name=\"ipAddress\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].start-address`\" />\n\t<parameter name=\"ipVersion\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].ip-version`\" />\n\t<parameter name=\"subnet\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].cidr-mask`\" />\n\t<parameter name=\"ctxVariable\" value=\"tmp.return.generate.gateway-address\" />","comments":"","outputs":1,"x":2731.4072036743164,"y":796.3979897499084,"z":"99faf548.31fd3","wires":[[]]},{"id":"28b52dd3.7082f2","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$tmp.return.generate.gateway-address`\" />\n","comments":"","x":3442.157329559326,"y":859.3979907035828,"z":"99faf548.31fd3","wires":[]},{"id":"39a0fd5.09c1302","type":"switchNode","name":"switch : PRELOAD gateway-address","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":2116.6572036743164,"y":796.3979897499084,"z":"99faf548.31fd3","wires":[["e677bc38.dc3a58","d7d19f20.309a6"]]},{"id":"e677bc38.dc3a58","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":2350.6572036743164,"y":796.3979897499084,"z":"99faf548.31fd3","wires":[["699bee75.d526c"]]},{"id":"d7d19f20.309a6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2352.6572036743164,"y":840.3979897499084,"z":"99faf548.31fd3","wires":[["952d7c82.288e9"]]},{"id":"952d7c82.288e9","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $preload-data.preload-network-topology-information.subnets[$n].gateway-address`\">","comments":"","outputs":1,"x":2585.6573600769043,"y":919.1122632026672,"z":"99faf548.31fd3","wires":[["4c118380.ad6dd4","19576292.7c9aad"]]},{"id":"4c118380.ad6dd4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2862.1573600769043,"y":919.3622632026672,"z":"99faf548.31fd3","wires":[["cbfa742a.a43be"]]},{"id":"f62c0289.88fe68","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":3349.1573219299316,"y":917.5051140785217,"z":"99faf548.31fd3","wires":[]},{"id":"699bee75.d526c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2490.6572036743164,"y":796.3979897499084,"z":"99faf548.31fd3","wires":[["b086b6c5.b9fd08","87eadea7.8d4478"]]},{"id":"cbfa742a.a43be","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":3001.1573600769043,"y":919.3622632026672,"z":"99faf548.31fd3","wires":[["f62c0289.88fe68","b181244c.b92ee8"]]},{"id":"9c428746.5e9d98","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3148.0461463928223,"y":1675.3703269958496,"z":"99faf548.31fd3","wires":[]},{"id":"f12386c9.7995d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2915.7527389526367,"y":1588.5290937423706,"z":"99faf548.31fd3","wires":[["9c428746.5e9d98","27f12fa3.0e7c5","d3a3c9df.e66c78"]]},{"id":"b9906b65.eab918","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2748.215518951416,"y":1588.241662979126,"z":"99faf548.31fd3","wires":[["f12386c9.7995d8"]]},{"id":"de2a40b4.84aaa","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2755.7772789001465,"y":1743.1879358291626,"z":"99faf548.31fd3","wires":[["f666d70f.2e613"]]},{"id":"6eb2f489.97fe34","type":"set","name":"set tmp.subnetRollback: keys","xml":"<set>\n  <parameter name=\"tmp.subnetRollback[$x].subnet-id\" value= \"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>\n  <parameter name=\"tmp.subnetRollback[$x].type\" value = \"update\"/>\n  \n\n\n","comments":"","x":3132.0407905578613,"y":1743.4227285385132,"z":"99faf548.31fd3","wires":[]},{"id":"f666d70f.2e613","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2894.2762298583984,"y":1743.1731042861938,"z":"99faf548.31fd3","wires":[["6eb2f489.97fe34","54f8f3cb.add09c","1c47a89d.311727"]]},{"id":"54f8f3cb.add09c","type":"set","name":"$x++","xml":"<set>\n  <parameter name=\"x\" value = \"`$x + 1`\"  />\n\n","comments":"","x":3061.7309761047363,"y":1788.9733877182007,"z":"99faf548.31fd3","wires":[]},{"id":"f7d88440.0483e8","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2868.157611846924,"y":1312.6838030815125,"z":"99faf548.31fd3","wires":[]},{"id":"87eadea7.8d4478","type":"switchNode","name":"switch: AnAI-k == tmp.return.generate.gateway-address","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].gateway-address == $tmp.return.generate.gateway-address`\">","comments":"","outputs":1,"x":2790.8635063171387,"y":859.2670702934265,"z":"99faf548.31fd3","wires":[["72052273.e10864"]]},{"id":"72052273.e10864","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":3075.435199737549,"y":858.7313723564148,"z":"99faf548.31fd3","wires":[["9773e5bb.fc3d8"]]},{"id":"9773e5bb.fc3d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":3220.113666534424,"y":859.1678652763367,"z":"99faf548.31fd3","wires":[["28b52dd3.7082f2","b181244c.b92ee8"]]},{"id":"de20db38.3b0d1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2594.3638801574707,"y":1265.9178347587585,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"29ebe2f8.a64166","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2593.6138801574707,"y":1312.9178366661072,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"f6b46141.4699d8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2593.1138801574707,"y":1361.1678376197815,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"3f393593.252182","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":2580.863628387451,"y":737.7551808357239,"z":"99faf548.31fd3","wires":[]},{"id":"27f12fa3.0e7c5","type":"set","name":"set k, n max + 1","xml":"<set>\n\t<parameter name='k' value='`$tmp.AnAI.l3network.subnets.subnet_length + 1`' />\n\t<parameter name='n' value='`$preload-data.preload-network-topology-information.subnets_length + 1`' />","comments":"","x":3115.863956451416,"y":1588.3505306243896,"z":"99faf548.31fd3","wires":[]},{"id":"b181244c.b92ee8","type":"set","name":"set tmp.subnetUpdate = 1","xml":"<set>\n<parameter name=\"tmp.subnetUpdate\" value=\"1\" />\n","comments":"","x":3353.5778312683105,"y":968.0408978462219,"z":"99faf548.31fd3","wires":[]},{"id":"19576292.7c9aad","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2863.292339324951,"y":964.1837391853333,"z":"99faf548.31fd3","wires":[["9504cc02.0a1f58"]]},{"id":"9504cc02.0a1f58","type":"set","name":"set tmp.gateway-address","xml":"<set>\n<parameter name=\"tmp.gateway-address\" value=\"`$preload-data.preload-network-topology-information.subnets[$n].gateway-address`\" />\n","comments":"","x":3059.149272918701,"y":964.3266224861145,"z":"99faf548.31fd3","wires":[]},{"id":"d3a3c9df.e66c78","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while updating subnet attributes in AnAI with subnet-id = ' + $tmp.AnAI.l3network.subnets.subnet[$k].subnet-id`\"/>","comments":"","x":3140.0782737731934,"y":1631.8148107528687,"z":"99faf548.31fd3","wires":[]},{"id":"3cdc30fb.83fab","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2756.5067100524902,"y":1631.8624181747437,"z":"99faf548.31fd3","wires":[["f12386c9.7995d8"]]},{"id":"fed208d7.282448","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] subnet-name","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-name == $preload-data.preload-network-topology-information.subnets[$n].subnet-name`\">","comments":"","outputs":1,"x":2185.8994369506836,"y":1407.7670607566833,"z":"99faf548.31fd3","wires":[["442ff957.20bbc"]]},{"id":"442ff957.20bbc","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2485.815944671631,"y":1407.4892754554749,"z":"99faf548.31fd3","wires":[["d042dd24.3307a"]]},{"id":"d042dd24.3307a","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2623.9571647644043,"y":1407.8647742271423,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"3f952973.3c3546","type":"set","name":"set tmp.addrFromStart.bolean=false","xml":"<set>\n<parameter name=\"tmp.addrFromStart.boolean\" value=\"false\" />\n","comments":"","x":2572.3636894226074,"y":1113.9178748130798,"z":"99faf548.31fd3","wires":[]},{"id":"59f14f10.d6082","type":"set","name":"set tmp.addrFromStart.boolean=true","xml":"<set>\n<parameter name=\"tmp.addrFromStart.boolean\" value=\"true\" />\n","comments":"","x":2574.002727508545,"y":1155.3900446891785,"z":"99faf548.31fd3","wires":[]},{"id":"d65c60ca.e54b08","type":"switchNode","name":"switch : PRELOAD-n addr-from-start","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$n].addr-from-start`\">","comments":"","outputs":1,"x":2123.2709159851074,"y":1113.6831946372986,"z":"99faf548.31fd3","wires":[["adbeda1f.3083d","e1d75a89.8723d8"]]},{"id":"e1d75a89.8723d8","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":2353.3265800476074,"y":1113.9610266685486,"z":"99faf548.31fd3","wires":[["3f952973.3c3546"]]},{"id":"adbeda1f.3083d","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2352.743381500244,"y":1155.1555399894714,"z":"99faf548.31fd3","wires":[["59f14f10.d6082"]]},{"id":"601da03.e985be","type":"switchNode","name":"switch: AnAI-k == PRELOAD-n addrFromStart.boolean","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].ip-assignment-direction == $tmp.addrFromStart.boolean`\">","comments":"","outputs":1,"x":2174.363628387451,"y":1220.1678576469421,"z":"99faf548.31fd3","wires":[["45a8e12f.45c57"]]},{"id":"45a8e12f.45c57","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2457.1975326538086,"y":1220.140034198761,"z":"99faf548.31fd3","wires":[["4a363391.8e9414"]]},{"id":"4a363391.8e9414","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2594.529945373535,"y":1220.3728184700012,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"7d24ad9b.e9cd44","type":"switchNode","name":"switch: l3subnet[k] == PRELOAD subnets[n] subnet-role","xml":"<switch test=\"`$tmp.AnAI.l3network.subnets.subnet[$k].subnet-role == $preload-data.preload-network-topology-information.subnets[$n].subnet-role`\">","comments":"","outputs":1,"x":2184.363628387451,"y":1452.6678576469421,"z":"99faf548.31fd3","wires":[["786164e5.30fc9c"]]},{"id":"786164e5.30fc9c","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2484.2801361083984,"y":1452.3900723457336,"z":"99faf548.31fd3","wires":[["4d54dd31.720a7c"]]},{"id":"4d54dd31.720a7c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2622.421356201172,"y":1452.7655711174011,"z":"99faf548.31fd3","wires":[["f7d88440.0483e8"]]},{"id":"6d27754.91a1f8c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3271.577642440796,"y":3516.822518348694,"z":"99faf548.31fd3","wires":[["5110cf67.6403a"]]},{"id":"5110cf67.6403a","type":"block","name":"block","xml":"<block>","atomic":"false","comments":"","outputs":1,"x":3470.970470428467,"y":3516.4586362838745,"z":"99faf548.31fd3","wires":[["3ecf3010.00d5b","1180ab4e.80b135"]]},{"id":"3ecf3010.00d5b","type":"set","name":"set: tmp.error-message","xml":"<set>\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"tmp.error-message\" value=\"`'An error occurred while saving host-route in AnAI where host-route-id = ' + $tmp.return.generate-host-routes-host-route-id.uuid`\"/>","comments":"","x":3691.070011138916,"y":3516.208535194397,"z":"99faf548.31fd3","wires":[]},{"id":"2282ff54.aaa3e8","type":"call","name":"call: generate-host-routes-host-route-id","xml":"<call module=\"VNF-API\" rpc=\"generate-host-routes-host-route-id\" mode=\"sync\" >\n","comments":"","outputs":1,"x":3011.085334777832,"y":3470.4823713302612,"z":"99faf548.31fd3","wires":[["1b1e2a5e.1081a6"]]},{"id":"1b1e2a5e.1081a6","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3272.835319519043,"y":3470.732361793518,"z":"99faf548.31fd3","wires":[["5110cf67.6403a"]]},{"id":"5621b71d.945c98","type":"save","name":"save AnAI - host-routes.host-route","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"host-route\" \n\t\tkey=\"l3-network.network-id = $tmp.AnAI.l3network.network-id  \n\t\t\tAND subnet.subnet-id = $tmp.local.subnet-id  \n\t\t\tAND host-route.host-route-id = $tmp.return.generate-host-routes-host-route-id.uuid\" >\n<!-- Create host-route object -->\n<parameter name=\"host-route-id\" value=\"`$tmp.return.generate-host-routes-host-route-id.uuid`\" />\n<parameter name=\"route-prefix\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].host-routes[$h].route-prefix`\" />\n<parameter name=\"next-hop\" value=\"`$preload-data.preload-network-topology-information.subnets[$i].host-routes[$h].next-hop`\" />","comments":"","outputs":1,"x":2995.961368560791,"y":3516.474015235901,"z":"99faf548.31fd3","wires":[["6d27754.91a1f8c","6cd11b79.ec678c"]]},{"id":"6cd11b79.ec678c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3279.894874572754,"y":3563.541890144348,"z":"99faf548.31fd3","wires":[["5110cf67.6403a"]]},{"id":"c45dc5f3.c229a","type":"for","name":"for loop h - PRELOAD host-routes","xml":"<for index=\"h\" start=\"0\" end=\"`$preload-data.preload-network-topology-information.subnets[$i].host-routes_length`\">\n","comments":"","outputs":1,"x":2438.791831970215,"y":3470.596242904663,"z":"99faf548.31fd3","wires":[["24f6dc0c.3cc6dc"]]},{"id":"24f6dc0c.3cc6dc","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2708.0299530029297,"y":3470.024764060974,"z":"99faf548.31fd3","wires":[["2282ff54.aaa3e8","5621b71d.945c98"]]},{"id":"6814d148.b02918","type":"set","name":"set tmp.local.subnet-id","xml":"<set>\n<parameter name=\"tmp.local.subnet-id\" value=\"`$tmp.AnAI.l3network.subnets.subnet[$j].subnet-id`\" />\n","comments":"","x":2403.6252250671387,"y":3319.9176931381226,"z":"99faf548.31fd3","wires":[]},{"id":"6fca63db.36a404","type":"set","name":"set tmp.addrFromStart.bolean=false","xml":"<set>\n<parameter name=\"tmp.addrFromStart.boolean\" value=\"false\" />\n","comments":"","x":2961.2917671203613,"y":2744.9177532196045,"z":"99faf548.31fd3","wires":[]},{"id":"c4e49471.506be","type":"set","name":"set tmp.addrFromStart.boolean=true","xml":"<set>\n<parameter name=\"tmp.addrFromStart.boolean\" value=\"true\" />\n","comments":"","x":2962.930805206299,"y":2786.389923095703,"z":"99faf548.31fd3","wires":[]},{"id":"6499a1da.9e778","type":"switchNode","name":"switch : PRELOAD-n addr-from-start","xml":"<switch test=\"`$preload-data.preload-network-topology-information.subnets[$n].addr-from-start`\">","comments":"","outputs":1,"x":2447.0562171936035,"y":2786.2545099258423,"z":"99faf548.31fd3","wires":[["f7756088.8ee018","67a5b3ff.025a6c","69cb5ef.fd054a"]]},{"id":"67a5b3ff.025a6c","type":"other","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":2710.2546577453613,"y":2744.9609050750732,"z":"99faf548.31fd3","wires":[["6fca63db.36a404"]]},{"id":"f7756088.8ee018","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":2709.671459197998,"y":2786.155418395996,"z":"99faf548.31fd3","wires":[["c4e49471.506be"]]},{"id":"916f68b3.411ab8","type":"switchNode","name":"switch host-routes_length","xml":"<switch test='`$preload-data.preload-network-topology-information.subnets[$i].host-routes_length`'>\n","comments":"","outputs":1,"x":2415.0537757873535,"y":3398.0131301879883,"z":"99faf548.31fd3","wires":[["555795d9.7a1144"]]},{"id":"555795d9.7a1144","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2655.6251945495605,"y":3397.584539413452,"z":"99faf548.31fd3","wires":[["1c07b0ec.e8eaa7"]]},{"id":"1c07b0ec.e8eaa7","type":"set","name":"set host-routes_length to 0","xml":"<set>\n<parameter name='preload-data.preload-network-topology-information.subnets[$i].host-routes_length' value='0' />\n","comments":"","x":2882.7681617736816,"y":3398.0129833221436,"z":"99faf548.31fd3","wires":[]},{"id":"1180ab4e.80b135","type":"returnSuccess","name":"set execute_failure = true","xml":"<return status='success'>\n\t<parameter name='execute_failure' value='true' />\n","comments":"","x":3695.0540657043457,"y":3559.441717147827,"z":"99faf548.31fd3","wires":[]},{"id":"ccdc8502.0da05","type":"set","name":"set ROLLBACK_START","xml":"<set>\n<parameter name='ROLLBACK_START' value='NETWORK_TOPOLOGY_CHANGEASSIGN' />\n","comments":"","x":1157.9109077453613,"y":6318.01323890686,"z":"99faf548.31fd3","wires":[]},{"id":"5348546b.a906bc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2187.196475982666,"y":3319.9176712036133,"z":"99faf548.31fd3","wires":[["6814d148.b02918","916f68b3.411ab8","c45dc5f3.c229a"]]},{"id":"69cb5ef.fd054a","type":"outcome","name":"NULL","xml":"<outcome value=''>","outputs":1,"x":2711.1965675354004,"y":2829.4415969848633,"z":"99faf548.31fd3","wires":[["c4e49471.506be"]]},{"id":"84ee1670.5f0a7","type":"switchNode","name":"switch from-preload","xml":"<switch test='`$service-data.networks.network[$nidx].network-data.network-information.from-preload`'>\n","comments":"","outputs":1,"x":553.4346008300781,"y":357.9970827102661,"z":"99faf548.31fd3","wires":[["88ba72dc.ce70d","bd813794.8f96e"]]},{"id":"88ba72dc.ce70d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":778.8506660461426,"y":339.5521297454834,"z":"99faf548.31fd3","wires":[["cb30e47b.b67808"]]},{"id":"bd813794.8f96e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":773.2951049804688,"y":388.3298616409302,"z":"99faf548.31fd3","wires":[["d0bf808b.d6a33"]]},{"id":"d0bf808b.d6a33","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"Error: changeassign only allowed for networks with from-preload set to true\" />","comments":"","x":938.4346466064453,"y":387.99708461761475,"z":"99faf548.31fd3","wires":[]},{"id":"cb30e47b.b67808","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":920.9345703125,"y":339.9970703125,"z":"99faf548.31fd3","wires":[[]]},{"id":"3fed421d.e63e86","type":"execute","name":"generate preload network url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.preload-network`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.pn-url\"/>\n    <parameter name=\"target\" value=\"{network-name}\"/>\n    <parameter name=\"replacement\" value=\"`$network-topology-operation-input.network-request-information.network-name`\"/>\n","comments":"","outputs":1,"x":569.9971313476562,"y":554.2471661567688,"z":"99faf548.31fd3","wires":[[]]},{"id":"b8e99272.6fe8b","type":"execute","name":"execute RestApiCallNode - Get preload-network by network-name","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.pn-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='GET' />\n    <parameter name=\"responsePrefix\" value=\"preload-data\" />\n\n","comments":"","outputs":1,"x":686.2471771240234,"y":586.9972295761108,"z":"99faf548.31fd3","wires":[["8b1aab55.e51f78","4ae4c873.f968"]]},{"id":"8b1aab55.e51f78","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1052.2471885681152,"y":591.7471933364868,"z":"99faf548.31fd3","wires":[["ab206880.cc5468"]]},{"id":"ab206880.cc5468","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1222.247142791748,"y":591.2470788955688,"z":"99faf548.31fd3","wires":[[]]},{"id":"4ae4c873.f968","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1048.098949432373,"y":623.8132514953613,"z":"99faf548.31fd3","wires":[["de5c4732.58bba"]]},{"id":"de5c4732.58bba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name=\"error-code\" value=\"500\" />\n\t<parameter name=\"error-message\" value=\"'Error: No preload-network found with network-name =' + $tmp.network-instance-name + ' in md-sal'\" />","comments":"","x":1226.2471466064453,"y":623.747166633606,"z":"99faf548.31fd3","wires":[]},{"id":"592b5af8.983664","type":"comment","name":"Error if from-preload is not true","info":"","comments":"","x":573.7500305175781,"y":322.00000762939453,"z":"99faf548.31fd3","wires":[]},{"id":"a118b584.13b3f8","type":"comment","name":"Read properties","info":"","comments":"","x":530.0000152587891,"y":407.0000104904175,"z":"99faf548.31fd3","wires":[]},{"id":"c39d640f.75ab2","type":"comment","name":"Read preload data from mdsal","info":"","comments":"","x":571.2500152587891,"y":515.7500143051147,"z":"99faf548.31fd3","wires":[]},{"id":"e5d8e3fb.d16cd","type":"comment","name":"Validate network name and type match","info":"","comments":"","x":590.0000305175781,"y":797.0000228881836,"z":"99faf548.31fd3","wires":[]},{"id":"26fe5b3e.c1646c","type":"comment","name":"Loop through subnets from AAI and compare to preload data","info":"","comments":"","x":656.2500305175781,"y":1140.75004196167,"z":"99faf548.31fd3","wires":[]},{"id":"5606ead2.76c2b4","type":"returnSuccess","name":"return success","xml":"<return status=\"success\">\n\t<parameter name=\"networkId\" value=\"`$network-topology-operation-input.network-request-information.network-id`\" />\n\t<parameter name=\"error-code\" value=\"200\" />","comments":"","x":475.7149658203125,"y":7478.7861328125,"z":"99faf548.31fd3","wires":[]}]