aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic
diff options
context:
space:
mode:
authorMarcus Williams <marcus.williams@intel.com>2017-10-25 21:22:07 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-25 21:22:07 +0000
commitb1a2675353ab3deeecee04a9b687e8cb2fd2b30d (patch)
tree8eacf9d4324dade40470f8a9c7681bf56f5f2832 /platform-logic
parent58efd4a371b3832f6bd3c7b0aaf29712e3f5a01f (diff)
parent7458ac3eb8fdf621c70a5c9cb617d8d579e67098 (diff)
Merge "Replace att-aic with Rackspace"
Former-commit-id: 412e0e8b705ebb762cee8225c676b2d2f987d393
Diffstat (limited to 'platform-logic')
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json2
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml8
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml4
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml6
16 files changed, 22 insertions, 22 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
index 1d4451a0..377e9734 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.json
@@ -1 +1 @@
-[{"id":"44e2a591.0adfcc","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":65,"z":"64165859.65c218","wires":[["9d11986f.fe6c88"]]},{"id":"9d11986f.fe6c88","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":276.2380828857422,"y":139.95239353179932,"z":"64165859.65c218","wires":[["25a64b97.aaff84"]]},{"id":"25a64b97.aaff84","type":"method","name":"contrail-route-topology-operation-activate","xml":"<method rpc='contrail-route-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":356.1548500061035,"y":209.1904420852661,"z":"64165859.65c218","wires":[["e75d32c1.7f5e3"]]},{"id":"e75d32c1.7f5e3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":264.4761848449707,"y":352.523784160614,"z":"64165859.65c218","wires":[["3c3c6bb5.b74fe4","748de0e2.cf35d","5d6b0eae.8b9ab","7e74e9f3.a6ed98","dd3b156a.4c09b8","a48e302.6f113d","bacf284d.e94b18","e41c133b.c89b1","b10213e8.7105b","6f67eab4.30b314","c4b97b0e.a9a448","82a00528.729748","3396a245.5af4be","4afec706.648e68","6e8ca02f.7313","54889c95.317884","c2672028.9a192","bc559c11.5308","a6675806.e2dc08","f8a3e8b0.ff98a8","f2b08893.418cf8","f43488c4.18e4b8"]]},{"id":"748de0e2.cf35d","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":526.7380561828613,"y":326.3333215713501,"z":"64165859.65c218","wires":[]},{"id":"3c3c6bb5.b74fe4","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":573.9973182678223,"y":292.5925874710083,"z":"64165859.65c218","wires":[]},{"id":"5d6b0eae.8b9ab","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.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":595.8505554199219,"y":358.23155403137207,"z":"64165859.65c218","wires":[[]]},{"id":"dd3b156a.4c09b8","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":600.6616058349609,"y":500.45952796936035,"z":"64165859.65c218","wires":[["2d1118d7.ca9798","1d99ce09.530022"]]},{"id":"7e74e9f3.a6ed98","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":561.0648460388184,"y":422.01722526550293,"z":"64165859.65c218","wires":[[]]},{"id":"2d1118d7.ca9798","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":845.9577102661133,"y":501.26734161376953,"z":"64165859.65c218","wires":[["ea375293.82727"]]},{"id":"ea375293.82727","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1014.9577140808105,"y":499.7672424316406,"z":"64165859.65c218","wires":[["d774b31f.c823"]]},{"id":"d774b31f.c823","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1225.814956665039,"y":499.3863716125488,"z":"64165859.65c218","wires":[["3663a4b3.12200c","5fbd0011.d76a1"]]},{"id":"3663a4b3.12200c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1415.1482620239258,"y":499.3863296508789,"z":"64165859.65c218","wires":[["ef8b2c8f.54ea4"]]},{"id":"5800ba19.309e44","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1891.1962203979492,"y":492.62452602386475,"z":"64165859.65c218","wires":[]},{"id":"ef8b2c8f.54ea4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1599.6721515655518,"y":496.29116344451904,"z":"64165859.65c218","wires":[["5800ba19.309e44","16951cf9.185633","5548694b.3db0b8","73094ec5.b6eab"]]},{"id":"16951cf9.185633","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1899.1961479187012,"y":556.719669342041,"z":"64165859.65c218","wires":[]},{"id":"4cd61be.86e0ce4","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":616.8148498535156,"y":466.3386821746826,"z":"64165859.65c218","wires":[]},{"id":"5548694b.3db0b8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1907.196002960205,"y":523.6244812011719,"z":"64165859.65c218","wires":[["3a1379d8.d399a6","b6f3ab65.fc2188"]]},{"id":"3a1379d8.d399a6","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2129.0339584350586,"y":507.7197847366333,"z":"64165859.65c218","wires":[["84ee09a1.dc5b98"]]},{"id":"b6f3ab65.fc2188","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2142.8436737060547,"y":538.0531902313232,"z":"64165859.65c218","wires":[["fcf09d0b.021fd"]]},{"id":"fcf09d0b.021fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`\" />\n","comments":"","x":2383.462423324585,"y":540.9577798843384,"z":"64165859.65c218","wires":[]},{"id":"73094ec5.b6eab","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1979.0532722473145,"y":459.4340181350708,"z":"64165859.65c218","wires":[]},{"id":"d9e02c4.1b7dcd","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":531.9576530456543,"y":391.62435245513916,"z":"64165859.65c218","wires":[]},{"id":"d9fc2f4b.0e8a1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1601.666997909546,"y":642.3333854675293,"z":"64165859.65c218","wires":[]},{"id":"1d99ce09.530022","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":837.809513092041,"y":536.3334264755249,"z":"64165859.65c218","wires":[["a5703b2e.575d28"]]},{"id":"a5703b2e.575d28","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1017.8094635009766,"y":536.9999771118164,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"a48e302.6f113d","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":510.66661071777344,"y":537.5237884521484,"z":"64165859.65c218","wires":[]},{"id":"5fbd0011.d76a1","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1403.4762153625488,"y":536.6666898727417,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"84ee09a1.dc5b98","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2367.333469390869,"y":506.66669750213623,"z":"64165859.65c218","wires":[[]]},{"id":"6b294610.d0fca8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":855.2856597900391,"y":795.7143956422806,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"a68172da.f1ef3","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":578.484001159668,"y":806.9609127044678,"z":"64165859.65c218","wires":[["5f9b62c9.68560c","6b294610.d0fca8","e4999668.493168"]]},{"id":"5f9b62c9.68560c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.0077667236328,"y":830.1989995241165,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"8bf366e0.30e6f8","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1000.1187286376953,"y":826.4212285280228,"z":"64165859.65c218","wires":[]},{"id":"e4999668.493168","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2857208251953,"y":861.7143956422806,"z":"64165859.65c218","wires":[["b98ab8b5.b478e8"]]},{"id":"b98ab8b5.b478e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9522857666016,"y":860.0477238893509,"z":"64165859.65c218","wires":[[]]},{"id":"ff8773cb.3c81e","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":556.7142181396484,"y":775.7143898010254,"z":"64165859.65c218","wires":[]},{"id":"14eb9a5f.2b7306","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873,"y":1059.4287095069885,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"bacf284d.e94b18","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":601.6269226074219,"y":1066.960970401764,"z":"64165859.65c218","wires":[["89010b42.75b1b8","14eb9a5f.2b7306","e2f3ea25.4379d8"]]},{"id":"89010b42.75b1b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.7221069335938,"y":1093.9133133888245,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"805cd670.1362a8","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1017.8330688476562,"y":1090.1355423927307,"z":"64165859.65c218","wires":[]},{"id":"e2f3ea25.4379d8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":875.5715103149414,"y":1128.2857780456543,"z":"64165859.65c218","wires":[["ae8077d1.7e13b8"]]},{"id":"ae8077d1.7e13b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1028.2380752563477,"y":1126.6191062927246,"z":"64165859.65c218","wires":[[]]},{"id":"369a7d5c.fb1bf2","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":574.4285430908203,"y":1035.1429624557495,"z":"64165859.65c218","wires":[]},{"id":"e41c133b.c89b1","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":527.4286270141602,"y":852.8571510314941,"z":"64165859.65c218","wires":[]},{"id":"b10213e8.7105b","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":589.4233093261719,"y":886.9469985961914,"z":"64165859.65c218","wires":[]},{"id":"82a00528.729748","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":665.6138305664062,"y":959.9471964836121,"z":"64165859.65c218","wires":[["bf44764e.6b5a08","d0dde1cb.d90ed"]]},{"id":"bf44764e.6b5a08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1021.2803268432617,"y":960.3754234313965,"z":"64165859.65c218","wires":[["12a9c022.986f1"]]},{"id":"d0dde1cb.d90ed","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1019.3756484985352,"y":993.3753631971776,"z":"64165859.65c218","wires":[["84f2d70e.48c6a8"]]},{"id":"84f2d70e.48c6a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1179.280418395996,"y":992.7087297439575,"z":"64165859.65c218","wires":[]},{"id":"12a9c022.986f1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1173.4708099365234,"y":961.042148437351,"z":"64165859.65c218","wires":[[]]},{"id":"6f67eab4.30b314","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538,"y":572,"z":"64165859.65c218","wires":[]},{"id":"c4b97b0e.a9a448","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":582,"y":732,"z":"64165859.65c218","wires":[["5e9aa570.67bd9c","3c95f25.131720e"]]},{"id":"5e9aa570.67bd9c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":938.0002174377441,"y":730.6663794517517,"z":"64165859.65c218","wires":[["15e26772.92ed49"]]},{"id":"3c95f25.131720e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":933.6670341491699,"y":693.6661796569824,"z":"64165859.65c218","wires":[["e75d9c15.8524a"]]},{"id":"c94aaa39.361bb8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1329.8256530761719,"y":730.6822066307068,"z":"64165859.65c218","wires":[["31d38ee0.d6f1c2","91dd3bf.a1bacc8"]]},{"id":"31d38ee0.d6f1c2","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1618.8256530761719,"y":732.682267665863,"z":"64165859.65c218","wires":[["499747c7.a55a48"]]},{"id":"91dd3bf.a1bacc8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1598.8256530761719,"y":767.682267665863,"z":"64165859.65c218","wires":[["af14b3c3.48097"]]},{"id":"15e26772.92ed49","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1072.111473083496,"y":731.1107840538025,"z":"64165859.65c218","wires":[["c94aaa39.361bb8"]]},{"id":"e75d9c15.8524a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1087.8004989624023,"y":694.3330821990967,"z":"64165859.65c218","wires":[]},{"id":"d046e6f6.0e2458","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":619.4003219604492,"y":698.6663160324097,"z":"64165859.65c218","wires":[]},{"id":"46dda770.da6c38","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2062.0000610351562,"y":768.0000228881836,"z":"64165859.65c218","wires":[["309cdf1e.a7927"]]},{"id":"af14b3c3.48097","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1787.9841003417969,"y":768.1260228157043,"z":"64165859.65c218","wires":[["46dda770.da6c38"]]},{"id":"499747c7.a55a48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1800.4888000488281,"y":732.5555934906006,"z":"64165859.65c218","wires":[]},{"id":"309cdf1e.a7927","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2354.5548706054688,"y":764.8891496658325,"z":"64165859.65c218","wires":[["849d5f32.c0a1d","8e8c972.e2a3368"]]},{"id":"ea225ffd.8fd5c","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2942.2214736938477,"y":754.8891334533691,"z":"64165859.65c218","wires":[]},{"id":"d4059f44.0d602","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2704.2879848480225,"y":767.8891382217407,"z":"64165859.65c218","wires":[["ea225ffd.8fd5c","22a21cd1.407344"]]},{"id":"849d5f32.c0a1d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2548.821361541748,"y":767.8890008926392,"z":"64165859.65c218","wires":[["d4059f44.0d602"]]},{"id":"8e8c972.e2a3368","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2549.6209716796875,"y":805.8890037536621,"z":"64165859.65c218","wires":[["866adc09.2f017"]]},{"id":"866adc09.2f017","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2727.6211280822754,"y":805.8890695571899,"z":"64165859.65c218","wires":[]},{"id":"22a21cd1.407344","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2916.688087463379,"y":790.888822555542,"z":"64165859.65c218","wires":[["9e49f002.0fb2d","9fd3ada.9523b5","38a0e1a6.0275de"]]},{"id":"9e49f002.0fb2d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3153.549415588379,"y":805.4999141693115,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"9fd3ada.9523b5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3148.8824424743652,"y":838.8332281112671,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"e5c370f8.6038","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3323.058364868164,"y":826.8887872695923,"z":"64165859.65c218","wires":[]},{"id":"38a0e1a6.0275de","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3149.058448791504,"y":773.9258785247803,"z":"64165859.65c218","wires":[["3e857a0c.1c9ed6"]]},{"id":"3e857a0c.1c9ed6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3329.058448791504,"y":771.9258785247803,"z":"64165859.65c218","wires":[["4c618c54.2a14d4"]]},{"id":"4c618c54.2a14d4","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3516.021553039551,"y":769.5556201934814,"z":"64165859.65c218","wires":[]},{"id":"5cf76218.ae346c","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":584.0000152587891,"y":928.0000286102295,"z":"64165859.65c218","wires":[]},{"id":"3396a245.5af4be","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":690.0000610351562,"y":1212.000036239624,"z":"64165859.65c218","wires":[["e17d1029.116eb","5a9c42ae.afc9ac"]]},{"id":"e17d1029.116eb","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1025.6664962768555,"y":1212.4282269477844,"z":"64165859.65c218","wires":[["b46738dd.eae108"]]},{"id":"5a9c42ae.afc9ac","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1023.7618179321289,"y":1245.4281667135656,"z":"64165859.65c218","wires":[["7d2e0a11.918714"]]},{"id":"7d2e0a11.918714","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1183.6665878295898,"y":1244.7615332603455,"z":"64165859.65c218","wires":[]},{"id":"b46738dd.eae108","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1177.8569793701172,"y":1213.094951953739,"z":"64165859.65c218","wires":[[]]},{"id":"b29978f4.4fd1e8","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":588.3861846923828,"y":1180.0528321266174,"z":"64165859.65c218","wires":[]},{"id":"4afec706.648e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":499.0001792907715,"y":2087.9766874313354,"z":"64165859.65c218","wires":[]},{"id":"6e8ca02f.7313","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":527.7540855407715,"y":2050.4324808120728,"z":"64165859.65c218","wires":[]},{"id":"54889c95.317884","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":559.4209213256836,"y":1909.4800510406494,"z":"64165859.65c218","wires":[]},{"id":"c2672028.9a192","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":587.5293960571289,"y":1983.529543876648,"z":"64165859.65c218","wires":[["e8a6a664.d79298","eabef186.2a8a8","879fe46c.3b2498"]]},{"id":"e8a6a664.d79298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":857.8374137878418,"y":2036.5277446731925,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"eabef186.2a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.8374633789062,"y":2005.027770422399,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"879fe46c.3b2498","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":852.5875015258789,"y":1975.3848752975464,"z":"64165859.65c218","wires":[["bb8e21b5.4f02e"]]},{"id":"a31c2d71.a08e1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1018.5875015258789,"y":2005.777794264257,"z":"64165859.65c218","wires":[]},{"id":"bb8e21b5.4f02e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":994.2434692382812,"y":1971.5770444869995,"z":"64165859.65c218","wires":[[]]},{"id":"bc559c11.5308","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":510.24351501464844,"y":1875.9101829528809,"z":"64165859.65c218","wires":[[]]},{"id":"922d2ffc.4476e","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1244.6667633056638,"y":2005.0953893661497,"z":"64165859.65c218","wires":[]},{"id":"876eb57a.485618","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":544.0000381469727,"y":1825.0952768325806,"z":"64165859.65c218","wires":[]},{"id":"a6675806.e2dc08","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":548.6191101074219,"y":1787.0478992462158,"z":"64165859.65c218","wires":[["b7633a81.cf12d8","475a5176.80fc4"]]},{"id":"b7633a81.cf12d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":816.3810272216797,"y":1764.2859525680542,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"475a5176.80fc4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":821.6904563903809,"y":1799.857370376587,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"7dabdf24.12b19","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1031.4762420654297,"y":1765.9049968719482,"z":"64165859.65c218","wires":[]},{"id":"c82b30e7.1d586","type":"comment","name":"Update AAI AR","info":"","comments":"","x":501.96195220947266,"y":1746.476222038269,"z":"64165859.65c218","wires":[]},{"id":"3de8fec.d2ae202","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":652.0001220703125,"y":1452.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"f8a3e8b0.ff98a8","type":"save","name":"save AnAI - network-policy relationship to source and destination network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`tmp.AnAI-src.related-link`\" />\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`tmp.AnAI-dest.related-link`\" />\n\n\n","comments":"","outputs":1,"x":713.3770179748535,"y":1489.0675249099731,"z":"64165859.65c218","wires":[["f4eee49b.3eb418","96306b55.89f5d8"]]},{"id":"930748bb.7c87d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1357.7225036621094,"y":1485.3494877815247,"z":"64165859.65c218","wires":[]},{"id":"f4eee49b.3eb418","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1129.1511116027832,"y":1488.365225315094,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"96306b55.89f5d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1132.9606094360352,"y":1516.8416419029236,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"f2b08893.418cf8","type":"save","name":"get related-link data for source network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-src\">\n\n\n\n","comments":"","outputs":1,"x":618.0000152587891,"y":1286.0000371932983,"z":"64165859.65c218","wires":[["1752b575.8c8cbb","cdbec68d.a55978"]]},{"id":"1398e1ba.93427e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1262,"y":1292,"z":"64165859.65c218","wires":[]},{"id":"1752b575.8c8cbb","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1033.4286079406738,"y":1291.0157375335693,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"cdbec68d.a55978","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1037.2381057739258,"y":1320.492154121399,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"f43488c4.18e4b8","type":"save","name":"get related-link data for dest network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-dest\">\n\n\n\n","comments":"","outputs":1,"x":614,"y":1360,"z":"64165859.65c218","wires":[["91989618.fd4e18","fa09c5bd.ae5068"]]},{"id":"7b92823a.91cf8c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1056.0000381469727,"y":1370.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"91989618.fd4e18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":873.4286422729492,"y":1357.0157642364502,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]},{"id":"fa09c5bd.ae5068","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.2381210327148,"y":1386.4922285079956,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]}]
+[{"id":"44e2a591.0adfcc","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":65,"z":"64165859.65c218","wires":[["9d11986f.fe6c88"]]},{"id":"9d11986f.fe6c88","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":276.2380828857422,"y":139.95239353179932,"z":"64165859.65c218","wires":[["25a64b97.aaff84"]]},{"id":"25a64b97.aaff84","type":"method","name":"contrail-route-topology-operation-activate","xml":"<method rpc='contrail-route-topology-operation-activate' mode='sync'>\n","comments":"","outputs":1,"x":356.1548500061035,"y":209.1904420852661,"z":"64165859.65c218","wires":[["e75d32c1.7f5e3"]]},{"id":"e75d32c1.7f5e3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":264.4761848449707,"y":352.523784160614,"z":"64165859.65c218","wires":[["3c3c6bb5.b74fe4","748de0e2.cf35d","5d6b0eae.8b9ab","7e74e9f3.a6ed98","dd3b156a.4c09b8","a48e302.6f113d","bacf284d.e94b18","e41c133b.c89b1","b10213e8.7105b","6f67eab4.30b314","c4b97b0e.a9a448","82a00528.729748","3396a245.5af4be","4afec706.648e68","6e8ca02f.7313","54889c95.317884","c2672028.9a192","bc559c11.5308","a6675806.e2dc08","f8a3e8b0.ff98a8","f2b08893.418cf8","f43488c4.18e4b8"]]},{"id":"748de0e2.cf35d","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":526.7380561828613,"y":326.3333215713501,"z":"64165859.65c218","wires":[]},{"id":"3c3c6bb5.b74fe4","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":573.9973182678223,"y":292.5925874710083,"z":"64165859.65c218","wires":[]},{"id":"5d6b0eae.8b9ab","type":"execute","name":"execute Properties - pull properties file","xml":"<execute plugin='org.onap.ccsdk.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":595.8505554199219,"y":358.23155403137207,"z":"64165859.65c218","wires":[[]]},{"id":"dd3b156a.4c09b8","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":600.6616058349609,"y":500.45952796936035,"z":"64165859.65c218","wires":[["2d1118d7.ca9798","1d99ce09.530022"]]},{"id":"7e74e9f3.a6ed98","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":561.0648460388184,"y":422.01722526550293,"z":"64165859.65c218","wires":[[]]},{"id":"2d1118d7.ca9798","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":845.9577102661133,"y":501.26734161376953,"z":"64165859.65c218","wires":[["ea375293.82727"]]},{"id":"ea375293.82727","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1014.9577140808105,"y":499.7672424316406,"z":"64165859.65c218","wires":[["d774b31f.c823"]]},{"id":"d774b31f.c823","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1225.814956665039,"y":499.3863716125488,"z":"64165859.65c218","wires":[["3663a4b3.12200c","5fbd0011.d76a1"]]},{"id":"3663a4b3.12200c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1415.1482620239258,"y":499.3863296508789,"z":"64165859.65c218","wires":[["ef8b2c8f.54ea4"]]},{"id":"5800ba19.309e44","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1891.1962203979492,"y":492.62452602386475,"z":"64165859.65c218","wires":[]},{"id":"ef8b2c8f.54ea4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1599.6721515655518,"y":496.29116344451904,"z":"64165859.65c218","wires":[["5800ba19.309e44","16951cf9.185633","5548694b.3db0b8","73094ec5.b6eab"]]},{"id":"16951cf9.185633","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1899.1961479187012,"y":556.719669342041,"z":"64165859.65c218","wires":[]},{"id":"4cd61be.86e0ce4","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":616.8148498535156,"y":466.3386821746826,"z":"64165859.65c218","wires":[]},{"id":"5548694b.3db0b8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1907.196002960205,"y":523.6244812011719,"z":"64165859.65c218","wires":[["3a1379d8.d399a6","b6f3ab65.fc2188"]]},{"id":"3a1379d8.d399a6","type":"outcome","name":"outcome Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":2129.0339584350586,"y":507.7197847366333,"z":"64165859.65c218","wires":[["84ee09a1.dc5b98"]]},{"id":"b6f3ab65.fc2188","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2142.8436737060547,"y":538.0531902313232,"z":"64165859.65c218","wires":[["fcf09d0b.021fd"]]},{"id":"fcf09d0b.021fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + ', expecting Created.'`\" />\n","comments":"","x":2383.462423324585,"y":540.9577798843384,"z":"64165859.65c218","wires":[]},{"id":"73094ec5.b6eab","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1979.0532722473145,"y":459.4340181350708,"z":"64165859.65c218","wires":[]},{"id":"d9e02c4.1b7dcd","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":531.9576530456543,"y":391.62435245513916,"z":"64165859.65c218","wires":[]},{"id":"d9fc2f4b.0e8a1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1601.666997909546,"y":642.3333854675293,"z":"64165859.65c218","wires":[]},{"id":"1d99ce09.530022","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":837.809513092041,"y":536.3334264755249,"z":"64165859.65c218","wires":[["a5703b2e.575d28"]]},{"id":"a5703b2e.575d28","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1017.8094635009766,"y":536.9999771118164,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"a48e302.6f113d","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":510.66661071777344,"y":537.5237884521484,"z":"64165859.65c218","wires":[]},{"id":"5fbd0011.d76a1","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1403.4762153625488,"y":536.6666898727417,"z":"64165859.65c218","wires":[["d9fc2f4b.0e8a1"]]},{"id":"84ee09a1.dc5b98","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2367.333469390869,"y":506.66669750213623,"z":"64165859.65c218","wires":[[]]},{"id":"6b294610.d0fca8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":855.2856597900391,"y":795.7143956422806,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"a68172da.f1ef3","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":578.484001159668,"y":806.9609127044678,"z":"64165859.65c218","wires":[["5f9b62c9.68560c","6b294610.d0fca8","e4999668.493168"]]},{"id":"5f9b62c9.68560c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.0077667236328,"y":830.1989995241165,"z":"64165859.65c218","wires":[["8bf366e0.30e6f8"]]},{"id":"8bf366e0.30e6f8","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1000.1187286376953,"y":826.4212285280228,"z":"64165859.65c218","wires":[]},{"id":"e4999668.493168","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2857208251953,"y":861.7143956422806,"z":"64165859.65c218","wires":[["b98ab8b5.b478e8"]]},{"id":"b98ab8b5.b478e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9522857666016,"y":860.0477238893509,"z":"64165859.65c218","wires":[[]]},{"id":"ff8773cb.3c81e","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":556.7142181396484,"y":775.7143898010254,"z":"64165859.65c218","wires":[]},{"id":"14eb9a5f.2b7306","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873,"y":1059.4287095069885,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"bacf284d.e94b18","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":601.6269226074219,"y":1066.960970401764,"z":"64165859.65c218","wires":[["89010b42.75b1b8","14eb9a5f.2b7306","e2f3ea25.4379d8"]]},{"id":"89010b42.75b1b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.7221069335938,"y":1093.9133133888245,"z":"64165859.65c218","wires":[["805cd670.1362a8"]]},{"id":"805cd670.1362a8","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1017.8330688476562,"y":1090.1355423927307,"z":"64165859.65c218","wires":[]},{"id":"e2f3ea25.4379d8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":875.5715103149414,"y":1128.2857780456543,"z":"64165859.65c218","wires":[["ae8077d1.7e13b8"]]},{"id":"ae8077d1.7e13b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1028.2380752563477,"y":1126.6191062927246,"z":"64165859.65c218","wires":[[]]},{"id":"369a7d5c.fb1bf2","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":574.4285430908203,"y":1035.1429624557495,"z":"64165859.65c218","wires":[]},{"id":"e41c133b.c89b1","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":527.4286270141602,"y":852.8571510314941,"z":"64165859.65c218","wires":[]},{"id":"b10213e8.7105b","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":589.4233093261719,"y":886.9469985961914,"z":"64165859.65c218","wires":[]},{"id":"82a00528.729748","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":665.6138305664062,"y":959.9471964836121,"z":"64165859.65c218","wires":[["bf44764e.6b5a08","d0dde1cb.d90ed"]]},{"id":"bf44764e.6b5a08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1021.2803268432617,"y":960.3754234313965,"z":"64165859.65c218","wires":[["12a9c022.986f1"]]},{"id":"d0dde1cb.d90ed","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1019.3756484985352,"y":993.3753631971776,"z":"64165859.65c218","wires":[["84f2d70e.48c6a8"]]},{"id":"84f2d70e.48c6a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1179.280418395996,"y":992.7087297439575,"z":"64165859.65c218","wires":[]},{"id":"12a9c022.986f1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1173.4708099365234,"y":961.042148437351,"z":"64165859.65c218","wires":[[]]},{"id":"6f67eab4.30b314","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538,"y":572,"z":"64165859.65c218","wires":[]},{"id":"c4b97b0e.a9a448","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":582,"y":732,"z":"64165859.65c218","wires":[["5e9aa570.67bd9c","3c95f25.131720e"]]},{"id":"5e9aa570.67bd9c","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":938.0002174377441,"y":730.6663794517517,"z":"64165859.65c218","wires":[["15e26772.92ed49"]]},{"id":"3c95f25.131720e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":933.6670341491699,"y":693.6661796569824,"z":"64165859.65c218","wires":[["e75d9c15.8524a"]]},{"id":"c94aaa39.361bb8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1329.8256530761719,"y":730.6822066307068,"z":"64165859.65c218","wires":[["31d38ee0.d6f1c2","91dd3bf.a1bacc8"]]},{"id":"31d38ee0.d6f1c2","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1618.8256530761719,"y":732.682267665863,"z":"64165859.65c218","wires":[["499747c7.a55a48"]]},{"id":"91dd3bf.a1bacc8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1598.8256530761719,"y":767.682267665863,"z":"64165859.65c218","wires":[["af14b3c3.48097"]]},{"id":"15e26772.92ed49","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1072.111473083496,"y":731.1107840538025,"z":"64165859.65c218","wires":[["c94aaa39.361bb8"]]},{"id":"e75d9c15.8524a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1087.8004989624023,"y":694.3330821990967,"z":"64165859.65c218","wires":[]},{"id":"d046e6f6.0e2458","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":619.4003219604492,"y":698.6663160324097,"z":"64165859.65c218","wires":[]},{"id":"46dda770.da6c38","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2062.0000610351562,"y":768.0000228881836,"z":"64165859.65c218","wires":[["309cdf1e.a7927"]]},{"id":"af14b3c3.48097","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1787.9841003417969,"y":768.1260228157043,"z":"64165859.65c218","wires":[["46dda770.da6c38"]]},{"id":"499747c7.a55a48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1800.4888000488281,"y":732.5555934906006,"z":"64165859.65c218","wires":[]},{"id":"309cdf1e.a7927","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2354.5548706054688,"y":764.8891496658325,"z":"64165859.65c218","wires":[["849d5f32.c0a1d","8e8c972.e2a3368"]]},{"id":"ea225ffd.8fd5c","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2942.2214736938477,"y":754.8891334533691,"z":"64165859.65c218","wires":[]},{"id":"d4059f44.0d602","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2704.2879848480225,"y":767.8891382217407,"z":"64165859.65c218","wires":[["ea225ffd.8fd5c","22a21cd1.407344"]]},{"id":"849d5f32.c0a1d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2548.821361541748,"y":767.8890008926392,"z":"64165859.65c218","wires":[["d4059f44.0d602"]]},{"id":"8e8c972.e2a3368","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2549.6209716796875,"y":805.8890037536621,"z":"64165859.65c218","wires":[["866adc09.2f017"]]},{"id":"866adc09.2f017","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2727.6211280822754,"y":805.8890695571899,"z":"64165859.65c218","wires":[]},{"id":"22a21cd1.407344","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2916.688087463379,"y":790.888822555542,"z":"64165859.65c218","wires":[["9e49f002.0fb2d","9fd3ada.9523b5","38a0e1a6.0275de"]]},{"id":"9e49f002.0fb2d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3153.549415588379,"y":805.4999141693115,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"9fd3ada.9523b5","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3148.8824424743652,"y":838.8332281112671,"z":"64165859.65c218","wires":[["e5c370f8.6038"]]},{"id":"e5c370f8.6038","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3323.058364868164,"y":826.8887872695923,"z":"64165859.65c218","wires":[]},{"id":"38a0e1a6.0275de","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3149.058448791504,"y":773.9258785247803,"z":"64165859.65c218","wires":[["3e857a0c.1c9ed6"]]},{"id":"3e857a0c.1c9ed6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3329.058448791504,"y":771.9258785247803,"z":"64165859.65c218","wires":[["4c618c54.2a14d4"]]},{"id":"4c618c54.2a14d4","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3516.021553039551,"y":769.5556201934814,"z":"64165859.65c218","wires":[]},{"id":"5cf76218.ae346c","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":584.0000152587891,"y":928.0000286102295,"z":"64165859.65c218","wires":[]},{"id":"3396a245.5af4be","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='apply' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":690.0000610351562,"y":1212.000036239624,"z":"64165859.65c218","wires":[["e17d1029.116eb","5a9c42ae.afc9ac"]]},{"id":"e17d1029.116eb","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1025.6664962768555,"y":1212.4282269477844,"z":"64165859.65c218","wires":[["b46738dd.eae108"]]},{"id":"5a9c42ae.afc9ac","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1023.7618179321289,"y":1245.4281667135656,"z":"64165859.65c218","wires":[["7d2e0a11.918714"]]},{"id":"7d2e0a11.918714","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to apply policy in Contrail to source network\" />\n","comments":"","x":1183.6665878295898,"y":1244.7615332603455,"z":"64165859.65c218","wires":[]},{"id":"b46738dd.eae108","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1177.8569793701172,"y":1213.094951953739,"z":"64165859.65c218","wires":[[]]},{"id":"b29978f4.4fd1e8","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":588.3861846923828,"y":1180.0528321266174,"z":"64165859.65c218","wires":[]},{"id":"4afec706.648e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":499.0001792907715,"y":2087.9766874313354,"z":"64165859.65c218","wires":[]},{"id":"6e8ca02f.7313","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":527.7540855407715,"y":2050.4324808120728,"z":"64165859.65c218","wires":[]},{"id":"54889c95.317884","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Active' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":559.4209213256836,"y":1909.4800510406494,"z":"64165859.65c218","wires":[]},{"id":"c2672028.9a192","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":587.5293960571289,"y":1983.529543876648,"z":"64165859.65c218","wires":[["e8a6a664.d79298","eabef186.2a8a8","879fe46c.3b2498"]]},{"id":"e8a6a664.d79298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":857.8374137878418,"y":2036.5277446731925,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"eabef186.2a8a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.8374633789062,"y":2005.027770422399,"z":"64165859.65c218","wires":[["a31c2d71.a08e1"]]},{"id":"879fe46c.3b2498","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":852.5875015258789,"y":1975.3848752975464,"z":"64165859.65c218","wires":[["bb8e21b5.4f02e"]]},{"id":"a31c2d71.a08e1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1018.5875015258789,"y":2005.777794264257,"z":"64165859.65c218","wires":[]},{"id":"bb8e21b5.4f02e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":994.2434692382812,"y":1971.5770444869995,"z":"64165859.65c218","wires":[[]]},{"id":"bc559c11.5308","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":510.24351501464844,"y":1875.9101829528809,"z":"64165859.65c218","wires":[[]]},{"id":"922d2ffc.4476e","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1244.6667633056638,"y":2005.0953893661497,"z":"64165859.65c218","wires":[]},{"id":"876eb57a.485618","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":544.0000381469727,"y":1825.0952768325806,"z":"64165859.65c218","wires":[]},{"id":"a6675806.e2dc08","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"in-service-path\" />\n","comments":"","outputs":1,"x":548.6191101074219,"y":1787.0478992462158,"z":"64165859.65c218","wires":[["b7633a81.cf12d8","475a5176.80fc4"]]},{"id":"b7633a81.cf12d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":816.3810272216797,"y":1764.2859525680542,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"475a5176.80fc4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":821.6904563903809,"y":1799.857370376587,"z":"64165859.65c218","wires":[["7dabdf24.12b19"]]},{"id":"7dabdf24.12b19","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1031.4762420654297,"y":1765.9049968719482,"z":"64165859.65c218","wires":[]},{"id":"c82b30e7.1d586","type":"comment","name":"Update AAI AR","info":"","comments":"","x":501.96195220947266,"y":1746.476222038269,"z":"64165859.65c218","wires":[]},{"id":"3de8fec.d2ae202","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":652.0001220703125,"y":1452.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"f8a3e8b0.ff98a8","type":"save","name":"save AnAI - network-policy relationship to source and destination network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`tmp.AnAI-src.related-link`\" />\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"l3-network\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`tmp.AnAI-dest.related-link`\" />\n\n\n","comments":"","outputs":1,"x":713.3770179748535,"y":1489.0675249099731,"z":"64165859.65c218","wires":[["f4eee49b.3eb418","96306b55.89f5d8"]]},{"id":"930748bb.7c87d8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1357.7225036621094,"y":1485.3494877815247,"z":"64165859.65c218","wires":[]},{"id":"f4eee49b.3eb418","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1129.1511116027832,"y":1488.365225315094,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"96306b55.89f5d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1132.9606094360352,"y":1516.8416419029236,"z":"64165859.65c218","wires":[["930748bb.7c87d8"]]},{"id":"f2b08893.418cf8","type":"save","name":"get related-link data for source network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-src\">\n\n\n\n","comments":"","outputs":1,"x":618.0000152587891,"y":1286.0000371932983,"z":"64165859.65c218","wires":[["1752b575.8c8cbb","cdbec68d.a55978"]]},{"id":"1398e1ba.93427e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1262,"y":1292,"z":"64165859.65c218","wires":[]},{"id":"1752b575.8c8cbb","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1033.4286079406738,"y":1291.0157375335693,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"cdbec68d.a55978","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1037.2381057739258,"y":1320.492154121399,"z":"64165859.65c218","wires":[["1398e1ba.93427e"]]},{"id":"f43488c4.18e4b8","type":"save","name":"get related-link data for dest network","xml":"<get-resource plugin=\"com.att.sdnctl.sli.aai.AAIService\"\nresource=\"related-link\"\nkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\"\nlocal-only=\"true\"\npfx=\"tmp.AnAI-dest\">\n\n\n\n","comments":"","outputs":1,"x":614,"y":1360,"z":"64165859.65c218","wires":[["91989618.fd4e18","fa09c5bd.ae5068"]]},{"id":"7b92823a.91cf8c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to get related link for l3-network in AAI\" />\n","comments":"","x":1056.0000381469727,"y":1370.0000410079956,"z":"64165859.65c218","wires":[]},{"id":"91989618.fd4e18","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":873.4286422729492,"y":1357.0157642364502,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]},{"id":"fa09c5bd.ae5068","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.2381210327148,"y":1386.4922285079956,"z":"64165859.65c218","wires":[["7b92823a.91cf8c"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json
index daafaa29..c5741ffa 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.json
@@ -1 +1 @@
-[{"id":"4c9f1270.94615c","type":"dgstart","name":"DGSTART","outputs":1,"x":150,"y":88,"z":"4d1b2427.607d4c","wires":[["9e2ac2f1.e6e2"]]},{"id":"9e2ac2f1.e6e2","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":256.23807525634766,"y":162.95240020751953,"z":"4d1b2427.607d4c","wires":[["3916a67.a589d5a"]]},{"id":"3916a67.a589d5a","type":"method","name":"contrail-route-topology-operation-assign","xml":"<method rpc='contrail-route-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":257.82152557373047,"y":262.1904363632202,"z":"4d1b2427.607d4c","wires":[["9cfe2b9e.d58558"]]},{"id":"9cfe2b9e.d58558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":284.4761848449707,"y":375.523784160614,"z":"4d1b2427.607d4c","wires":[["779e03bd.004a6c","b7d6a7d6.406e68","fb26a2b7.6969f","142b08a1.6d8de7","87a2a4c4.087d48","f3613a51.1c26f8","625eb8ab.21f038","6c13aed7.4f039","1836ca82.75ebe5","9f72a1ac.015ab","d634d1d1.89bbb","69c9d3c4.e9707c","bec92482.90ee38","bbe3aaad.4a5568","6bcbfec7.4a61d","62c0d784.f7e3d8","b6d077f3.00bc38","892a2973.dace48","ac3303.d63e3d","866ca1ea.ff3bc","ea795139.b531a","6a318934.66ddc8","783e64a0.ae3edc","cd01ba46.1664d8","1420897.e40c477","1fa15432.96f97c","af7a877d.eb2d78","843930fc.abe98","fac7c328.21b71","6959d8ae.04d098","b5119828.1d53c8","e6eeaa3.150a058","8211864b.caed98","571268e5.730638","96b047c4.679ec8","5e25bd11.a21d44","e2e2a185.95801","5790ccca.f5ea54","c643b552.15d5b8","e9e426fe.b64fd8","be0b4c28.f1b79"]]},{"id":"b7d6a7d6.406e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":519.0002326965332,"y":3227.2144536972046,"z":"4d1b2427.607d4c","wires":[]},{"id":"779e03bd.004a6c","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":547.7541580200195,"y":3199.051257133484,"z":"4d1b2427.607d4c","wires":[]},{"id":"b6d077f3.00bc38","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":584.7542457580566,"y":2376.0512704849243,"z":"4d1b2427.607d4c","wires":[]},{"id":"142b08a1.6d8de7","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":556.7381706237793,"y":325.33333587646484,"z":"4d1b2427.607d4c","wires":[]},{"id":"fb26a2b7.6969f","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.contrail-applied-service-instance-id' value='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id`' />\n<parameter name='tmp.ar.allotted-resource-type' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n\n","comments":"","x":603.9974327087402,"y":291.59260177612305,"z":"4d1b2427.607d4c","wires":[]},{"id":"87a2a4c4.087d48","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":618.9935836791992,"y":357.2315893173218,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"625eb8ab.21f038","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":619.5189018249512,"y":737.4595794677734,"z":"4d1b2427.607d4c","wires":[["b8ba7075.92c81","408b9489.78624c"]]},{"id":"f3613a51.1c26f8","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":591.0649604797363,"y":421.0172395706177,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"b8ba7075.92c81","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":866.8149909973145,"y":732.2673687934875,"z":"4d1b2427.607d4c","wires":[["3a69737a.dd4c0c"]]},{"id":"6bcbfec7.4a61d","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":612.958122253418,"y":2994.291175842285,"z":"4d1b2427.607d4c","wires":[["69575477.9eb00c","215247c4.dbf588"]]},{"id":"69575477.9eb00c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.9328575134277,"y":3023.9561338424683,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"215247c4.dbf588","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":874.2662467956543,"y":2992.455969810486,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"1a4098bb.aead37","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource. Parent provided resource rolled back\" />\n","comments":"","x":1216.3495788574219,"y":3038.5395822525024,"z":"4d1b2427.607d4c","wires":[]},{"id":"3a69737a.dd4c0c","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1035.8149948120117,"y":730.7672696113586,"z":"4d1b2427.607d4c","wires":[["9399d0e2.ddd51"]]},{"id":"9399d0e2.ddd51","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1246.6722373962402,"y":730.3863987922668,"z":"4d1b2427.607d4c","wires":[["4041d430.f6846c"]]},{"id":"4041d430.f6846c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1436.005542755127,"y":730.3863568305969,"z":"4d1b2427.607d4c","wires":[["e842b5e7.c19358"]]},{"id":"f17d1c78.92f5f","type":"comment","name":"Save consumed-allotted-resources to mdsal","info":"","comments":"","x":619.2436676025391,"y":2185.3863854408264,"z":"4d1b2427.607d4c","wires":[]},{"id":"efe5ed7c.3b0ae","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":638.8148880004883,"y":704.7672181129456,"z":"4d1b2427.607d4c","wires":[]},{"id":"6c13aed7.4f039","type":"set","name":"set ar-identifiers","xml":"<set>\n<parameter name='ar-identifiers.consuming-service-instance-id' value=\"`$contrail-route-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='ar-identifiers.parent-service-instance-id' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='ar-identifiers.allotted-resource-type' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n","comments":"","x":545.0531158447266,"y":846.2912406921387,"z":"4d1b2427.607d4c","wires":[]},{"id":"306f9e61.b62042","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":585.6721267700195,"y":816.6720333099365,"z":"4d1b2427.607d4c","wires":[]},{"id":"892a2973.dace48","type":"set","name":"set identifiers in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.' \nvalue=\"`$ar-identifiers.`\" />\n\n\n","comments":"","x":605.0529861450195,"y":1362.9103206694126,"z":"4d1b2427.607d4c","wires":[]},{"id":"1836ca82.75ebe5","type":"set","name":"set onap model information from input","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.' \nvalue=\"`$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.`\" />\n\n\n","comments":"","x":606.7196884155273,"y":930.2436923980713,"z":"4d1b2427.607d4c","wires":[]},{"id":"9f72a1ac.015ab","type":"switchNode","name":"switch model-invariant-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>\n","comments":"","outputs":1,"x":592.9101486206055,"y":965.9578294754028,"z":"4d1b2427.607d4c","wires":[["a386a341.6a5dc"]]},{"id":"a386a341.6a5dc","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":820.0530281066895,"y":967.3863468170166,"z":"4d1b2427.607d4c","wires":[["f68746c1.bc30f8"]]},{"id":"f68746c1.bc30f8","type":"set","name":"set model-invariant-uuid","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-invariant-uuid' \nvalue=\"`$ar-model.invariant-uuid`\" />\n\n\n","comments":"","x":1021.4816017150879,"y":966.8148994445801,"z":"4d1b2427.607d4c","wires":[]},{"id":"d634d1d1.89bbb","type":"switchNode","name":"switch model-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>\n","comments":"","outputs":1,"x":564.3387451171875,"y":1000.2435302734375,"z":"4d1b2427.607d4c","wires":[["41ad333e.6ea4ec"]]},{"id":"41ad333e.6ea4ec","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":765.7673110961914,"y":1000.8149518966675,"z":"4d1b2427.607d4c","wires":[["8577b5de.034978"]]},{"id":"8577b5de.034978","type":"set","name":"set model-uuid","xml":"<set>\n<parameter name='sar.allotted-resource-data.contrail-route-topology.onap-model-information.model-uuid' \nvalue=\"`$ar-model.uuid`\" />\n\n\n","comments":"","x":958.6244697570801,"y":1000.8148736953735,"z":"4d1b2427.607d4c","wires":[]},{"id":"69c9d3c4.e9707c","type":"switchNode","name":"switch model-version is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>\n","comments":"","outputs":1,"x":572.9101486206055,"y":1033.1006574630737,"z":"4d1b2427.607d4c","wires":[["a2183382.79fd3"]]},{"id":"a2183382.79fd3","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":822.9101295471191,"y":1033.1006422042847,"z":"4d1b2427.607d4c","wires":[["32b5229d.0cab2e"]]},{"id":"32b5229d.0cab2e","type":"set","name":"set model-version","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-version' \nvalue=\"`$ar-model.version`\" />\n\n\n","comments":"","x":1015.767276763916,"y":1033.1006317138672,"z":"4d1b2427.607d4c","wires":[]},{"id":"866ca1ea.ff3bc","type":"switchNode","name":"switch ar-model.onap-generated-naming","xml":"<switch test='`$ar-model.onap-generated-naming`'>\n","comments":"","outputs":1,"x":633.7196960449219,"y":1279.7672176361084,"z":"4d1b2427.607d4c","wires":[["3948bc2f.f77b54","e707f9ff.d5a678"]]},{"id":"3948bc2f.f77b54","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":910.7197341918945,"y":1275.8624358177185,"z":"4d1b2427.607d4c","wires":[["20908a4f.bf6266"]]},{"id":"20908a4f.bf6266","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1079.4697761535645,"y":1276.3624243736267,"z":"4d1b2427.607d4c","wires":[["7b9d654d.5be03c"]]},{"id":"e707f9ff.d5a678","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":901.942024230957,"y":1308.8624358177185,"z":"4d1b2427.607d4c","wires":[["29eade88.e64712"]]},{"id":"29eade88.e64712","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in allotted-resource-model data. Ecomp-generated-naming should be true\" />\n\n","comments":"","x":1079.942024230957,"y":1307.8624358177185,"z":"4d1b2427.607d4c","wires":[]},{"id":"7b9d654d.5be03c","type":"switchNode","name":"switch ar-model.onap-generated-naming","xml":"<switch test='`$ar-model.naming-policy`'>\n","comments":"","outputs":1,"x":1380.7196807861328,"y":1276.433897972107,"z":"4d1b2427.607d4c","wires":[["cef027f.91fdfd8","38b91d73.c94a62"]]},{"id":"cef027f.91fdfd8","type":"other","name":"outcome oam_network_policy","xml":"<outcome value='oam_network_policy'>\n","comments":"","outputs":1,"x":1751.5775146484375,"y":1268.0119352340698,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"38b91d73.c94a62","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1676.338981628418,"y":1300.529139995575,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"9b97c321.adf0f","type":"set","name":"set ar_name","xml":"<set>\n<parameter name='tmp.ar-name' value='$TenantName_$CloudRegionID_$TenantNetworkRole_$LandingNetworkRole_policy_' />\n","comments":"","x":2194.100845336914,"y":1256.1009072959423,"z":"4d1b2427.607d4c","wires":[]},{"id":"b38296e4.3c0ea8","type":"execute","name":"execute SliStringUtils - replace $TenantName","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":2294.244155883789,"y":1294.6247834861279,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"52fb7e92.2cea6","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2302.577407836914,"y":1398.7676134109497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"8431f8ba.f08668","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1981.8626976013184,"y":1302.0053367614746,"z":"4d1b2427.607d4c","wires":[["9b97c321.adf0f","b38296e4.3c0ea8","52fb7e92.2cea6","33d9a65.b86135a","70595e41.23774","d7151a9c.c5a358","b85f95cf.56c518","e6c914ff.bbbeb8","a21ede43.fc3e7"]]},{"id":"33d9a65.b86135a","type":"set","name":"set identifiers.allotted-resource-name","xml":"<set>\n<parameter name='ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n","comments":"","x":2258.767318725586,"y":1545.3865489661694,"z":"4d1b2427.607d4c","wires":[]},{"id":"ac3303.d63e3d","type":"set","name":"set assignments in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' \nvalue=\"`$ar-assignments.`\" />\n\n\n","comments":"","x":593.1960144042969,"y":2152.624861717224,"z":"4d1b2427.607d4c","wires":[]},{"id":"6a318934.66ddc8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.source-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.` \" />\n<parameter name='ar-assignments.dest-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.` \" />\n<parameter name='ar-assignments.contrail-applied-service.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.` \" />\n\n\n","comments":"","x":564.529167175293,"y":1399.3863624632359,"z":"4d1b2427.607d4c","wires":[]},{"id":"e9829904.2e77e8","type":"for","name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1498.8155517578125,"y":2260.291075229645,"z":"4d1b2427.607d4c","wires":[["76e1246.58bf5dc"]]},{"id":"bec92482.90ee38","type":"switchNode","name":"switch service-data.consumed-allotted-resources_length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":656.8150024414062,"y":2218.0051369667053,"z":"4d1b2427.607d4c","wires":[["4dce9f0e.197ca","75705eae.125bb"]]},{"id":"4dce9f0e.197ca","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":978.9578857421875,"y":2220.8625588417053,"z":"4d1b2427.607d4c","wires":[["f9d4ed78.b618a"]]},{"id":"75705eae.125bb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":966.9578895568848,"y":2263.862560272217,"z":"4d1b2427.607d4c","wires":[["c55c83ec.31bb6"]]},{"id":"76e1246.58bf5dc","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":1928.9107818603516,"y":2262.3508410453796,"z":"4d1b2427.607d4c","wires":[["d664ab8f.6994a8"]]},{"id":"d664ab8f.6994a8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2133.720748901367,"y":2262.81529378891,"z":"4d1b2427.607d4c","wires":[["67045931.262a78"]]},{"id":"c55c83ec.31bb6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1127.0849800109863,"y":2261.988536834717,"z":"4d1b2427.607d4c","wires":[["e9829904.2e77e8","1d1bc1f0.a72b7e"]]},{"id":"67045931.262a78","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2305.481700897217,"y":2262.6725223064423,"z":"4d1b2427.607d4c","wires":[["354eaed.bcc7f52","3ad061dc.d44dfe"]]},{"id":"f9d4ed78.b618a","type":"set","name":"set cidx","xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n","comments":"","x":1137.8148574829102,"y":2220.57662153244,"z":"4d1b2427.607d4c","wires":[]},{"id":"354eaed.bcc7f52","type":"set","name":"set tmp.cidx and ctx.consumed-ar","xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />","comments":"","x":2551.339029312134,"y":2263.2439963817596,"z":"4d1b2427.607d4c","wires":[]},{"id":"bbe3aaad.4a5568","type":"set","name":"set consumed allotted resources","xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n","comments":"","x":580.6723365783691,"y":2308.5766229629517,"z":"4d1b2427.607d4c","wires":[]},{"id":"8d887169.2ecf8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":561.9577674865723,"y":390.6243667602539,"z":"4d1b2427.607d4c","wires":[]},{"id":"6959d8ae.04d098","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.fq-name' value=\"`$tmp.fq-name` \" />\n\n\n\n","comments":"","x":548.6722793579102,"y":2118.196542739868,"z":"4d1b2427.607d4c","wires":[]},{"id":"8665234a.8510b","type":"comment","name":"Add AR to md-sal","info":"","comments":"","x":534.2437210083008,"y":2965.481409072876,"z":"4d1b2427.607d4c","wires":[]},{"id":"62c0d784.f7e3d8","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":535.2434692382812,"y":2343.4815063476562,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e842b5e7.c19358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Existing contrail route allotted resource\" />\n \n","comments":"","x":1616.33349609375,"y":728.3334121704102,"z":"4d1b2427.607d4c","wires":[]},{"id":"408b9489.78624c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":858.6667938232422,"y":767.3334536552429,"z":"4d1b2427.607d4c","wires":[["94a2f0be.5376d"]]},{"id":"94a2f0be.5376d","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1038.6667442321777,"y":768.0000042915344,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"ea795139.b531a","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":530.6667594909668,"y":771.666675567627,"z":"4d1b2427.607d4c","wires":[]},{"id":"70595e41.23774","type":"execute","name":"execute SliStringUtils - replace $CloudRegionID","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$CloudRegionID\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.cloud-region-id`\"/>\n\n","comments":"","outputs":1,"x":2303.333267211914,"y":1328.6671237945557,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"d7151a9c.c5a358","type":"execute","name":"execute SliStringUtils - replace $TenantNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2312.6664657592773,"y":1362.6670274734497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6c914ff.bbbeb8","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2317.3332595825195,"y":1503.333630681038,"z":"4d1b2427.607d4c","wires":[["be6042e3.12db","9ef8ef75.f00ad"]]},{"id":"be6042e3.12db","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2627.047782897949,"y":1506.1907633244991,"z":"4d1b2427.607d4c","wires":[["d59007c0.f67198"]]},{"id":"9ef8ef75.f00ad","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2632.3810272216797,"y":1537.85746383667,"z":"4d1b2427.607d4c","wires":[["b0a81ae7.4dfba8"]]},{"id":"b85f95cf.56c518","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$tmp.ar-name`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":2279.000259399414,"y":1433.0003308951855,"z":"4d1b2427.607d4c","wires":[]},{"id":"b0a81ae7.4dfba8","type":"set","name":"set tmp.ar-name to generated name","xml":"<set>\n<parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":2879.571189880371,"y":1538.3335467875004,"z":"4d1b2427.607d4c","wires":[]},{"id":"d59007c0.f67198","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2800.9047050476074,"y":1505.6192770004272,"z":"4d1b2427.607d4c","wires":[]},{"id":"783e64a0.ae3edc","type":"set","name":"set fq_name","xml":"<set>\n<parameter name='tmp.fq-name' value='$defaultDomain.$defaultProject.$sdncNetworkPolicy' />\n","comments":"","x":548.3332748413086,"y":1478.6666288375854,"z":"4d1b2427.607d4c","wires":[]},{"id":"cd01ba46.1664d8","type":"execute","name":"execute SliStringUtils - replace $defaultDomain","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultDomain\"/>\n <parameter name=\"replacement\" value=\"default-domain\"/>\n\n","comments":"","outputs":1,"x":655.6666259765625,"y":1508.6666717529297,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"1420897.e40c477","type":"execute","name":"execute SliStringUtils - replace $defaultProject","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultProject\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":655.6666564941406,"y":1542.0001125335693,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"467969e2.ea3918","type":"comment","name":"generate fqname","info":"","comments":"","x":557.3333206176758,"y":1451.9999351501465,"z":"4d1b2427.607d4c","wires":[]},{"id":"1fa15432.96f97c","type":"execute","name":"execute SliStringUtils - replace $sdncNetworkPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$sdncNetworkPolicy\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar-name`\"/>\n\n","comments":"","outputs":1,"x":668.9999618530273,"y":1575.333267211914,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"bb5388b.9a34478","type":"comment","name":"Set onap-model-info","info":"","comments":"","x":554.1429672241211,"y":896.5714740753174,"z":"4d1b2427.607d4c","wires":[]},{"id":"af7a877d.eb2d78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$ar-model.invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$ar-model.uuid`\" />\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":568.8571891784668,"y":2474.5715532302856,"z":"4d1b2427.607d4c","wires":[["f49edd24.7f19d","22aa6a43.558c86"]]},{"id":"f49edd24.7f19d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":824.6191215515137,"y":2451.809727668762,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"22aa6a43.558c86","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":829.9285507202148,"y":2487.381145477295,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"a2554f1f.b50de","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1039.7143363952637,"y":2453.4287719726562,"z":"4d1b2427.607d4c","wires":[]},{"id":"a21ede43.fc3e7","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"generate-unique-name-input.prefix\" />\n<parameter name=\"field5\" value=\"`$generate-unique-name-input.prefix`\" />","comments":"","outputs":1,"x":2170.2000579833984,"y":1468.0004276931286,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"843930fc.abe98","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":601.5997695922852,"y":1155.3336191177368,"z":"4d1b2427.607d4c","wires":[["f66777d8.98ad18","6a87e5bf.61d96c"]]},{"id":"f66777d8.98ad18","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":952.6000289916992,"y":1153.0001316070557,"z":"4d1b2427.607d4c","wires":[["cde00633.b18cb8"]]},{"id":"6a87e5bf.61d96c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":945.2668228149414,"y":1114.9999265670776,"z":"4d1b2427.607d4c","wires":[["44011184.bdb35"]]},{"id":"b7184182.4959f","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2105.7113876342773,"y":1151.444565474987,"z":"4d1b2427.607d4c","wires":[["1c4a61f3.c2849e"]]},{"id":"fbab815c.672c4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1341.425392150879,"y":1152.0159158706665,"z":"4d1b2427.607d4c","wires":[["140ca41e.1dac4c","97892501.9ff8f8"]]},{"id":"140ca41e.1dac4c","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1630.425392150879,"y":1154.0159769058228,"z":"4d1b2427.607d4c","wires":[["662569df.4978f8"]]},{"id":"97892501.9ff8f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1610.425392150879,"y":1189.0159769058228,"z":"4d1b2427.607d4c","wires":[["c55a8bab.54c1e8"]]},{"id":"cb1b209a.0c898","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2550.1400508880615,"y":1113.6947317123413,"z":"4d1b2427.607d4c","wires":[["6f669f36.77ecf"]]},{"id":"c55a8bab.54c1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1811.695411682129,"y":1190.5705423355103,"z":"4d1b2427.607d4c","wires":[["b7184182.4959f","74060662.5164e8","4f6aa7ae.9611b8"]]},{"id":"cde00633.b18cb8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1083.7112121582031,"y":1152.4444932937622,"z":"4d1b2427.607d4c","wires":[["fbab815c.672c4"]]},{"id":"44011184.bdb35","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1099.4002304077148,"y":1114.000121831894,"z":"4d1b2427.607d4c","wires":[]},{"id":"662569df.4978f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1820.2001876831055,"y":1152.0001287460327,"z":"4d1b2427.607d4c","wires":[]},{"id":"74a5cd24.86b7f4","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n<parameter name='source-network-found' value='true' />\n\n","comments":"","x":3059.2002391815186,"y":1093.0001211166382,"z":"4d1b2427.607d4c","wires":[]},{"id":"7a4f9f18.b1ca8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2869.2666816711426,"y":1106.00013256073,"z":"4d1b2427.607d4c","wires":[["74a5cd24.86b7f4","d9c31b5a.6a4cd8"]]},{"id":"6f669f36.77ecf","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2719.8002071380615,"y":1112.0000047683716,"z":"4d1b2427.607d4c","wires":[["7a4f9f18.b1ca8"]]},{"id":"465f3356.89525c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2434.5999183654785,"y":1186.0001649856567,"z":"4d1b2427.607d4c","wires":[]},{"id":"23fb5fa1.57992","type":"execute","name":"execute RestApiCallNode - Get Parent service network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-parentnetwork-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=\"parent-net\" />\n\n","comments":"","outputs":1,"x":1549.0000228881836,"y":1704.000186920166,"z":"4d1b2427.607d4c","wires":[["a3fb960c.d85758","fc9d9601.9e18b8"]]},{"id":"a3fb960c.d85758","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1858.2960777282715,"y":1704.8080496788025,"z":"4d1b2427.607d4c","wires":[["ac20b661.d93d88"]]},{"id":"ac20b661.d93d88","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2027.2960815429688,"y":1703.3079504966736,"z":"4d1b2427.607d4c","wires":[["55142221.a74b4c"]]},{"id":"55142221.a74b4c","type":"switchNode","name":"switch network length","xml":"<switch test='`$parent-net.networks.network_length`'>\n","comments":"","outputs":1,"x":2238.1533241271973,"y":1702.9270796775818,"z":"4d1b2427.607d4c","wires":[["66c12173.13d7","d9862bb8.9cb708"]]},{"id":"66c12173.13d7","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2447.4865951538086,"y":1702.9269948005676,"z":"4d1b2427.607d4c","wires":[["a8318bf.731e378"]]},{"id":"68b4c2ed.00f22c","type":"comment","name":"GET dest network from mdsal","info":"","comments":"","x":1494.295997619629,"y":1645.3078532218933,"z":"4d1b2427.607d4c","wires":[]},{"id":"fc9d9601.9e18b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1850.1478805541992,"y":1739.8741345405579,"z":"4d1b2427.607d4c","wires":[["8ccfa208.0193"]]},{"id":"8ccfa208.0193","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2030.1478309631348,"y":1740.5406851768494,"z":"4d1b2427.607d4c","wires":[["fa75851f.39e8f8"]]},{"id":"fac7c328.21b71","type":"execute","name":"generate parent-network url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-parentnetwork-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":585.0001220703125,"y":450.0000238418579,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"fa75851f.39e8f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing parent netorks\" />\n \n","comments":"","x":2214.999954223633,"y":1742.0001639127731,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9862bb8.9cb708","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2448.999828338623,"y":1738.0000948905945,"z":"4d1b2427.607d4c","wires":[["462e905c.7055"]]},{"id":"462e905c.7055","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Network id not found. Parent Service should only have one network\" />\n \n","comments":"","x":2615.3278045654297,"y":1737.9472098350525,"z":"4d1b2427.607d4c","wires":[]},{"id":"a8318bf.731e378","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$parent-net.networks.network[0].network-id` \" />\n\n\n\n","comments":"","x":2626.5996856689453,"y":1704.000138759613,"z":"4d1b2427.607d4c","wires":[]},{"id":"d30b861c.434bf8","type":"comment","name":"Find tenant/cloud region from source network","info":"","comments":"","x":631.0000610351562,"y":1120.0000252723694,"z":"4d1b2427.607d4c","wires":[]},{"id":"b5119828.1d53c8","type":"execute","name":"generate contrail-applied-service url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.vnf`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-contrailappliedsvc-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.contrail-applied-service-instance-id`\"/>\n","comments":"","outputs":1,"x":612.200122833252,"y":480.00002574920654,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6eeaa3.150a058","type":"execute","name":"execute RestApiCallNode - Get vnf","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-contrailappliedsvc-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=\"vnf\" />\n\n","comments":"","outputs":1,"x":598.2000503540039,"y":1835.6668615341187,"z":"4d1b2427.607d4c","wires":[["1fcbedaf.3a00e2","f42d5962.ac9958"]]},{"id":"1fcbedaf.3a00e2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":977.4961700439453,"y":1828.8080359697342,"z":"4d1b2427.607d4c","wires":[["81eaf91d.91f988"]]},{"id":"81eaf91d.91f988","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1146.4961738586426,"y":1827.3079367876053,"z":"4d1b2427.607d4c","wires":[["2ab7fe69.be87a2"]]},{"id":"2ab7fe69.be87a2","type":"switchNode","name":"switch vnf length","xml":"<switch test='`$vnf.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":1357.353416442871,"y":1826.9270659685135,"z":"4d1b2427.607d4c","wires":[["6ae0da83.aaa4f4","f324301e.0d32b"]]},{"id":"6ae0da83.aaa4f4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1548.6869087219238,"y":1820.9270491600037,"z":"4d1b2427.607d4c","wires":[["b98f6f34.959f"]]},{"id":"be2cb9a.2505e48","type":"comment","name":"GET contrail vnf for contrail applied service from mdsal","info":"","comments":"","x":660.8294906616211,"y":1797.6413383483887,"z":"4d1b2427.607d4c","wires":[]},{"id":"f42d5962.ac9958","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":969.347972869873,"y":1863.8741208314896,"z":"4d1b2427.607d4c","wires":[["e17a2bcb.e52fb8"]]},{"id":"e17a2bcb.e52fb8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1149.3479232788086,"y":1864.540671467781,"z":"4d1b2427.607d4c","wires":[["a25cc221.aaa89"]]},{"id":"a25cc221.aaa89","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing contrail applied service vnfs\" />\n \n","comments":"","x":1334.2000465393066,"y":1866.0001502037048,"z":"4d1b2427.607d4c","wires":[]},{"id":"f324301e.0d32b","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1550.2001419067383,"y":1856.0001492500305,"z":"4d1b2427.607d4c","wires":[["55da27e9.1a2d18"]]},{"id":"55da27e9.1a2d18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: vnf id not found. Contrail applied service should only have one vnf\" />\n \n","comments":"","x":1714.5280456542969,"y":1855.9473118782043,"z":"4d1b2427.607d4c","wires":[]},{"id":"b98f6f34.959f","type":"set","name":"set applied service vnf id","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.vnf-id' value=\"`$vnf.vnfs.vnf[0].vnf-id` \" />\n\n\n\n","comments":"","x":1759.8001136779785,"y":1820.0002398490906,"z":"4d1b2427.607d4c","wires":[]},{"id":"c6c2334d.98278","type":"comment","name":"Generate contrail route name","info":"","comments":"","x":583.0000457763672,"y":1244.0000286102295,"z":"4d1b2427.607d4c","wires":[]},{"id":"6add4fcf.7d2a3","type":"comment","name":"GET contrail fqdn from vnf/vf-module","info":"","comments":"","x":613.3333969116211,"y":1938.6669101715088,"z":"4d1b2427.607d4c","wires":[]},{"id":"8211864b.caed98","type":"switchNode","name":"switch contrail-route-request-input.constrail-applied-service-info.contrail-fqdn","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`'>\n","comments":"","outputs":1,"x":719.0000991821289,"y":1980.0002436637878,"z":"4d1b2427.607d4c","wires":[["4525a9a8.0b4468","841c4f89.afe5f"]]},{"id":"4525a9a8.0b4468","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1111.0000648498535,"y":1970.0000656843185,"z":"4d1b2427.607d4c","wires":[["68cb2b70.90a404"]]},{"id":"841c4f89.afe5f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1093.9999923706055,"y":2007.0000529289246,"z":"4d1b2427.607d4c","wires":[["36215833.3a7f48"]]},{"id":"36215833.3a7f48","type":"set","name":"set applied service fqdn","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn` \" />\n\n\n\n","comments":"","x":1285.0000076293945,"y":2007.000086903572,"z":"4d1b2427.607d4c","wires":[]},{"id":"68cb2b70.90a404","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1297.0000686645508,"y":1970.0000647306442,"z":"4d1b2427.607d4c","wires":[["bf2bb366.b639d","c7b161a8.2d59d"]]},{"id":"54037341.49dacc","type":"comment","name":"GET dest network from parent service","info":"","comments":"","x":603.666618347168,"y":1676.000069618225,"z":"4d1b2427.607d4c","wires":[]},{"id":"571268e5.730638","type":"switchNode","name":"switch contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id`'>\n","comments":"","outputs":1,"x":795.0000686645508,"y":1704.0000405311584,"z":"4d1b2427.607d4c","wires":[["8bb9d911.861198","a62ad6dd.907908"]]},{"id":"8bb9d911.861198","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1236.9999771118164,"y":1704.0000402927399,"z":"4d1b2427.607d4c","wires":[["23fb5fa1.57992"]]},{"id":"a62ad6dd.907908","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1218.9999809265137,"y":1737.0000410079956,"z":"4d1b2427.607d4c","wires":[["cddb9071.a0335"]]},{"id":"cddb9071.a0335","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$contrail-route-request-input.dest-network.network-id` \" />\n\n\n\n","comments":"","x":1410.999942779541,"y":1739.9999961853027,"z":"4d1b2427.607d4c","wires":[]},{"id":"bfe89f13.37b26","type":"comment","name":"GET contrail fqdn via AAI","info":"","comments":"","x":1550.2000579833984,"y":1933.9999685287476,"z":"4d1b2427.607d4c","wires":[]},{"id":"bf2bb366.b639d","type":"get-resource","name":"get-resource generic-vnf","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $ar-assignments.contrail-applied-service.vnf-id\"\n pfx='aai.vnf' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1560.2000579833984,"y":1969.9999694824219,"z":"4d1b2427.607d4c","wires":[["358e578d.2fd368","1096a3e1.ecde4c"]]},{"id":"1096a3e1.ecde4c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1762.8396644592285,"y":1998.805338382721,"z":"4d1b2427.607d4c","wires":[["1005d67c.37828a"]]},{"id":"1005d67c.37828a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving vnf from AAI\" />\n","comments":"","x":1938.7918891906738,"y":2002.1386723518372,"z":"4d1b2427.607d4c","wires":[]},{"id":"358e578d.2fd368","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1765.3394889831543,"y":1968.8054161071777,"z":"4d1b2427.607d4c","wires":[["e73bb580.fac7b8"]]},{"id":"e73bb580.fac7b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Vnf not found in AAI\" />\n","comments":"","x":1933.117374420166,"y":1968.110846042633,"z":"4d1b2427.607d4c","wires":[]},{"id":"6ad7fa83.050644","type":"comment","name":"Loop through vf modeuls looking for contrail fqdn","info":"","comments":"","x":1633.8667068481445,"y":2038.333501815796,"z":"4d1b2427.607d4c","wires":[]},{"id":"57a1c09e.69c79","type":"comment","name":"Update AAI AR","info":"","comments":"","x":532.2000465393066,"y":2437.999997138977,"z":"4d1b2427.607d4c","wires":[]},{"id":"96b047c4.679ec8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":674.2001609802246,"y":2570.0002641677856,"z":"4d1b2427.607d4c","wires":[["c1fb6c5e.e721a","e74826b3.4d8b38","d137df8f.0037a"]]},{"id":"c1fb6c5e.e721a","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":996.5081787109375,"y":2614.9984817504883,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"e74826b3.4d8b38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":987.508228302002,"y":2583.498507499695,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"d137df8f.0037a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":991.2582664489746,"y":2553.855612374842,"z":"4d1b2427.607d4c","wires":[["a297dd7b.aa05c"]]},{"id":"dd5d09e6.0f8e48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1157.2582664489746,"y":2584.2485313415527,"z":"4d1b2427.607d4c","wires":[]},{"id":"a297dd7b.aa05c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1132.914234161377,"y":2550.0477815642953,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c332fe05.c3ade","type":"comment","name":"Put the parent allotted resource in mdsal","info":"","comments":"","x":601.2001266479492,"y":2538.0000896453857,"z":"4d1b2427.607d4c","wires":[]},{"id":"1d1bc1f0.a72b7e","type":"switchNode","name":"switch tmp.found-cidx","xml":"<switch test='`$tmp.found-cidx`'>\n","comments":"","outputs":1,"x":1316.2000274658203,"y":2294.000059604645,"z":"4d1b2427.607d4c","wires":[["65d66863.2a8258"]]},{"id":"65d66863.2a8258","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1506.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["762eafdc.0bdf2"]]},{"id":"762eafdc.0bdf2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1672.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["63da8f53.b089c"]]},{"id":"63da8f53.b089c","type":"set","name":"set tmp.cidx ","xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n","comments":"","x":1918.0573101043701,"y":2294.5714707374573,"z":"4d1b2427.607d4c","wires":[]},{"id":"3ad061dc.d44dfe","type":"break","name":"break","xml":"<break>\n","comments":"","x":2468.199981689453,"y":2291.99999666214,"z":"4d1b2427.607d4c","wires":[]},{"id":"5e25bd11.a21d44","type":"execute","name":"generate parent-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":656.2001876831055,"y":512.0000591278076,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e2e2a185.95801","type":"execute","name":"generate parent-ar url - replace allotted-resource-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":661.2000579833984,"y":547.0000600814819,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"3111d761.5e06d8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-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='DELETE' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":1373.333595275879,"y":3004.3333768844604,"z":"4d1b2427.607d4c","wires":[["7e416b6f.40fa64","cdcc7917.56abb8","8bd6f68b.5ef6b8"]]},{"id":"521d8bd0.fa7014","type":"comment","name":"Rollback parent","info":"","comments":"","x":1217.3335227966309,"y":2974.000007390976,"z":"4d1b2427.607d4c","wires":[]},{"id":"2a4bd3e4.dd179c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1026.0001258850098,"y":3003.6666803359985,"z":"4d1b2427.607d4c","wires":[["3111d761.5e06d8","1a4098bb.aead37"]]},{"id":"7e416b6f.40fa64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1744.64164352417,"y":3064.998343229294,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"cdcc7917.56abb8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1735.6416931152344,"y":3033.4983689785004,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"8bd6f68b.5ef6b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1739.391731262207,"y":3003.8554738536477,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"3c400d0a.33bc62","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1881.0476989746094,"y":3000.047643043101,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"5790ccca.f5ea54","type":"execute","name":"generate network-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":663.0000228881836,"y":581.9999942779541,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c643b552.15d5b8","type":"execute","name":"generate network-ar url - replace network-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{network-id}\"/>\n <parameter name=\"replacement\" value=\"`$ar-assignments.dest-network.network-id`\"/>\n","comments":"","outputs":1,"x":608.3334274291992,"y":2757.333106994629,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e9e426fe.b64fd8","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-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=\"net-ar\" />\n\n","comments":"","outputs":1,"x":669.0000686645508,"y":2789.332983970642,"z":"4d1b2427.607d4c","wires":[["5fedcca8.21af14","b88ee5a.8fd2218","945ef6e1.dc3458"]]},{"id":"b88ee5a.8fd2218","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1076.3081321716309,"y":2790.9985933303833,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"945ef6e1.dc3458","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1068.9748420715332,"y":2826.165051460266,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"5fedcca8.21af14","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1071.0581665039062,"y":2756.5221377387643,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"758f2d97.6a46a4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1242.7140617370605,"y":2761.047921180725,"z":"4d1b2427.607d4c","wires":[["47bc6f66.279f","aed7c269.f7e95"]]},{"id":"5b0d4b89.fa37f4","type":"comment","name":"Add AR to parent network allotted resource from mdsal","info":"","comments":"","x":636.9999618530273,"y":2717.6666049957275,"z":"4d1b2427.607d4c","wires":[]},{"id":"aed7c269.f7e95","type":"switchNode","name":"switch net-ar_length","xml":"<switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>\n","comments":"","outputs":1,"x":1469.3332176208496,"y":2800.3330936431885,"z":"4d1b2427.607d4c","wires":[["28ec3cfa.5c9964","d62a83f8.5e709"]]},{"id":"561e5c25.cb8074","type":"for","name":"for nidx..net-ar[]","xml":"<for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >\n","comments":"","outputs":1,"x":2187.6666717529297,"y":2821.3331003189087,"z":"4d1b2427.607d4c","wires":[["a35b9203.161d8"]]},{"id":"28ec3cfa.5c9964","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1752.1422843933105,"y":2755.9044466018677,"z":"4d1b2427.607d4c","wires":[["e0cae091.f6ab5"]]},{"id":"d62a83f8.5e709","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1733.8089332580566,"y":2829.571165084839,"z":"4d1b2427.607d4c","wires":[["8d766915.255368"]]},{"id":"a35b9203.161d8","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":2412.761730194092,"y":2828.3930258750916,"z":"4d1b2427.607d4c","wires":[["bc858023.6898d"]]},{"id":"bc858023.6898d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2595.905242919922,"y":2823.857072353363,"z":"4d1b2427.607d4c","wires":[["f4a2c79.aa6a338"]]},{"id":"8d766915.255368","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1936.2693977355957,"y":2832.36363363266,"z":"4d1b2427.607d4c","wires":[["561e5c25.cb8074","3cebc33.7bab73c"]]},{"id":"f4a2c79.aa6a338","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2762.6662063598633,"y":2825.3809678554535,"z":"4d1b2427.607d4c","wires":[["e9b23d6.001eac","c26f5049.d1dee"]]},{"id":"a0f4304a.2addd","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2366.7178077697754,"y":2865.041989326477,"z":"4d1b2427.607d4c","wires":[["907c3bfc.fa31a8"]]},{"id":"907c3bfc.fa31a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2536.0509071350098,"y":2863.3752422332764,"z":"4d1b2427.607d4c","wires":[["f4d721f4.46f46","fe096059.4ee75","3c945468.bd2a2c"]]},{"id":"f4d721f4.46f46","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />\n","comments":"","x":2741.9081535339355,"y":2868.946853160858,"z":"4d1b2427.607d4c","wires":[]},{"id":"6922d49.4d4892c","type":"comment","name":"allotted resource already exists- no op","info":"","comments":"","x":2457.999900817871,"y":2679.333148956299,"z":"4d1b2427.607d4c","wires":[]},{"id":"3cebc33.7bab73c","type":"switchNode","name":"switch tmp.found-nidx","xml":"<switch test='`$tmp.found-nidx`'>\n","comments":"","outputs":1,"x":2196.717716217041,"y":2863.375160217285,"z":"4d1b2427.607d4c","wires":[["a0f4304a.2addd"]]},{"id":"e9b23d6.001eac","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.found-nidx' value='true' />","comments":"","x":2974.6665992736816,"y":2816.6662435531616,"z":"4d1b2427.607d4c","wires":[]},{"id":"c26f5049.d1dee","type":"break","name":"break","xml":"<break>\n","comments":"","x":2961.860704421997,"y":2850.0894327163696,"z":"4d1b2427.607d4c","wires":[]},{"id":"fe096059.4ee75","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"p-network-ar\" />\n\n","comments":"","outputs":1,"x":2909.0000190734863,"y":2934.6661834716797,"z":"4d1b2427.607d4c","wires":[["409657f3.cf5e98","c70db172.aebc4","8859496f.d9d998"]]},{"id":"8859496f.d9d998","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3251.9999656677246,"y":2980.999610900879,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"c70db172.aebc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3243.000015258789,"y":2949.4996366500854,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"409657f3.cf5e98","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3246.7500534057617,"y":2919.856741525233,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"34c49998.798456","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":3431.739345550537,"y":2916.0488624572754,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"47bc6f66.279f","type":"set","name":"set tmp.found-nidx = false","xml":"<set>\n<parameter name='tmp.found-nidx' value='false' />","comments":"","x":1485.9999809265137,"y":2730.6669635772705,"z":"4d1b2427.607d4c","wires":[]},{"id":"3c945468.bd2a2c","type":"set","name":"set length","xml":"<set>\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length + 1`' />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value=\"`$tmp.ar.allotted-resource-id`\" />\n","comments":"","x":2736.666305541992,"y":2903.000112056732,"z":"4d1b2427.607d4c","wires":[]},{"id":"e917600f.4f7d7","type":"set","name":"set new network-provided-ar","xml":"<set>\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value=\"1\" />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value=\"`$tmp.ar.allotted-resource-id`\" />\n\n\n\n\n","comments":"","x":2252.999351501465,"y":2759.285076737404,"z":"4d1b2427.607d4c","wires":[]},{"id":"e0cae091.f6ab5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1949.6670188903809,"y":2755.9993057250977,"z":"4d1b2427.607d4c","wires":[["e917600f.4f7d7","fe096059.4ee75"]]},{"id":"ed6517f4.b8f3b8","type":"comment","name":"Other Rollbacks? ","info":"","comments":"","x":1222.999870300293,"y":3065.9997520446777,"z":"4d1b2427.607d4c","wires":[]},{"id":"5b89889f.eedaf8","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$aai.vnf.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1975.1585693359375,"y":2104.26904296875,"z":"4d1b2427.607d4c","wires":[["c9284eeb.d1eb5"]]},{"id":"471bc9f6.bff138","type":"break","name":"break","xml":"<break>\n","comments":"","x":2854.730155944824,"y":2168.507378578186,"z":"4d1b2427.607d4c","wires":[]},{"id":"c9284eeb.d1eb5","type":"switchNode","name":"switch contrail-service-instance-fqdn","xml":"<switch test='`$aai-vf-module.contrail-service-instance-fqdn`'>\n","comments":"","outputs":1,"x":2258.66650390625,"y":2104.999755859375,"z":"4d1b2427.607d4c","wires":[["b136ca44.5724a8","ed24b238.48ffb"]]},{"id":"eedd883d.4f3368","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"VF Module not found in AAI\" />\n","comments":"","x":1956.61083984375,"y":2071.97216796875,"z":"4d1b2427.607d4c","wires":[]},{"id":"b136ca44.5724a8","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2538.66650390625,"y":2106.3330078125,"z":"4d1b2427.607d4c","wires":[["b5e70f0a.b42d"]]},{"id":"ed24b238.48ffb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2520.6665077209473,"y":2139.3330085277557,"z":"4d1b2427.607d4c","wires":[["322afc54.4f0194"]]},{"id":"b5e70f0a.b42d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2695.3334197998047,"y":2104.666417121887,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"322afc54.4f0194","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2701.9997482299805,"y":2136.333013534546,"z":"4d1b2427.607d4c","wires":[["471bc9f6.bff138","caad7e17.7d471"]]},{"id":"caad7e17.7d471","type":"set","name":"set applied service fqdn","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value=\"`$aai-vf-module.contrail-service-instance-fqdn` \" />\n\n\n\n","comments":"","x":2913.3330078125,"y":2135.6666259765625,"z":"4d1b2427.607d4c","wires":[]},{"id":"be0b4c28.f1b79","type":"switchNode","name":"switch ar-assignments.contrail-applied-service.contrail-fqdn","xml":"<switch test='`$ar-assignments.contrail-applied-service.contrail-fqdn`'>\n","comments":"","outputs":1,"x":672.0000610351562,"y":2053.6666259765625,"z":"4d1b2427.607d4c","wires":[["214426a4.7d2d2a"]]},{"id":"214426a4.7d2d2a","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1000.6667442321777,"y":2054.333152294159,"z":"4d1b2427.607d4c","wires":[["9fbe5884.aaa628"]]},{"id":"9fbe5884.aaa628","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No vf-module with contrail-service-instance-fqdn found in AAI\" />\n \n","comments":"","x":1176.6666259765625,"y":2052.66650390625,"z":"4d1b2427.607d4c","wires":[]},{"id":"68ea4ba9.f086b4","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":650.666618347168,"y":90.99999618530273,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9c31b5a.6a4cd8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":3081.666784286499,"y":1128.9998168945312,"z":"4d1b2427.607d4c","wires":[["a1818b66.74b108","7a2bb1ac.b1704","d7af6553.4f9528"]]},{"id":"a1818b66.74b108","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3302.5281734466553,"y":1121.6109313964844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"7a2bb1ac.b1704","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3297.8612003326416,"y":1154.94424533844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"e5f97be8.5172e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3472.0371227264404,"y":1142.9998044967651,"z":"4d1b2427.607d4c","wires":[]},{"id":"d7af6553.4f9528","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3298.0372066497803,"y":1090.0368957519531,"z":"4d1b2427.607d4c","wires":[["d4ad82c0.f23a2"]]},{"id":"d4ad82c0.f23a2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3478.0372066497803,"y":1088.0368957519531,"z":"4d1b2427.607d4c","wires":[["e5841bea.414a18"]]},{"id":"e5841bea.414a18","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3665.000310897827,"y":1085.6666374206543,"z":"4d1b2427.607d4c","wires":[]},{"id":"1c4a61f3.c2849e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2344.39990234375,"y":1116,"z":"4d1b2427.607d4c","wires":[["cb1b209a.0c898","3cf67218.fc2b9e"]]},{"id":"3cf67218.fc2b9e","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"service-data-network-id\" />\n<parameter name=\"field5\" value=\"`$service-data.networks.network[$nidx].network-id`\" />\n<parameter name=\"field6\" value=\"contrail-route-input-network-id\" />\n<parameter name=\"field7\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\" />\n<parameter name=\"field8\" value=\"`$nidx`\" />","comments":"","outputs":1,"x":2509.0000762939453,"y":1079.0001277923584,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"74060662.5164e8","type":"set","name":"set source-network-found","xml":"<set>\n<parameter name='source-network-found' value='false' />\n\n","comments":"","x":2067.000198364258,"y":1120.0000407099724,"z":"4d1b2427.607d4c","wires":[]},{"id":"4f6aa7ae.9611b8","type":"switchNode","name":"switch source-network-found","xml":"<switch test=\"`$source-network-found`\">\n\n","comments":"","outputs":1,"x":2071.000072479248,"y":1186.000033378601,"z":"4d1b2427.607d4c","wires":[["ef194605.ce8898"]]},{"id":"ef194605.ce8898","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2283.000030517578,"y":1186.0000343322754,"z":"4d1b2427.607d4c","wires":[["465f3356.89525c"]]},{"id":"c7b161a8.2d59d","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$aai.vnf.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":1558,"y":2071,"z":"4d1b2427.607d4c","wires":[["883be9e.f5d5a18","130ed066.b1002"]]},{"id":"883be9e.f5d5a18","type":"other","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1763,"y":2072,"z":"4d1b2427.607d4c","wires":[["eedd883d.4f3368"]]},{"id":"130ed066.b1002","type":"other","name":"outcome other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1763,"y":2103,"z":"4d1b2427.607d4c","wires":[["5b89889f.eedaf8"]]}]
+[{"id":"4c9f1270.94615c","type":"dgstart","name":"DGSTART","outputs":1,"x":150,"y":88,"z":"4d1b2427.607d4c","wires":[["9e2ac2f1.e6e2"]]},{"id":"9e2ac2f1.e6e2","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":256.23807525634766,"y":162.95240020751953,"z":"4d1b2427.607d4c","wires":[["3916a67.a589d5a"]]},{"id":"3916a67.a589d5a","type":"method","name":"contrail-route-topology-operation-assign","xml":"<method rpc='contrail-route-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":257.82152557373047,"y":262.1904363632202,"z":"4d1b2427.607d4c","wires":[["9cfe2b9e.d58558"]]},{"id":"9cfe2b9e.d58558","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":284.4761848449707,"y":375.523784160614,"z":"4d1b2427.607d4c","wires":[["779e03bd.004a6c","b7d6a7d6.406e68","fb26a2b7.6969f","142b08a1.6d8de7","87a2a4c4.087d48","f3613a51.1c26f8","625eb8ab.21f038","6c13aed7.4f039","1836ca82.75ebe5","9f72a1ac.015ab","d634d1d1.89bbb","69c9d3c4.e9707c","bec92482.90ee38","bbe3aaad.4a5568","6bcbfec7.4a61d","62c0d784.f7e3d8","b6d077f3.00bc38","892a2973.dace48","ac3303.d63e3d","866ca1ea.ff3bc","ea795139.b531a","6a318934.66ddc8","783e64a0.ae3edc","cd01ba46.1664d8","1420897.e40c477","1fa15432.96f97c","af7a877d.eb2d78","843930fc.abe98","fac7c328.21b71","6959d8ae.04d098","b5119828.1d53c8","e6eeaa3.150a058","8211864b.caed98","571268e5.730638","96b047c4.679ec8","5e25bd11.a21d44","e2e2a185.95801","5790ccca.f5ea54","c643b552.15d5b8","e9e426fe.b64fd8","be0b4c28.f1b79"]]},{"id":"b7d6a7d6.406e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":519.0002326965332,"y":3227.2144536972046,"z":"4d1b2427.607d4c","wires":[]},{"id":"779e03bd.004a6c","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":547.7541580200195,"y":3199.051257133484,"z":"4d1b2427.607d4c","wires":[]},{"id":"b6d077f3.00bc38","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingCreate' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":584.7542457580566,"y":2376.0512704849243,"z":"4d1b2427.607d4c","wires":[]},{"id":"142b08a1.6d8de7","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":556.7381706237793,"y":325.33333587646484,"z":"4d1b2427.607d4c","wires":[]},{"id":"fb26a2b7.6969f","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.contrail-applied-service-instance-id' value='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.service-instance-id`' />\n<parameter name='tmp.ar.allotted-resource-type' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n\n","comments":"","x":603.9974327087402,"y":291.59260177612305,"z":"4d1b2427.607d4c","wires":[]},{"id":"87a2a4c4.087d48","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":618.9935836791992,"y":357.2315893173218,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"625eb8ab.21f038","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":619.5189018249512,"y":737.4595794677734,"z":"4d1b2427.607d4c","wires":[["b8ba7075.92c81","408b9489.78624c"]]},{"id":"f3613a51.1c26f8","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":591.0649604797363,"y":421.0172395706177,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"b8ba7075.92c81","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":866.8149909973145,"y":732.2673687934875,"z":"4d1b2427.607d4c","wires":[["3a69737a.dd4c0c"]]},{"id":"6bcbfec7.4a61d","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":612.958122253418,"y":2994.291175842285,"z":"4d1b2427.607d4c","wires":[["69575477.9eb00c","215247c4.dbf588"]]},{"id":"69575477.9eb00c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":879.9328575134277,"y":3023.9561338424683,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"215247c4.dbf588","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":874.2662467956543,"y":2992.455969810486,"z":"4d1b2427.607d4c","wires":[["2a4bd3e4.dd179c"]]},{"id":"1a4098bb.aead37","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource. Parent provided resource rolled back\" />\n","comments":"","x":1216.3495788574219,"y":3038.5395822525024,"z":"4d1b2427.607d4c","wires":[]},{"id":"3a69737a.dd4c0c","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1035.8149948120117,"y":730.7672696113586,"z":"4d1b2427.607d4c","wires":[["9399d0e2.ddd51"]]},{"id":"9399d0e2.ddd51","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1246.6722373962402,"y":730.3863987922668,"z":"4d1b2427.607d4c","wires":[["4041d430.f6846c"]]},{"id":"4041d430.f6846c","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1436.005542755127,"y":730.3863568305969,"z":"4d1b2427.607d4c","wires":[["e842b5e7.c19358"]]},{"id":"f17d1c78.92f5f","type":"comment","name":"Save consumed-allotted-resources to mdsal","info":"","comments":"","x":619.2436676025391,"y":2185.3863854408264,"z":"4d1b2427.607d4c","wires":[]},{"id":"efe5ed7c.3b0ae","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":638.8148880004883,"y":704.7672181129456,"z":"4d1b2427.607d4c","wires":[]},{"id":"6c13aed7.4f039","type":"set","name":"set ar-identifiers","xml":"<set>\n<parameter name='ar-identifiers.consuming-service-instance-id' value=\"`$contrail-route-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='ar-identifiers.parent-service-instance-id' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='ar-identifiers.allotted-resource-type' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n","comments":"","x":545.0531158447266,"y":846.2912406921387,"z":"4d1b2427.607d4c","wires":[]},{"id":"306f9e61.b62042","type":"comment","name":"Set allotted-resource-identifiers","info":"","comments":"","x":585.6721267700195,"y":816.6720333099365,"z":"4d1b2427.607d4c","wires":[]},{"id":"892a2973.dace48","type":"set","name":"set identifiers in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.' \nvalue=\"`$ar-identifiers.`\" />\n\n\n","comments":"","x":605.0529861450195,"y":1362.9103206694126,"z":"4d1b2427.607d4c","wires":[]},{"id":"1836ca82.75ebe5","type":"set","name":"set onap model information from input","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.' \nvalue=\"`$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.`\" />\n\n\n","comments":"","x":606.7196884155273,"y":930.2436923980713,"z":"4d1b2427.607d4c","wires":[]},{"id":"9f72a1ac.015ab","type":"switchNode","name":"switch model-invariant-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid'>\n","comments":"","outputs":1,"x":592.9101486206055,"y":965.9578294754028,"z":"4d1b2427.607d4c","wires":[["a386a341.6a5dc"]]},{"id":"a386a341.6a5dc","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":820.0530281066895,"y":967.3863468170166,"z":"4d1b2427.607d4c","wires":[["f68746c1.bc30f8"]]},{"id":"f68746c1.bc30f8","type":"set","name":"set model-invariant-uuid","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-invariant-uuid' \nvalue=\"`$ar-model.invariant-uuid`\" />\n\n\n","comments":"","x":1021.4816017150879,"y":966.8148994445801,"z":"4d1b2427.607d4c","wires":[]},{"id":"d634d1d1.89bbb","type":"switchNode","name":"switch model-uuid is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid'>\n","comments":"","outputs":1,"x":564.3387451171875,"y":1000.2435302734375,"z":"4d1b2427.607d4c","wires":[["41ad333e.6ea4ec"]]},{"id":"41ad333e.6ea4ec","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":765.7673110961914,"y":1000.8149518966675,"z":"4d1b2427.607d4c","wires":[["8577b5de.034978"]]},{"id":"8577b5de.034978","type":"set","name":"set model-uuid","xml":"<set>\n<parameter name='sar.allotted-resource-data.contrail-route-topology.onap-model-information.model-uuid' \nvalue=\"`$ar-model.uuid`\" />\n\n\n","comments":"","x":958.6244697570801,"y":1000.8148736953735,"z":"4d1b2427.607d4c","wires":[]},{"id":"69c9d3c4.e9707c","type":"switchNode","name":"switch model-version is null","xml":"<switch test='$contrail-route-topology-operation-input.allotted-resource-information.onap-model-information.model-version'>\n","comments":"","outputs":1,"x":572.9101486206055,"y":1033.1006574630737,"z":"4d1b2427.607d4c","wires":[["a2183382.79fd3"]]},{"id":"a2183382.79fd3","type":"outcome","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":822.9101295471191,"y":1033.1006422042847,"z":"4d1b2427.607d4c","wires":[["32b5229d.0cab2e"]]},{"id":"32b5229d.0cab2e","type":"set","name":"set model-version","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-version' \nvalue=\"`$ar-model.version`\" />\n\n\n","comments":"","x":1015.767276763916,"y":1033.1006317138672,"z":"4d1b2427.607d4c","wires":[]},{"id":"866ca1ea.ff3bc","type":"switchNode","name":"switch ar-model.onap-generated-naming","xml":"<switch test='`$ar-model.onap-generated-naming`'>\n","comments":"","outputs":1,"x":633.7196960449219,"y":1279.7672176361084,"z":"4d1b2427.607d4c","wires":[["3948bc2f.f77b54","e707f9ff.d5a678"]]},{"id":"3948bc2f.f77b54","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":910.7197341918945,"y":1275.8624358177185,"z":"4d1b2427.607d4c","wires":[["20908a4f.bf6266"]]},{"id":"20908a4f.bf6266","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1079.4697761535645,"y":1276.3624243736267,"z":"4d1b2427.607d4c","wires":[["7b9d654d.5be03c"]]},{"id":"e707f9ff.d5a678","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":901.942024230957,"y":1308.8624358177185,"z":"4d1b2427.607d4c","wires":[["29eade88.e64712"]]},{"id":"29eade88.e64712","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in allotted-resource-model data. Ecomp-generated-naming should be true\" />\n\n","comments":"","x":1079.942024230957,"y":1307.8624358177185,"z":"4d1b2427.607d4c","wires":[]},{"id":"7b9d654d.5be03c","type":"switchNode","name":"switch ar-model.onap-generated-naming","xml":"<switch test='`$ar-model.naming-policy`'>\n","comments":"","outputs":1,"x":1380.7196807861328,"y":1276.433897972107,"z":"4d1b2427.607d4c","wires":[["cef027f.91fdfd8","38b91d73.c94a62"]]},{"id":"cef027f.91fdfd8","type":"other","name":"outcome oam_network_policy","xml":"<outcome value='oam_network_policy'>\n","comments":"","outputs":1,"x":1751.5775146484375,"y":1268.0119352340698,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"38b91d73.c94a62","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1676.338981628418,"y":1300.529139995575,"z":"4d1b2427.607d4c","wires":[["8431f8ba.f08668"]]},{"id":"9b97c321.adf0f","type":"set","name":"set ar_name","xml":"<set>\n<parameter name='tmp.ar-name' value='$TenantName_$CloudRegionID_$TenantNetworkRole_$LandingNetworkRole_policy_' />\n","comments":"","x":2194.100845336914,"y":1256.1009072959423,"z":"4d1b2427.607d4c","wires":[]},{"id":"b38296e4.3c0ea8","type":"execute","name":"execute SliStringUtils - replace $TenantName","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":2294.244155883789,"y":1294.6247834861279,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"52fb7e92.2cea6","type":"execute","name":"execute SliStringUtils - replace LandingNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$LandingNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2302.577407836914,"y":1398.7676134109497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"8431f8ba.f08668","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1981.8626976013184,"y":1302.0053367614746,"z":"4d1b2427.607d4c","wires":[["9b97c321.adf0f","b38296e4.3c0ea8","52fb7e92.2cea6","33d9a65.b86135a","70595e41.23774","d7151a9c.c5a358","b85f95cf.56c518","e6c914ff.bbbeb8","a21ede43.fc3e7"]]},{"id":"33d9a65.b86135a","type":"set","name":"set identifiers.allotted-resource-name","xml":"<set>\n<parameter name='ar-identifiers.allotted-resource-name' value='`$tmp.ar-name`' />\n","comments":"","x":2258.767318725586,"y":1545.3865489661694,"z":"4d1b2427.607d4c","wires":[]},{"id":"ac3303.d63e3d","type":"set","name":"set assignments in overal structure","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' \nvalue=\"`$ar-assignments.`\" />\n\n\n","comments":"","x":593.1960144042969,"y":2152.624861717224,"z":"4d1b2427.607d4c","wires":[]},{"id":"6a318934.66ddc8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.source-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.` \" />\n<parameter name='ar-assignments.dest-network.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.` \" />\n<parameter name='ar-assignments.contrail-applied-service.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.` \" />\n\n\n","comments":"","x":564.529167175293,"y":1399.3863624632359,"z":"4d1b2427.607d4c","wires":[]},{"id":"e9829904.2e77e8","type":"for","name":"for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]","xml":"<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n","comments":"","outputs":1,"x":1498.8155517578125,"y":2260.291075229645,"z":"4d1b2427.607d4c","wires":[["76e1246.58bf5dc"]]},{"id":"bec92482.90ee38","type":"switchNode","name":"switch service-data.consumed-allotted-resources_length","xml":"<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n","comments":"","outputs":1,"x":656.8150024414062,"y":2218.0051369667053,"z":"4d1b2427.607d4c","wires":[["4dce9f0e.197ca","75705eae.125bb"]]},{"id":"4dce9f0e.197ca","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":978.9578857421875,"y":2220.8625588417053,"z":"4d1b2427.607d4c","wires":[["f9d4ed78.b618a"]]},{"id":"75705eae.125bb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":966.9578895568848,"y":2263.862560272217,"z":"4d1b2427.607d4c","wires":[["c55c83ec.31bb6"]]},{"id":"76e1246.58bf5dc","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":1928.9107818603516,"y":2262.3508410453796,"z":"4d1b2427.607d4c","wires":[["d664ab8f.6994a8"]]},{"id":"d664ab8f.6994a8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2133.720748901367,"y":2262.81529378891,"z":"4d1b2427.607d4c","wires":[["67045931.262a78"]]},{"id":"c55c83ec.31bb6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1127.0849800109863,"y":2261.988536834717,"z":"4d1b2427.607d4c","wires":[["e9829904.2e77e8","1d1bc1f0.a72b7e"]]},{"id":"67045931.262a78","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2305.481700897217,"y":2262.6725223064423,"z":"4d1b2427.607d4c","wires":[["354eaed.bcc7f52","3ad061dc.d44dfe"]]},{"id":"f9d4ed78.b618a","type":"set","name":"set cidx","xml":"<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n","comments":"","x":1137.8148574829102,"y":2220.57662153244,"z":"4d1b2427.607d4c","wires":[]},{"id":"354eaed.bcc7f52","type":"set","name":"set tmp.cidx and ctx.consumed-ar","xml":"<set>\n<parameter name='tmp.cidx' value='`$cidx`' />\n<parameter name='ctx.consumed-ar.' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].`' />\n<parameter name='tmp.found-cidx' value='true' />","comments":"","x":2551.339029312134,"y":2263.2439963817596,"z":"4d1b2427.607d4c","wires":[]},{"id":"bbe3aaad.4a5568","type":"set","name":"set consumed allotted resources","xml":"<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n","comments":"","x":580.6723365783691,"y":2308.5766229629517,"z":"4d1b2427.607d4c","wires":[]},{"id":"8d887169.2ecf8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":561.9577674865723,"y":390.6243667602539,"z":"4d1b2427.607d4c","wires":[]},{"id":"6959d8ae.04d098","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.fq-name' value=\"`$tmp.fq-name` \" />\n\n\n\n","comments":"","x":548.6722793579102,"y":2118.196542739868,"z":"4d1b2427.607d4c","wires":[]},{"id":"8665234a.8510b","type":"comment","name":"Add AR to md-sal","info":"","comments":"","x":534.2437210083008,"y":2965.481409072876,"z":"4d1b2427.607d4c","wires":[]},{"id":"62c0d784.f7e3d8","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":535.2434692382812,"y":2343.4815063476562,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e842b5e7.c19358","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Existing contrail route allotted resource\" />\n \n","comments":"","x":1616.33349609375,"y":728.3334121704102,"z":"4d1b2427.607d4c","wires":[]},{"id":"408b9489.78624c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":858.6667938232422,"y":767.3334536552429,"z":"4d1b2427.607d4c","wires":[["94a2f0be.5376d"]]},{"id":"94a2f0be.5376d","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1038.6667442321777,"y":768.0000042915344,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"ea795139.b531a","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":530.6667594909668,"y":771.666675567627,"z":"4d1b2427.607d4c","wires":[]},{"id":"70595e41.23774","type":"execute","name":"execute SliStringUtils - replace $CloudRegionID","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$CloudRegionID\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.cloud-region-id`\"/>\n\n","comments":"","outputs":1,"x":2303.333267211914,"y":1328.6671237945557,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"d7151a9c.c5a358","type":"execute","name":"execute SliStringUtils - replace $TenantNetworkRole","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ar-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-name\"/>\n <parameter name=\"target\" value=\"$TenantNetworkRole\"/>\n <parameter name=\"replacement\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-role`\"/>\n\n","comments":"","outputs":1,"x":2312.6664657592773,"y":1362.6670274734497,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6c914ff.bbbeb8","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2317.3332595825195,"y":1503.333630681038,"z":"4d1b2427.607d4c","wires":[["be6042e3.12db","9ef8ef75.f00ad"]]},{"id":"be6042e3.12db","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2627.047782897949,"y":1506.1907633244991,"z":"4d1b2427.607d4c","wires":[["d59007c0.f67198"]]},{"id":"9ef8ef75.f00ad","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2632.3810272216797,"y":1537.85746383667,"z":"4d1b2427.607d4c","wires":[["b0a81ae7.4dfba8"]]},{"id":"b85f95cf.56c518","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='CONTRAIL_ROUTE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='contrail_route_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CONTRAIL_ROUTE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$tmp.ar-name`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":2279.000259399414,"y":1433.0003308951855,"z":"4d1b2427.607d4c","wires":[]},{"id":"b0a81ae7.4dfba8","type":"set","name":"set tmp.ar-name to generated name","xml":"<set>\n<parameter name='tmp.ar-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":2879.571189880371,"y":1538.3335467875004,"z":"4d1b2427.607d4c","wires":[]},{"id":"d59007c0.f67198","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2800.9047050476074,"y":1505.6192770004272,"z":"4d1b2427.607d4c","wires":[]},{"id":"783e64a0.ae3edc","type":"set","name":"set fq_name","xml":"<set>\n<parameter name='tmp.fq-name' value='$defaultDomain.$defaultProject.$sdncNetworkPolicy' />\n","comments":"","x":548.3332748413086,"y":1478.6666288375854,"z":"4d1b2427.607d4c","wires":[]},{"id":"cd01ba46.1664d8","type":"execute","name":"execute SliStringUtils - replace $defaultDomain","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultDomain\"/>\n <parameter name=\"replacement\" value=\"default-domain\"/>\n\n","comments":"","outputs":1,"x":655.6666259765625,"y":1508.6666717529297,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"1420897.e40c477","type":"execute","name":"execute SliStringUtils - replace $defaultProject","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$defaultProject\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":655.6666564941406,"y":1542.0001125335693,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"467969e2.ea3918","type":"comment","name":"generate fqname","info":"","comments":"","x":557.3333206176758,"y":1451.9999351501465,"z":"4d1b2427.607d4c","wires":[]},{"id":"1fa15432.96f97c","type":"execute","name":"execute SliStringUtils - replace $sdncNetworkPolicy","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.fq-name`\"/>\n <parameter name=\"outputPath\" value=\"tmp.fq-name\"/>\n <parameter name=\"target\" value=\"$sdncNetworkPolicy\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar-name`\"/>\n\n","comments":"","outputs":1,"x":668.9999618530273,"y":1575.333267211914,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"bb5388b.9a34478","type":"comment","name":"Set onap-model-info","info":"","comments":"","x":554.1429672241211,"y":896.5714740753174,"z":"4d1b2427.607d4c","wires":[]},{"id":"af7a877d.eb2d78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$ar-model.invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$ar-model.uuid`\" />\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":568.8571891784668,"y":2474.5715532302856,"z":"4d1b2427.607d4c","wires":[["f49edd24.7f19d","22aa6a43.558c86"]]},{"id":"f49edd24.7f19d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":824.6191215515137,"y":2451.809727668762,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"22aa6a43.558c86","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":829.9285507202148,"y":2487.381145477295,"z":"4d1b2427.607d4c","wires":[["a2554f1f.b50de"]]},{"id":"a2554f1f.b50de","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1039.7143363952637,"y":2453.4287719726562,"z":"4d1b2427.607d4c","wires":[]},{"id":"a21ede43.fc3e7","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"generate-unique-name-input.prefix\" />\n<parameter name=\"field5\" value=\"`$generate-unique-name-input.prefix`\" />","comments":"","outputs":1,"x":2170.2000579833984,"y":1468.0004276931286,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"843930fc.abe98","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":601.5997695922852,"y":1155.3336191177368,"z":"4d1b2427.607d4c","wires":[["f66777d8.98ad18","6a87e5bf.61d96c"]]},{"id":"f66777d8.98ad18","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":952.6000289916992,"y":1153.0001316070557,"z":"4d1b2427.607d4c","wires":[["cde00633.b18cb8"]]},{"id":"6a87e5bf.61d96c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":945.2668228149414,"y":1114.9999265670776,"z":"4d1b2427.607d4c","wires":[["44011184.bdb35"]]},{"id":"b7184182.4959f","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2105.7113876342773,"y":1151.444565474987,"z":"4d1b2427.607d4c","wires":[["1c4a61f3.c2849e"]]},{"id":"fbab815c.672c4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1341.425392150879,"y":1152.0159158706665,"z":"4d1b2427.607d4c","wires":[["140ca41e.1dac4c","97892501.9ff8f8"]]},{"id":"140ca41e.1dac4c","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1630.425392150879,"y":1154.0159769058228,"z":"4d1b2427.607d4c","wires":[["662569df.4978f8"]]},{"id":"97892501.9ff8f8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1610.425392150879,"y":1189.0159769058228,"z":"4d1b2427.607d4c","wires":[["c55a8bab.54c1e8"]]},{"id":"cb1b209a.0c898","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2550.1400508880615,"y":1113.6947317123413,"z":"4d1b2427.607d4c","wires":[["6f669f36.77ecf"]]},{"id":"c55a8bab.54c1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1811.695411682129,"y":1190.5705423355103,"z":"4d1b2427.607d4c","wires":[["b7184182.4959f","74060662.5164e8","4f6aa7ae.9611b8"]]},{"id":"cde00633.b18cb8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1083.7112121582031,"y":1152.4444932937622,"z":"4d1b2427.607d4c","wires":[["fbab815c.672c4"]]},{"id":"44011184.bdb35","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1099.4002304077148,"y":1114.000121831894,"z":"4d1b2427.607d4c","wires":[]},{"id":"662569df.4978f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1820.2001876831055,"y":1152.0001287460327,"z":"4d1b2427.607d4c","wires":[]},{"id":"74a5cd24.86b7f4","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n<parameter name='source-network-found' value='true' />\n\n","comments":"","x":3059.2002391815186,"y":1093.0001211166382,"z":"4d1b2427.607d4c","wires":[]},{"id":"7a4f9f18.b1ca8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2869.2666816711426,"y":1106.00013256073,"z":"4d1b2427.607d4c","wires":[["74a5cd24.86b7f4","d9c31b5a.6a4cd8"]]},{"id":"6f669f36.77ecf","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2719.8002071380615,"y":1112.0000047683716,"z":"4d1b2427.607d4c","wires":[["7a4f9f18.b1ca8"]]},{"id":"465f3356.89525c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2434.5999183654785,"y":1186.0001649856567,"z":"4d1b2427.607d4c","wires":[]},{"id":"23fb5fa1.57992","type":"execute","name":"execute RestApiCallNode - Get Parent service network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-parentnetwork-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=\"parent-net\" />\n\n","comments":"","outputs":1,"x":1549.0000228881836,"y":1704.000186920166,"z":"4d1b2427.607d4c","wires":[["a3fb960c.d85758","fc9d9601.9e18b8"]]},{"id":"a3fb960c.d85758","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1858.2960777282715,"y":1704.8080496788025,"z":"4d1b2427.607d4c","wires":[["ac20b661.d93d88"]]},{"id":"ac20b661.d93d88","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2027.2960815429688,"y":1703.3079504966736,"z":"4d1b2427.607d4c","wires":[["55142221.a74b4c"]]},{"id":"55142221.a74b4c","type":"switchNode","name":"switch network length","xml":"<switch test='`$parent-net.networks.network_length`'>\n","comments":"","outputs":1,"x":2238.1533241271973,"y":1702.9270796775818,"z":"4d1b2427.607d4c","wires":[["66c12173.13d7","d9862bb8.9cb708"]]},{"id":"66c12173.13d7","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2447.4865951538086,"y":1702.9269948005676,"z":"4d1b2427.607d4c","wires":[["a8318bf.731e378"]]},{"id":"68b4c2ed.00f22c","type":"comment","name":"GET dest network from mdsal","info":"","comments":"","x":1494.295997619629,"y":1645.3078532218933,"z":"4d1b2427.607d4c","wires":[]},{"id":"fc9d9601.9e18b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1850.1478805541992,"y":1739.8741345405579,"z":"4d1b2427.607d4c","wires":[["8ccfa208.0193"]]},{"id":"8ccfa208.0193","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":2030.1478309631348,"y":1740.5406851768494,"z":"4d1b2427.607d4c","wires":[["fa75851f.39e8f8"]]},{"id":"fac7c328.21b71","type":"execute","name":"generate parent-network url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-parentnetwork-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":585.0001220703125,"y":450.0000238418579,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"fa75851f.39e8f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing parent netorks\" />\n \n","comments":"","x":2214.999954223633,"y":1742.0001639127731,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9862bb8.9cb708","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2448.999828338623,"y":1738.0000948905945,"z":"4d1b2427.607d4c","wires":[["462e905c.7055"]]},{"id":"462e905c.7055","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: Network id not found. Parent Service should only have one network\" />\n \n","comments":"","x":2615.3278045654297,"y":1737.9472098350525,"z":"4d1b2427.607d4c","wires":[]},{"id":"a8318bf.731e378","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$parent-net.networks.network[0].network-id` \" />\n\n\n\n","comments":"","x":2626.5996856689453,"y":1704.000138759613,"z":"4d1b2427.607d4c","wires":[]},{"id":"d30b861c.434bf8","type":"comment","name":"Find tenant/cloud region from source network","info":"","comments":"","x":631.0000610351562,"y":1120.0000252723694,"z":"4d1b2427.607d4c","wires":[]},{"id":"b5119828.1d53c8","type":"execute","name":"generate contrail-applied-service url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.vnf`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-contrailappliedsvc-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.contrail-applied-service-instance-id`\"/>\n","comments":"","outputs":1,"x":612.200122833252,"y":480.00002574920654,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e6eeaa3.150a058","type":"execute","name":"execute RestApiCallNode - Get vnf","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-contrailappliedsvc-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=\"vnf\" />\n\n","comments":"","outputs":1,"x":598.2000503540039,"y":1835.6668615341187,"z":"4d1b2427.607d4c","wires":[["1fcbedaf.3a00e2","f42d5962.ac9958"]]},{"id":"1fcbedaf.3a00e2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":977.4961700439453,"y":1828.8080359697342,"z":"4d1b2427.607d4c","wires":[["81eaf91d.91f988"]]},{"id":"81eaf91d.91f988","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1146.4961738586426,"y":1827.3079367876053,"z":"4d1b2427.607d4c","wires":[["2ab7fe69.be87a2"]]},{"id":"2ab7fe69.be87a2","type":"switchNode","name":"switch vnf length","xml":"<switch test='`$vnf.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":1357.353416442871,"y":1826.9270659685135,"z":"4d1b2427.607d4c","wires":[["6ae0da83.aaa4f4","f324301e.0d32b"]]},{"id":"6ae0da83.aaa4f4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1548.6869087219238,"y":1820.9270491600037,"z":"4d1b2427.607d4c","wires":[["b98f6f34.959f"]]},{"id":"be2cb9a.2505e48","type":"comment","name":"GET contrail vnf for contrail applied service from mdsal","info":"","comments":"","x":660.8294906616211,"y":1797.6413383483887,"z":"4d1b2427.607d4c","wires":[]},{"id":"f42d5962.ac9958","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":969.347972869873,"y":1863.8741208314896,"z":"4d1b2427.607d4c","wires":[["e17a2bcb.e52fb8"]]},{"id":"e17a2bcb.e52fb8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1149.3479232788086,"y":1864.540671467781,"z":"4d1b2427.607d4c","wires":[["a25cc221.aaa89"]]},{"id":"a25cc221.aaa89","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No existing contrail applied service vnfs\" />\n \n","comments":"","x":1334.2000465393066,"y":1866.0001502037048,"z":"4d1b2427.607d4c","wires":[]},{"id":"f324301e.0d32b","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1550.2001419067383,"y":1856.0001492500305,"z":"4d1b2427.607d4c","wires":[["55da27e9.1a2d18"]]},{"id":"55da27e9.1a2d18","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: vnf id not found. Contrail applied service should only have one vnf\" />\n \n","comments":"","x":1714.5280456542969,"y":1855.9473118782043,"z":"4d1b2427.607d4c","wires":[]},{"id":"b98f6f34.959f","type":"set","name":"set applied service vnf id","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.vnf-id' value=\"`$vnf.vnfs.vnf[0].vnf-id` \" />\n\n\n\n","comments":"","x":1759.8001136779785,"y":1820.0002398490906,"z":"4d1b2427.607d4c","wires":[]},{"id":"c6c2334d.98278","type":"comment","name":"Generate contrail route name","info":"","comments":"","x":583.0000457763672,"y":1244.0000286102295,"z":"4d1b2427.607d4c","wires":[]},{"id":"6add4fcf.7d2a3","type":"comment","name":"GET contrail fqdn from vnf/vf-module","info":"","comments":"","x":613.3333969116211,"y":1938.6669101715088,"z":"4d1b2427.607d4c","wires":[]},{"id":"8211864b.caed98","type":"switchNode","name":"switch contrail-route-request-input.constrail-applied-service-info.contrail-fqdn","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`'>\n","comments":"","outputs":1,"x":719.0000991821289,"y":1980.0002436637878,"z":"4d1b2427.607d4c","wires":[["4525a9a8.0b4468","841c4f89.afe5f"]]},{"id":"4525a9a8.0b4468","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1111.0000648498535,"y":1970.0000656843185,"z":"4d1b2427.607d4c","wires":[["68cb2b70.90a404"]]},{"id":"841c4f89.afe5f","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1093.9999923706055,"y":2007.0000529289246,"z":"4d1b2427.607d4c","wires":[["36215833.3a7f48"]]},{"id":"36215833.3a7f48","type":"set","name":"set applied service fqdn","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn` \" />\n\n\n\n","comments":"","x":1285.0000076293945,"y":2007.000086903572,"z":"4d1b2427.607d4c","wires":[]},{"id":"68cb2b70.90a404","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1297.0000686645508,"y":1970.0000647306442,"z":"4d1b2427.607d4c","wires":[["bf2bb366.b639d","c7b161a8.2d59d"]]},{"id":"54037341.49dacc","type":"comment","name":"GET dest network from parent service","info":"","comments":"","x":603.666618347168,"y":1676.000069618225,"z":"4d1b2427.607d4c","wires":[]},{"id":"571268e5.730638","type":"switchNode","name":"switch contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id","xml":"<switch test='`$contrail-route-topology-operation-input.contrail-route-request-input.dest-network.network-id`'>\n","comments":"","outputs":1,"x":795.0000686645508,"y":1704.0000405311584,"z":"4d1b2427.607d4c","wires":[["8bb9d911.861198","a62ad6dd.907908"]]},{"id":"8bb9d911.861198","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1236.9999771118164,"y":1704.0000402927399,"z":"4d1b2427.607d4c","wires":[["23fb5fa1.57992"]]},{"id":"a62ad6dd.907908","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1218.9999809265137,"y":1737.0000410079956,"z":"4d1b2427.607d4c","wires":[["cddb9071.a0335"]]},{"id":"cddb9071.a0335","type":"set","name":"set dest network id","xml":"<set>\n<parameter name='ar-assignments.dest-network.network-id' value=\"`$contrail-route-request-input.dest-network.network-id` \" />\n\n\n\n","comments":"","x":1410.999942779541,"y":1739.9999961853027,"z":"4d1b2427.607d4c","wires":[]},{"id":"bfe89f13.37b26","type":"comment","name":"GET contrail fqdn via AAI","info":"","comments":"","x":1550.2000579833984,"y":1933.9999685287476,"z":"4d1b2427.607d4c","wires":[]},{"id":"bf2bb366.b639d","type":"get-resource","name":"get-resource generic-vnf","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $ar-assignments.contrail-applied-service.vnf-id\"\n pfx='aai.vnf' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1560.2000579833984,"y":1969.9999694824219,"z":"4d1b2427.607d4c","wires":[["358e578d.2fd368","1096a3e1.ecde4c"]]},{"id":"1096a3e1.ecde4c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1762.8396644592285,"y":1998.805338382721,"z":"4d1b2427.607d4c","wires":[["1005d67c.37828a"]]},{"id":"1005d67c.37828a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving vnf from AAI\" />\n","comments":"","x":1938.7918891906738,"y":2002.1386723518372,"z":"4d1b2427.607d4c","wires":[]},{"id":"358e578d.2fd368","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1765.3394889831543,"y":1968.8054161071777,"z":"4d1b2427.607d4c","wires":[["e73bb580.fac7b8"]]},{"id":"e73bb580.fac7b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Vnf not found in AAI\" />\n","comments":"","x":1933.117374420166,"y":1968.110846042633,"z":"4d1b2427.607d4c","wires":[]},{"id":"6ad7fa83.050644","type":"comment","name":"Loop through vf modeuls looking for contrail fqdn","info":"","comments":"","x":1633.8667068481445,"y":2038.333501815796,"z":"4d1b2427.607d4c","wires":[]},{"id":"57a1c09e.69c79","type":"comment","name":"Update AAI AR","info":"","comments":"","x":532.2000465393066,"y":2437.999997138977,"z":"4d1b2427.607d4c","wires":[]},{"id":"96b047c4.679ec8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":674.2001609802246,"y":2570.0002641677856,"z":"4d1b2427.607d4c","wires":[["c1fb6c5e.e721a","e74826b3.4d8b38","d137df8f.0037a"]]},{"id":"c1fb6c5e.e721a","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":996.5081787109375,"y":2614.9984817504883,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"e74826b3.4d8b38","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":987.508228302002,"y":2583.498507499695,"z":"4d1b2427.607d4c","wires":[["dd5d09e6.0f8e48"]]},{"id":"d137df8f.0037a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":991.2582664489746,"y":2553.855612374842,"z":"4d1b2427.607d4c","wires":[["a297dd7b.aa05c"]]},{"id":"dd5d09e6.0f8e48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1157.2582664489746,"y":2584.2485313415527,"z":"4d1b2427.607d4c","wires":[]},{"id":"a297dd7b.aa05c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1132.914234161377,"y":2550.0477815642953,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c332fe05.c3ade","type":"comment","name":"Put the parent allotted resource in mdsal","info":"","comments":"","x":601.2001266479492,"y":2538.0000896453857,"z":"4d1b2427.607d4c","wires":[]},{"id":"1d1bc1f0.a72b7e","type":"switchNode","name":"switch tmp.found-cidx","xml":"<switch test='`$tmp.found-cidx`'>\n","comments":"","outputs":1,"x":1316.2000274658203,"y":2294.000059604645,"z":"4d1b2427.607d4c","wires":[["65d66863.2a8258"]]},{"id":"65d66863.2a8258","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1506.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["762eafdc.0bdf2"]]},{"id":"762eafdc.0bdf2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1672.1999816894531,"y":2293.99999666214,"z":"4d1b2427.607d4c","wires":[["63da8f53.b089c"]]},{"id":"63da8f53.b089c","type":"set","name":"set tmp.cidx ","xml":"<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n","comments":"","x":1918.0573101043701,"y":2294.5714707374573,"z":"4d1b2427.607d4c","wires":[]},{"id":"3ad061dc.d44dfe","type":"break","name":"break","xml":"<break>\n","comments":"","x":2468.199981689453,"y":2291.99999666214,"z":"4d1b2427.607d4c","wires":[]},{"id":"5e25bd11.a21d44","type":"execute","name":"generate parent-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":656.2001876831055,"y":512.0000591278076,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e2e2a185.95801","type":"execute","name":"generate parent-ar url - replace allotted-resource-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":661.2000579833984,"y":547.0000600814819,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"3111d761.5e06d8","type":"execute","name":"execute RestApiCallNode - Update parent provided service AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-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='DELETE' />\n <parameter name=\"responsePrefix\" value=\"parent\" />\n\n","comments":"","outputs":1,"x":1373.333595275879,"y":3004.3333768844604,"z":"4d1b2427.607d4c","wires":[["7e416b6f.40fa64","cdcc7917.56abb8","8bd6f68b.5ef6b8"]]},{"id":"521d8bd0.fa7014","type":"comment","name":"Rollback parent","info":"","comments":"","x":1217.3335227966309,"y":2974.000007390976,"z":"4d1b2427.607d4c","wires":[]},{"id":"2a4bd3e4.dd179c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1026.0001258850098,"y":3003.6666803359985,"z":"4d1b2427.607d4c","wires":[["3111d761.5e06d8","1a4098bb.aead37"]]},{"id":"7e416b6f.40fa64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1744.64164352417,"y":3064.998343229294,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"cdcc7917.56abb8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1735.6416931152344,"y":3033.4983689785004,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"8bd6f68b.5ef6b8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1739.391731262207,"y":3003.8554738536477,"z":"4d1b2427.607d4c","wires":[["3c400d0a.33bc62"]]},{"id":"3c400d0a.33bc62","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1881.0476989746094,"y":3000.047643043101,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"5790ccca.f5ea54","type":"execute","name":"generate network-ar url - replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.network-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n","comments":"","outputs":1,"x":663.0000228881836,"y":581.9999942779541,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"c643b552.15d5b8","type":"execute","name":"generate network-ar url - replace network-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-ar-url\"/>\n <parameter name=\"target\" value=\"{network-id}\"/>\n <parameter name=\"replacement\" value=\"`$ar-assignments.dest-network.network-id`\"/>\n","comments":"","outputs":1,"x":608.3334274291992,"y":2757.333106994629,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"e9e426fe.b64fd8","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-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=\"net-ar\" />\n\n","comments":"","outputs":1,"x":669.0000686645508,"y":2789.332983970642,"z":"4d1b2427.607d4c","wires":[["5fedcca8.21af14","b88ee5a.8fd2218","945ef6e1.dc3458"]]},{"id":"b88ee5a.8fd2218","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1076.3081321716309,"y":2790.9985933303833,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"945ef6e1.dc3458","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1068.9748420715332,"y":2826.165051460266,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"5fedcca8.21af14","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1071.0581665039062,"y":2756.5221377387643,"z":"4d1b2427.607d4c","wires":[["758f2d97.6a46a4"]]},{"id":"758f2d97.6a46a4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1242.7140617370605,"y":2761.047921180725,"z":"4d1b2427.607d4c","wires":[["47bc6f66.279f","aed7c269.f7e95"]]},{"id":"5b0d4b89.fa37f4","type":"comment","name":"Add AR to parent network allotted resource from mdsal","info":"","comments":"","x":636.9999618530273,"y":2717.6666049957275,"z":"4d1b2427.607d4c","wires":[]},{"id":"aed7c269.f7e95","type":"switchNode","name":"switch net-ar_length","xml":"<switch test='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`'>\n","comments":"","outputs":1,"x":1469.3332176208496,"y":2800.3330936431885,"z":"4d1b2427.607d4c","wires":[["28ec3cfa.5c9964","d62a83f8.5e709"]]},{"id":"561e5c25.cb8074","type":"for","name":"for nidx..net-ar[]","xml":"<for index='nidx' start='0' end='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' >\n","comments":"","outputs":1,"x":2187.6666717529297,"y":2821.3331003189087,"z":"4d1b2427.607d4c","wires":[["a35b9203.161d8"]]},{"id":"28ec3cfa.5c9964","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1752.1422843933105,"y":2755.9044466018677,"z":"4d1b2427.607d4c","wires":[["e0cae091.f6ab5"]]},{"id":"d62a83f8.5e709","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1733.8089332580566,"y":2829.571165084839,"z":"4d1b2427.607d4c","wires":[["8d766915.255368"]]},{"id":"a35b9203.161d8","type":"switchNode","name":"switch allotted-resource-id","xml":"<switch test=\"`$net-ar.network-provided-allotted-resources.network-provided-ar-id[$nidx] == $tmp.ar.allotted-resource-id`\">\n\n","comments":"","outputs":1,"x":2412.761730194092,"y":2828.3930258750916,"z":"4d1b2427.607d4c","wires":[["bc858023.6898d"]]},{"id":"bc858023.6898d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2595.905242919922,"y":2823.857072353363,"z":"4d1b2427.607d4c","wires":[["f4a2c79.aa6a338"]]},{"id":"8d766915.255368","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1936.2693977355957,"y":2832.36363363266,"z":"4d1b2427.607d4c","wires":[["561e5c25.cb8074","3cebc33.7bab73c"]]},{"id":"f4a2c79.aa6a338","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2762.6662063598633,"y":2825.3809678554535,"z":"4d1b2427.607d4c","wires":[["e9b23d6.001eac","c26f5049.d1dee"]]},{"id":"a0f4304a.2addd","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2366.7178077697754,"y":2865.041989326477,"z":"4d1b2427.607d4c","wires":[["907c3bfc.fa31a8"]]},{"id":"907c3bfc.fa31a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2536.0509071350098,"y":2863.3752422332764,"z":"4d1b2427.607d4c","wires":[["f4d721f4.46f46","fe096059.4ee75","3c945468.bd2a2c"]]},{"id":"f4d721f4.46f46","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.nidx' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length`' />\n","comments":"","x":2741.9081535339355,"y":2868.946853160858,"z":"4d1b2427.607d4c","wires":[]},{"id":"6922d49.4d4892c","type":"comment","name":"allotted resource already exists- no op","info":"","comments":"","x":2457.999900817871,"y":2679.333148956299,"z":"4d1b2427.607d4c","wires":[]},{"id":"3cebc33.7bab73c","type":"switchNode","name":"switch tmp.found-nidx","xml":"<switch test='`$tmp.found-nidx`'>\n","comments":"","outputs":1,"x":2196.717716217041,"y":2863.375160217285,"z":"4d1b2427.607d4c","wires":[["a0f4304a.2addd"]]},{"id":"e9b23d6.001eac","type":"set","name":"set tmp.nidx ","xml":"<set>\n<parameter name='tmp.found-nidx' value='true' />","comments":"","x":2974.6665992736816,"y":2816.6662435531616,"z":"4d1b2427.607d4c","wires":[]},{"id":"c26f5049.d1dee","type":"break","name":"break","xml":"<break>\n","comments":"","x":2961.860704421997,"y":2850.0894327163696,"z":"4d1b2427.607d4c","wires":[]},{"id":"fe096059.4ee75","type":"execute","name":"execute RestApiCallNode - Update parent network provided AR","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.network-ar.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.network-ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"p-network-ar\" />\n\n","comments":"","outputs":1,"x":2909.0000190734863,"y":2934.6661834716797,"z":"4d1b2427.607d4c","wires":[["409657f3.cf5e98","c70db172.aebc4","8859496f.d9d998"]]},{"id":"8859496f.d9d998","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3251.9999656677246,"y":2980.999610900879,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"c70db172.aebc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3243.000015258789,"y":2949.4996366500854,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"409657f3.cf5e98","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3246.7500534057617,"y":2919.856741525233,"z":"4d1b2427.607d4c","wires":[["34c49998.798456"]]},{"id":"34c49998.798456","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":3431.739345550537,"y":2916.0488624572754,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"47bc6f66.279f","type":"set","name":"set tmp.found-nidx = false","xml":"<set>\n<parameter name='tmp.found-nidx' value='false' />","comments":"","x":1485.9999809265137,"y":2730.6669635772705,"z":"4d1b2427.607d4c","wires":[]},{"id":"3c945468.bd2a2c","type":"set","name":"set length","xml":"<set>\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value='`$net-ar.network-provided-allotted-resources.network-provided-ar-id_length + 1`' />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[$tmp.nidx]' value=\"`$tmp.ar.allotted-resource-id`\" />\n","comments":"","x":2736.666305541992,"y":2903.000112056732,"z":"4d1b2427.607d4c","wires":[]},{"id":"e917600f.4f7d7","type":"set","name":"set new network-provided-ar","xml":"<set>\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id_length' value=\"1\" />\n<parameter name='net-ar.network-provided-allotted-resources.network-provided-ar-id[0]' value=\"`$tmp.ar.allotted-resource-id`\" />\n\n\n\n\n","comments":"","x":2252.999351501465,"y":2759.285076737404,"z":"4d1b2427.607d4c","wires":[]},{"id":"e0cae091.f6ab5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1949.6670188903809,"y":2755.9993057250977,"z":"4d1b2427.607d4c","wires":[["e917600f.4f7d7","fe096059.4ee75"]]},{"id":"ed6517f4.b8f3b8","type":"comment","name":"Other Rollbacks? ","info":"","comments":"","x":1222.999870300293,"y":3065.9997520446777,"z":"4d1b2427.607d4c","wires":[]},{"id":"5b89889f.eedaf8","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$aai.vnf.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1975.1585693359375,"y":2104.26904296875,"z":"4d1b2427.607d4c","wires":[["c9284eeb.d1eb5"]]},{"id":"471bc9f6.bff138","type":"break","name":"break","xml":"<break>\n","comments":"","x":2854.730155944824,"y":2168.507378578186,"z":"4d1b2427.607d4c","wires":[]},{"id":"c9284eeb.d1eb5","type":"switchNode","name":"switch contrail-service-instance-fqdn","xml":"<switch test='`$aai-vf-module.contrail-service-instance-fqdn`'>\n","comments":"","outputs":1,"x":2258.66650390625,"y":2104.999755859375,"z":"4d1b2427.607d4c","wires":[["b136ca44.5724a8","ed24b238.48ffb"]]},{"id":"eedd883d.4f3368","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"VF Module not found in AAI\" />\n","comments":"","x":1956.61083984375,"y":2071.97216796875,"z":"4d1b2427.607d4c","wires":[]},{"id":"b136ca44.5724a8","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":2538.66650390625,"y":2106.3330078125,"z":"4d1b2427.607d4c","wires":[["b5e70f0a.b42d"]]},{"id":"ed24b238.48ffb","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2520.6665077209473,"y":2139.3330085277557,"z":"4d1b2427.607d4c","wires":[["322afc54.4f0194"]]},{"id":"b5e70f0a.b42d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2695.3334197998047,"y":2104.666417121887,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"322afc54.4f0194","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2701.9997482299805,"y":2136.333013534546,"z":"4d1b2427.607d4c","wires":[["471bc9f6.bff138","caad7e17.7d471"]]},{"id":"caad7e17.7d471","type":"set","name":"set applied service fqdn","xml":"<set>\n<parameter name='ar-assignments.contrail-applied-service.contrail-fqdn' value=\"`$aai-vf-module.contrail-service-instance-fqdn` \" />\n\n\n\n","comments":"","x":2913.3330078125,"y":2135.6666259765625,"z":"4d1b2427.607d4c","wires":[]},{"id":"be0b4c28.f1b79","type":"switchNode","name":"switch ar-assignments.contrail-applied-service.contrail-fqdn","xml":"<switch test='`$ar-assignments.contrail-applied-service.contrail-fqdn`'>\n","comments":"","outputs":1,"x":672.0000610351562,"y":2053.6666259765625,"z":"4d1b2427.607d4c","wires":[["214426a4.7d2d2a"]]},{"id":"214426a4.7d2d2a","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1000.6667442321777,"y":2054.333152294159,"z":"4d1b2427.607d4c","wires":[["9fbe5884.aaa628"]]},{"id":"9fbe5884.aaa628","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error: No vf-module with contrail-service-instance-fqdn found in AAI\" />\n \n","comments":"","x":1176.6666259765625,"y":2052.66650390625,"z":"4d1b2427.607d4c","wires":[]},{"id":"68ea4ba9.f086b4","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":650.666618347168,"y":90.99999618530273,"z":"4d1b2427.607d4c","wires":[]},{"id":"d9c31b5a.6a4cd8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":3081.666784286499,"y":1128.9998168945312,"z":"4d1b2427.607d4c","wires":[["a1818b66.74b108","7a2bb1ac.b1704","d7af6553.4f9528"]]},{"id":"a1818b66.74b108","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3302.5281734466553,"y":1121.6109313964844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"7a2bb1ac.b1704","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3297.8612003326416,"y":1154.94424533844,"z":"4d1b2427.607d4c","wires":[["e5f97be8.5172e8"]]},{"id":"e5f97be8.5172e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3472.0371227264404,"y":1142.9998044967651,"z":"4d1b2427.607d4c","wires":[]},{"id":"d7af6553.4f9528","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3298.0372066497803,"y":1090.0368957519531,"z":"4d1b2427.607d4c","wires":[["d4ad82c0.f23a2"]]},{"id":"d4ad82c0.f23a2","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3478.0372066497803,"y":1088.0368957519531,"z":"4d1b2427.607d4c","wires":[["e5841bea.414a18"]]},{"id":"e5841bea.414a18","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3665.000310897827,"y":1085.6666374206543,"z":"4d1b2427.607d4c","wires":[]},{"id":"1c4a61f3.c2849e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2344.39990234375,"y":1116,"z":"4d1b2427.607d4c","wires":[["cb1b209a.0c898","3cf67218.fc2b9e"]]},{"id":"3cf67218.fc2b9e","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"tmp.ar-name=\"/>\n<parameter name=\"field3\" value=\"`$tmp.ar-name`\"/>\n<parameter name=\"field4\" value=\"service-data-network-id\" />\n<parameter name=\"field5\" value=\"`$service-data.networks.network[$nidx].network-id`\" />\n<parameter name=\"field6\" value=\"contrail-route-input-network-id\" />\n<parameter name=\"field7\" value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.source-network.network-id`\" />\n<parameter name=\"field8\" value=\"`$nidx`\" />","comments":"","outputs":1,"x":2509.0000762939453,"y":1079.0001277923584,"z":"4d1b2427.607d4c","wires":[[]]},{"id":"74060662.5164e8","type":"set","name":"set source-network-found","xml":"<set>\n<parameter name='source-network-found' value='false' />\n\n","comments":"","x":2067.000198364258,"y":1120.0000407099724,"z":"4d1b2427.607d4c","wires":[]},{"id":"4f6aa7ae.9611b8","type":"switchNode","name":"switch source-network-found","xml":"<switch test=\"`$source-network-found`\">\n\n","comments":"","outputs":1,"x":2071.000072479248,"y":1186.000033378601,"z":"4d1b2427.607d4c","wires":[["ef194605.ce8898"]]},{"id":"ef194605.ce8898","type":"outcomeTrue","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2283.000030517578,"y":1186.0000343322754,"z":"4d1b2427.607d4c","wires":[["465f3356.89525c"]]},{"id":"c7b161a8.2d59d","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$aai.vnf.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":1558,"y":2071,"z":"4d1b2427.607d4c","wires":[["883be9e.f5d5a18","130ed066.b1002"]]},{"id":"883be9e.f5d5a18","type":"other","name":"outcome null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1763,"y":2072,"z":"4d1b2427.607d4c","wires":[["eedd883d.4f3368"]]},{"id":"130ed066.b1002","type":"other","name":"outcome other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1763,"y":2103,"z":"4d1b2427.607d4c","wires":[["5b89889f.eedaf8"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json
index ec1de4ea..4c39f384 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.json
@@ -1 +1 @@
-[{"id":"977f53d.3ee9fb","type":"dgstart","name":"DGSTART","outputs":1,"x":107,"y":51,"z":"5f90649b.a6618c","wires":[["f60ed586.79f2e8"]]},{"id":"f60ed586.79f2e8","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":253.2380828857422,"y":125.95239353179932,"z":"5f90649b.a6618c","wires":[["7ed7da9d.6e2b64"]]},{"id":"7ed7da9d.6e2b64","type":"method","name":"contrail-route-topology-operation-create","xml":"<method rpc='contrail-route-topology-operation-create' mode='sync'>\n","comments":"","outputs":1,"x":333.1548500061035,"y":195.1904420852661,"z":"5f90649b.a6618c","wires":[["56f7100c.36c0c"]]},{"id":"56f7100c.36c0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":241.4761848449707,"y":338.523784160614,"z":"5f90649b.a6618c","wires":[["9e479a64.54c188","e3448fe7.bd93a","8da0a386.68f65","9aff23ea.c5706","14b94fc4.c4f09","98b3a116.8663e","15a1d923.552617","d9a64061.5a09f","8dd7a6c4.f97498","4c8c7d6c.390284","2f8ea3d3.25d61c","df03f36f.1c4a","c6e8d07f.0b15c","21f56f54.bd659","c191a157.b6674","f0fa32bd.ad602","9525be20.92483","63945192.1184c","dcc82b6d.bd0448","3fc1cd7b.ce8842","7ce279cd.dfcc18","84f94150.403b","674f14d2.772d8c","fa1647e6.8bb8f8"]]},{"id":"e3448fe7.bd93a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":439.7144775390625,"y":2006.7268590070307,"z":"5f90649b.a6618c","wires":[]},{"id":"9e479a64.54c188","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":468.4683837890625,"y":1969.182652387768,"z":"5f90649b.a6618c","wires":[]},{"id":"4c8c7d6c.390284","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":501.8017692565918,"y":1841.563532743603,"z":"5f90649b.a6618c","wires":[]},{"id":"9aff23ea.c5706","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":503.7380561828613,"y":312.3333215713501,"z":"5f90649b.a6618c","wires":[]},{"id":"8da0a386.68f65","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":550.9973297119141,"y":278.5925884246826,"z":"5f90649b.a6618c","wires":[]},{"id":"14b94fc4.c4f09","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":565.4219818115234,"y":348.23153495788574,"z":"5f90649b.a6618c","wires":[[]]},{"id":"15a1d923.552617","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":583.8520965576172,"y":519.7928762435913,"z":"5f90649b.a6618c","wires":[["a2f6a7ce.665958","f3b38cd6.2e6e6"]]},{"id":"98b3a116.8663e","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":538.0648651123047,"y":404.01720237731934,"z":"5f90649b.a6618c","wires":[[]]},{"id":"a2f6a7ce.665958","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":825.8148498535156,"y":517.2673225402832,"z":"5f90649b.a6618c","wires":[["20f015d.23979ea"]]},{"id":"d9a64061.5a09f","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":519.0769958496094,"y":1926.0893211364746,"z":"5f90649b.a6618c","wires":[["c10dc6ee.696618","805abac4.a6c908","3cb9e4ff.c3e14c"]]},{"id":"c10dc6ee.696618","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":801.8849945068359,"y":1961.9445136152208,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"805abac4.a6c908","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":792.8850440979004,"y":1930.4445393644273,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"3cb9e4ff.c3e14c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":796.635082244873,"y":1900.8016442395747,"z":"5f90649b.a6618c","wires":[["993aa5dc.bb4718"]]},{"id":"950a7649.40f1f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":962.635082244873,"y":1931.1945632062852,"z":"5f90649b.a6618c","wires":[]},{"id":"20f015d.23979ea","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":994.8148536682129,"y":515.7672233581543,"z":"5f90649b.a6618c","wires":[["729d2c16.7a05d4"]]},{"id":"729d2c16.7a05d4","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1205.6720962524414,"y":515.3863525390625,"z":"5f90649b.a6618c","wires":[["2012dd5e.936ac2","ea94432e.31d92"]]},{"id":"2012dd5e.936ac2","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1395.0054016113281,"y":515.3863105773926,"z":"5f90649b.a6618c","wires":[["976ad675.132198"]]},{"id":"f33b796d.cb9ac8","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1868.1962203979492,"y":478.62452602386475,"z":"5f90649b.a6618c","wires":[]},{"id":"976ad675.132198","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1579.529291152954,"y":512.2911443710327,"z":"5f90649b.a6618c","wires":[["f33b796d.cb9ac8","20c37c8e.57cb74"]]},{"id":"26a328fb.e4fd48","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":593.8147926330566,"y":483.7672119140625,"z":"5f90649b.a6618c","wires":[]},{"id":"f0fa32bd.ad602","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"`$contrailResp.network-policy.uuid`\" />\n\n\n\n","comments":"","x":523.6721115112305,"y":1402.565318107605,"z":"5f90649b.a6618c","wires":[]},{"id":"20c37c8e.57cb74","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1956.0532722473145,"y":445.4340181350708,"z":"5f90649b.a6618c","wires":[]},{"id":"aa784c84.13ef8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":508.9576530456543,"y":377.62435245513916,"z":"5f90649b.a6618c","wires":[]},{"id":"993aa5dc.bb4718","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":938.2910499572754,"y":1896.9938134290278,"z":"5f90649b.a6618c","wires":[[]]},{"id":"8dd7a6c4.f97498","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":450.95776748657227,"y":1874.6602372266352,"z":"5f90649b.a6618c","wires":[[]]},{"id":"19d401c8.5d312e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1545.3337326049805,"y":600.0000534057617,"z":"5f90649b.a6618c","wires":[]},{"id":"f3b38cd6.2e6e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":817.6666526794434,"y":552.3334074020386,"z":"5f90649b.a6618c","wires":[["2dce5d4a.489092"]]},{"id":"2dce5d4a.489092","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":997.6666030883789,"y":552.9999580383301,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"2f8ea3d3.25d61c","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":490.5238265991211,"y":557.8095149993896,"z":"5f90649b.a6618c","wires":[]},{"id":"ea94432e.31d92","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1383.3333549499512,"y":552.6666707992554,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"63945192.1184c","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":547.3810729980469,"y":1208.9765033721924,"z":"5f90649b.a6618c","wires":[]},{"id":"ea06c71e.efa318","type":"comment","name":"Call contrail api here","info":"","comments":"","x":491.0477752685547,"y":1175.643006324768,"z":"5f90649b.a6618c","wires":[]},{"id":"228d2ac3.140ba6","type":"comment","name":"Rollback - rollback contrail/AAI","info":"","comments":"","x":1175.8573608398438,"y":1136.0477056503296,"z":"5f90649b.a6618c","wires":[]},{"id":"eb7db965.cffa68","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":497.76202392578125,"y":1611.2262735366821,"z":"5f90649b.a6618c","wires":[]},{"id":"21f56f54.bd659","type":"save","name":"save AnAI - network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-policy-id\" value=\"`$ar-assignments.contrail-id`\" />\n<parameter name=\"network-policy-fqdn\" value=\"`$ar-assignments.fq-name`\" />\n\n\n","comments":"","outputs":1,"x":513.1389083862305,"y":1648.2938385009766,"z":"5f90649b.a6618c","wires":[["52e636d7.8ebb58","ed317c2.86ca38"]]},{"id":"244a6c17.3e21d4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":985.4844169616699,"y":1638.575451850891,"z":"5f90649b.a6618c","wires":[]},{"id":"52e636d7.8ebb58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.9130249023438,"y":1637.5911893844604,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"ed317c2.86ca38","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":760.7225227355957,"y":1667.06760597229,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"801bff7e.fbad5","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":613.6666259765625,"y":49.33332824707031,"z":"5f90649b.a6618c","wires":[]},{"id":"c191a157.b6674","type":"execute","name":"execute Contrail API create network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='create' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":552.0000915527344,"y":1291.8338508605957,"z":"5f90649b.a6618c","wires":[["7a90fc8f.31cf84","1476872f.65dcf9"]]},{"id":"7a90fc8f.31cf84","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.380973815918,"y":1259.976146850735,"z":"5f90649b.a6618c","wires":[["e7e4be16.a7a45"]]},{"id":"1476872f.65dcf9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":831.4762954711914,"y":1292.976086616516,"z":"5f90649b.a6618c","wires":[["44b885c3.5934bc"]]},{"id":"df03f36f.1c4a","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":554.0000457763672,"y":764.0001230239868,"z":"5f90649b.a6618c","wires":[["69c55b4f.8054f4","6060b3b1.b4008c"]]},{"id":"69c55b4f.8054f4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":910.0002632141113,"y":762.6665024757385,"z":"5f90649b.a6618c","wires":[["74dfd12.49de63"]]},{"id":"6060b3b1.b4008c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":905.6670799255371,"y":725.6663026809692,"z":"5f90649b.a6618c","wires":[["1ff80c0f.023764"]]},{"id":"7a681aef.92f704","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2045.4450378417969,"y":802.4442802667618,"z":"5f90649b.a6618c","wires":[["ddb4759b.c74ba8"]]},{"id":"58522d88.a159a4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1301.825698852539,"y":762.6823296546936,"z":"5f90649b.a6618c","wires":[["a0f9f28f.3a11d","62f8d43d.6ff0ac"]]},{"id":"a0f9f28f.3a11d","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1590.825698852539,"y":764.6823906898499,"z":"5f90649b.a6618c","wires":[["6eb4b765.2bcfe8"]]},{"id":"62f8d43d.6ff0ac","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1570.825698852539,"y":799.6823906898499,"z":"5f90649b.a6618c","wires":[["e7594b36.af86f8"]]},{"id":"e7594b36.af86f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1775.4290008544922,"y":803.5702644586563,"z":"5f90649b.a6618c","wires":[["7a681aef.92f704"]]},{"id":"74dfd12.49de63","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1044.1115188598633,"y":763.1109070777893,"z":"5f90649b.a6618c","wires":[["58522d88.a159a4"]]},{"id":"1ff80c0f.023764","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1059.8005447387695,"y":726.3332052230835,"z":"5f90649b.a6618c","wires":[]},{"id":"6eb4b765.2bcfe8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1783.9337768554688,"y":764.9998508691788,"z":"5f90649b.a6618c","wires":[]},{"id":"7cbfe81d.55cd18","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":591.4003677368164,"y":730.6664390563965,"z":"5f90649b.a6618c","wires":[]},{"id":"ddb4759b.c74ba8","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2337.9998474121094,"y":799.3334070444107,"z":"5f90649b.a6618c","wires":[["f4eec0e2.b336a","e74ffe1b.ee527"]]},{"id":"831dcdf8.8c4d9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2877.666519165039,"y":789.3333841562271,"z":"5f90649b.a6618c","wires":[]},{"id":"1f3c5039.cf476","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2687.732961654663,"y":802.3333956003189,"z":"5f90649b.a6618c","wires":[["831dcdf8.8c4d9","3e513116.e80b7e"]]},{"id":"f4eec0e2.b336a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2532.2663383483887,"y":802.3332582712173,"z":"5f90649b.a6618c","wires":[["1f3c5039.cf476"]]},{"id":"e74ffe1b.ee527","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2533.065948486328,"y":840.3332611322403,"z":"5f90649b.a6618c","wires":[["cce762b8.5727a"]]},{"id":"cce762b8.5727a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2711.066104888916,"y":840.3333269357681,"z":"5f90649b.a6618c","wires":[]},{"id":"3e513116.e80b7e","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2900.1330642700195,"y":825.3330799341202,"z":"5f90649b.a6618c","wires":[["dfe3bd23.975b8","7f907bb.cc18a84","324872c7.f43eee"]]},{"id":"dfe3bd23.975b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3120.994453430176,"y":817.9441944360733,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"7f907bb.cc18a84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3116.327480316162,"y":851.2775083780289,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"ddb43474.5e2fc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3290.503402709961,"y":839.3330675363541,"z":"5f90649b.a6618c","wires":[]},{"id":"324872c7.f43eee","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3116.503486633301,"y":786.370158791542,"z":"5f90649b.a6618c","wires":[["19595da5.86cf22"]]},{"id":"19595da5.86cf22","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3296.503486633301,"y":784.370158791542,"z":"5f90649b.a6618c","wires":[["9bf595b1.bf70f8"]]},{"id":"9bf595b1.bf70f8","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3483.4665908813477,"y":781.9999004602432,"z":"5f90649b.a6618c","wires":[]},{"id":"c6e8d07f.0b15c","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":500.4287109375,"y":1747.6073377132416,"z":"5f90649b.a6618c","wires":[["4c9be32.4622c1c","58211de1.fa28b4"]]},{"id":"4c9be32.4622c1c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.1906051635742,"y":1724.8455572128296,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"58211de1.fa28b4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":761.5000343322754,"y":1760.4169750213623,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"3ee10ac5.6c52d6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":971.2858200073242,"y":1726.4646015167236,"z":"5f90649b.a6618c","wires":[]},{"id":"a5f87574.e494f8","type":"comment","name":"Update AAI AR","info":"","comments":"","x":456.62871170043945,"y":1716.7500885389745,"z":"5f90649b.a6618c","wires":[]},{"id":"44b885c3.5934bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":991.381103515625,"y":1292.309534072876,"z":"5f90649b.a6618c","wires":[]},{"id":"9525be20.92483","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.contrail-route-topology-operation-create\"/>\n<parameter name='field3' value='network-policy' />\n<parameter name='field4' value='create' />\n<parameter name='field5' value='contrailResp' />\n<parameter name='field6' value='default-domain' />\n<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='field8' value='`$tmp.ar.tenant-name`' />\n<parameter name='field9' value='`$ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`' />\n<parameter name='field10' value='$aai.dest-network.contrail-network-fqdn' />\n<parameter name='field11' value='$aai.src-network.contrail-network-fqdn' />\n<parameter name='field12' value='&lt;&gt;' />\n<parameter name='field13' value='$tmp.ar.cloud-region-id' />\n\n\n","comments":"","outputs":1,"x":440.09527587890625,"y":1261.595251083374,"z":"5f90649b.a6618c","wires":[[]]},{"id":"c2b56ee4.19d0f","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":836.2857666015625,"y":841.9288463592529,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"84f94150.403b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":564.9126892089844,"y":849.4611072540283,"z":"5f90649b.a6618c","wires":[["d00661cb.d83c8","c2b56ee4.19d0f","bf39102b.a9daa"]]},{"id":"d00661cb.d83c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":829.0078735351562,"y":876.4134502410889,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"a3daa790.c8f578","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":981.1188354492188,"y":872.6356792449951,"z":"5f90649b.a6618c","wires":[]},{"id":"bf39102b.a9daa","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":834.2858276367188,"y":907.9288463592529,"z":"5f90649b.a6618c","wires":[["35e7e6d8.9c02fa"]]},{"id":"35e7e6d8.9c02fa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.952392578125,"y":906.2621746063232,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b5a6ae1.293715","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":537.7143249511719,"y":817.6430835723877,"z":"5f90649b.a6618c","wires":[]},{"id":"4c2c7cf4.617bb4","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":840.5714721679688,"y":949.0716209411621,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"674f14d2.772d8c","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":569.1983947753906,"y":956.6038818359375,"z":"5f90649b.a6618c","wires":[["946c94f2.2a45a8","4c2c7cf4.617bb4","e5db03f9.2fafe"]]},{"id":"946c94f2.2a45a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":833.2935791015625,"y":983.556224822998,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"9036f2cc.f4b7d","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":985.404541015625,"y":979.7784538269043,"z":"5f90649b.a6618c","wires":[]},{"id":"e5db03f9.2fafe","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.571533203125,"y":1020.0715923309326,"z":"5f90649b.a6618c","wires":[["854d69a8.a38398"]]},{"id":"854d69a8.a38398","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.2380981445312,"y":1018.4049205780029,"z":"5f90649b.a6618c","wires":[[]]},{"id":"3714bcdd.1c2684","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":542.0000305175781,"y":924.7858581542969,"z":"5f90649b.a6618c","wires":[]},{"id":"14b73b46.6d9fb5","type":"set","name":"set temp contrail fqdn for input to contrail","xml":"<set>\n<parameter name='aai.src-network.contrail-network-fqdn' value='`tmpsourcecontrailfqdn`' />\n<parameter name='aai.dest-network.contrail-network-fqdn' value='`tmpdestinationcontrailfqdn`' />","comments":"","x":575.0000648498535,"y":1106.928747177124,"z":"5f90649b.a6618c","wires":[]},{"id":"e7e4be16.a7a45","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":985.5714569091797,"y":1260.6428718566895,"z":"5f90649b.a6618c","wires":[[]]},{"id":"dcc82b6d.bd0448","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":516.2857627868652,"y":588.5714883804321,"z":"5f90649b.a6618c","wires":[]},{"id":"3fc1cd7b.ce8842","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' value='`$ar-assignments.`' />\n\n\n\n","comments":"","x":463.42869567871094,"y":1807.607406616211,"z":"5f90649b.a6618c","wires":[]},{"id":"7ce279cd.dfcc18","type":"switchNode","name":"switch contrailResp.resp-code","xml":"<switch test='`$contrailResp.resp-code`'>\n\n","comments":"","outputs":1,"x":518.607177734375,"y":1357.2500972747803,"z":"5f90649b.a6618c","wires":[["d4c93b29.23d048","dcc6b0f9.993d7"]]},{"id":"d4c93b29.23d048","type":"outcome","name":"outcome 0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":795.7501801252365,"y":1357.2502279281616,"z":"5f90649b.a6618c","wires":[["43219c8b.d04894"]]},{"id":"dcc6b0f9.993d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":775.7500915527344,"y":1384.7501316070557,"z":"5f90649b.a6618c","wires":[["62b65f6a.fbc85"]]},{"id":"62b65f6a.fbc85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":948.2501907348633,"y":1387.2502298355103,"z":"5f90649b.a6618c","wires":[]},{"id":"43219c8b.d04894","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":940.7500915527344,"y":1357.250129699707,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b1b62e5b.66cdc","type":"comment","name":"Dummy values for dev/dev","info":"","comments":"","x":522.0000114440918,"y":1070.0002274513245,"z":"5f90649b.a6618c","wires":[]},{"id":"fa1647e6.8bb8f8","type":"call","name":"call policy-manager-create-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-create-policy' mode='sync' >\n","comments":"","outputs":1,"x":537.1427841186523,"y":1491.4284505844116,"z":"5f90649b.a6618c","wires":[["4134066.d0e53f8","cfa986c.9649d78"]]},{"id":"4134066.d0e53f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":772.7221450805664,"y":1488.7704181671143,"z":"5f90649b.a6618c","wires":[["6336a3da.11edec"]]},{"id":"cfa986c.9649d78","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":778.714412689209,"y":1529.5714936256409,"z":"5f90649b.a6618c","wires":[["f41f6acc.efb3a8"]]},{"id":"f41f6acc.efb3a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":931.3809776306152,"y":1527.9048218727112,"z":"5f90649b.a6618c","wires":[[]]},{"id":"2d6f6d8d.fcc1b2","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":1225.7143249511719,"y":1487.1428270339966,"z":"5f90649b.a6618c","wires":[["cd2ace54.7c12e","4fd4dcde.514ad4"]]},{"id":"cd2ace54.7c12e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1502.809471130371,"y":1456.7137071229517,"z":"5f90649b.a6618c","wires":[["c111c6b8.837068"]]},{"id":"4fd4dcde.514ad4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1500.9047927856445,"y":1489.713646888733,"z":"5f90649b.a6618c","wires":[["704a5361.3555ec"]]},{"id":"704a5361.3555ec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create Policy in Policy Mgr. Rollback failed to delete policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1660.8096008300781,"y":1487.0470943450928,"z":"5f90649b.a6618c","wires":[]},{"id":"c111c6b8.837068","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1654.9999542236328,"y":1457.3804321289062,"z":"5f90649b.a6618c","wires":[[]]},{"id":"6336a3da.11edec","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":931.4285888671875,"y":1482.857177734375,"z":"5f90649b.a6618c","wires":[["2d6f6d8d.fcc1b2","15d27925.63edf7"]]},{"id":"15d27925.63edf7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in PolicyMgr. '+ $error-message + 'Contrail network policy rolled back.'`\" />\n","comments":"","x":1129.9999771118164,"y":1527.142939567566,"z":"5f90649b.a6618c","wires":[]}]
+[{"id":"977f53d.3ee9fb","type":"dgstart","name":"DGSTART","outputs":1,"x":107,"y":51,"z":"5f90649b.a6618c","wires":[["f60ed586.79f2e8"]]},{"id":"f60ed586.79f2e8","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":253.2380828857422,"y":125.95239353179932,"z":"5f90649b.a6618c","wires":[["7ed7da9d.6e2b64"]]},{"id":"7ed7da9d.6e2b64","type":"method","name":"contrail-route-topology-operation-create","xml":"<method rpc='contrail-route-topology-operation-create' mode='sync'>\n","comments":"","outputs":1,"x":333.1548500061035,"y":195.1904420852661,"z":"5f90649b.a6618c","wires":[["56f7100c.36c0c"]]},{"id":"56f7100c.36c0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":241.4761848449707,"y":338.523784160614,"z":"5f90649b.a6618c","wires":[["9e479a64.54c188","e3448fe7.bd93a","8da0a386.68f65","9aff23ea.c5706","14b94fc4.c4f09","98b3a116.8663e","15a1d923.552617","d9a64061.5a09f","8dd7a6c4.f97498","4c8c7d6c.390284","2f8ea3d3.25d61c","df03f36f.1c4a","c6e8d07f.0b15c","21f56f54.bd659","c191a157.b6674","f0fa32bd.ad602","9525be20.92483","63945192.1184c","dcc82b6d.bd0448","3fc1cd7b.ce8842","7ce279cd.dfcc18","84f94150.403b","674f14d2.772d8c","fa1647e6.8bb8f8"]]},{"id":"e3448fe7.bd93a","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":439.7144775390625,"y":2006.7268590070307,"z":"5f90649b.a6618c","wires":[]},{"id":"9e479a64.54c188","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":468.4683837890625,"y":1969.182652387768,"z":"5f90649b.a6618c","wires":[]},{"id":"4c8c7d6c.390284","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":501.8017692565918,"y":1841.563532743603,"z":"5f90649b.a6618c","wires":[]},{"id":"9aff23ea.c5706","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":503.7380561828613,"y":312.3333215713501,"z":"5f90649b.a6618c","wires":[]},{"id":"8da0a386.68f65","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n\n\n\n","comments":"","x":550.9973297119141,"y":278.5925884246826,"z":"5f90649b.a6618c","wires":[]},{"id":"14b94fc4.c4f09","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":565.4219818115234,"y":348.23153495788574,"z":"5f90649b.a6618c","wires":[[]]},{"id":"15a1d923.552617","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":583.8520965576172,"y":519.7928762435913,"z":"5f90649b.a6618c","wires":[["a2f6a7ce.665958","f3b38cd6.2e6e6"]]},{"id":"98b3a116.8663e","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":538.0648651123047,"y":404.01720237731934,"z":"5f90649b.a6618c","wires":[[]]},{"id":"a2f6a7ce.665958","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":825.8148498535156,"y":517.2673225402832,"z":"5f90649b.a6618c","wires":[["20f015d.23979ea"]]},{"id":"d9a64061.5a09f","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":519.0769958496094,"y":1926.0893211364746,"z":"5f90649b.a6618c","wires":[["c10dc6ee.696618","805abac4.a6c908","3cb9e4ff.c3e14c"]]},{"id":"c10dc6ee.696618","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":801.8849945068359,"y":1961.9445136152208,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"805abac4.a6c908","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":792.8850440979004,"y":1930.4445393644273,"z":"5f90649b.a6618c","wires":[["950a7649.40f1f8"]]},{"id":"3cb9e4ff.c3e14c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":796.635082244873,"y":1900.8016442395747,"z":"5f90649b.a6618c","wires":[["993aa5dc.bb4718"]]},{"id":"950a7649.40f1f8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":962.635082244873,"y":1931.1945632062852,"z":"5f90649b.a6618c","wires":[]},{"id":"20f015d.23979ea","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":994.8148536682129,"y":515.7672233581543,"z":"5f90649b.a6618c","wires":[["729d2c16.7a05d4"]]},{"id":"729d2c16.7a05d4","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1205.6720962524414,"y":515.3863525390625,"z":"5f90649b.a6618c","wires":[["2012dd5e.936ac2","ea94432e.31d92"]]},{"id":"2012dd5e.936ac2","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1395.0054016113281,"y":515.3863105773926,"z":"5f90649b.a6618c","wires":[["976ad675.132198"]]},{"id":"f33b796d.cb9ac8","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1868.1962203979492,"y":478.62452602386475,"z":"5f90649b.a6618c","wires":[]},{"id":"976ad675.132198","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1579.529291152954,"y":512.2911443710327,"z":"5f90649b.a6618c","wires":[["f33b796d.cb9ac8","20c37c8e.57cb74"]]},{"id":"26a328fb.e4fd48","type":"comment","name":"GET contrail-route-allotted-resource from mdsal","info":"","comments":"","x":593.8147926330566,"y":483.7672119140625,"z":"5f90649b.a6618c","wires":[]},{"id":"f0fa32bd.ad602","type":"set","name":"set ar-assignments.contrail-id","xml":"<set>\n<parameter name='ar-assignments.contrail-id' value=\"`$contrailResp.network-policy.uuid`\" />\n\n\n\n","comments":"","x":523.6721115112305,"y":1402.565318107605,"z":"5f90649b.a6618c","wires":[]},{"id":"20c37c8e.57cb74","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1956.0532722473145,"y":445.4340181350708,"z":"5f90649b.a6618c","wires":[]},{"id":"aa784c84.13ef8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":508.9576530456543,"y":377.62435245513916,"z":"5f90649b.a6618c","wires":[]},{"id":"993aa5dc.bb4718","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":938.2910499572754,"y":1896.9938134290278,"z":"5f90649b.a6618c","wires":[[]]},{"id":"8dd7a6c4.f97498","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":450.95776748657227,"y":1874.6602372266352,"z":"5f90649b.a6618c","wires":[[]]},{"id":"19d401c8.5d312e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1545.3337326049805,"y":600.0000534057617,"z":"5f90649b.a6618c","wires":[]},{"id":"f3b38cd6.2e6e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":817.6666526794434,"y":552.3334074020386,"z":"5f90649b.a6618c","wires":[["2dce5d4a.489092"]]},{"id":"2dce5d4a.489092","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":997.6666030883789,"y":552.9999580383301,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"2f8ea3d3.25d61c","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":490.5238265991211,"y":557.8095149993896,"z":"5f90649b.a6618c","wires":[]},{"id":"ea94432e.31d92","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1383.3333549499512,"y":552.6666707992554,"z":"5f90649b.a6618c","wires":[["19d401c8.5d312e"]]},{"id":"63945192.1184c","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":547.3810729980469,"y":1208.9765033721924,"z":"5f90649b.a6618c","wires":[]},{"id":"ea06c71e.efa318","type":"comment","name":"Call contrail api here","info":"","comments":"","x":491.0477752685547,"y":1175.643006324768,"z":"5f90649b.a6618c","wires":[]},{"id":"228d2ac3.140ba6","type":"comment","name":"Rollback - rollback contrail/AAI","info":"","comments":"","x":1175.8573608398438,"y":1136.0477056503296,"z":"5f90649b.a6618c","wires":[]},{"id":"eb7db965.cffa68","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":497.76202392578125,"y":1611.2262735366821,"z":"5f90649b.a6618c","wires":[]},{"id":"21f56f54.bd659","type":"save","name":"save AnAI - network-policy","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-policy-id\" value=\"`$ar-assignments.contrail-id`\" />\n<parameter name=\"network-policy-fqdn\" value=\"`$ar-assignments.fq-name`\" />\n\n\n","comments":"","outputs":1,"x":513.1389083862305,"y":1648.2938385009766,"z":"5f90649b.a6618c","wires":[["52e636d7.8ebb58","ed317c2.86ca38"]]},{"id":"244a6c17.3e21d4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":985.4844169616699,"y":1638.575451850891,"z":"5f90649b.a6618c","wires":[]},{"id":"52e636d7.8ebb58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.9130249023438,"y":1637.5911893844604,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"ed317c2.86ca38","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":760.7225227355957,"y":1667.06760597229,"z":"5f90649b.a6618c","wires":[["244a6c17.3e21d4"]]},{"id":"801bff7e.fbad5","type":"comment","name":"MDSal adaptor only saves consuming service so parent service and AR are done by Rest api calls","info":"","comments":"","x":613.6666259765625,"y":49.33332824707031,"z":"5f90649b.a6618c","wires":[]},{"id":"c191a157.b6674","type":"execute","name":"execute Contrail API create network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='create' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":552.0000915527344,"y":1291.8338508605957,"z":"5f90649b.a6618c","wires":[["7a90fc8f.31cf84","1476872f.65dcf9"]]},{"id":"7a90fc8f.31cf84","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.380973815918,"y":1259.976146850735,"z":"5f90649b.a6618c","wires":[["e7e4be16.a7a45"]]},{"id":"1476872f.65dcf9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":831.4762954711914,"y":1292.976086616516,"z":"5f90649b.a6618c","wires":[["44b885c3.5934bc"]]},{"id":"df03f36f.1c4a","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":554.0000457763672,"y":764.0001230239868,"z":"5f90649b.a6618c","wires":[["69c55b4f.8054f4","6060b3b1.b4008c"]]},{"id":"69c55b4f.8054f4","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":910.0002632141113,"y":762.6665024757385,"z":"5f90649b.a6618c","wires":[["74dfd12.49de63"]]},{"id":"6060b3b1.b4008c","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":905.6670799255371,"y":725.6663026809692,"z":"5f90649b.a6618c","wires":[["1ff80c0f.023764"]]},{"id":"7a681aef.92f704","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2045.4450378417969,"y":802.4442802667618,"z":"5f90649b.a6618c","wires":[["ddb4759b.c74ba8"]]},{"id":"58522d88.a159a4","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1301.825698852539,"y":762.6823296546936,"z":"5f90649b.a6618c","wires":[["a0f9f28f.3a11d","62f8d43d.6ff0ac"]]},{"id":"a0f9f28f.3a11d","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1590.825698852539,"y":764.6823906898499,"z":"5f90649b.a6618c","wires":[["6eb4b765.2bcfe8"]]},{"id":"62f8d43d.6ff0ac","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1570.825698852539,"y":799.6823906898499,"z":"5f90649b.a6618c","wires":[["e7594b36.af86f8"]]},{"id":"e7594b36.af86f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1775.4290008544922,"y":803.5702644586563,"z":"5f90649b.a6618c","wires":[["7a681aef.92f704"]]},{"id":"74dfd12.49de63","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1044.1115188598633,"y":763.1109070777893,"z":"5f90649b.a6618c","wires":[["58522d88.a159a4"]]},{"id":"1ff80c0f.023764","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1059.8005447387695,"y":726.3332052230835,"z":"5f90649b.a6618c","wires":[]},{"id":"6eb4b765.2bcfe8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1783.9337768554688,"y":764.9998508691788,"z":"5f90649b.a6618c","wires":[]},{"id":"7cbfe81d.55cd18","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":591.4003677368164,"y":730.6664390563965,"z":"5f90649b.a6618c","wires":[]},{"id":"ddb4759b.c74ba8","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2337.9998474121094,"y":799.3334070444107,"z":"5f90649b.a6618c","wires":[["f4eec0e2.b336a","e74ffe1b.ee527"]]},{"id":"831dcdf8.8c4d9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2877.666519165039,"y":789.3333841562271,"z":"5f90649b.a6618c","wires":[]},{"id":"1f3c5039.cf476","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2687.732961654663,"y":802.3333956003189,"z":"5f90649b.a6618c","wires":[["831dcdf8.8c4d9","3e513116.e80b7e"]]},{"id":"f4eec0e2.b336a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2532.2663383483887,"y":802.3332582712173,"z":"5f90649b.a6618c","wires":[["1f3c5039.cf476"]]},{"id":"e74ffe1b.ee527","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2533.065948486328,"y":840.3332611322403,"z":"5f90649b.a6618c","wires":[["cce762b8.5727a"]]},{"id":"cce762b8.5727a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2711.066104888916,"y":840.3333269357681,"z":"5f90649b.a6618c","wires":[]},{"id":"3e513116.e80b7e","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2900.1330642700195,"y":825.3330799341202,"z":"5f90649b.a6618c","wires":[["dfe3bd23.975b8","7f907bb.cc18a84","324872c7.f43eee"]]},{"id":"dfe3bd23.975b8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3120.994453430176,"y":817.9441944360733,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"7f907bb.cc18a84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3116.327480316162,"y":851.2775083780289,"z":"5f90649b.a6618c","wires":[["ddb43474.5e2fc8"]]},{"id":"ddb43474.5e2fc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3290.503402709961,"y":839.3330675363541,"z":"5f90649b.a6618c","wires":[]},{"id":"324872c7.f43eee","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3116.503486633301,"y":786.370158791542,"z":"5f90649b.a6618c","wires":[["19595da5.86cf22"]]},{"id":"19595da5.86cf22","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3296.503486633301,"y":784.370158791542,"z":"5f90649b.a6618c","wires":[["9bf595b1.bf70f8"]]},{"id":"9bf595b1.bf70f8","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3483.4665908813477,"y":781.9999004602432,"z":"5f90649b.a6618c","wires":[]},{"id":"c6e8d07f.0b15c","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":500.4287109375,"y":1747.6073377132416,"z":"5f90649b.a6618c","wires":[["4c9be32.4622c1c","58211de1.fa28b4"]]},{"id":"4c9be32.4622c1c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":756.1906051635742,"y":1724.8455572128296,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"58211de1.fa28b4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":761.5000343322754,"y":1760.4169750213623,"z":"5f90649b.a6618c","wires":[["3ee10ac5.6c52d6"]]},{"id":"3ee10ac5.6c52d6","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":971.2858200073242,"y":1726.4646015167236,"z":"5f90649b.a6618c","wires":[]},{"id":"a5f87574.e494f8","type":"comment","name":"Update AAI AR","info":"","comments":"","x":456.62871170043945,"y":1716.7500885389745,"z":"5f90649b.a6618c","wires":[]},{"id":"44b885c3.5934bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":991.381103515625,"y":1292.309534072876,"z":"5f90649b.a6618c","wires":[]},{"id":"9525be20.92483","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.contrail-route-topology-operation-create\"/>\n<parameter name='field3' value='network-policy' />\n<parameter name='field4' value='create' />\n<parameter name='field5' value='contrailResp' />\n<parameter name='field6' value='default-domain' />\n<parameter name='field7' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='field8' value='`$tmp.ar.tenant-name`' />\n<parameter name='field9' value='`$ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.contrail-fqdn`' />\n<parameter name='field10' value='$aai.dest-network.contrail-network-fqdn' />\n<parameter name='field11' value='$aai.src-network.contrail-network-fqdn' />\n<parameter name='field12' value='&lt;&gt;' />\n<parameter name='field13' value='$tmp.ar.cloud-region-id' />\n\n\n","comments":"","outputs":1,"x":440.09527587890625,"y":1261.595251083374,"z":"5f90649b.a6618c","wires":[[]]},{"id":"c2b56ee4.19d0f","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":836.2857666015625,"y":841.9288463592529,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"84f94150.403b","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":564.9126892089844,"y":849.4611072540283,"z":"5f90649b.a6618c","wires":[["d00661cb.d83c8","c2b56ee4.19d0f","bf39102b.a9daa"]]},{"id":"d00661cb.d83c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":829.0078735351562,"y":876.4134502410889,"z":"5f90649b.a6618c","wires":[["a3daa790.c8f578"]]},{"id":"a3daa790.c8f578","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":981.1188354492188,"y":872.6356792449951,"z":"5f90649b.a6618c","wires":[]},{"id":"bf39102b.a9daa","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":834.2858276367188,"y":907.9288463592529,"z":"5f90649b.a6618c","wires":[["35e7e6d8.9c02fa"]]},{"id":"35e7e6d8.9c02fa","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.952392578125,"y":906.2621746063232,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b5a6ae1.293715","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":537.7143249511719,"y":817.6430835723877,"z":"5f90649b.a6618c","wires":[]},{"id":"4c2c7cf4.617bb4","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":840.5714721679688,"y":949.0716209411621,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"674f14d2.772d8c","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":569.1983947753906,"y":956.6038818359375,"z":"5f90649b.a6618c","wires":[["946c94f2.2a45a8","4c2c7cf4.617bb4","e5db03f9.2fafe"]]},{"id":"946c94f2.2a45a8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":833.2935791015625,"y":983.556224822998,"z":"5f90649b.a6618c","wires":[["9036f2cc.f4b7d"]]},{"id":"9036f2cc.f4b7d","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":985.404541015625,"y":979.7784538269043,"z":"5f90649b.a6618c","wires":[]},{"id":"e5db03f9.2fafe","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":833.571533203125,"y":1020.0715923309326,"z":"5f90649b.a6618c","wires":[["854d69a8.a38398"]]},{"id":"854d69a8.a38398","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":986.2380981445312,"y":1018.4049205780029,"z":"5f90649b.a6618c","wires":[[]]},{"id":"3714bcdd.1c2684","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":542.0000305175781,"y":924.7858581542969,"z":"5f90649b.a6618c","wires":[]},{"id":"14b73b46.6d9fb5","type":"set","name":"set temp contrail fqdn for input to contrail","xml":"<set>\n<parameter name='aai.src-network.contrail-network-fqdn' value='`tmpsourcecontrailfqdn`' />\n<parameter name='aai.dest-network.contrail-network-fqdn' value='`tmpdestinationcontrailfqdn`' />","comments":"","x":575.0000648498535,"y":1106.928747177124,"z":"5f90649b.a6618c","wires":[]},{"id":"e7e4be16.a7a45","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":985.5714569091797,"y":1260.6428718566895,"z":"5f90649b.a6618c","wires":[[]]},{"id":"dcc82b6d.bd0448","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":516.2857627868652,"y":588.5714883804321,"z":"5f90649b.a6618c","wires":[]},{"id":"3fc1cd7b.ce8842","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.' value='`$ar-assignments.`' />\n\n\n\n","comments":"","x":463.42869567871094,"y":1807.607406616211,"z":"5f90649b.a6618c","wires":[]},{"id":"7ce279cd.dfcc18","type":"switchNode","name":"switch contrailResp.resp-code","xml":"<switch test='`$contrailResp.resp-code`'>\n\n","comments":"","outputs":1,"x":518.607177734375,"y":1357.2500972747803,"z":"5f90649b.a6618c","wires":[["d4c93b29.23d048","dcc6b0f9.993d7"]]},{"id":"d4c93b29.23d048","type":"outcome","name":"outcome 0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":795.7501801252365,"y":1357.2502279281616,"z":"5f90649b.a6618c","wires":[["43219c8b.d04894"]]},{"id":"dcc6b0f9.993d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":775.7500915527344,"y":1384.7501316070557,"z":"5f90649b.a6618c","wires":[["62b65f6a.fbc85"]]},{"id":"62b65f6a.fbc85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":948.2501907348633,"y":1387.2502298355103,"z":"5f90649b.a6618c","wires":[]},{"id":"43219c8b.d04894","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":940.7500915527344,"y":1357.250129699707,"z":"5f90649b.a6618c","wires":[[]]},{"id":"b1b62e5b.66cdc","type":"comment","name":"Dummy values for dev/dev","info":"","comments":"","x":522.0000114440918,"y":1070.0002274513245,"z":"5f90649b.a6618c","wires":[]},{"id":"fa1647e6.8bb8f8","type":"call","name":"call policy-manager-create-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-create-policy' mode='sync' >\n","comments":"","outputs":1,"x":537.1427841186523,"y":1491.4284505844116,"z":"5f90649b.a6618c","wires":[["4134066.d0e53f8","cfa986c.9649d78"]]},{"id":"4134066.d0e53f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":772.7221450805664,"y":1488.7704181671143,"z":"5f90649b.a6618c","wires":[["6336a3da.11edec"]]},{"id":"cfa986c.9649d78","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":778.714412689209,"y":1529.5714936256409,"z":"5f90649b.a6618c","wires":[["f41f6acc.efb3a8"]]},{"id":"f41f6acc.efb3a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":931.3809776306152,"y":1527.9048218727112,"z":"5f90649b.a6618c","wires":[[]]},{"id":"2d6f6d8d.fcc1b2","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='default-domain' value='default-domain' />\n<parameter name='policy-name' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name`' />\n<parameter name='default-project' value='`$tmp.ar.tenant-name`' /> \n<!-- dummy for dev <parameter name='default-project' value='default-project' /> -->\n<parameter name='vipr-service-instance' value='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn`' />\n<parameter name='dst-virtual-network' value='`$aai.dest-network.contrail-network-fqdn`' />\n<parameter name='src-virtual-network' value='`$aai.src-network.contrail-network-fqdn`' />\n<parameter name='direction' value='&lt;&gt;' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n\n","comments":"","outputs":1,"x":1225.7143249511719,"y":1487.1428270339966,"z":"5f90649b.a6618c","wires":[["cd2ace54.7c12e","4fd4dcde.514ad4"]]},{"id":"cd2ace54.7c12e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1502.809471130371,"y":1456.7137071229517,"z":"5f90649b.a6618c","wires":[["c111c6b8.837068"]]},{"id":"4fd4dcde.514ad4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1500.9047927856445,"y":1489.713646888733,"z":"5f90649b.a6618c","wires":[["704a5361.3555ec"]]},{"id":"704a5361.3555ec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create Policy in Policy Mgr. Rollback failed to delete policy in Contrail. '+ $contrailResp.resp-code + ':' +$contrailResp.resp-message `\" />\n","comments":"","x":1660.8096008300781,"y":1487.0470943450928,"z":"5f90649b.a6618c","wires":[]},{"id":"c111c6b8.837068","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1654.9999542236328,"y":1457.3804321289062,"z":"5f90649b.a6618c","wires":[[]]},{"id":"6336a3da.11edec","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":931.4285888671875,"y":1482.857177734375,"z":"5f90649b.a6618c","wires":[["2d6f6d8d.fcc1b2","15d27925.63edf7"]]},{"id":"15d27925.63edf7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to create policy in PolicyMgr. '+ $error-message + 'Contrail network policy rolled back.'`\" />\n","comments":"","x":1129.9999771118164,"y":1527.142939567566,"z":"5f90649b.a6618c","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json
index 71d1caca..597505cc 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.json
@@ -1 +1 @@
-[{"id":"6f42193e.7fcb18","type":"dgstart","name":"DGSTART","outputs":1,"x":182,"y":96,"z":"9d85256.794bfd8","wires":[["3a9d923a.4687de"]]},{"id":"3a9d923a.4687de","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":328.2380828857422,"y":170.95239353179932,"z":"9d85256.794bfd8","wires":[["1dd7e766.22b889"]]},{"id":"1dd7e766.22b889","type":"method","name":"contrail-route-topology-operation-deactivate","xml":"<method rpc='contrail-route-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":408.1548500061035,"y":240.1904420852661,"z":"9d85256.794bfd8","wires":[["5b6f8915.4550d8"]]},{"id":"5b6f8915.4550d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":316.4761848449707,"y":383.523784160614,"z":"9d85256.794bfd8","wires":[["38d86f0b.67968","122583d8.1d260c","feae2ef.c5154d","cc085949.e3c218","9d38854d.1bb8b8","2829196a.eaaa76","8d33f3ff.44af3","c5fcedfe.366e1","a2b2b115.328ef","6975ce5b.c1d44","dca3aceb.03885","6578d3d4.5476dc","9376585b.91de78","98d3d9af.b219d8","b42adb13.7a13e8","d0cfc654.944c28","cbccf77c.4013d8","e468068e.f8fd78","3eceb01b.795e6","4fb1ccbe.de9264","8edbb4f5.1da278","4619cd3d.096d04"]]},{"id":"122583d8.1d260c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":579.000072479248,"y":2309.548008918762,"z":"9d85256.794bfd8","wires":[]},{"id":"38d86f0b.67968","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":607.753978729248,"y":2272.0038022994995,"z":"9d85256.794bfd8","wires":[]},{"id":"6975ce5b.c1d44","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":642.7541427612305,"y":2132.7179613113403,"z":"9d85256.794bfd8","wires":[]},{"id":"cc085949.e3c218","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":578.7380561828613,"y":357.3333215713501,"z":"9d85256.794bfd8","wires":[]},{"id":"feae2ef.c5154d","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />\n\n\n","comments":"","x":625.9973182678223,"y":323.5925874710083,"z":"9d85256.794bfd8","wires":[]},{"id":"9d38854d.1bb8b8","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":648.9934158325195,"y":393.2315502166748,"z":"9d85256.794bfd8","wires":[[]]},{"id":"8d33f3ff.44af3","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":655.5187454223633,"y":561.459508895874,"z":"9d85256.794bfd8","wires":[["ef8e221b.d195c","c49c58ea.301828"]]},{"id":"2829196a.eaaa76","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":613.0648460388184,"y":453.01722526550293,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ef8e221b.d195c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":900.8148498535156,"y":562.2673225402832,"z":"9d85256.794bfd8","wires":[["70fd0b18.96fdf4"]]},{"id":"c5fcedfe.366e1","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":670.8626098632812,"y":2206.7674808502197,"z":"9d85256.794bfd8","wires":[["4700a122.f4dac","36986bb9.23cbc4","460b74b4.c2c05c"]]},{"id":"4700a122.f4dac","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":941.1706275939941,"y":2259.7656816467643,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"36986bb9.23cbc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":932.1706771850586,"y":2228.265707395971,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"460b74b4.c2c05c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":935.9207153320312,"y":2198.622812271118,"z":"9d85256.794bfd8","wires":[["5404b4c7.e2032c"]]},{"id":"36e7add1.93abd2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1101.9207153320312,"y":2229.0157312378287,"z":"9d85256.794bfd8","wires":[]},{"id":"70fd0b18.96fdf4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1069.814853668213,"y":560.7672233581543,"z":"9d85256.794bfd8","wires":[["b8f11906.dba3b8"]]},{"id":"b8f11906.dba3b8","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1280.6720962524414,"y":560.3863525390625,"z":"9d85256.794bfd8","wires":[["9b410254.194e9","33e90ef6.f223c2"]]},{"id":"9b410254.194e9","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1470.0054016113281,"y":560.3863105773926,"z":"9d85256.794bfd8","wires":[["15bf006b.a87d5"]]},{"id":"f9f3fdcd.0ab34","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1943.1962203979492,"y":523.6245260238647,"z":"9d85256.794bfd8","wires":[]},{"id":"15bf006b.a87d5","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1654.529291152954,"y":557.2911443710327,"z":"9d85256.794bfd8","wires":[["f9f3fdcd.0ab34","e7cd0298.e8dcc","bba9d10e.349f9"]]},{"id":"e7cd0298.e8dcc","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1951.1961479187012,"y":587.719669342041,"z":"9d85256.794bfd8","wires":[]},{"id":"2bf64ead.e3bc32","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":668.8147926330566,"y":528.7672119140625,"z":"9d85256.794bfd8","wires":[]},{"id":"93e5a3ab.9544a","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1959.196002960205,"y":554.6244812011719,"z":"9d85256.794bfd8","wires":[["9b9adb79.d81988","d559dc4.b4c922"]]},{"id":"9b9adb79.d81988","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2194.8436737060547,"y":569.0531902313232,"z":"9d85256.794bfd8","wires":[["d622bf5.875044"]]},{"id":"d622bf5.875044","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2435.462423324585,"y":571.9577798843384,"z":"9d85256.794bfd8","wires":[]},{"id":"6578d3d4.5476dc","type":"set","name":"unset ar-assignments.vlan-tag","xml":"<set>\n<parameter name='ar-assignments.vlan-tag' value=\"\" />\n\n\n\n","comments":"","x":616.862419128418,"y":1670.0531845092773,"z":"9d85256.794bfd8","wires":[]},{"id":"bba9d10e.349f9","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":2031.0532722473145,"y":490.4340181350708,"z":"9d85256.794bfd8","wires":[]},{"id":"7d4ef2a7.fd27ec","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":583.9576530456543,"y":422.62435245513916,"z":"9d85256.794bfd8","wires":[]},{"id":"5404b4c7.e2032c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1077.5766830444336,"y":2194.8149814605713,"z":"9d85256.794bfd8","wires":[[]]},{"id":"a2b2b115.328ef","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":593.5767288208008,"y":2099.1481199264526,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ba60bed0.88369","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1653.666997909546,"y":673.3333854675293,"z":"9d85256.794bfd8","wires":[]},{"id":"c49c58ea.301828","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":892.6666526794434,"y":597.3334074020386,"z":"9d85256.794bfd8","wires":[["25ba4dc1.5132b2"]]},{"id":"25ba4dc1.5132b2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1072.666603088379,"y":597.9999580383301,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"dca3aceb.03885","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":564.666618347168,"y":593.6666221618652,"z":"9d85256.794bfd8","wires":[]},{"id":"33e90ef6.f223c2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1458.3333549499512,"y":597.6666707992554,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"41d0055a.f5d40c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2419.333469390869,"y":537.6666975021362,"z":"9d85256.794bfd8","wires":[[]]},{"id":"1e0333e0.bb844c","type":"comment","name":"Call contrail api here","info":"","comments":"","x":594.8571243286133,"y":660.2857151031494,"z":"9d85256.794bfd8","wires":[]},{"id":"5db846ef.38ec08","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1327.9999771118164,"y":2228.3333263397217,"z":"9d85256.794bfd8","wires":[]},{"id":"48ad7bf5.74a014","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":627.333251953125,"y":2048.3332138061523,"z":"9d85256.794bfd8","wires":[]},{"id":"d559dc4.b4c922","type":"outcome","name":"outcome Active","xml":"<outcome value='Active'>\n","comments":"","outputs":1,"x":2209.6053161621094,"y":537.2912015914917,"z":"9d85256.794bfd8","wires":[["41d0055a.f5d40c"]]},{"id":"9376585b.91de78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":615.3333129882812,"y":1826.6666622161865,"z":"9d85256.794bfd8","wires":[["5f9fa013.45a14","1dfd3b63.382635"]]},{"id":"5f9fa013.45a14","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":871.0952453613281,"y":1803.904836654663,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"1dfd3b63.382635","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":876.4046745300293,"y":1839.4762544631958,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"e7c07e31.eaec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1086.1904602050781,"y":1805.5238809585571,"z":"9d85256.794bfd8","wires":[]},{"id":"a91079be.620158","type":"comment","name":"Update AAI AR","info":"","comments":"","x":578.6761703491211,"y":1790.095106124878,"z":"9d85256.794bfd8","wires":[]},{"id":"98d3d9af.b219d8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":593,"y":626,"z":"9d85256.794bfd8","wires":[]},{"id":"d67ce795.d438a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1639.571683883667,"y":772.6666259765625,"z":"9d85256.794bfd8","wires":[]},{"id":"95b2d8a8.b95fe8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":893.1903457641602,"y":926.0476361513138,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"d0cfc654.944c28","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":616.3886871337891,"y":937.294153213501,"z":"9d85256.794bfd8","wires":[["27df97d8.1b3568","95b2d8a8.b95fe8","ff40702c.ccb5a"]]},{"id":"27df97d8.1b3568","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":885.9124526977539,"y":960.5322400331497,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"587d3201.9d2dec","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1038.0234146118164,"y":956.754469037056,"z":"9d85256.794bfd8","wires":[]},{"id":"ff40702c.ccb5a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":891.1904067993164,"y":992.0476361513138,"z":"9d85256.794bfd8","wires":[["71fad46f.afcc4c"]]},{"id":"71fad46f.afcc4c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1043.8569717407227,"y":990.3809643983841,"z":"9d85256.794bfd8","wires":[[]]},{"id":"5c5f3058.c0223","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":594.6189041137695,"y":906.0476303100586,"z":"9d85256.794bfd8","wires":[]},{"id":"4cfc272e.3ba048","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":910.9046859741211,"y":1189.7619500160217,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"4fb1ccbe.de9264","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":639.531608581543,"y":1197.2942109107971,"z":"9d85256.794bfd8","wires":[["dc427390.11d98","4cfc272e.3ba048","3deff125.68148e"]]},{"id":"dc427390.11d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":903.6267929077148,"y":1224.2465538978577,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"a32dd432.848348","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1055.7377548217773,"y":1220.468782901764,"z":"9d85256.794bfd8","wires":[]},{"id":"3deff125.68148e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":913.4761962890625,"y":1258.6190185546875,"z":"9d85256.794bfd8","wires":[["9214480a.91e1e8"]]},{"id":"9214480a.91e1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1066.1427612304688,"y":1256.9523468017578,"z":"9d85256.794bfd8","wires":[[]]},{"id":"2a49204d.cef83","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":612.3332290649414,"y":1165.4762029647827,"z":"9d85256.794bfd8","wires":[]},{"id":"cbccf77c.4013d8","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":565.3333129882812,"y":983.1903915405273,"z":"9d85256.794bfd8","wires":[]},{"id":"e468068e.f8fd78","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":627.327995300293,"y":1017.2802391052246,"z":"9d85256.794bfd8","wires":[]},{"id":"3eceb01b.795e6","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":703.5185165405273,"y":1090.2804369926453,"z":"9d85256.794bfd8","wires":[["701abbd2.7e3b54","94120abf.4d0b08"]]},{"id":"701abbd2.7e3b54","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1059.1850128173828,"y":1090.7086639404297,"z":"9d85256.794bfd8","wires":[["dcb9ff58.45886"]]},{"id":"94120abf.4d0b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1057.2803344726562,"y":1123.7086037062109,"z":"9d85256.794bfd8","wires":[["a24bc0fc.7cfa4"]]},{"id":"a24bc0fc.7cfa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from source network\" />\n","comments":"","x":1217.1851043701172,"y":1123.0419702529907,"z":"9d85256.794bfd8","wires":[]},{"id":"dcb9ff58.45886","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1211.3754959106445,"y":1091.3753889463842,"z":"9d85256.794bfd8","wires":[[]]},{"id":"b42adb13.7a13e8","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":619.9046859741211,"y":862.3332405090332,"z":"9d85256.794bfd8","wires":[["5424210d.1c802","971927f5.16bf58"]]},{"id":"5424210d.1c802","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":975.9049034118652,"y":860.9996199607849,"z":"9d85256.794bfd8","wires":[["e39e1e1a.7ac94"]]},{"id":"971927f5.16bf58","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":971.571720123291,"y":823.9994201660156,"z":"9d85256.794bfd8","wires":[["4f4a92a0.e38f1c"]]},{"id":"b98ee4e8.38eb78","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1367.730339050293,"y":861.01544713974,"z":"9d85256.794bfd8","wires":[["f9657d22.1dd65","c9ebc8c2.c7d948"]]},{"id":"f9657d22.1dd65","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1656.730339050293,"y":863.0155081748962,"z":"9d85256.794bfd8","wires":[["839cc49f.136208"]]},{"id":"c9ebc8c2.c7d948","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1636.730339050293,"y":898.0155081748962,"z":"9d85256.794bfd8","wires":[["16bca9c2.7dc4c6"]]},{"id":"e39e1e1a.7ac94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1110.0161590576172,"y":861.4440245628357,"z":"9d85256.794bfd8","wires":[["b98ee4e8.38eb78"]]},{"id":"4f4a92a0.e38f1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1125.7051849365234,"y":824.6663227081299,"z":"9d85256.794bfd8","wires":[]},{"id":"95f9228a.7f106","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":657.3050079345703,"y":828.9995565414429,"z":"9d85256.794bfd8","wires":[]},{"id":"c66b5efd.1ec84","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2099.9047470092773,"y":898.3332633972168,"z":"9d85256.794bfd8","wires":[["f15b62ec.d4784"]]},{"id":"16bca9c2.7dc4c6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1825.888786315918,"y":898.4592633247375,"z":"9d85256.794bfd8","wires":[["c66b5efd.1ec84"]]},{"id":"839cc49f.136208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1838.3934860229492,"y":862.8888339996338,"z":"9d85256.794bfd8","wires":[]},{"id":"f15b62ec.d4784","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2392.45955657959,"y":895.2223901748657,"z":"9d85256.794bfd8","wires":[["20466326.cc228c","e3af7381.016dd"]]},{"id":"ca02674e.84b438","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2980.1261596679688,"y":885.2223739624023,"z":"9d85256.794bfd8","wires":[]},{"id":"8017154b.206ea8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2742.1926708221436,"y":898.2223787307739,"z":"9d85256.794bfd8","wires":[["ca02674e.84b438","b9dd247f.268ab8"]]},{"id":"20466326.cc228c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2586.726047515869,"y":898.2222414016724,"z":"9d85256.794bfd8","wires":[["8017154b.206ea8"]]},{"id":"e3af7381.016dd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2587.5256576538086,"y":936.2222442626953,"z":"9d85256.794bfd8","wires":[["5a94e0ce.bbd29"]]},{"id":"5a94e0ce.bbd29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2765.5258140563965,"y":936.2223100662231,"z":"9d85256.794bfd8","wires":[]},{"id":"b9dd247f.268ab8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2954.5927734375,"y":921.2220630645752,"z":"9d85256.794bfd8","wires":[["dd7ba10c.161b9","cbf42233.390d7","866c3c16.228b3"]]},{"id":"dd7ba10c.161b9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3191.4541015625,"y":935.8331546783447,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"cbf42233.390d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3186.7871284484863,"y":969.1664686203003,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"6068b4e5.0f7b2c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3360.963050842285,"y":957.2220277786255,"z":"9d85256.794bfd8","wires":[]},{"id":"866c3c16.228b3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3186.963134765625,"y":904.2591190338135,"z":"9d85256.794bfd8","wires":[["f29d601d.cb81d"]]},{"id":"f29d601d.cb81d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3366.963134765625,"y":902.2591190338135,"z":"9d85256.794bfd8","wires":[["2300be73.7c54a2"]]},{"id":"2300be73.7c54a2","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3553.926239013672,"y":899.8888607025146,"z":"9d85256.794bfd8","wires":[]},{"id":"4c6f65c8.0d26bc","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":621.9047012329102,"y":1058.3332691192627,"z":"9d85256.794bfd8","wires":[]},{"id":"8edbb4f5.1da278","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":727.9047470092773,"y":1342.3332767486572,"z":"9d85256.794bfd8","wires":[["40503601.fe4738","90fb633f.f3b86"]]},{"id":"40503601.fe4738","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1063.5711822509766,"y":1342.7614674568176,"z":"9d85256.794bfd8","wires":[["a824091b.d45238"]]},{"id":"90fb633f.f3b86","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1061.66650390625,"y":1375.7614072225988,"z":"9d85256.794bfd8","wires":[["a6d7eb4e.7a67a8"]]},{"id":"a6d7eb4e.7a67a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from dest network\" />\n","comments":"","x":1221.571273803711,"y":1375.0947737693787,"z":"9d85256.794bfd8","wires":[]},{"id":"a824091b.d45238","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1215.7616653442383,"y":1343.4281924627721,"z":"9d85256.794bfd8","wires":[[]]},{"id":"53b61fa1.1416d","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":626.2908706665039,"y":1310.3860726356506,"z":"9d85256.794bfd8","wires":[]},{"id":"f68288a2.a88758","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":689.9047546386719,"y":1452.3332481384277,"z":"9d85256.794bfd8","wires":[]},{"id":"4619cd3d.096d04","type":"save","name":"delete AnAI - network-policy relationship to source/dest network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id and related-to = 'l3-network' \" >\n\n\n\n","comments":"","outputs":1,"x":727.2816619873047,"y":1485.4009227752686,"z":"9d85256.794bfd8","wires":[["c2ba7845.aba188","9531a4a4.802f48"]]},{"id":"d37f50f9.c5788","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1275.6271018981934,"y":1479.6824353933334,"z":"9d85256.794bfd8","wires":[]},{"id":"c2ba7845.aba188","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1047.0557098388672,"y":1482.6981729269028,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]},{"id":"9531a4a4.802f48","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1050.8652076721191,"y":1512.1745895147324,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]}]
+[{"id":"6f42193e.7fcb18","type":"dgstart","name":"DGSTART","outputs":1,"x":182,"y":96,"z":"9d85256.794bfd8","wires":[["3a9d923a.4687de"]]},{"id":"3a9d923a.4687de","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":328.2380828857422,"y":170.95239353179932,"z":"9d85256.794bfd8","wires":[["1dd7e766.22b889"]]},{"id":"1dd7e766.22b889","type":"method","name":"contrail-route-topology-operation-deactivate","xml":"<method rpc='contrail-route-topology-operation-deactivate' mode='sync'>\n","comments":"","outputs":1,"x":408.1548500061035,"y":240.1904420852661,"z":"9d85256.794bfd8","wires":[["5b6f8915.4550d8"]]},{"id":"5b6f8915.4550d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":316.4761848449707,"y":383.523784160614,"z":"9d85256.794bfd8","wires":[["38d86f0b.67968","122583d8.1d260c","feae2ef.c5154d","cc085949.e3c218","9d38854d.1bb8b8","2829196a.eaaa76","8d33f3ff.44af3","c5fcedfe.366e1","a2b2b115.328ef","6975ce5b.c1d44","dca3aceb.03885","6578d3d4.5476dc","9376585b.91de78","98d3d9af.b219d8","b42adb13.7a13e8","d0cfc654.944c28","cbccf77c.4013d8","e468068e.f8fd78","3eceb01b.795e6","4fb1ccbe.de9264","8edbb4f5.1da278","4619cd3d.096d04"]]},{"id":"122583d8.1d260c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":579.000072479248,"y":2309.548008918762,"z":"9d85256.794bfd8","wires":[]},{"id":"38d86f0b.67968","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":607.753978729248,"y":2272.0038022994995,"z":"9d85256.794bfd8","wires":[]},{"id":"6975ce5b.c1d44","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":642.7541427612305,"y":2132.7179613113403,"z":"9d85256.794bfd8","wires":[]},{"id":"cc085949.e3c218","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":578.7380561828613,"y":357.3333215713501,"z":"9d85256.794bfd8","wires":[]},{"id":"feae2ef.c5154d","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />\n\n\n","comments":"","x":625.9973182678223,"y":323.5925874710083,"z":"9d85256.794bfd8","wires":[]},{"id":"9d38854d.1bb8b8","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":648.9934158325195,"y":393.2315502166748,"z":"9d85256.794bfd8","wires":[[]]},{"id":"8d33f3ff.44af3","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":655.5187454223633,"y":561.459508895874,"z":"9d85256.794bfd8","wires":[["ef8e221b.d195c","c49c58ea.301828"]]},{"id":"2829196a.eaaa76","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":613.0648460388184,"y":453.01722526550293,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ef8e221b.d195c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":900.8148498535156,"y":562.2673225402832,"z":"9d85256.794bfd8","wires":[["70fd0b18.96fdf4"]]},{"id":"c5fcedfe.366e1","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":670.8626098632812,"y":2206.7674808502197,"z":"9d85256.794bfd8","wires":[["4700a122.f4dac","36986bb9.23cbc4","460b74b4.c2c05c"]]},{"id":"4700a122.f4dac","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":941.1706275939941,"y":2259.7656816467643,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"36986bb9.23cbc4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":932.1706771850586,"y":2228.265707395971,"z":"9d85256.794bfd8","wires":[["36e7add1.93abd2"]]},{"id":"460b74b4.c2c05c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":935.9207153320312,"y":2198.622812271118,"z":"9d85256.794bfd8","wires":[["5404b4c7.e2032c"]]},{"id":"36e7add1.93abd2","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1101.9207153320312,"y":2229.0157312378287,"z":"9d85256.794bfd8","wires":[]},{"id":"70fd0b18.96fdf4","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1069.814853668213,"y":560.7672233581543,"z":"9d85256.794bfd8","wires":[["b8f11906.dba3b8"]]},{"id":"b8f11906.dba3b8","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1280.6720962524414,"y":560.3863525390625,"z":"9d85256.794bfd8","wires":[["9b410254.194e9","33e90ef6.f223c2"]]},{"id":"9b410254.194e9","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1470.0054016113281,"y":560.3863105773926,"z":"9d85256.794bfd8","wires":[["15bf006b.a87d5"]]},{"id":"f9f3fdcd.0ab34","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1943.1962203979492,"y":523.6245260238647,"z":"9d85256.794bfd8","wires":[]},{"id":"15bf006b.a87d5","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1654.529291152954,"y":557.2911443710327,"z":"9d85256.794bfd8","wires":[["f9f3fdcd.0ab34","e7cd0298.e8dcc","bba9d10e.349f9"]]},{"id":"e7cd0298.e8dcc","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1951.1961479187012,"y":587.719669342041,"z":"9d85256.794bfd8","wires":[]},{"id":"2bf64ead.e3bc32","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":668.8147926330566,"y":528.7672119140625,"z":"9d85256.794bfd8","wires":[]},{"id":"93e5a3ab.9544a","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1959.196002960205,"y":554.6244812011719,"z":"9d85256.794bfd8","wires":[["9b9adb79.d81988","d559dc4.b4c922"]]},{"id":"9b9adb79.d81988","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2194.8436737060547,"y":569.0531902313232,"z":"9d85256.794bfd8","wires":[["d622bf5.875044"]]},{"id":"d622bf5.875044","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2435.462423324585,"y":571.9577798843384,"z":"9d85256.794bfd8","wires":[]},{"id":"6578d3d4.5476dc","type":"set","name":"unset ar-assignments.vlan-tag","xml":"<set>\n<parameter name='ar-assignments.vlan-tag' value=\"\" />\n\n\n\n","comments":"","x":616.862419128418,"y":1670.0531845092773,"z":"9d85256.794bfd8","wires":[]},{"id":"bba9d10e.349f9","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":2031.0532722473145,"y":490.4340181350708,"z":"9d85256.794bfd8","wires":[]},{"id":"7d4ef2a7.fd27ec","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":583.9576530456543,"y":422.62435245513916,"z":"9d85256.794bfd8","wires":[]},{"id":"5404b4c7.e2032c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1077.5766830444336,"y":2194.8149814605713,"z":"9d85256.794bfd8","wires":[[]]},{"id":"a2b2b115.328ef","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":593.5767288208008,"y":2099.1481199264526,"z":"9d85256.794bfd8","wires":[[]]},{"id":"ba60bed0.88369","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1653.666997909546,"y":673.3333854675293,"z":"9d85256.794bfd8","wires":[]},{"id":"c49c58ea.301828","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":892.6666526794434,"y":597.3334074020386,"z":"9d85256.794bfd8","wires":[["25ba4dc1.5132b2"]]},{"id":"25ba4dc1.5132b2","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1072.666603088379,"y":597.9999580383301,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"dca3aceb.03885","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":564.666618347168,"y":593.6666221618652,"z":"9d85256.794bfd8","wires":[]},{"id":"33e90ef6.f223c2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1458.3333549499512,"y":597.6666707992554,"z":"9d85256.794bfd8","wires":[["ba60bed0.88369"]]},{"id":"41d0055a.f5d40c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2419.333469390869,"y":537.6666975021362,"z":"9d85256.794bfd8","wires":[[]]},{"id":"1e0333e0.bb844c","type":"comment","name":"Call contrail api here","info":"","comments":"","x":594.8571243286133,"y":660.2857151031494,"z":"9d85256.794bfd8","wires":[]},{"id":"5db846ef.38ec08","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1327.9999771118164,"y":2228.3333263397217,"z":"9d85256.794bfd8","wires":[]},{"id":"48ad7bf5.74a014","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":627.333251953125,"y":2048.3332138061523,"z":"9d85256.794bfd8","wires":[]},{"id":"d559dc4.b4c922","type":"outcome","name":"outcome Active","xml":"<outcome value='Active'>\n","comments":"","outputs":1,"x":2209.6053161621094,"y":537.2912015914917,"z":"9d85256.794bfd8","wires":[["41d0055a.f5d40c"]]},{"id":"9376585b.91de78","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n","comments":"","outputs":1,"x":615.3333129882812,"y":1826.6666622161865,"z":"9d85256.794bfd8","wires":[["5f9fa013.45a14","1dfd3b63.382635"]]},{"id":"5f9fa013.45a14","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":871.0952453613281,"y":1803.904836654663,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"1dfd3b63.382635","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":876.4046745300293,"y":1839.4762544631958,"z":"9d85256.794bfd8","wires":[["e7c07e31.eaec"]]},{"id":"e7c07e31.eaec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1086.1904602050781,"y":1805.5238809585571,"z":"9d85256.794bfd8","wires":[]},{"id":"a91079be.620158","type":"comment","name":"Update AAI AR","info":"","comments":"","x":578.6761703491211,"y":1790.095106124878,"z":"9d85256.794bfd8","wires":[]},{"id":"98d3d9af.b219d8","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":593,"y":626,"z":"9d85256.794bfd8","wires":[]},{"id":"d67ce795.d438a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1639.571683883667,"y":772.6666259765625,"z":"9d85256.794bfd8","wires":[]},{"id":"95b2d8a8.b95fe8","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":893.1903457641602,"y":926.0476361513138,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"d0cfc654.944c28","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.src-network\">\n","comments":"","outputs":1,"x":616.3886871337891,"y":937.294153213501,"z":"9d85256.794bfd8","wires":[["27df97d8.1b3568","95b2d8a8.b95fe8","ff40702c.ccb5a"]]},{"id":"27df97d8.1b3568","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":885.9124526977539,"y":960.5322400331497,"z":"9d85256.794bfd8","wires":[["587d3201.9d2dec"]]},{"id":"587d3201.9d2dec","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 source network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1038.0234146118164,"y":956.754469037056,"z":"9d85256.794bfd8","wires":[]},{"id":"ff40702c.ccb5a","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":891.1904067993164,"y":992.0476361513138,"z":"9d85256.794bfd8","wires":[["71fad46f.afcc4c"]]},{"id":"71fad46f.afcc4c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1043.8569717407227,"y":990.3809643983841,"z":"9d85256.794bfd8","wires":[[]]},{"id":"5c5f3058.c0223","type":"comment","name":"GET source network from AAI","info":"","comments":"","x":594.6189041137695,"y":906.0476303100586,"z":"9d85256.794bfd8","wires":[]},{"id":"4cfc272e.3ba048","type":"not-found","name":"not found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":910.9046859741211,"y":1189.7619500160217,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"4fb1ccbe.de9264","type":"get-resource","name":"get AnAI - l3-network by network-id","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx=\"aai.dest-network\">\n","comments":"","outputs":1,"x":639.531608581543,"y":1197.2942109107971,"z":"9d85256.794bfd8","wires":[["dc427390.11d98","4cfc272e.3ba048","3deff125.68148e"]]},{"id":"dc427390.11d98","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":903.6267929077148,"y":1224.2465538978577,"z":"9d85256.794bfd8","wires":[["a32dd432.848348"]]},{"id":"a32dd432.848348","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 destination network with network-id=' + $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id + ' from AnAI'`\" />","comments":"","x":1055.7377548217773,"y":1220.468782901764,"z":"9d85256.794bfd8","wires":[]},{"id":"3deff125.68148e","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":913.4761962890625,"y":1258.6190185546875,"z":"9d85256.794bfd8","wires":[["9214480a.91e1e8"]]},{"id":"9214480a.91e1e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1066.1427612304688,"y":1256.9523468017578,"z":"9d85256.794bfd8","wires":[[]]},{"id":"2a49204d.cef83","type":"comment","name":"GET dest network from AAI","info":"","comments":"","x":612.3332290649414,"y":1165.4762029647827,"z":"9d85256.794bfd8","wires":[]},{"id":"cbccf77c.4013d8","type":"set","name":"set policy fq-name","xml":"<set>\n<parameter name='tmp.fq-name' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name` \" />\n","comments":"","x":565.3333129882812,"y":983.1903915405273,"z":"9d85256.794bfd8","wires":[]},{"id":"e468068e.f8fd78","type":"set","name":"set cloud-region-id for input to contrail","xml":"<set>\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n","comments":"","x":627.327995300293,"y":1017.2802391052246,"z":"9d85256.794bfd8","wires":[]},{"id":"3eceb01b.795e6","type":"execute","name":"execute Contrail API apply network policy to source network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.src-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":703.5185165405273,"y":1090.2804369926453,"z":"9d85256.794bfd8","wires":[["701abbd2.7e3b54","94120abf.4d0b08"]]},{"id":"701abbd2.7e3b54","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1059.1850128173828,"y":1090.7086639404297,"z":"9d85256.794bfd8","wires":[["dcb9ff58.45886"]]},{"id":"94120abf.4d0b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1057.2803344726562,"y":1123.7086037062109,"z":"9d85256.794bfd8","wires":[["a24bc0fc.7cfa4"]]},{"id":"a24bc0fc.7cfa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from source network\" />\n","comments":"","x":1217.1851043701172,"y":1123.0419702529907,"z":"9d85256.794bfd8","wires":[]},{"id":"dcb9ff58.45886","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1211.3754959106445,"y":1091.3753889463842,"z":"9d85256.794bfd8","wires":[[]]},{"id":"b42adb13.7a13e8","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":619.9046859741211,"y":862.3332405090332,"z":"9d85256.794bfd8","wires":[["5424210d.1c802","971927f5.16bf58"]]},{"id":"5424210d.1c802","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":975.9049034118652,"y":860.9996199607849,"z":"9d85256.794bfd8","wires":[["e39e1e1a.7ac94"]]},{"id":"971927f5.16bf58","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":971.571720123291,"y":823.9994201660156,"z":"9d85256.794bfd8","wires":[["4f4a92a0.e38f1c"]]},{"id":"b98ee4e8.38eb78","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1367.730339050293,"y":861.01544713974,"z":"9d85256.794bfd8","wires":[["f9657d22.1dd65","c9ebc8c2.c7d948"]]},{"id":"f9657d22.1dd65","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1656.730339050293,"y":863.0155081748962,"z":"9d85256.794bfd8","wires":[["839cc49f.136208"]]},{"id":"c9ebc8c2.c7d948","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1636.730339050293,"y":898.0155081748962,"z":"9d85256.794bfd8","wires":[["16bca9c2.7dc4c6"]]},{"id":"e39e1e1a.7ac94","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1110.0161590576172,"y":861.4440245628357,"z":"9d85256.794bfd8","wires":[["b98ee4e8.38eb78"]]},{"id":"4f4a92a0.e38f1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1125.7051849365234,"y":824.6663227081299,"z":"9d85256.794bfd8","wires":[]},{"id":"95f9228a.7f106","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":657.3050079345703,"y":828.9995565414429,"z":"9d85256.794bfd8","wires":[]},{"id":"c66b5efd.1ec84","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2099.9047470092773,"y":898.3332633972168,"z":"9d85256.794bfd8","wires":[["f15b62ec.d4784"]]},{"id":"16bca9c2.7dc4c6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1825.888786315918,"y":898.4592633247375,"z":"9d85256.794bfd8","wires":[["c66b5efd.1ec84"]]},{"id":"839cc49f.136208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":1838.3934860229492,"y":862.8888339996338,"z":"9d85256.794bfd8","wires":[]},{"id":"f15b62ec.d4784","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2392.45955657959,"y":895.2223901748657,"z":"9d85256.794bfd8","wires":[["20466326.cc228c","e3af7381.016dd"]]},{"id":"ca02674e.84b438","type":"set","name":"set tenantid and cloud region id","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2980.1261596679688,"y":885.2223739624023,"z":"9d85256.794bfd8","wires":[]},{"id":"8017154b.206ea8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2742.1926708221436,"y":898.2223787307739,"z":"9d85256.794bfd8","wires":[["ca02674e.84b438","b9dd247f.268ab8"]]},{"id":"20466326.cc228c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2586.726047515869,"y":898.2222414016724,"z":"9d85256.794bfd8","wires":[["8017154b.206ea8"]]},{"id":"e3af7381.016dd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2587.5256576538086,"y":936.2222442626953,"z":"9d85256.794bfd8","wires":[["5a94e0ce.bbd29"]]},{"id":"5a94e0ce.bbd29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error activating contrail route. Source network not found\" />\n","comments":"","x":2765.5258140563965,"y":936.2223100662231,"z":"9d85256.794bfd8","wires":[]},{"id":"b9dd247f.268ab8","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2954.5927734375,"y":921.2220630645752,"z":"9d85256.794bfd8","wires":[["dd7ba10c.161b9","cbf42233.390d7","866c3c16.228b3"]]},{"id":"dd7ba10c.161b9","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3191.4541015625,"y":935.8331546783447,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"cbf42233.390d7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3186.7871284484863,"y":969.1664686203003,"z":"9d85256.794bfd8","wires":[["6068b4e5.0f7b2c"]]},{"id":"6068b4e5.0f7b2c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3360.963050842285,"y":957.2220277786255,"z":"9d85256.794bfd8","wires":[]},{"id":"866c3c16.228b3","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3186.963134765625,"y":904.2591190338135,"z":"9d85256.794bfd8","wires":[["f29d601d.cb81d"]]},{"id":"f29d601d.cb81d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3366.963134765625,"y":902.2591190338135,"z":"9d85256.794bfd8","wires":[["2300be73.7c54a2"]]},{"id":"2300be73.7c54a2","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3553.926239013672,"y":899.8888607025146,"z":"9d85256.794bfd8","wires":[]},{"id":"4c6f65c8.0d26bc","type":"comment","name":"Apply the policy to source network","info":"","comments":"","x":621.9047012329102,"y":1058.3332691192627,"z":"9d85256.794bfd8","wires":[]},{"id":"8edbb4f5.1da278","type":"execute","name":"execute Contrail API apply network policy to destination network","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='remove' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n<parameter name='contrail-network-policy-fq-name' value='`$ar-assignments.contrail-fq-name`' />\n<parameter name='contrail-virtual-network-id' value='`$aai.dest-network.contrail-network-fqdn`' />\n\n","comments":"","outputs":1,"x":727.9047470092773,"y":1342.3332767486572,"z":"9d85256.794bfd8","wires":[["40503601.fe4738","90fb633f.f3b86"]]},{"id":"40503601.fe4738","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1063.5711822509766,"y":1342.7614674568176,"z":"9d85256.794bfd8","wires":[["a824091b.d45238"]]},{"id":"90fb633f.f3b86","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1061.66650390625,"y":1375.7614072225988,"z":"9d85256.794bfd8","wires":[["a6d7eb4e.7a67a8"]]},{"id":"a6d7eb4e.7a67a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to remove policy in Contrail from dest network\" />\n","comments":"","x":1221.571273803711,"y":1375.0947737693787,"z":"9d85256.794bfd8","wires":[]},{"id":"a824091b.d45238","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1215.7616653442383,"y":1343.4281924627721,"z":"9d85256.794bfd8","wires":[[]]},{"id":"53b61fa1.1416d","type":"comment","name":"Apply the policy to dest network","info":"","comments":"","x":626.2908706665039,"y":1310.3860726356506,"z":"9d85256.794bfd8","wires":[]},{"id":"f68288a2.a88758","type":"comment","name":"Update network policy in AAI - relationship to networks","info":"","comments":"","x":689.9047546386719,"y":1452.3332481384277,"z":"9d85256.794bfd8","wires":[]},{"id":"4619cd3d.096d04","type":"save","name":"delete AnAI - network-policy relationship to source/dest network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy:relationship-list\" \n\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id and related-to = 'l3-network' \" >\n\n\n\n","comments":"","outputs":1,"x":727.2816619873047,"y":1485.4009227752686,"z":"9d85256.794bfd8","wires":[["c2ba7845.aba188","9531a4a4.802f48"]]},{"id":"d37f50f9.c5788","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1275.6271018981934,"y":1479.6824353933334,"z":"9d85256.794bfd8","wires":[]},{"id":"c2ba7845.aba188","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1047.0557098388672,"y":1482.6981729269028,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]},{"id":"9531a4a4.802f48","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1050.8652076721191,"y":1512.1745895147324,"z":"9d85256.794bfd8","wires":[["d37f50f9.c5788"]]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json
index c0860334..4e737f60 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.json
@@ -1 +1 @@
-[{"id":"becd7f46.fe2bf","type":"dgstart","name":"DGSTART","outputs":1,"x":128.75,"y":27.5,"z":"e569e14b.d5e55","wires":[["adc37c50.19098"]]},{"id":"adc37c50.19098","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":274.9880828857422,"y":102.45239353179932,"z":"e569e14b.d5e55","wires":[["88d121bb.cdd29"]]},{"id":"88d121bb.cdd29","type":"method","name":"contrail-route-topology-operation-delete","xml":"<method rpc='contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":354.9048500061035,"y":171.6904420852661,"z":"e569e14b.d5e55","wires":[["60ab3b30.b86e34"]]},{"id":"60ab3b30.b86e34","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":263.2261848449707,"y":315.023784160614,"z":"e569e14b.d5e55","wires":[["22819c80.b5e484","445b52e8.7f835c","4ac8649d.ada16c","62ed76ff.3c67b8","354e0921.5c5ed6","e3e3d9e6.687068","f049140a.554d68","b627ce5a.c2954","d72864d2.c3f998","79f2ba4.25f5344","a4812fb4.cdeec","1bce9c6e.93a654","c7759fb6.6c31d","6689456.39a4cbc","d86a7f33.843fa","4706a986.175c68","9aa992b8.2845a"]]},{"id":"445b52e8.7f835c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":530.4644355773926,"y":1507.0481815338135,"z":"e569e14b.d5e55","wires":[]},{"id":"22819c80.b5e484","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":559.2183418273926,"y":1469.5039749145508,"z":"e569e14b.d5e55","wires":[]},{"id":"79f2ba4.25f5344","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":594.2184982299805,"y":1348.5514640808105,"z":"e569e14b.d5e55","wires":[]},{"id":"62ed76ff.3c67b8","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":525.4880561828613,"y":288.8333215713501,"z":"e569e14b.d5e55","wires":[]},{"id":"4ac8649d.ada16c","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />\n\n\n","comments":"","x":572.7473182678223,"y":255.0925874710083,"z":"e569e14b.d5e55","wires":[]},{"id":"354e0921.5c5ed6","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":595.7434158325195,"y":324.7315502166748,"z":"e569e14b.d5e55","wires":[[]]},{"id":"f049140a.554d68","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":602.2687454223633,"y":492.959508895874,"z":"e569e14b.d5e55","wires":[["69cfc505.7f3bfc","1595a59f.8ba24a"]]},{"id":"e3e3d9e6.687068","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":559.8148460388184,"y":384.51722526550293,"z":"e569e14b.d5e55","wires":[[]]},{"id":"69cfc505.7f3bfc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":847.5648498535156,"y":493.7673225402832,"z":"e569e14b.d5e55","wires":[["3d3e16bd.d3cd1a"]]},{"id":"b627ce5a.c2954","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":622.3269729614258,"y":1422.600956916809,"z":"e569e14b.d5e55","wires":[["bb0a2810.ed8a78","c90a1d4a.3f87a","fea853dd.97a09"]]},{"id":"bb0a2810.ed8a78","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":892.6349906921387,"y":1475.5991577133536,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"c90a1d4a.3f87a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":883.6350402832031,"y":1444.0991834625602,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"fea853dd.97a09","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":887.3850784301758,"y":1414.4562883377075,"z":"e569e14b.d5e55","wires":[["2d2d87e.03f6078"]]},{"id":"d905f0c9.5808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1053.3850784301758,"y":1444.849207304418,"z":"e569e14b.d5e55","wires":[]},{"id":"3d3e16bd.d3cd1a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1016.5648536682129,"y":492.2672233581543,"z":"e569e14b.d5e55","wires":[["9e65c440.041d18"]]},{"id":"9e65c440.041d18","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1227.4220962524414,"y":491.8863525390625,"z":"e569e14b.d5e55","wires":[["4d39ed9a.01efb4","a3995ce4.1f05c"]]},{"id":"4d39ed9a.01efb4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1416.7554016113281,"y":491.8863105773926,"z":"e569e14b.d5e55","wires":[["5e4bfa25.12c6e4"]]},{"id":"d59088ab.eae808","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1889.9462203979492,"y":455.12452602386475,"z":"e569e14b.d5e55","wires":[]},{"id":"5e4bfa25.12c6e4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1601.279291152954,"y":488.7911443710327,"z":"e569e14b.d5e55","wires":[["d59088ab.eae808","43821273.52747c","4a61db6.87e5124","7d01f23a.bec1cc"]]},{"id":"43821273.52747c","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1897.9461479187012,"y":519.219669342041,"z":"e569e14b.d5e55","wires":[]},{"id":"9fb35462.f52a18","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":615.5647926330566,"y":460.2672119140625,"z":"e569e14b.d5e55","wires":[]},{"id":"7d01f23a.bec1cc","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1905.946002960205,"y":486.1244812011719,"z":"e569e14b.d5e55","wires":[["eac06920.e5b678","b310637f.02fbd"]]},{"id":"eac06920.e5b678","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2119.2125549316406,"y":468.7911968231201,"z":"e569e14b.d5e55","wires":[["febe9e04.e9e54"]]},{"id":"b310637f.02fbd","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2141.5936737060547,"y":500.55319023132324,"z":"e569e14b.d5e55","wires":[["7ce0b7e4.ca1208"]]},{"id":"7ce0b7e4.ca1208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2382.212423324585,"y":503.4577798843384,"z":"e569e14b.d5e55","wires":[]},{"id":"4a61db6.87e5124","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1977.8032722473145,"y":421.9340181350708,"z":"e569e14b.d5e55","wires":[]},{"id":"c977b987.7343b8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":530.7076530456543,"y":354.12435245513916,"z":"e569e14b.d5e55","wires":[]},{"id":"2d2d87e.03f6078","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1029.0410461425781,"y":1410.6484575271606,"z":"e569e14b.d5e55","wires":[[]]},{"id":"d72864d2.c3f998","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":545.0410919189453,"y":1314.981595993042,"z":"e569e14b.d5e55","wires":[[]]},{"id":"9bed6f70.40b63","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1600.416997909546,"y":604.8333854675293,"z":"e569e14b.d5e55","wires":[]},{"id":"1595a59f.8ba24a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":839.4166526794434,"y":528.8334074020386,"z":"e569e14b.d5e55","wires":[["d10e959d.f1af08"]]},{"id":"d10e959d.f1af08","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1019.4166030883789,"y":529.4999580383301,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"a4812fb4.cdeec","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":509.4165802001953,"y":522.8808951377869,"z":"e569e14b.d5e55","wires":[]},{"id":"a3995ce4.1f05c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1405.0833549499512,"y":529.1666707992554,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"febe9e04.e9e54","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2366.083469390869,"y":469.16669750213623,"z":"e569e14b.d5e55","wires":[[]]},{"id":"91ea6f99.223eb","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1279.464340209961,"y":1444.1668024063108,"z":"e569e14b.d5e55","wires":[]},{"id":"6ac1fe37.5f523","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":578.7976150512695,"y":1264.1666898727417,"z":"e569e14b.d5e55","wires":[]},{"id":"1bce9c6e.93a654","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":572.4642715454102,"y":1202.1667737960815,"z":"e569e14b.d5e55","wires":[["67708d06.981c54","b5575696.f84148"]]},{"id":"67708d06.981c54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":828.226203918457,"y":1179.404948234558,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"b5575696.f84148","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":833.5356330871582,"y":1214.9763660430908,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"d0e7d313.62e1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1043.321418762207,"y":1181.0239925384521,"z":"e569e14b.d5e55","wires":[]},{"id":"a58ba31a.f94","type":"comment","name":"Update AAI AR","info":"","comments":"","x":535.80712890625,"y":1165.595217704773,"z":"e569e14b.d5e55","wires":[]},{"id":"c7759fb6.6c31d","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538.2262420654297,"y":553.4048233032227,"z":"e569e14b.d5e55","wires":[]},{"id":"6689456.39a4cbc","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":591.7500228881836,"y":738.0000433921814,"z":"e569e14b.d5e55","wires":[["515c68f.6a6a098","894918d6.e832c8"]]},{"id":"515c68f.6a6a098","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":939.7502098083496,"y":734.666512966156,"z":"e569e14b.d5e55","wires":[["f2deddaa.598f2"]]},{"id":"894918d6.e832c8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":950.4170837402344,"y":682.6663026809692,"z":"e569e14b.d5e55","wires":[["93707edc.f30ee"]]},{"id":"f99240c7.f4772","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2075.194984436035,"y":774.4442907571793,"z":"e569e14b.d5e55","wires":[["da8b3e4d.18624"]]},{"id":"96d519a6.4763b8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1331.5756454467773,"y":734.6823401451111,"z":"e569e14b.d5e55","wires":[["2e19de27.056642","bcf381b3.c76e"]]},{"id":"2e19de27.056642","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1620.5756454467773,"y":736.6824011802673,"z":"e569e14b.d5e55","wires":[["7c9aa9bb.103b58"]]},{"id":"bcf381b3.c76e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1600.5756454467773,"y":771.6824011802673,"z":"e569e14b.d5e55","wires":[["ed771c46.afda1"]]},{"id":"ed771c46.afda1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1805.1789474487305,"y":775.5702749490738,"z":"e569e14b.d5e55","wires":[["f99240c7.f4772"]]},{"id":"f2deddaa.598f2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1073.8614654541016,"y":735.1109175682068,"z":"e569e14b.d5e55","wires":[["96d519a6.4763b8"]]},{"id":"93707edc.f30ee","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1104.5504913330078,"y":681.6664979457855,"z":"e569e14b.d5e55","wires":[]},{"id":"7c9aa9bb.103b58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1813.683723449707,"y":736.9998613595963,"z":"e569e14b.d5e55","wires":[]},{"id":"744200d3.b7b6c","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":621.1503143310547,"y":702.666449546814,"z":"e569e14b.d5e55","wires":[]},{"id":"da8b3e4d.18624","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2367.7497940063477,"y":771.3334175348282,"z":"e569e14b.d5e55","wires":[["2c78c682.af625a","a918ee27.d0f7"]]},{"id":"8003625a.45bf9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2922.416702270508,"y":758.8333740234375,"z":"e569e14b.d5e55","wires":[]},{"id":"ef7f7f6c.34425","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2732.483144760132,"y":771.8333854675293,"z":"e569e14b.d5e55","wires":[["8003625a.45bf9","5c078955.678798"]]},{"id":"2c78c682.af625a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2577.0165214538574,"y":771.8332481384277,"z":"e569e14b.d5e55","wires":[["ef7f7f6c.34425"]]},{"id":"a918ee27.d0f7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2577.816131591797,"y":809.8332509994507,"z":"e569e14b.d5e55","wires":[["510901ad.81fce"]]},{"id":"510901ad.81fce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2755.8162879943848,"y":809.8333168029785,"z":"e569e14b.d5e55","wires":[]},{"id":"5c078955.678798","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2944.8832473754883,"y":794.8330698013306,"z":"e569e14b.d5e55","wires":[["a025d6e3.0cf328","2b3e07b3.856838","80bbe92b.0ca8c8"]]},{"id":"a025d6e3.0cf328","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3165.7446365356445,"y":787.4441843032837,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"2b3e07b3.856838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3161.077663421631,"y":820.7774982452393,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"366a9169.e07f0e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3335.2535858154297,"y":808.8330574035645,"z":"e569e14b.d5e55","wires":[]},{"id":"80bbe92b.0ca8c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3161.2536697387695,"y":755.8701486587524,"z":"e569e14b.d5e55","wires":[["fdc8673.8e4fe98"]]},{"id":"fdc8673.8e4fe98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3341.2536697387695,"y":753.8701486587524,"z":"e569e14b.d5e55","wires":[["dcb00324.4f521"]]},{"id":"dcb00324.4f521","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3528.2167739868164,"y":751.4998903274536,"z":"e569e14b.d5e55","wires":[]},{"id":"17163470.0781cc","type":"comment","name":"Call contrail api here","info":"","comments":"","x":548.0356826782227,"y":794.1667237281799,"z":"e569e14b.d5e55","wires":[]},{"id":"d86a7f33.843fa","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":631.1547546386719,"y":831.8097562789917,"z":"e569e14b.d5e55","wires":[["dbc93224.c778b","d259410.5f4e0c"]]},{"id":"dbc93224.c778b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":912.5356903076172,"y":799.952121887356,"z":"e569e14b.d5e55","wires":[["30e0725f.31f38e"]]},{"id":"d259410.5f4e0c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":910.6310119628906,"y":832.9520616531372,"z":"e569e14b.d5e55","wires":[["8d871542.3bdde8"]]},{"id":"8d871542.3bdde8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to create policy in Contrail\" />\n","comments":"","x":1070.5357818603516,"y":832.2854281999171,"z":"e569e14b.d5e55","wires":[]},{"id":"30e0725f.31f38e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1064.726173400879,"y":800.6188468933105,"z":"e569e14b.d5e55","wires":[[]]},{"id":"bc9dc5ef.cc95b8","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":549.25,"y":1020.5,"z":"e569e14b.d5e55","wires":[]},{"id":"4706a986.175c68","type":"save","name":"delete AnAI - network-policy","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n\n\n\n","comments":"","outputs":1,"x":564.6268844604492,"y":1057.5675649642944,"z":"e569e14b.d5e55","wires":[["40afbc3e.f273b4","b25dd908.c3dfd8"]]},{"id":"89d7c3b.8b4d84","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1036.9723930358887,"y":1047.849178314209,"z":"e569e14b.d5e55","wires":[]},{"id":"40afbc3e.f273b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":808.4010009765625,"y":1046.8649158477783,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"b25dd908.c3dfd8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":812.2104988098145,"y":1076.341332435608,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"9aa992b8.2845a","type":"call","name":"call policy-manager-delete-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-delete-policy' mode='sync' >\n","comments":"","outputs":1,"x":611.6666259765625,"y":918.3333129882812,"z":"e569e14b.d5e55","wires":[["e6c7cfc1.e9849","9ded72db.4afdc"]]},{"id":"e6c7cfc1.e9849","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":847.2459869384766,"y":915.6752805709839,"z":"e569e14b.d5e55","wires":[["ef5c2a2c.1e98b8"]]},{"id":"9ded72db.4afdc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2382545471191,"y":956.4763560295105,"z":"e569e14b.d5e55","wires":[["f106eb88.3f01a8"]]},{"id":"f106eb88.3f01a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9048194885254,"y":954.8096842765808,"z":"e569e14b.d5e55","wires":[[]]},{"id":"ef5c2a2c.1e98b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1005.9524307250977,"y":909.7620401382446,"z":"e569e14b.d5e55","wires":[[]]},{"id":"6ced15d1.6e2fdc","type":"comment","name":"Call policy mgr. continue on failure","info":"","comments":"","x":602.3332977294922,"y":886.6666030883789,"z":"e569e14b.d5e55","wires":[]}]
+[{"id":"becd7f46.fe2bf","type":"dgstart","name":"DGSTART","outputs":1,"x":128.75,"y":27.5,"z":"e569e14b.d5e55","wires":[["adc37c50.19098"]]},{"id":"adc37c50.19098","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":274.9880828857422,"y":102.45239353179932,"z":"e569e14b.d5e55","wires":[["88d121bb.cdd29"]]},{"id":"88d121bb.cdd29","type":"method","name":"contrail-route-topology-operation-delete","xml":"<method rpc='contrail-route-topology-operation-delete' mode='sync'>\n","comments":"","outputs":1,"x":354.9048500061035,"y":171.6904420852661,"z":"e569e14b.d5e55","wires":[["60ab3b30.b86e34"]]},{"id":"60ab3b30.b86e34","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":263.2261848449707,"y":315.023784160614,"z":"e569e14b.d5e55","wires":[["22819c80.b5e484","445b52e8.7f835c","4ac8649d.ada16c","62ed76ff.3c67b8","354e0921.5c5ed6","e3e3d9e6.687068","f049140a.554d68","b627ce5a.c2954","d72864d2.c3f998","79f2ba4.25f5344","a4812fb4.cdeec","1bce9c6e.93a654","c7759fb6.6c31d","6689456.39a4cbc","d86a7f33.843fa","4706a986.175c68","9aa992b8.2845a"]]},{"id":"445b52e8.7f835c","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":530.4644355773926,"y":1507.0481815338135,"z":"e569e14b.d5e55","wires":[]},{"id":"22819c80.b5e484","type":"set","name":"set output to api handler","xml":"<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='contrail-route-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $contrail-route-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n","comments":"","x":559.2183418273926,"y":1469.5039749145508,"z":"e569e14b.d5e55","wires":[]},{"id":"79f2ba4.25f5344","type":"set","name":"set allotted-resource-oper-status","xml":"<set>\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='PendingDelete' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$contrail-route-topology-operation-input.request-information.request-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$contrail-route-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n","comments":"","x":594.2184982299805,"y":1348.5514640808105,"z":"e569e14b.d5e55","wires":[]},{"id":"62ed76ff.3c67b8","type":"set","name":"set tmp.ar.self-link","xml":"<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/contrail-route-topology/'` \" />\n\n","comments":"","x":525.4880561828613,"y":288.8333215713501,"z":"e569e14b.d5e55","wires":[]},{"id":"4ac8649d.ada16c","type":"set","name":"set tmp.ar.allotted-resource-id,etc","xml":"<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n<parameter name='tmp.ar.parent-service-instance-id' value='`$contrail-route-topology-operation-input.allotted-resource-information.parent-service-instance-id`' />\n<parameter name='tmp.ar.sz-vnf-id' value='`$contrail-route-topology-operation-input.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id`' />\n\n\n","comments":"","x":572.7473182678223,"y":255.0925874710083,"z":"e569e14b.d5e55","wires":[]},{"id":"354e0921.5c5ed6","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":595.7434158325195,"y":324.7315502166748,"z":"e569e14b.d5e55","wires":[[]]},{"id":"f049140a.554d68","type":"execute","name":"execute RestApiCallNode - Get AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":602.2687454223633,"y":492.959508895874,"z":"e569e14b.d5e55","wires":[["69cfc505.7f3bfc","1595a59f.8ba24a"]]},{"id":"e3e3d9e6.687068","type":"execute","name":"generate allotted-resource url","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.cr-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n","comments":"","outputs":1,"x":559.8148460388184,"y":384.51722526550293,"z":"e569e14b.d5e55","wires":[[]]},{"id":"69cfc505.7f3bfc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":847.5648498535156,"y":493.7673225402832,"z":"e569e14b.d5e55","wires":[["3d3e16bd.d3cd1a"]]},{"id":"b627ce5a.c2954","type":"execute","name":"execute RestApiCallNode - PUT AR by id","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.cr.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n","comments":"","outputs":1,"x":622.3269729614258,"y":1422.600956916809,"z":"e569e14b.d5e55","wires":[["bb0a2810.ed8a78","c90a1d4a.3f87a","fea853dd.97a09"]]},{"id":"bb0a2810.ed8a78","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":892.6349906921387,"y":1475.5991577133536,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"c90a1d4a.3f87a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":883.6350402832031,"y":1444.0991834625602,"z":"e569e14b.d5e55","wires":[["d905f0c9.5808e"]]},{"id":"fea853dd.97a09","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":887.3850784301758,"y":1414.4562883377075,"z":"e569e14b.d5e55","wires":[["2d2d87e.03f6078"]]},{"id":"d905f0c9.5808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating md-sal for contrail-route-allotted-resource\" />\n","comments":"","x":1053.3850784301758,"y":1444.849207304418,"z":"e569e14b.d5e55","wires":[]},{"id":"3d3e16bd.d3cd1a","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1016.5648536682129,"y":492.2672233581543,"z":"e569e14b.d5e55","wires":[["9e65c440.041d18"]]},{"id":"9e65c440.041d18","type":"switchNode","name":"switch cr length","xml":"<switch test='`$mdsal-ar.contrail-route-allotted-resource_length`'>\n","comments":"","outputs":1,"x":1227.4220962524414,"y":491.8863525390625,"z":"e569e14b.d5e55","wires":[["4d39ed9a.01efb4","a3995ce4.1f05c"]]},{"id":"4d39ed9a.01efb4","type":"other","name":"outcome 1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1416.7554016113281,"y":491.8863105773926,"z":"e569e14b.d5e55","wires":[["5e4bfa25.12c6e4"]]},{"id":"d59088ab.eae808","type":"set","name":"set ar from get","xml":"<set>\n<parameter name='ar.' value='$mdsal-ar.contrail-route-allotted-resource[0].' />\n","comments":"","x":1889.9462203979492,"y":455.12452602386475,"z":"e569e14b.d5e55","wires":[]},{"id":"5e4bfa25.12c6e4","type":"block","name":"block: atomic","xml":"<block atomic='true'>\n","atomic":"false","comments":"","outputs":1,"x":1601.279291152954,"y":488.7911443710327,"z":"e569e14b.d5e55","wires":[["d59088ab.eae808","43821273.52747c","4a61db6.87e5124","7d01f23a.bec1cc"]]},{"id":"43821273.52747c","type":"set","name":"set oper-status","xml":"<set>\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$sz-ar.allotted-resource-status.rpc-action`' />\n<parameter name='sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id`' />\n\n","comments":"","x":1897.9461479187012,"y":519.219669342041,"z":"e569e14b.d5e55","wires":[]},{"id":"9fb35462.f52a18","type":"comment","name":"GET security-zone-allotted-resource from mdsal","info":"","comments":"","x":615.5647926330566,"y":460.2672119140625,"z":"e569e14b.d5e55","wires":[]},{"id":"7d01f23a.bec1cc","type":"switchNode","name":"switch order-status","xml":"<switch test='`$ar.allotted-resource-data.allotted-resource-oper-status.order-status`'>\n","comments":"","outputs":1,"x":1905.946002960205,"y":486.1244812011719,"z":"e569e14b.d5e55","wires":[["eac06920.e5b678","b310637f.02fbd"]]},{"id":"eac06920.e5b678","type":"outcome","name":"outcome PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":2119.2125549316406,"y":468.7911968231201,"z":"e569e14b.d5e55","wires":[["febe9e04.e9e54"]]},{"id":"b310637f.02fbd","type":"outcome","name":"outcome Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2141.5936737060547,"y":500.55319023132324,"z":"e569e14b.d5e55","wires":[["7ce0b7e4.ca1208"]]},{"id":"7ce0b7e4.ca1208","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" \n value=\"`'Existing contrail-route-allotted-resource with order status of ' + $ar.allotted-resource-data.allotted-resource-oper-status.order-status + '.'`\" />\n","comments":"","x":2382.212423324585,"y":503.4577798843384,"z":"e569e14b.d5e55","wires":[]},{"id":"4a61db6.87e5124","type":"set","name":"save backup copy of mdsal-ar for rollback","xml":"<set>\n<parameter name='bk-cr-ar' value='$mdsal-ar.' />\n","comments":"","x":1977.8032722473145,"y":421.9340181350708,"z":"e569e14b.d5e55","wires":[]},{"id":"c977b987.7343b8","type":"comment","name":"Create urls for restapi","info":"","comments":"","x":530.7076530456543,"y":354.12435245513916,"z":"e569e14b.d5e55","wires":[]},{"id":"2d2d87e.03f6078","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1029.0410461425781,"y":1410.6484575271606,"z":"e569e14b.d5e55","wires":[[]]},{"id":"d72864d2.c3f998","type":"execute","name":"execute getTime","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n","comments":"","outputs":1,"x":545.0410919189453,"y":1314.981595993042,"z":"e569e14b.d5e55","wires":[[]]},{"id":"9bed6f70.40b63","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"Error: Contrail Route not found\" />\n \n","comments":"","x":1600.416997909546,"y":604.8333854675293,"z":"e569e14b.d5e55","wires":[]},{"id":"1595a59f.8ba24a","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":839.4166526794434,"y":528.8334074020386,"z":"e569e14b.d5e55","wires":[["d10e959d.f1af08"]]},{"id":"d10e959d.f1af08","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1019.4166030883789,"y":529.4999580383301,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"a4812fb4.cdeec","type":"set","name":"set ar data","xml":"<set>\n<parameter name='ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='ar.allotted-resource-status.action' value=\"`$contrail-route-topology-operation-input.request-information.request-action` \" />\n<parameter name='ar.allotted-resource-status.rpc-name' value=\"contrail-route-topology-operation\" />\n<parameter name='ar.allotted-resource-status.rpc-action' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$contrail-route-topology-operation-input.request-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$contrail-route-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$contrail-route-topology-operation-input.service-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$contrail-route-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.' value=\"`$contrail-route-topology-operation-input.contrail-route-request-input.` \" />\n","comments":"","x":509.4165802001953,"y":522.8808951377869,"z":"e569e14b.d5e55","wires":[]},{"id":"a3995ce4.1f05c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1405.0833549499512,"y":529.1666707992554,"z":"e569e14b.d5e55","wires":[["9bed6f70.40b63"]]},{"id":"febe9e04.e9e54","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2366.083469390869,"y":469.16669750213623,"z":"e569e14b.d5e55","wires":[[]]},{"id":"91ea6f99.223eb","type":"comment","name":"Need to rollback aai here","info":"","comments":"","x":1279.464340209961,"y":1444.1668024063108,"z":"e569e14b.d5e55","wires":[]},{"id":"6ac1fe37.5f523","type":"comment","name":"Create network policy in AAI","info":"","comments":"","x":578.7976150512695,"y":1264.1666898727417,"z":"e569e14b.d5e55","wires":[]},{"id":"1bce9c6e.93a654","type":"update","name":"update AAI allotted-resource","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $service-data.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-data.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-data.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"operational-status\" value=\"null\" />\n","comments":"","outputs":1,"x":572.4642715454102,"y":1202.1667737960815,"z":"e569e14b.d5e55","wires":[["67708d06.981c54","b5575696.f84148"]]},{"id":"67708d06.981c54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":828.226203918457,"y":1179.404948234558,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"b5575696.f84148","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":833.5356330871582,"y":1214.9763660430908,"z":"e569e14b.d5e55","wires":[["d0e7d313.62e1c"]]},{"id":"d0e7d313.62e1c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":1043.321418762207,"y":1181.0239925384521,"z":"e569e14b.d5e55","wires":[]},{"id":"a58ba31a.f94","type":"comment","name":"Update AAI AR","info":"","comments":"","x":535.80712890625,"y":1165.595217704773,"z":"e569e14b.d5e55","wires":[]},{"id":"c7759fb6.6c31d","type":"set","name":"set ar-assignments","xml":"<set>\n<parameter name='ar-assignments.' value=\"`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.`\" />\n\n\n\n","comments":"","x":538.2262420654297,"y":553.4048233032227,"z":"e569e14b.d5e55","wires":[]},{"id":"6689456.39a4cbc","type":"switchNode","name":"switch source-network.network-id","xml":"<switch test='`$ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`'>\n\n","comments":"","outputs":1,"x":591.7500228881836,"y":738.0000433921814,"z":"e569e14b.d5e55","wires":[["515c68f.6a6a098","894918d6.e832c8"]]},{"id":"515c68f.6a6a098","type":"other","name":"Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":939.7502098083496,"y":734.666512966156,"z":"e569e14b.d5e55","wires":[["f2deddaa.598f2"]]},{"id":"894918d6.e832c8","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":950.4170837402344,"y":682.6663026809692,"z":"e569e14b.d5e55","wires":[["93707edc.f30ee"]]},{"id":"f99240c7.f4772","type":"for","name":"for nidx..service-data.networks.network[]","xml":"<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":2075.194984436035,"y":774.4442907571793,"z":"e569e14b.d5e55","wires":[["da8b3e4d.18624"]]},{"id":"96d519a6.4763b8","type":"switchNode","name":"switch service-data.networks.network_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":1331.5756454467773,"y":734.6823401451111,"z":"e569e14b.d5e55","wires":[["2e19de27.056642","bcf381b3.c76e"]]},{"id":"2e19de27.056642","type":"other","name":"outcome Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":1620.5756454467773,"y":736.6824011802673,"z":"e569e14b.d5e55","wires":[["7c9aa9bb.103b58"]]},{"id":"bcf381b3.c76e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1600.5756454467773,"y":771.6824011802673,"z":"e569e14b.d5e55","wires":[["ed771c46.afda1"]]},{"id":"ed771c46.afda1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1805.1789474487305,"y":775.5702749490738,"z":"e569e14b.d5e55","wires":[["f99240c7.f4772"]]},{"id":"f2deddaa.598f2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1073.8614654541016,"y":735.1109175682068,"z":"e569e14b.d5e55","wires":[["96d519a6.4763b8"]]},{"id":"93707edc.f30ee","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1104.5504913330078,"y":681.6664979457855,"z":"e569e14b.d5e55","wires":[]},{"id":"7c9aa9bb.103b58","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":1813.683723449707,"y":736.9998613595963,"z":"e569e14b.d5e55","wires":[]},{"id":"744200d3.b7b6c","type":"comment","name":"Find tenant id/cloud region from source network","info":"","comments":"","x":621.1503143310547,"y":702.666449546814,"z":"e569e14b.d5e55","wires":[]},{"id":"da8b3e4d.18624","type":"switchNode","name":"switch networkid found","xml":"<switch test=\"`$service-data.networks.network[$nidx].network-id == $ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id`\">\n\n","comments":"","outputs":1,"x":2367.7497940063477,"y":771.3334175348282,"z":"e569e14b.d5e55","wires":[["2c78c682.af625a","a918ee27.d0f7"]]},{"id":"8003625a.45bf9","type":"set","name":"set tmp vals","xml":"<set>\n<parameter name='tmp.ar.tenant-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.tenant`' />\n<parameter name='tmp.ar.cloud-region-id' value='`$service-data.networks.network[$nidx].network-data.network-topology.aic-cloud-region`' />\n\n\n","comments":"","x":2922.416702270508,"y":758.8333740234375,"z":"e569e14b.d5e55","wires":[]},{"id":"ef7f7f6c.34425","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2732.483144760132,"y":771.8333854675293,"z":"e569e14b.d5e55","wires":[["8003625a.45bf9","5c078955.678798"]]},{"id":"2c78c682.af625a","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2577.0165214538574,"y":771.8332481384277,"z":"e569e14b.d5e55","wires":[["ef7f7f6c.34425"]]},{"id":"a918ee27.d0f7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2577.816131591797,"y":809.8332509994507,"z":"e569e14b.d5e55","wires":[["510901ad.81fce"]]},{"id":"510901ad.81fce","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error assigning contrail route. Source network not found\" />\n","comments":"","x":2755.8162879943848,"y":809.8333168029785,"z":"e569e14b.d5e55","wires":[]},{"id":"5c078955.678798","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND\n\t\t tenant.tenant-id = $tmp.ar.tenant-id\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":2944.8832473754883,"y":794.8330698013306,"z":"e569e14b.d5e55","wires":[["a025d6e3.0cf328","2b3e07b3.856838","80bbe92b.0ca8c8"]]},{"id":"a025d6e3.0cf328","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":3165.7446365356445,"y":787.4441843032837,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"2b3e07b3.856838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3161.077663421631,"y":820.7774982452393,"z":"e569e14b.d5e55","wires":[["366a9169.e07f0e"]]},{"id":"366a9169.e07f0e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":3335.2535858154297,"y":808.8330574035645,"z":"e569e14b.d5e55","wires":[]},{"id":"80bbe92b.0ca8c8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":3161.2536697387695,"y":755.8701486587524,"z":"e569e14b.d5e55","wires":[["fdc8673.8e4fe98"]]},{"id":"fdc8673.8e4fe98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3341.2536697387695,"y":753.8701486587524,"z":"e569e14b.d5e55","wires":[["dcb00324.4f521"]]},{"id":"dcb00324.4f521","type":"set","name":"set tenant name","xml":"<set>\n<parameter name='tmp.ar.tenant-name' value='`$aai.tenant.tenant-name`' />\n\n\n","comments":"","x":3528.2167739868164,"y":751.4998903274536,"z":"e569e14b.d5e55","wires":[]},{"id":"17163470.0781cc","type":"comment","name":"Call contrail api here","info":"","comments":"","x":548.0356826782227,"y":794.1667237281799,"z":"e569e14b.d5e55","wires":[]},{"id":"d86a7f33.843fa","type":"execute","name":"execute Contrail API delete network policy","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='delete' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$tmp.ar.cloud-region-id`' />\n<parameter name='contrail-network-policy-id' value='`$ar-assignments.contrail-id`' />\n\n","comments":"","outputs":1,"x":631.1547546386719,"y":831.8097562789917,"z":"e569e14b.d5e55","wires":[["dbc93224.c778b","d259410.5f4e0c"]]},{"id":"dbc93224.c778b","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":912.5356903076172,"y":799.952121887356,"z":"e569e14b.d5e55","wires":[["30e0725f.31f38e"]]},{"id":"d259410.5f4e0c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":910.6310119628906,"y":832.9520616531372,"z":"e569e14b.d5e55","wires":[["8d871542.3bdde8"]]},{"id":"8d871542.3bdde8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to create policy in Contrail\" />\n","comments":"","x":1070.5357818603516,"y":832.2854281999171,"z":"e569e14b.d5e55","wires":[]},{"id":"30e0725f.31f38e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1064.726173400879,"y":800.6188468933105,"z":"e569e14b.d5e55","wires":[[]]},{"id":"bc9dc5ef.cc95b8","type":"comment","name":"Delete network policy in AAI","info":"","comments":"","x":549.25,"y":1020.5,"z":"e569e14b.d5e55","wires":[]},{"id":"4706a986.175c68","type":"save","name":"delete AnAI - network-policy","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"network-policy\" \n\t\tkey=\"network-policy.network-policy-id = $ar-assignments.contrail-id\" >\n\n\n\n","comments":"","outputs":1,"x":564.6268844604492,"y":1057.5675649642944,"z":"e569e14b.d5e55","wires":[["40afbc3e.f273b4","b25dd908.c3dfd8"]]},{"id":"89d7c3b.8b4d84","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to save network policy in AAI\" />\n","comments":"","x":1036.9723930358887,"y":1047.849178314209,"z":"e569e14b.d5e55","wires":[]},{"id":"40afbc3e.f273b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":808.4010009765625,"y":1046.8649158477783,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"b25dd908.c3dfd8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":812.2104988098145,"y":1076.341332435608,"z":"e569e14b.d5e55","wires":[["89d7c3b.8b4d84"]]},{"id":"9aa992b8.2845a","type":"call","name":"call policy-manager-delete-policy","xml":"<call module='GENERIC-RESOURCE-API' rpc='policy-manager-delete-policy' mode='sync' >\n","comments":"","outputs":1,"x":611.6666259765625,"y":918.3333129882812,"z":"e569e14b.d5e55","wires":[["e6c7cfc1.e9849","9ded72db.4afdc"]]},{"id":"e6c7cfc1.e9849","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":847.2459869384766,"y":915.6752805709839,"z":"e569e14b.d5e55","wires":[["ef5c2a2c.1e98b8"]]},{"id":"9ded72db.4afdc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2382545471191,"y":956.4763560295105,"z":"e569e14b.d5e55","wires":[["f106eb88.3f01a8"]]},{"id":"f106eb88.3f01a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1005.9048194885254,"y":954.8096842765808,"z":"e569e14b.d5e55","wires":[[]]},{"id":"ef5c2a2c.1e98b8","type":"block","name":"block: atomic","xml":"<block atomic=\"true\">\n","atomic":"false","comments":"","outputs":1,"x":1005.9524307250977,"y":909.7620401382446,"z":"e569e14b.d5e55","wires":[[]]},{"id":"6ced15d1.6e2fdc","type":"comment","name":"Call policy mgr. continue on failure","info":"","comments":"","x":602.3332977294922,"y":886.6666030883789,"z":"e569e14b.d5e55","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json
index 1bd23a66..eadc9b3e 100644
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_network-topology-operation-assign.json
@@ -1 +1 @@
-[{"id":"89493007.0268b","type":"dgstart","name":"DGSTART","outputs":1,"x":111,"y":80,"z":"1a8b5305.c085cd","wires":[["a4a8f170.658a9"]]},{"id":"a4a8f170.658a9","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":254.2856903076172,"y":140.2381067276001,"z":"1a8b5305.c085cd","wires":[["751a884f.6eaac8"]]},{"id":"751a884f.6eaac8","type":"method","name":"network-topology-operation-assign","xml":"<method rpc='network-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":229.96437072753906,"y":220.892840385437,"z":"1a8b5305.c085cd","wires":[["df0099f6.6eeb38"]]},{"id":"df0099f6.6eeb38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":189.28572845458984,"y":405.1578025817871,"z":"1a8b5305.c085cd","wires":[["b6852699.060e68","f58c2417.cbf1f8","91b6be2e.099cc","c7c72a39.652de8","8773a6fd.bcffa8","71a62cc6.0c1ad4","9c5b3463.cd7bf8","a057f23f.aa6af","868ff2ba.bc798","679ee129.c4252","34cb595d.aff816","a5f2c0c4.2e002","aa240c34.3d017","cae13e62.0dbe2","b7ab3890.826f88","a6f05dc6.5396f","2fbd77c1.048628","a9dd6669.a72c38","7a1a7c2.ce09484","5b1e35b2.5ea92c","60381262.576cfc","b629208a.09c27","4728dc8a.76ddd4","a2da1074.b277a","e495d7bf.6827a8","797304de.6cccec","ed1fbf08.fa0f9","cb2ae5c7.b8f7a8","2709264e.6759fa","ca6d6436.b4f728","61bb926f.cd7d7c","13db491e.a822c7","63bb1d97.e60064"]]},{"id":"b6852699.060e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":501.7738227844238,"y":3448.8575134277344,"z":"1a8b5305.c085cd","wires":[]},{"id":"f58c2417.cbf1f8","type":"switchNode","name":"switch network-model.is-bound-to-vpn","xml":"<switch test='`$network-model.is-bound-to-vpn`'>\n","comments":"","outputs":1,"x":577.6110610961914,"y":263.6111059188843,"z":"1a8b5305.c085cd","wires":[["c74440f1.9c51e"]]},{"id":"c74440f1.9c51e","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":842.6110649108887,"y":263.6111068725586,"z":"1a8b5305.c085cd","wires":[["9b88c546.2f2778"]]},{"id":"9b88c546.2f2778","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1005.3611068725586,"y":264.1110954284668,"z":"1a8b5305.c085cd","wires":[["960cc18d.2fd1b"]]},{"id":"be126fa6.e030e","type":"get-resource","name":"get-resource vpn-binding","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.vpn-id = $vpn-bindings[$vidx].binding-uuid\"\n pfx='aai.vpnBinding' local-only='false' >\n\n","comments":"","outputs":1,"x":2285.932662963867,"y":257.8849563598633,"z":"1a8b5305.c085cd","wires":[["612f7c79.d93d64","29e26ef4.5879a2","70ec648.56c6c9c"]]},{"id":"612f7c79.d93d64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2521.8889961242676,"y":229.63891220092773,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"29e26ef4.5879a2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2514.8889389038086,"y":262.972243309021,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"b29726d5.228328","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vpn binding found for network-model.vpn-binding=' \n + $vpn-bindings[$vidx].binding-uuid`\" />\n\n","comments":"","x":2704.031726837158,"y":234.21033000946045,"z":"1a8b5305.c085cd","wires":[]},{"id":"91b6be2e.099cc","type":"switchNode","name":"switch network-request-information.network-name","xml":"<switch test='`$network-topology-operation-input.network-request-input.network-name`'>\n","comments":"","outputs":1,"x":604.3651161193848,"y":470.68650007247925,"z":"1a8b5305.c085cd","wires":[["22435a1e.c63286","1ea3bcf5.db62a3"]]},{"id":"a4d718a8.4b5a78","type":"comment","name":"if network-name not populated, generate","info":"","comments":"","x":577.8889389038086,"y":297.6388816833496,"z":"1a8b5305.c085cd","wires":[]},{"id":"22435a1e.c63286","type":"other","name":"outcome NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":899.5556564331055,"y":463.97219467163086,"z":"1a8b5305.c085cd","wires":[["1d9431b.4db66ce"]]},{"id":"1d9431b.4db66ce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1092.8888549804688,"y":461.3055396080017,"z":"1a8b5305.c085cd","wires":[["a9e920ad.ae72"]]},{"id":"a9e920ad.ae72","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1387.5554695129395,"y":459.3055396080017,"z":"1a8b5305.c085cd","wires":[["2c61b334.66b64c","a3fb55a9.a89968"]]},{"id":"2c61b334.66b64c","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1707.5555229187012,"y":447.30554962158203,"z":"1a8b5305.c085cd","wires":[["e30091c0.02f1a"]]},{"id":"e30091c0.02f1a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1876.305564880371,"y":447.80553817749023,"z":"1a8b5305.c085cd","wires":[["7a3fdfa5.4ccd4"]]},{"id":"a3fb55a9.a89968","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1698.7778129577637,"y":480.30554962158203,"z":"1a8b5305.c085cd","wires":[["da34b64.c9ee048"]]},{"id":"da34b64.c9ee048","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network name is required if ecomp naming is false\" />\n\n","comments":"","x":1876.7778129577637,"y":479.30554962158203,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a3fdfa5.4ccd4","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.naming-policy`'>\n","comments":"","outputs":1,"x":2198.221389770508,"y":447.3055124282837,"z":"1a8b5305.c085cd","wires":[["f1453c06.5ed4a","6b66fa0f.19fd64","f9fba683.787ff8","e3a6601d.ee1c2","d21320c7.875be","3927bc9.ef1ad44"]]},{"id":"6b66fa0f.19fd64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2501.2216873168945,"y":711.3055171966553,"z":"1a8b5305.c085cd","wires":[["42111482.a679dc"]]},{"id":"f1453c06.5ed4a","type":"other","name":"outcome org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork","xml":"<outcome value='org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork'>\n","comments":"","outputs":1,"x":2715.333381652832,"y":615.3055877685547,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"42111482.a679dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unknown naming policy = ' \n + $network-model.naming-policy`\" />\n\n","comments":"","x":2661.665948867798,"y":710.9721937179565,"z":"1a8b5305.c085cd","wires":[]},{"id":"36f8e62e.3e607a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3251.000175476074,"y":188.6388816833496,"z":"1a8b5305.c085cd","wires":[["e8c5e30.358142","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"e8c5e30.358142","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />\n","comments":"","x":3687.6187286376953,"y":85.40079879760742,"z":"1a8b5305.c085cd","wires":[]},{"id":"4ed6dd56.64d354","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_$role_net' />\n","comments":"","x":3685.4286880493164,"y":127.25794219970703,"z":"1a8b5305.c085cd","wires":[]},{"id":"9269a69b.c004e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3201.57186126709,"y":615.3056554794312,"z":"1a8b5305.c085cd","wires":[["4ed6dd56.64d354","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"f9fba683.787ff8","type":"other","name":"outcome org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork","xml":"<outcome value='org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork'>\n","comments":"","outputs":1,"x":2755.111503601074,"y":338.6389513015747,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"dac3091b.c72dd8","type":"execute","name":"execute SliStringUtils - replace tenantname","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$aai.tenant.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":3761.873222351074,"y":250.92461776733398,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"61e7e703.d3e688","type":"execute","name":"execute SliStringUtils - replace role","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$role\"/>\n <parameter name=\"replacement\" value=\"`$network-model.network-role`\"/>\n\n","comments":"","outputs":1,"x":3734.873222351074,"y":285.924617767334,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"749f7e23.95d86","type":"get-resource","name":"get-resource NETWORK_INSTANCE_NAME_INDEX","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix\n = $tmp.network-name-prefix'\n pfx='db.network-name-prefix'>\n\n","comments":"","outputs":1,"x":3784.539970397949,"y":321.924617767334,"z":"1a8b5305.c085cd","wires":[["d1722a3d.4b95d8"]]},{"id":"f1f2ca4a.1510c8","type":"switchNode","name":"switch index-number","xml":"<switch test='`$db.network-name-prefix.index-number`'>\n","comments":"","outputs":1,"x":3690.25431060791,"y":426.21020221710205,"z":"1a8b5305.c085cd","wires":[["e5a7ba6c.507c58","27e6f16.769840e"]]},{"id":"27e6f16.769840e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3873.1113510131836,"y":467.63871574401855,"z":"1a8b5305.c085cd","wires":[["b0448576.a22c18"]]},{"id":"e5a7ba6c.507c58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3874.5399017333984,"y":383.3530445098877,"z":"1a8b5305.c085cd","wires":[["7b9484b0.6f36cc"]]},{"id":"9b3d1da7.01a72","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)\"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4248.825759887695,"y":487.6390686035156,"z":"1a8b5305.c085cd","wires":[["63e45141.ca441"]]},{"id":"7f3fa0.f0f1d06","type":"set","name":"increment index number","xml":"<set>\n<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />\n","comments":"","x":4245.96854019165,"y":360.4960594177246,"z":"1a8b5305.c085cd","wires":[]},{"id":"b0448576.a22c18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.6828956604004,"y":466.21035957336426,"z":"1a8b5305.c085cd","wires":[["a01edb2f.ec40a8","9b3d1da7.01a72"]]},{"id":"d1722a3d.4b95d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4058.825611114502,"y":320.4960289001465,"z":"1a8b5305.c085cd","wires":[["f4b5aa4d.2456c8"]]},{"id":"f4b5aa4d.2456c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading the NETWORK_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4213.111427307129,"y":320.4960479736328,"z":"1a8b5305.c085cd","wires":[]},{"id":"a01edb2f.ec40a8","type":"set","name":"set new index number to 1","xml":"<set>\n<parameter name='tmp.index-number' value='1' />\n","comments":"","x":4254.54012298584,"y":444.78167724609375,"z":"1a8b5305.c085cd","wires":[]},{"id":"9005b1b8.d71dc","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"update NETWORK_INSTANCE_NAME_INDEX\n set index_number = $tmp.index-number\n where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix \"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4253.111484527588,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["d17ac839.1a13f8"]]},{"id":"7b9484b0.6f36cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.682792663574,"y":381.9244918823242,"z":"1a8b5305.c085cd","wires":[["7f3fa0.f0f1d06","9005b1b8.d71dc"]]},{"id":"d17ac839.1a13f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4475.96854019165,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["957fcd83.2301e"]]},{"id":"957fcd83.2301e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to update SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4630.254356384277,"y":401.9246311187744,"z":"1a8b5305.c085cd","wires":[]},{"id":"63e45141.ca441","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4474.539840698242,"y":487.6388244628906,"z":"1a8b5305.c085cd","wires":[["deb7415b.ff8fd"]]},{"id":"deb7415b.ff8fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4628.825656890869,"y":487.63884353637695,"z":"1a8b5305.c085cd","wires":[]},{"id":"c5ab838b.1f37b","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$tmp.network-name-prefix + '_' + $tmp.index-number`\" />\n","comments":"","x":3727.825107574463,"y":505.3531255722046,"z":"1a8b5305.c085cd","wires":[]},{"id":"c7c72a39.652de8","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path'\n value=\"`$tmp.l3-network.self-link`\"/>\n \n","comments":"","x":503.2063407897949,"y":3350.4801511764526,"z":"1a8b5305.c085cd","wires":[]},{"id":"8773a6fd.bcffa8","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$tmp.l3-network.network-id`' />\n","comments":"","x":504.63486099243164,"y":3304.765769958496,"z":"1a8b5305.c085cd","wires":[]},{"id":"a057f23f.aa6af","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />\n","comments":"","x":550.9205741882324,"y":3396.194423675537,"z":"1a8b5305.c085cd","wires":[]},{"id":"71a62cc6.0c1ad4","type":"set","name":"set network in service-data","xml":"<set>\n<parameter name=\"service-data.networks.network[$nidx].network-id\" value='`$tmp.l3-network.network-id`' />\n<parameter name=\"service-data.networks.network[$nidx].network-data.network-topology.\" value='$network-topology.' />\n<parameter name=\"service-data.networks.network_length\" value='`$nidx+1`' />\n\n","comments":"","x":552.4920387268066,"y":3124.051595687866,"z":"1a8b5305.c085cd","wires":[]},{"id":"9c5b3463.cd7bf8","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n","comments":"","x":547.7300186157227,"y":3163.813540458679,"z":"1a8b5305.c085cd","wires":[]},{"id":"868ff2ba.bc798","type":"set","name":"set network-topology-identifier-structure in service-data","xml":"<set>\n<parameter name='network-topology.network-topology-identifier-structure.' value='`$tmp.l3-network.`' />\n<parameter name='network-topology.tenant' value='`$network-topology-operation-input.network-request-input.tenant`' />\n<parameter name='network-topology.onap-model-information.' value='`$network-topology-operation-input.network-information.onap-model-information.`' />\n<parameter name='network-topology.network-parameters.' value='`$network-topology-operation-input.network-request-input.network-input-parameters.`' />\n<parameter name='network-topology.aic-cloud-region' value='`$network-topology-operation-input.network-request-input.aic-cloud-region`' />","comments":"","x":637.4920539855957,"y":3016.908727169037,"z":"1a8b5305.c085cd","wires":[]},{"id":"679ee129.c4252","type":"switchNode","name":"switch service-data.networks_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":582.2538871765137,"y":3073.0992045402527,"z":"1a8b5305.c085cd","wires":[["d892cc25.abd2e","1419948c.74a04b"]]},{"id":"d892cc25.abd2e","type":"other","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":886.0634269714355,"y":3064.0516147613525,"z":"1a8b5305.c085cd","wires":[["256eeb6b.789b54"]]},{"id":"256eeb6b.789b54","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='0' />\n","comments":"","x":1066.0634689331055,"y":3061.6230306625366,"z":"1a8b5305.c085cd","wires":[]},{"id":"1419948c.74a04b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":888.9205894470215,"y":3089.765887260437,"z":"1a8b5305.c085cd","wires":[["265dbf75.6b9f6"]]},{"id":"265dbf75.6b9f6","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='`$service-data.networks.network_length`' />\n","comments":"","x":1067.4920196533203,"y":3098.6230878829956,"z":"1a8b5305.c085cd","wires":[]},{"id":"70ec648.56c6c9c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2517.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[["25c11570.4e18ba"]]},{"id":"25c11570.4e18ba","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2682.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ea7bbc28.439ef","type":"comment","name":"pull vpn binding from db table vs field","info":"","comments":"","x":1884.0740661621094,"y":187.53438568115234,"z":"1a8b5305.c085cd","wires":[]},{"id":"2dde48f4.4544e8","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1858.4393882751465,"y":256.34392642974854,"z":"1a8b5305.c085cd","wires":[["654f5072.a2802"]]},{"id":"654f5072.a2802","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2066.9150428771973,"y":258.4233341217041,"z":"1a8b5305.c085cd","wires":[["be126fa6.e030e"]]},{"id":"911dd542.ed2ee8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unexpected error retrieving vpn binding\" />\n\n","comments":"","x":1638.6769752502441,"y":330.77249813079834,"z":"1a8b5305.c085cd","wires":[]},{"id":"32d5ba47.7aac96","type":"set","name":"set hasVpnBindings=true","xml":"<set>\n<parameter name='hasVpnBindings' value='true' />\n","comments":"","x":1856.6137466430664,"y":224.91532611846924,"z":"1a8b5305.c085cd","wires":[]},{"id":"1ea3bcf5.db62a3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":887.1851005554199,"y":520.2963137626648,"z":"1a8b5305.c085cd","wires":[["e6e8dae5.027898"]]},{"id":"34cb595d.aff816","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND\n\t\t tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":516.6295700073242,"y":382.962947845459,"z":"1a8b5305.c085cd","wires":[["8869ece2.c675b","49964e35.7bcd","f9e58c7b.aacc4"]]},{"id":"8869ece2.c675b","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":737.4909591674805,"y":375.5740623474121,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"49964e35.7bcd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.8239860534668,"y":408.9073762893677,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"12cdda76.c90c96","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":933.666633605957,"y":383.6296272277832,"z":"1a8b5305.c085cd","wires":[]},{"id":"4f0e6905.0b7fa8","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$network-topology-operation-input.network-request-input.network-name`\" />\n","comments":"","x":1342.3702583312988,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[]},{"id":"e6e8dae5.027898","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1085.7036628723145,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[["4f0e6905.0b7fa8"]]},{"id":"aa240c34.3d017","type":"set","name":"set tmp.l3-network","xml":"<set>\n<parameter name='tmp.l3-network.network-id' value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name='tmp.l3-network.network-name' value=\"`$tmp.network-instance-name`\" />\n<parameter name='tmp.l3-network.network-type' value=\"`$network-model.network-type`\" />\n<parameter name='tmp.l3-network.network-role' value=\"`$network-model.network-role`\" />\n<parameter name='tmp.l3-network.network-technology' value=\"`$network-model.network-technology`\" />\n<parameter name='tmp.l3-network.is-bound-to-vpn' value=\"`$network-model.is-bound-to-vpn`\" />\n<parameter name='tmp.l3-network.orchestration-status' value=\"PendingCreate\" />\n<parameter name='tmp.l3-network.model-invariant-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`\" />\n<parameter name='tmp.l3-network.model-version-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-version`\" />\n<parameter name='tmp.l3-network.model-customization-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`\" />\n<parameter name='tmp.l3-network.is-provider-network' value=\"`$network-model.is-provider-network`\" />\n<parameter name='tmp.l3-network.is-shared-network' value=\"`$network-model.is-shared-network`\" />\n<parameter name='tmp.l3-network.is-external-network' value=\"`$network-model.is-external-network`\" />\n<parameter name='tmp.l3-network.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.l3-network.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.l3-network.service-id' value=\"`$service-data.service-information.service-id`\" />\n<parameter name='tmp.l3-network.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $tmp.l3-network.network-id\n + '/network-data/network-topology/'` \" />\n","comments":"","x":509.244140625,"y":653.2910766601562,"z":"1a8b5305.c085cd","wires":[]},{"id":"a5f2c0c4.2e002","type":"call","name":"call generate-l3network-network-id","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-l3network-network-id' mode='sync' >\n","comments":"","outputs":1,"x":556.3866653442383,"y":605.7196311950684,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"cae13e62.0dbe2","type":"switchNode","name":"switch network--model.is-provider-network","xml":"<switch test='`$network-model.is-provider-network`'>\n","comments":"","outputs":1,"x":582.7352676391602,"y":694.5768089294434,"z":"1a8b5305.c085cd","wires":[["89c6a854.601f48","7724a3fb.17a6ec"]]},{"id":"89c6a854.601f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":882.8784408569336,"y":679.402265548706,"z":"1a8b5305.c085cd","wires":[["602f391.030b8c8"]]},{"id":"602f391.030b8c8","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"`$network-model.physical-network-name`\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='true' />","comments":"","x":1150.8782958984375,"y":676.4022312164307,"z":"1a8b5305.c085cd","wires":[]},{"id":"4728dc8a.76ddd4","type":"set","name":"set tmp.network-topology","xml":"<set>\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-id' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-name' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-type' value=\"`$tmp.l3-network.network-type`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-role' value=\"`$tmp.l3-network.network-role`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-technology' value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.network-topology.region-identifier.tenant' value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-cloud-region' value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-clli' value=\"`$network-topology-operation-input.network-request-input.aic-clli`\" />\n<parameter name='tmp.network-topology.onap-model-information.' value=\"`$network-topology-operation-input.network-information.onap-model-information.`\" />\n<parameter name='tmp.network-topology.network-parameters.' value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.`\" />\n","comments":"","x":577.4101905822754,"y":2448.9736881256104,"z":"1a8b5305.c085cd","wires":[]},{"id":"bc4df92.6ad6f08","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (VIPR)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2028.5613021850586,"y":1388.909984588623,"z":"1a8b5305.c085cd","wires":[["5efa60f2.f4a81","464197e1.4cabd8","b87722fe.57e3c","279f950e.baf49a"]]},{"id":"5efa60f2.f4a81","type":"other","name":"AIC_ATM_UNPROTECTED_V4","xml":"<outcome value='AIC_ATM_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2488.560722351074,"y":1357.9098014831543,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"464197e1.4cabd8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2412.2276878356934,"y":1473.2434101104736,"z":"1a8b5305.c085cd","wires":[["54efc2e2.b2c12c"]]},{"id":"797304de.6cccec","type":"save","name":"save relationship: service-instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"customer.global-customer-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.service-information.global-customer-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"service-subscription.service-type\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$service-data.service-information.subscription-service-type`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"service-instance.service-instance-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$service-data.service-information.service-instance-id`\" />","comments":"","outputs":1,"x":617.2711410522461,"y":2710.8468132019043,"z":"1a8b5305.c085cd","wires":[["2f4f1f7c.f19a9","29f88949.932b36"]]},{"id":"b87722fe.57e3c","type":"other","name":"AIC_ATM_PROTECTED_V4","xml":"<outcome value='AIC_ATM_PROTECTED_V4'>","comments":"","outputs":1,"x":2478.449333190918,"y":1395.4656400680542,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"54efc2e2.b2c12c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for VIPR\" />\n","comments":"","x":2583.1158714294434,"y":1474.5766925811768,"z":"1a8b5305.c085cd","wires":[]},{"id":"ccfde65e.e5a838","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2064.2953033447266,"y":1737.5170440673828,"z":"1a8b5305.c085cd","wires":[["7d69ddb.4eb1724","661e7fce.8d3e6","cb5bdfca.b22e2","2a9685d1.8f282a"]]},{"id":"7d69ddb.4eb1724","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2531.5452423095703,"y":1736.7669706344604,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"661e7fce.8d3e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2424.15252494812,"y":1851.588595867157,"z":"1a8b5305.c085cd","wires":[["e08c16f9.560da8"]]},{"id":"cb5bdfca.b22e2","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_PROTECTED_V4'>","comments":"","outputs":1,"x":2527.9339141845703,"y":1773.5725135803223,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"e08c16f9.560da8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for SRIOV\" />\n","comments":"","x":2570.0407104492188,"y":1854.1718482971191,"z":"1a8b5305.c085cd","wires":[]},{"id":"2a9685d1.8f282a","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V4","xml":"<outcome value='AIC_DATA_PLANE_PRIVATE_V4'>","comments":"","outputs":1,"x":2510.1525268554688,"y":1812.3384685516357,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"14bf4e76.feb402","type":"switchNode","name":"switch network-model.eipam-v6-address-plan","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2008.493263244629,"y":1556.5017204284668,"z":"1a8b5305.c085cd","wires":[["24428acd.934a56","a8641e83.b8db7","95022c2.dc0f4d","e1a0deaa.2971a"]]},{"id":"a2da1074.b277a","type":"save","name":"save AnAI - l3-network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"network-name\" value=\"`$tmp.l3-network.network-name`\" />\n<parameter name=\"network-type\" value=\"`$tmp.l3-network.network-type`\" />\n<parameter name=\"network-role\" value=\"`$tmp.l3-network.network-role`\" />\n<parameter name=\"network-technology\" value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name=\"is-bound-to-vpn\" value=\"`$tmp.l3-network.is-bound-to-vpn`\" />\n<parameter name=\"service-id\" value=\"`$tmp.l3-network.service-id`\" />\n<parameter name=\"tenant-id\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />\n<parameter name=\"persona-model-id\" value=\"`$tmp.l3-network.persona-model-id`\" />\n<parameter name=\"persona-model-version\" value=\"`$tmp.l3-network.persona-model-version`\" />\n<parameter name=\"persona-model-customization-id\" value=\"`$tmp.l3-network.persona-model-customization-id`\" />\n<parameter name=\"physical-network-name\" value=\"`$tmp.l3-network.physical-network-name`\" />\n<parameter name=\"is-provider-network\" value=\"`$tmp.l3-network.is-provider-network-boolean`\" />\n<parameter name=\"is-shared-network\" value=\"`$tmp.l3-network.is-shared-network-boolean`\" />\n<parameter name=\"is-external-network\" value=\"`$tmp.l3-network.is-external-network-boolean`\" />\n<parameter name=\"selflink\" value=\"`$tmp.l3-network.self-link`\" />\n","comments":"","outputs":1,"x":560.1203231811523,"y":2508.6126823425293,"z":"1a8b5305.c085cd","wires":[["c40893c5.bed6a","cc2e1488.ed29e8"]]},{"id":"a3b08dd5.410cf","type":"switchNode","name":"switch network-model.eipam-v6-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2100.3426971435547,"y":1955.7078790664673,"z":"1a8b5305.c085cd","wires":[["9370dcee.b1658","230c5ba9.b8ec14","8421ed93.f98dc","d1efeef1.782e5","c7ab8d9a.6efc4","4e216a04.bdc844"]]},{"id":"9370dcee.b1658","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2434.770872116089,"y":2150.6365903019905,"z":"1a8b5305.c085cd","wires":[["e7e4c219.08456"]]},{"id":"e7e4c219.08456","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid ipv6 address plan for SRIOV\" />\n","comments":"","x":2600.6589279174805,"y":2149.6485112309456,"z":"1a8b5305.c085cd","wires":[]},{"id":"230c5ba9.b8ec14","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value=\"AIC_ATM_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2503.6082305908203,"y":1956.9102249145508,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"8421ed93.f98dc","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value=\"AIC_ATM_PROTECTED_V6\">","comments":"","outputs":1,"x":2498.893585205078,"y":1998.9102478027344,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"d1efeef1.782e5","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2538.795234680176,"y":2037.0531024932861,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"4e216a04.bdc844","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V6\">","comments":"","outputs":1,"x":2527.509864807129,"y":2104.4815190434456,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"c7ab8d9a.6efc4","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V6\">","comments":"","outputs":1,"x":2515.795440673828,"y":2071.910224914551,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"7724a3fb.17a6ec","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":870.2434997558594,"y":710.2752866744995,"z":"1a8b5305.c085cd","wires":[["e943ec69.aeaf6"]]},{"id":"e943ec69.aeaf6","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='false' />","comments":"","x":1154.5294570922852,"y":708.8467178344727,"z":"1a8b5305.c085cd","wires":[]},{"id":"b7ab3890.826f88","type":"switchNode","name":"switch network--model.is-shared-network","xml":"<switch test='`$network-model.is-shared-network`'>\n","comments":"","outputs":1,"x":583.7351722717285,"y":741.878303527832,"z":"1a8b5305.c085cd","wires":[["ddbe6021.0df94","43db457d.275bfc"]]},{"id":"ddbe6021.0df94","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":881.0210113525391,"y":745.2752389907837,"z":"1a8b5305.c085cd","wires":[["dfdc8285.e2d84"]]},{"id":"dfdc8285.e2d84","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='true' />","comments":"","x":1173.3067245483398,"y":745.2750864028931,"z":"1a8b5305.c085cd","wires":[]},{"id":"43db457d.275bfc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":869.8150367736816,"y":780.5767459869385,"z":"1a8b5305.c085cd","wires":[["48fd2235.78fcdc"]]},{"id":"48fd2235.78fcdc","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='false' />","comments":"","x":1174.1009559631348,"y":780.4339237213135,"z":"1a8b5305.c085cd","wires":[]},{"id":"a6f05dc6.5396f","type":"switchNode","name":"switch network--model.is-external-network","xml":"<switch test='`$network-model.is-external-network`'>\n","comments":"","outputs":1,"x":586.7517318725586,"y":810.5926513671875,"z":"1a8b5305.c085cd","wires":[["dde6ab06.666f48","3f618dc2.181b72"]]},{"id":"dde6ab06.666f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":884.0375709533691,"y":813.9895868301392,"z":"1a8b5305.c085cd","wires":[["fa82ba7a.274818"]]},{"id":"fa82ba7a.274818","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='true' />","comments":"","x":1176.32328414917,"y":813.9894342422485,"z":"1a8b5305.c085cd","wires":[]},{"id":"3f618dc2.181b72","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":872.8315963745117,"y":849.291093826294,"z":"1a8b5305.c085cd","wires":[["1d5e084a.a29b78"]]},{"id":"1d5e084a.a29b78","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='false' />","comments":"","x":1177.1175155639648,"y":849.148271560669,"z":"1a8b5305.c085cd","wires":[]},{"id":"3837a2bc.6e158e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to save l3-network in AAI for network-id = ' + $tmp.l3-network.network-id`\" />\n","comments":"","x":1023.7992134094238,"y":2491.6560916900635,"z":"1a8b5305.c085cd","wires":[]},{"id":"c40893c5.bed6a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":795.2278213500977,"y":2490.671829223633,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"8d2ed5fd.a2be38","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.6559104919434,"y":2591.67188167572,"z":"1a8b5305.c085cd","wires":[["10173bcb.62db54","304a38c0.5ac098"]]},{"id":"e495d7bf.6827a8","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$tmp.l3-network.subnet_length`' >\n","comments":"","outputs":1,"x":562.2121324539185,"y":2569.6719675064087,"z":"1a8b5305.c085cd","wires":[["9a14be8b.c4dce"]]},{"id":"9a14be8b.c4dce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":789.3548126220703,"y":2568.5609188079834,"z":"1a8b5305.c085cd","wires":[["113cc2e1.6bb4ed","cb48f70c.4ee7f8"]]},{"id":"10173bcb.62db54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1934.4962425231934,"y":2548.1478338241577,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"ed1fbf08.fa0f9","type":"save","name":"save relationship: tenant and cloud-region","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t<!-- create relationship-list -->\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"tenant\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"tenant.tenant-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n\t<parameter name=\"relationship-list.relationship[1].related-to\" value=\"cloud-region\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"att-aic\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t\n\t","comments":"","outputs":1,"x":617.9264144897461,"y":2846.2435417175293,"z":"1a8b5305.c085cd","wires":[["f876d5b8.4f26c8","9ea6263d.2cf398"]]},{"id":"f876d5b8.4f26c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.9264183044434,"y":2846.243532180786,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"e0ef3b91.882348","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1054.3192462921143,"y":2845.879650115967,"z":"1a8b5305.c085cd","wires":[["74512067.32d89","21428fc3.65275"]]},{"id":"74512067.32d89","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 tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1300.0851249694824,"y":2836.5820569992065,"z":"1a8b5305.c085cd","wires":[]},{"id":"304a38c0.5ac098","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1943.2193870544434,"y":2585.79102230072,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"9ea6263d.2cf398","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873.9342613220215,"y":2888.0768547058105,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"2f4f1f7c.f19a9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":853.4181060791016,"y":2709.989246368408,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"29f88949.932b36","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":864.1411399841309,"y":2743.632335662842,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"48994ca2.f68244","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\">","comments":"","outputs":1,"x":1814.7355880737305,"y":3411.2118644714355,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca9121d3.7a07d","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 writing to l3-network - ' + $tmp.error-message`\"/>","comments":"","x":1803.3397216796875,"y":3454.407875061035,"z":"1a8b5305.c085cd","wires":[]},{"id":"21428fc3.65275","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1624.911849975586,"y":3411.4634532928467,"z":"1a8b5305.c085cd","wires":[["48994ca2.f68244","ca9121d3.7a07d"]]},{"id":"dc5a36f4.8bbba8","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 subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2374.3692893981934,"y":2563.0052556991577,"z":"1a8b5305.c085cd","wires":[]},{"id":"e72b852c.6da448","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2119.2267112731934,"y":2562.4337224960327,"z":"1a8b5305.c085cd","wires":[["dc5a36f4.8bbba8","21428fc3.65275"]]},{"id":"cc2e1488.ed29e8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":799.0373191833496,"y":2520.1482458114624,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"113cc2e1.6bb4ed","type":"set","name":"set: tmp.subnet-id","xml":"<set>\n<parameter name=\"tmp.subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\"/>\n\t","comments":"","x":1015.4183883666992,"y":2528.8146476745605,"z":"1a8b5305.c085cd","wires":[]},{"id":"cb48f70c.4ee7f8","type":"switchNode","name":"switch dhcp-enabled","xml":"<switch test='`$tmp.l3-network.subnet[$sidx].dhcp-enabled`'>\n","comments":"","outputs":1,"x":1018.7674827575684,"y":2573.683539390564,"z":"1a8b5305.c085cd","wires":[["332a0d9a.2096e2","37b18102.98d6ce"]]},{"id":"37b18102.98d6ce","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1252.7674827575684,"y":2549.6836614608765,"z":"1a8b5305.c085cd","wires":[["bbfc739f.96b1"]]},{"id":"332a0d9a.2096e2","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1250.7674827575684,"y":2585.6836614608765,"z":"1a8b5305.c085cd","wires":[["4c50ff55.54e58"]]},{"id":"412912ba.445eac","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.7672386169434,"y":2547.68360042572,"z":"1a8b5305.c085cd","wires":[["304a38c0.5ac098","10173bcb.62db54"]]},{"id":"bbfc739f.96b1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6559104919434,"y":2549.906012535095,"z":"1a8b5305.c085cd","wires":[["412912ba.445eac"]]},{"id":"4c50ff55.54e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6561546325684,"y":2589.906012535095,"z":"1a8b5305.c085cd","wires":[["8d2ed5fd.a2be38"]]},{"id":"3917cd9.7ed7c32","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1144.9518966674805,"y":2649.239086151123,"z":"1a8b5305.c085cd","wires":[["7c900881.645018"]]},{"id":"cb2ae5c7.b8f7a8","type":"switchNode","name":"switch hasVpnBindings","xml":"<switch test='`$hasVpnBindings`'>\n","comments":"","outputs":1,"x":585.6190299987793,"y":2650.202492713928,"z":"1a8b5305.c085cd","wires":[["8207c0b3.22e3f"]]},{"id":"6cf30f85.f2632","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":946.285758972168,"y":2651.535472869873,"z":"1a8b5305.c085cd","wires":[["3917cd9.7ed7c32"]]},{"id":"5f2018d1.a1d508","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.l3-network.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=\"`$vpn-bindings[$vidx].binding-uuid`\" />","comments":"","outputs":1,"x":1606.285514831543,"y":2649.202220916748,"z":"1a8b5305.c085cd","wires":[["c08b58ea.2e93c8","6ffa9708.073958"]]},{"id":"c08b58ea.2e93c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1838.0251121520996,"y":2648.0110969543457,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"a8bf5972.afc6a8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1994.9179916381836,"y":2647.647204399109,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","55da40d2.2f072"]]},{"id":"6ffa9708.073958","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1847.0555114746094,"y":2682.289525985718,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"7c900881.645018","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1362.6186447143555,"y":2651.201976776123,"z":"1a8b5305.c085cd","wires":[["5f2018d1.a1d508"]]},{"id":"10d1d9fc.30afb6","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1045.581932067871,"y":2709.5356254577637,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","fd152d37.d5acd"]]},{"id":"fd152d37.d5acd","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 service instance relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1270.581932067871,"y":2708.202251434326,"z":"1a8b5305.c085cd","wires":[]},{"id":"55da40d2.2f072","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 vpn binding relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2222.581886291504,"y":2646.8689556121826,"z":"1a8b5305.c085cd","wires":[]},{"id":"b629208a.09c27","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":546.1110458374023,"y":1389.4443473815918,"z":"1a8b5305.c085cd","wires":[["5d98c991.20e8f8","9d4e2f0d.1638","bcb49c2d.d02b3"]]},{"id":"a9dd6669.a72c38","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND \n\t\t depth = '0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.444450378418,"y":982.4443778991699,"z":"1a8b5305.c085cd","wires":[["b1b41c5c.6ac73","b1eb8b68.e93818"]]},{"id":"b1eb8b68.e93818","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":765.8335571289062,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[["358bf8ac.301e38"]]},{"id":"358bf8ac.301e38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":944.1192016601562,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[]},{"id":"b1b41c5c.6ac73","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":772.333553314209,"y":983.1666069030762,"z":"1a8b5305.c085cd","wires":[["cccc3223.636ff"]]},{"id":"cccc3223.636ff","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":940.1113891601562,"y":982.4721488952637,"z":"1a8b5305.c085cd","wires":[]},{"id":"9de966ff.c0be48","type":"comment","name":"Per test failure in IT, need to throw error if relationships don't exist","info":"","comments":"","x":661.6946868896484,"y":939.5276851654053,"z":"1a8b5305.c085cd","wires":[]},{"id":"2fbd77c1.048628","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='false' />\n\n","comments":"","x":529.8890609741211,"y":882.8332328796387,"z":"1a8b5305.c085cd","wires":[]},{"id":"93a30dfc.d4482","type":"get-resource","name":"get-resource complex","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"complex\" \n\t\tkey=\"complex.physical-location-id = $aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value\"\n pfx='aai.complex' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1634.999870300293,"y":1202.4444198608398,"z":"1a8b5305.c085cd","wires":[["4044fb25.8ce8c4","898fafd9.df1f5","9249c225.c0f71"]]},{"id":"898fafd9.df1f5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1866.6391830444336,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[["97d0bcc0.ddc29"]]},{"id":"97d0bcc0.ddc29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving complex from AAI\" />\n","comments":"","x":2040.9248275756836,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[]},{"id":"4044fb25.8ce8c4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1869.1391792297363,"y":1221.9164657592773,"z":"1a8b5305.c085cd","wires":[["b737ddd0.c8ed4"]]},{"id":"b737ddd0.c8ed4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":2036.917106628418,"y":1221.2218132019043,"z":"1a8b5305.c085cd","wires":[]},{"id":"5b1e35b2.5ea92c","type":"for","name":"for relationship list","xml":"<for silentFailure='false' index='ridx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":509.86153411865234,"y":1158.6747665405273,"z":"1a8b5305.c085cd","wires":[["6b0ad57f.0fe9cc"]]},{"id":"862e6c4c.7a97","type":"switchNode","name":"switch","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":915.361198425293,"y":1162.3888778686523,"z":"1a8b5305.c085cd","wires":[["5eb1534d.ddb1fc"]]},{"id":"6b0ad57f.0fe9cc","type":"for","name":"for relationship data","xml":"<for silentFailure='false' index='rdidx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`\" >\n","comments":"","outputs":1,"x":732.7779769897461,"y":1159.6389999389648,"z":"1a8b5305.c085cd","wires":[["862e6c4c.7a97"]]},{"id":"5eb1534d.ddb1fc","type":"other","name":"complex.physical-location-id","xml":"<outcome value='complex.physical-location-id'>\n","comments":"","outputs":1,"x":1137.8612594604492,"y":1160.8055038452148,"z":"1a8b5305.c085cd","wires":[["ec522bfd.604bd8"]]},{"id":"ec522bfd.604bd8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.2775802612305,"y":1158.5556259155273,"z":"1a8b5305.c085cd","wires":[["93a30dfc.d4482","a0b8ae7e.73db","1478ab7a.138b25"]]},{"id":"9249c225.c0f71","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1861.6669752332891,"y":1175.9721787770586,"z":"1a8b5305.c085cd","wires":[["73c62e58.62479"]]},{"id":"73c62e58.62479","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2038.8098449707031,"y":1177.222131729126,"z":"1a8b5305.c085cd","wires":[["97a332a5.2b6c9"]]},{"id":"a0b8ae7e.73db","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.network-request-input.aic-clli' value='`$aai.complex.physical-location-id`' />\n\n","comments":"","x":1601.7781372070312,"y":1165.5000114440918,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a1a7c2.ce09484","type":"switchNode","name":"switch relationship_length","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship_length`'>\n","comments":"","outputs":1,"x":539.8889694213867,"y":1081.7221908569336,"z":"1a8b5305.c085cd","wires":[["727319e3.8edd98","26c69776.80cfa8"]]},{"id":"727319e3.8edd98","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":733.8890414767793,"y":1080.7222796546089,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"26c69776.80cfa8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":735.8890380859375,"y":1119.7223110198975,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"6823a93b.07df48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region missing relationships in AAI\" />\n","comments":"","x":919.8890380859375,"y":1085.7223110198975,"z":"1a8b5305.c085cd","wires":[]},{"id":"1478ab7a.138b25","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='true' />\n\n","comments":"","x":1640.1111450195312,"y":1133.8333854675293,"z":"1a8b5305.c085cd","wires":[]},{"id":"60381262.576cfc","type":"switchNode","name":"switch tmp.complex-found","xml":"<switch test='`$tmp.complex-found`'>\n","comments":"","outputs":1,"x":537.8890914916992,"y":1241.9444198608398,"z":"1a8b5305.c085cd","wires":[["5a328de2.03b8b4"]]},{"id":"5a328de2.03b8b4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":755.3890914916992,"y":1241.3055038452148,"z":"1a8b5305.c085cd","wires":[["e8bfbba2.de15b8"]]},{"id":"e8bfbba2.de15b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":912.889030456543,"y":1242.8056259155273,"z":"1a8b5305.c085cd","wires":[]},{"id":"5d98c991.20e8f8","type":"outcome","name":"outcome Contrail","xml":"<outcome value='Contrail'>\n","comments":"","outputs":1,"x":788.9999618530273,"y":1389.8886833190918,"z":"1a8b5305.c085cd","wires":[["f6f1d63d.fe27e8"]]},{"id":"9d4e2f0d.1638","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":822.9999923706055,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["46abce7a.44c39"]]},{"id":"97a332a5.2b6c9","type":"switchNode","name":"switch region","xml":"<switch test='`$aai.complex.region`'>\n","comments":"","outputs":1,"x":2241.4445724487305,"y":1176.8888053894043,"z":"1a8b5305.c085cd","wires":[["38bf1673.6311ca","961953ad.504c8","5a180df4.7bc884","f16470ad.05b77","7e5b906f.9202a","5490bc7c.7aca24"]]},{"id":"38bf1673.6311ca","type":"other","name":"USA","xml":"<outcome value='USA'>\n","comments":"","outputs":1,"x":2475.9447729322637,"y":1120.1388247807818,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"961953ad.504c8","type":"other","name":"US","xml":"<outcome value='US'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1151.3888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5a180df4.7bc884","type":"other","name":"CALA","xml":"<outcome value='CALA'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1183.8888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"f16470ad.05b77","type":"other","name":"EMEA","xml":"<outcome value='EMEA'>\n","comments":"","outputs":1,"x":2475.9446601867676,"y":1215.1388368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"7e5b906f.9202a","type":"other","name":"AP","xml":"<outcome value='AP'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1248.8887758255005,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5490bc7c.7aca24","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2477.1945152282715,"y":1280.1387453079224,"z":"1a8b5305.c085cd","wires":[["e44c109d.dc45c"]]},{"id":"e44c109d.dc45c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex.region unknown\" />\n","comments":"","x":2645.9446601867676,"y":1278.8887758255005,"z":"1a8b5305.c085cd","wires":[]},{"id":"b368b63c.3dd7a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2634.888779110379,"y":1145.3889084921943,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"bcb49c2d.d02b3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":773.0000076293945,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[["939bed8f.13cae"]]},{"id":"939bed8f.13cae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid network-technology. Only AIC_SR_IOV and Contrail are supported\" />\n","comments":"","x":1000.9999465942383,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[]},{"id":"b8481fbd.f33f6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2745.9997024536133,"y":1365.1110954284668,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"dd3a41a3.fce13","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2803.000259399414,"y":1745.1110877990723,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"403ea448.83caac","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2844.9997940063477,"y":2003.1112187504768,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca6d6436.b4f728","type":"call","name":"call process-eipam-pools","xml":"<call module='GENERIC-RESOURCE-API' rpc='process-eipam-pools' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":570.3022994995117,"y":2234.156078338623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"13db491e.a822c7","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":651.5131759643555,"y":2312.913890838623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"2709264e.6759fa","type":"set","name":"set process-eipam-action","xml":"<set>\n<parameter name='tmp.process-eipam-action' value='assign' />\n","comments":"","x":573.7677536010742,"y":2195.156322479248,"z":"1a8b5305.c085cd","wires":[]},{"id":"61bb926f.cd7d7c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Values after process-eipam\"/>\n<parameter name=\"field5\" value=\"`level1-v4-mask`\"/>\n<parameter name=\"field6\" value=\"`$tmp.l3-network.level1.v4.mask`\"/>\n<parameter name=\"field7\" value=\"`level1-v4-ipprefix`\"/>\n<parameter name=\"field8\" value=\"`$tmp.l3-network.level1.v4.ip-prefix`\"/>\n<parameter name=\"field9\" value=\"`level1-v4-entity-id`\"/>\n<parameter name=\"field10\" value=\"`$tmp.l3-network.level1.v4.entity-id`\"/>\n<parameter name=\"field11\" value=\"`level2-v4-mask`\"/>\n<parameter name=\"field12\" value=\"`$tmp.l3-network.level2.v4.mask`\"/>\n<parameter name=\"field13\" value=\"`level2-v4-ipprefix`\"/>\n<parameter name=\"field14\" value=\"`$tmp.l3-network.level2.v4.ip-prefix`\"/>\n<parameter name=\"field15\" value=\"`level2-v4-entity-id`\"/>\n<parameter name=\"field16\" value=\"`$tmp.l3-network.level2.v4.entity-id`\"/>\n\n\n","comments":"","outputs":1,"x":520.4187545776367,"y":2269.938060760498,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"f6f1d63d.fe27e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1000.9999923706055,"y":1388.8888053894043,"z":"1a8b5305.c085cd","wires":[["d1028c12.c84fc","bade0de.687c6f"]]},{"id":"46abce7a.44c39","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1048.9999313354492,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["6dc461c1.1dfdf","330b7d34.5dfc22"]]},{"id":"8207c0b3.22e3f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":778.9999923706055,"y":2650.999828338623,"z":"1a8b5305.c085cd","wires":[["6cf30f85.f2632"]]},{"id":"f9e58c7b.aacc4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":732.9999923706055,"y":344.00002670288086,"z":"1a8b5305.c085cd","wires":[["18ec6cc4.a941f3"]]},{"id":"18ec6cc4.a941f3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.9999847412109,"y":342.00000190734863,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"63bb1d97.e60064","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":574.9999923706055,"y":2927.999828338623,"z":"1a8b5305.c085cd","wires":[["939b5aed.1aae58"]]},{"id":"939b5aed.1aae58","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":877.8889694213867,"y":2929.444164276123,"z":"1a8b5305.c085cd","wires":[["e82a508a.4229a"]]},{"id":"e82a508a.4229a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1095.8887252807617,"y":2927.4442863464355,"z":"1a8b5305.c085cd","wires":[["aebd7334.b437c","8cea94a0.5581b8"]]},{"id":"aebd7334.b437c","type":"save","name":"save AnAI - segmentation-assignment","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"segmentation-assignment\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND segmentation-assignment.segmentation-id = $tmp.l3-network.segmentation-id\" >\n<!-- Create segmentation-assignment object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"segmentation-id\" value=\"`$tmp.l3-network.segmentation-id`\" />\n","comments":"","outputs":1,"x":1374.999870300293,"y":2983.7777824401855,"z":"1a8b5305.c085cd","wires":[["635baecf.da65a","844325db.02e548"]]},{"id":"635baecf.da65a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1643.999870300293,"y":2960.777904510498,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"844325db.02e548","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1652.723014831543,"y":2998.4210929870605,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"fc0f6851.bec3b8","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 segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2083.872917175293,"y":2975.635326385498,"z":"1a8b5305.c085cd","wires":[]},{"id":"1db9bcd1.f30e23","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1828.730339050293,"y":2975.063793182373,"z":"1a8b5305.c085cd","wires":[["fc0f6851.bec3b8","21428fc3.65275"]]},{"id":"c2804041.b3c85","type":"execute","name":"execute readProperties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties'>\n <parameter name='contextPrefix' value='prop'/>\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api.properties'/>\n","comments":"","outputs":1,"x":1342.999984741211,"y":2906.666576385498,"z":"1a8b5305.c085cd","wires":[["5bb8bd75.e7bd04","b6b631b.f63f8d"]]},{"id":"5bb8bd75.e7bd04","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1550.999984741211,"y":2848.666576385498,"z":"1a8b5305.c085cd","wires":[["44e3f917.1e2e28"]]},{"id":"b6b631b.f63f8d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1544.999984741211,"y":2884.666576385498,"z":"1a8b5305.c085cd","wires":[["4be39f81.4fd4a"]]},{"id":"95dbb3fd.0c1f7","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 reading default segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1952.9999923706055,"y":2868.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"4be39f81.4fd4a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1721.857406616211,"y":2884.095043182373,"z":"1a8b5305.c085cd","wires":[["95dbb3fd.0c1f7","21428fc3.65275"]]},{"id":"e1be1a52.54f3b8","type":"set","name":"set: tmp.l3-network.segmentation-id","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"`$prop.default.segmentation-assignment`\"/>","comments":"","x":1984.9999923706055,"y":2836.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"44e3f917.1e2e28","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1727.857406616211,"y":2848.095043182373,"z":"1a8b5305.c085cd","wires":[["e1be1a52.54f3b8"]]},{"id":"d1028c12.c84fc","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1256.999870300293,"y":1387.4445915222168,"z":"1a8b5305.c085cd","wires":[["2024b896.76a498"]]},{"id":"2024b896.76a498","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1511.9999961853027,"y":1387.8731479644775,"z":"1a8b5305.c085cd","wires":[["27e33253.31496e"]]},{"id":"27e33253.31496e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1684.5713157653809,"y":1388.301752090454,"z":"1a8b5305.c085cd","wires":[["bc4df92.6ad6f08"]]},{"id":"6dc461c1.1dfdf","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1324.1111755371094,"y":1733.4446239471436,"z":"1a8b5305.c085cd","wires":[["140551e2.4f61fe"]]},{"id":"140551e2.4f61fe","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1579.1113014221191,"y":1736.8731803894043,"z":"1a8b5305.c085cd","wires":[["ea5dcb81.6728d8"]]},{"id":"ea5dcb81.6728d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1751.6826210021973,"y":1737.3017845153809,"z":"1a8b5305.c085cd","wires":[["ccfde65e.e5a838"]]},{"id":"330b7d34.5dfc22","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1344.1111373901367,"y":1954.4445304870605,"z":"1a8b5305.c085cd","wires":[["65a51dc6.c0e5e4"]]},{"id":"65a51dc6.c0e5e4","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1599.1112632751465,"y":1957.8730869293213,"z":"1a8b5305.c085cd","wires":[["9d1d090d.9dc2f8"]]},{"id":"9d1d090d.9dc2f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1795.6825942993164,"y":1956.3017692565918,"z":"1a8b5305.c085cd","wires":[["a3b08dd5.410cf"]]},{"id":"bade0de.687c6f","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1266.1111373901367,"y":1556.4445304870605,"z":"1a8b5305.c085cd","wires":[["4e4efcc8.51a894"]]},{"id":"4e4efcc8.51a894","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1521.1112632751465,"y":1559.8730869293213,"z":"1a8b5305.c085cd","wires":[["26c43fce.b1a9a"]]},{"id":"26c43fce.b1a9a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1717.6825942993164,"y":1558.3017692565918,"z":"1a8b5305.c085cd","wires":[["14bf4e76.feb402"]]},{"id":"8cea94a0.5581b8","type":"set","name":"set: segmentionat-d=1","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"1\"/>","comments":"","x":1329.9841690063477,"y":2950.8570852279663,"z":"1a8b5305.c085cd","wires":[]},{"id":"7e62bfac.efaea","type":"comment","name":"future if need from property","info":"","comments":"","x":1348.5556564331055,"y":2871.999828338623,"z":"1a8b5305.c085cd","wires":[]},{"id":"e3a6601d.ee1c2","type":"other","name":"outcome oam_vipr_protected_network","xml":"<outcome value='oam_vipr_protected_network'>\n","comments":"","outputs":1,"x":2609.555305480957,"y":375.50263023376465,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"d21320c7.875be","type":"other","name":"outcome network_without_route_tags_naming_default","xml":"<outcome value='network_without_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2656.2219772338867,"y":412.16929817199707,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"3927bc9.ef1ad44","type":"other","name":"outcome sriov_provider_network","xml":"<outcome value='sriov_provider_network'>\n","comments":"","outputs":1,"x":2587.888801574707,"y":648.8359718322754,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"f545226c.1e1f3","type":"other","name":"outcome oam_atm_u_landing_network","xml":"<outcome value='oam_atm_u_landing_network'>\n","comments":"","outputs":1,"x":2602.888496398926,"y":453.83595752716064,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"983a4aba.12f018","type":"other","name":"outcome oam_atm_p_landing_network","xml":"<outcome value='oam_atm_p_landing_network'>\n","comments":"","outputs":1,"x":2601.2216720581055,"y":488.8359594345093,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"9ac69de3.85dd5","type":"other","name":"outcome oam_aim_landing_network","xml":"<outcome value='oam_aim_landing_network'>\n","comments":"","outputs":1,"x":2594.5555114746094,"y":520.502628326416,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"56b6dcac.c4bfc4","type":"other","name":"outcome network_with_route_tags_naming_default","xml":"<outcome value='network_with_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2639.555595397949,"y":553.8359527587891,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"279f950e.baf49a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V4","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V4'>","comments":"","outputs":1,"x":2502.999824523926,"y":1429.9999198913574,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"960cc18d.2fd1b","type":"get-resource","name":"get-resource VPN_BINDINGS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VPN_BINDINGS WHERE network_customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid'\n pfx='vpn-bindings[]'>\n\n","comments":"","outputs":1,"x":1246.142807006836,"y":264.28571128845215,"z":"1a8b5305.c085cd","wires":[["feb45c91.fd681","d7038114.b2909","7f333885.c94138"]]},{"id":"d7038114.b2909","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1467.5714111328125,"y":296.99999237060547,"z":"1a8b5305.c085cd","wires":[["ef08fa38.9d4078"]]},{"id":"7f333885.c94138","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1462.9044380187988,"y":329.33330631256104,"z":"1a8b5305.c085cd","wires":[["911dd542.ed2ee8"]]},{"id":"feb45c91.fd681","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1463.0804443359375,"y":264.4259567260742,"z":"1a8b5305.c085cd","wires":[["cda800bd.57b12"]]},{"id":"ef08fa38.9d4078","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network model is_bound_to_vpn=true but no vpn_binding is present\" />\n\n","comments":"","x":1636.1428604125977,"y":297.28572368621826,"z":"1a8b5305.c085cd","wires":[]},{"id":"cda800bd.57b12","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1633.2857666015625,"y":263.99999237060547,"z":"1a8b5305.c085cd","wires":[["32d5ba47.7aac96","2dde48f4.4544e8"]]},{"id":"43007d32.9c93f4","type":"comment","name":"Changelog","info":"1707: Change vpn binding from field to table selection\n1710: Add ipv6 vipr flows","comments":"","x":323.8571472167969,"y":80.00000667572021,"z":"1a8b5305.c085cd","wires":[]},{"id":"a8641e83.b8db7","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value='AIC_ATM_UNPROTECTED_V6'>","comments":"","outputs":1,"x":2493.800048828125,"y":1535,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"95022c2.dc0f4d","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value='AIC_ATM_PROTECTED_V6'>","comments":"","outputs":1,"x":2483.6886596679688,"y":1572.5558385849,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"140e9a55.7c9096","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2751.239028930664,"y":1542.2012939453125,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"e1a0deaa.2971a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V6","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V6'>","comments":"","outputs":1,"x":2508.2391510009766,"y":1607.0901184082031,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"24428acd.934a56","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2414.243480682373,"y":1644.6681156158447,"z":"1a8b5305.c085cd","wires":[["7c564997.04f088"]]},{"id":"7c564997.04f088","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"EIPAM V6 Address plan should be null\" />\n","comments":"","x":2585.131175994873,"y":1643.5013790130615,"z":"1a8b5305.c085cd","wires":[]}]
+[{"id":"89493007.0268b","type":"dgstart","name":"DGSTART","outputs":1,"x":111,"y":80,"z":"1a8b5305.c085cd","wires":[["a4a8f170.658a9"]]},{"id":"a4a8f170.658a9","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":254.2856903076172,"y":140.2381067276001,"z":"1a8b5305.c085cd","wires":[["751a884f.6eaac8"]]},{"id":"751a884f.6eaac8","type":"method","name":"network-topology-operation-assign","xml":"<method rpc='network-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":229.96437072753906,"y":220.892840385437,"z":"1a8b5305.c085cd","wires":[["df0099f6.6eeb38"]]},{"id":"df0099f6.6eeb38","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":189.28572845458984,"y":405.1578025817871,"z":"1a8b5305.c085cd","wires":[["b6852699.060e68","f58c2417.cbf1f8","91b6be2e.099cc","c7c72a39.652de8","8773a6fd.bcffa8","71a62cc6.0c1ad4","9c5b3463.cd7bf8","a057f23f.aa6af","868ff2ba.bc798","679ee129.c4252","34cb595d.aff816","a5f2c0c4.2e002","aa240c34.3d017","cae13e62.0dbe2","b7ab3890.826f88","a6f05dc6.5396f","2fbd77c1.048628","a9dd6669.a72c38","7a1a7c2.ce09484","5b1e35b2.5ea92c","60381262.576cfc","b629208a.09c27","4728dc8a.76ddd4","a2da1074.b277a","e495d7bf.6827a8","797304de.6cccec","ed1fbf08.fa0f9","cb2ae5c7.b8f7a8","2709264e.6759fa","ca6d6436.b4f728","61bb926f.cd7d7c","13db491e.a822c7","63bb1d97.e60064"]]},{"id":"b6852699.060e68","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":501.7738227844238,"y":3448.8575134277344,"z":"1a8b5305.c085cd","wires":[]},{"id":"f58c2417.cbf1f8","type":"switchNode","name":"switch network-model.is-bound-to-vpn","xml":"<switch test='`$network-model.is-bound-to-vpn`'>\n","comments":"","outputs":1,"x":577.6110610961914,"y":263.6111059188843,"z":"1a8b5305.c085cd","wires":[["c74440f1.9c51e"]]},{"id":"c74440f1.9c51e","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":842.6110649108887,"y":263.6111068725586,"z":"1a8b5305.c085cd","wires":[["9b88c546.2f2778"]]},{"id":"9b88c546.2f2778","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1005.3611068725586,"y":264.1110954284668,"z":"1a8b5305.c085cd","wires":[["960cc18d.2fd1b"]]},{"id":"be126fa6.e030e","type":"get-resource","name":"get-resource vpn-binding","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"vpn-binding\" \n\t\tkey=\"vpn-binding.vpn-id = $vpn-bindings[$vidx].binding-uuid\"\n pfx='aai.vpnBinding' local-only='false' >\n\n","comments":"","outputs":1,"x":2285.932662963867,"y":257.8849563598633,"z":"1a8b5305.c085cd","wires":[["612f7c79.d93d64","29e26ef4.5879a2","70ec648.56c6c9c"]]},{"id":"612f7c79.d93d64","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2521.8889961242676,"y":229.63891220092773,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"29e26ef4.5879a2","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2514.8889389038086,"y":262.972243309021,"z":"1a8b5305.c085cd","wires":[["b29726d5.228328"]]},{"id":"b29726d5.228328","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vpn binding found for network-model.vpn-binding=' \n + $vpn-bindings[$vidx].binding-uuid`\" />\n\n","comments":"","x":2704.031726837158,"y":234.21033000946045,"z":"1a8b5305.c085cd","wires":[]},{"id":"91b6be2e.099cc","type":"switchNode","name":"switch network-request-information.network-name","xml":"<switch test='`$network-topology-operation-input.network-request-input.network-name`'>\n","comments":"","outputs":1,"x":604.3651161193848,"y":470.68650007247925,"z":"1a8b5305.c085cd","wires":[["22435a1e.c63286","1ea3bcf5.db62a3"]]},{"id":"a4d718a8.4b5a78","type":"comment","name":"if network-name not populated, generate","info":"","comments":"","x":577.8889389038086,"y":297.6388816833496,"z":"1a8b5305.c085cd","wires":[]},{"id":"22435a1e.c63286","type":"other","name":"outcome NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":899.5556564331055,"y":463.97219467163086,"z":"1a8b5305.c085cd","wires":[["1d9431b.4db66ce"]]},{"id":"1d9431b.4db66ce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1092.8888549804688,"y":461.3055396080017,"z":"1a8b5305.c085cd","wires":[["a9e920ad.ae72"]]},{"id":"a9e920ad.ae72","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1387.5554695129395,"y":459.3055396080017,"z":"1a8b5305.c085cd","wires":[["2c61b334.66b64c","a3fb55a9.a89968"]]},{"id":"2c61b334.66b64c","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":1707.5555229187012,"y":447.30554962158203,"z":"1a8b5305.c085cd","wires":[["e30091c0.02f1a"]]},{"id":"e30091c0.02f1a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n","atomic":"true","comments":"","outputs":1,"x":1876.305564880371,"y":447.80553817749023,"z":"1a8b5305.c085cd","wires":[["7a3fdfa5.4ccd4"]]},{"id":"a3fb55a9.a89968","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1698.7778129577637,"y":480.30554962158203,"z":"1a8b5305.c085cd","wires":[["da34b64.c9ee048"]]},{"id":"da34b64.c9ee048","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network name is required if ecomp naming is false\" />\n\n","comments":"","x":1876.7778129577637,"y":479.30554962158203,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a3fdfa5.4ccd4","type":"switchNode","name":"switch network-model.ecomp-generated-naming","xml":"<switch test='`$network-model.naming-policy`'>\n","comments":"","outputs":1,"x":2198.221389770508,"y":447.3055124282837,"z":"1a8b5305.c085cd","wires":[["f1453c06.5ed4a","6b66fa0f.19fd64","f9fba683.787ff8","e3a6601d.ee1c2","d21320c7.875be","3927bc9.ef1ad44"]]},{"id":"6b66fa0f.19fd64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2501.2216873168945,"y":711.3055171966553,"z":"1a8b5305.c085cd","wires":[["42111482.a679dc"]]},{"id":"f1453c06.5ed4a","type":"other","name":"outcome org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork","xml":"<outcome value='org.openecomp.policy.naming.SriovProvider.SriovProviderNetwork'>\n","comments":"","outputs":1,"x":2715.333381652832,"y":615.3055877685547,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"42111482.a679dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unknown naming policy = ' \n + $network-model.naming-policy`\" />\n\n","comments":"","x":2661.665948867798,"y":710.9721937179565,"z":"1a8b5305.c085cd","wires":[]},{"id":"36f8e62e.3e607a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3251.000175476074,"y":188.6388816833496,"z":"1a8b5305.c085cd","wires":[["e8c5e30.358142","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"e8c5e30.358142","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_int_$role_net' />\n","comments":"","x":3687.6187286376953,"y":85.40079879760742,"z":"1a8b5305.c085cd","wires":[]},{"id":"4ed6dd56.64d354","type":"set","name":"set nameformat","xml":"<set>\n<parameter name='tmp.network-name-prefix' value='$TenantName_$role_net' />\n","comments":"","x":3685.4286880493164,"y":127.25794219970703,"z":"1a8b5305.c085cd","wires":[]},{"id":"9269a69b.c004e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3201.57186126709,"y":615.3056554794312,"z":"1a8b5305.c085cd","wires":[["4ed6dd56.64d354","dac3091b.c72dd8","61e7e703.d3e688","749f7e23.95d86","f1f2ca4a.1510c8","c5ab838b.1f37b"]]},{"id":"f9fba683.787ff8","type":"other","name":"outcome org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork","xml":"<outcome value='org.openecomp.policy.naming.ViprProtectedOam.ViprOamProtectedNetwork'>\n","comments":"","outputs":1,"x":2755.111503601074,"y":338.6389513015747,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"dac3091b.c72dd8","type":"execute","name":"execute SliStringUtils - replace tenantname","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$TenantName\"/>\n <parameter name=\"replacement\" value=\"`$aai.tenant.tenant-name`\"/>\n\n","comments":"","outputs":1,"x":3761.873222351074,"y":250.92461776733398,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"61e7e703.d3e688","type":"execute","name":"execute SliStringUtils - replace role","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.network-name-prefix`\"/>\n <parameter name=\"outputPath\" value=\"tmp.network-name-prefix\"/>\n <parameter name=\"target\" value=\"$role\"/>\n <parameter name=\"replacement\" value=\"`$network-model.network-role`\"/>\n\n","comments":"","outputs":1,"x":3734.873222351074,"y":285.924617767334,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"749f7e23.95d86","type":"get-resource","name":"get-resource NETWORK_INSTANCE_NAME_INDEX","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from NETWORK_INSTANCE_NAME_INDEX WHERE network_instance_name_prefix\n = $tmp.network-name-prefix'\n pfx='db.network-name-prefix'>\n\n","comments":"","outputs":1,"x":3784.539970397949,"y":321.924617767334,"z":"1a8b5305.c085cd","wires":[["d1722a3d.4b95d8"]]},{"id":"f1f2ca4a.1510c8","type":"switchNode","name":"switch index-number","xml":"<switch test='`$db.network-name-prefix.index-number`'>\n","comments":"","outputs":1,"x":3690.25431060791,"y":426.21020221710205,"z":"1a8b5305.c085cd","wires":[["e5a7ba6c.507c58","27e6f16.769840e"]]},{"id":"27e6f16.769840e","type":"other","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":3873.1113510131836,"y":467.63871574401855,"z":"1a8b5305.c085cd","wires":[["b0448576.a22c18"]]},{"id":"e5a7ba6c.507c58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":3874.5399017333984,"y":383.3530445098877,"z":"1a8b5305.c085cd","wires":[["7b9484b0.6f36cc"]]},{"id":"9b3d1da7.01a72","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"insert into NETWORK_INSTANCE_NAME_INDEX values ( $tmp.network-name-prefix , 1)\"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4248.825759887695,"y":487.6390686035156,"z":"1a8b5305.c085cd","wires":[["63e45141.ca441"]]},{"id":"7f3fa0.f0f1d06","type":"set","name":"increment index number","xml":"<set>\n<parameter name='tmp.index-number' value='`$db.network-name-prefix.index-number+1`' />\n","comments":"","x":4245.96854019165,"y":360.4960594177246,"z":"1a8b5305.c085cd","wires":[]},{"id":"b0448576.a22c18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.6828956604004,"y":466.21035957336426,"z":"1a8b5305.c085cd","wires":[["a01edb2f.ec40a8","9b3d1da7.01a72"]]},{"id":"d1722a3d.4b95d8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4058.825611114502,"y":320.4960289001465,"z":"1a8b5305.c085cd","wires":[["f4b5aa4d.2456c8"]]},{"id":"f4b5aa4d.2456c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading the NETWORK_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4213.111427307129,"y":320.4960479736328,"z":"1a8b5305.c085cd","wires":[]},{"id":"a01edb2f.ec40a8","type":"set","name":"set new index number to 1","xml":"<set>\n<parameter name='tmp.index-number' value='1' />\n","comments":"","x":4254.54012298584,"y":444.78167724609375,"z":"1a8b5305.c085cd","wires":[]},{"id":"9005b1b8.d71dc","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key=\"update NETWORK_INSTANCE_NAME_INDEX\n set index_number = $tmp.index-number\n where network_instance_name_prefix = $db.network-name-prefix.network-instance-name-prefix \"\n force='false' pfx='pfx'>\n","comments":"","outputs":1,"x":4253.111484527588,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["d17ac839.1a13f8"]]},{"id":"7b9484b0.6f36cc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":4031.682792663574,"y":381.9244918823242,"z":"1a8b5305.c085cd","wires":[["7f3fa0.f0f1d06","9005b1b8.d71dc"]]},{"id":"d17ac839.1a13f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4475.96854019165,"y":401.9246120452881,"z":"1a8b5305.c085cd","wires":[["957fcd83.2301e"]]},{"id":"957fcd83.2301e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to update SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4630.254356384277,"y":401.9246311187744,"z":"1a8b5305.c085cd","wires":[]},{"id":"63e45141.ca441","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":4474.539840698242,"y":487.6388244628906,"z":"1a8b5305.c085cd","wires":[["deb7415b.ff8fd"]]},{"id":"deb7415b.ff8fd","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Failed to insert record into SERVICE_INSTANCE_NAME_INDEX table\" />\n","comments":"","x":4628.825656890869,"y":487.63884353637695,"z":"1a8b5305.c085cd","wires":[]},{"id":"c5ab838b.1f37b","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$tmp.network-name-prefix + '_' + $tmp.index-number`\" />\n","comments":"","x":3727.825107574463,"y":505.3531255722046,"z":"1a8b5305.c085cd","wires":[]},{"id":"c7c72a39.652de8","type":"set","name":"set object-path","xml":"<set>\n<parameter name='network-object-path'\n value=\"`$tmp.l3-network.self-link`\"/>\n \n","comments":"","x":503.2063407897949,"y":3350.4801511764526,"z":"1a8b5305.c085cd","wires":[]},{"id":"8773a6fd.bcffa8","type":"set","name":"set networkId","xml":"<set>\n<parameter name='networkId' value='`$tmp.l3-network.network-id`' />\n","comments":"","x":504.63486099243164,"y":3304.765769958496,"z":"1a8b5305.c085cd","wires":[]},{"id":"a057f23f.aa6af","type":"set","name":"set network-level-oper-status","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />\n","comments":"","x":550.9205741882324,"y":3396.194423675537,"z":"1a8b5305.c085cd","wires":[]},{"id":"71a62cc6.0c1ad4","type":"set","name":"set network in service-data","xml":"<set>\n<parameter name=\"service-data.networks.network[$nidx].network-id\" value='`$tmp.l3-network.network-id`' />\n<parameter name=\"service-data.networks.network[$nidx].network-data.network-topology.\" value='$network-topology.' />\n<parameter name=\"service-data.networks.network_length\" value='`$nidx+1`' />\n\n","comments":"","x":552.4920387268066,"y":3124.051595687866,"z":"1a8b5305.c085cd","wires":[]},{"id":"9c5b3463.cd7bf8","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n","comments":"","x":547.7300186157227,"y":3163.813540458679,"z":"1a8b5305.c085cd","wires":[]},{"id":"868ff2ba.bc798","type":"set","name":"set network-topology-identifier-structure in service-data","xml":"<set>\n<parameter name='network-topology.network-topology-identifier-structure.' value='`$tmp.l3-network.`' />\n<parameter name='network-topology.tenant' value='`$network-topology-operation-input.network-request-input.tenant`' />\n<parameter name='network-topology.onap-model-information.' value='`$network-topology-operation-input.network-information.onap-model-information.`' />\n<parameter name='network-topology.network-parameters.' value='`$network-topology-operation-input.network-request-input.network-input-parameters.`' />\n<parameter name='network-topology.aic-cloud-region' value='`$network-topology-operation-input.network-request-input.aic-cloud-region`' />","comments":"","x":637.4920539855957,"y":3016.908727169037,"z":"1a8b5305.c085cd","wires":[]},{"id":"679ee129.c4252","type":"switchNode","name":"switch service-data.networks_length","xml":"<switch test='`$service-data.networks.network_length`'>\n","comments":"","outputs":1,"x":582.2538871765137,"y":3073.0992045402527,"z":"1a8b5305.c085cd","wires":[["d892cc25.abd2e","1419948c.74a04b"]]},{"id":"d892cc25.abd2e","type":"other","name":"Null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":886.0634269714355,"y":3064.0516147613525,"z":"1a8b5305.c085cd","wires":[["256eeb6b.789b54"]]},{"id":"256eeb6b.789b54","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='0' />\n","comments":"","x":1066.0634689331055,"y":3061.6230306625366,"z":"1a8b5305.c085cd","wires":[]},{"id":"1419948c.74a04b","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":888.9205894470215,"y":3089.765887260437,"z":"1a8b5305.c085cd","wires":[["265dbf75.6b9f6"]]},{"id":"265dbf75.6b9f6","type":"set","name":"set nidx","xml":"<set>\n<parameter name='nidx' value='`$service-data.networks.network_length`' />\n","comments":"","x":1067.4920196533203,"y":3098.6230878829956,"z":"1a8b5305.c085cd","wires":[]},{"id":"70ec648.56c6c9c","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2517.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[["25c11570.4e18ba"]]},{"id":"25c11570.4e18ba","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2682.999942779541,"y":194.00002670288086,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ea7bbc28.439ef","type":"comment","name":"pull vpn binding from db table vs field","info":"","comments":"","x":1884.0740661621094,"y":187.53438568115234,"z":"1a8b5305.c085cd","wires":[]},{"id":"2dde48f4.4544e8","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1858.4393882751465,"y":256.34392642974854,"z":"1a8b5305.c085cd","wires":[["654f5072.a2802"]]},{"id":"654f5072.a2802","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2066.9150428771973,"y":258.4233341217041,"z":"1a8b5305.c085cd","wires":[["be126fa6.e030e"]]},{"id":"911dd542.ed2ee8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Unexpected error retrieving vpn binding\" />\n\n","comments":"","x":1638.6769752502441,"y":330.77249813079834,"z":"1a8b5305.c085cd","wires":[]},{"id":"32d5ba47.7aac96","type":"set","name":"set hasVpnBindings=true","xml":"<set>\n<parameter name='hasVpnBindings' value='true' />\n","comments":"","x":1856.6137466430664,"y":224.91532611846924,"z":"1a8b5305.c085cd","wires":[]},{"id":"1ea3bcf5.db62a3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":887.1851005554199,"y":520.2963137626648,"z":"1a8b5305.c085cd","wires":[["e6e8dae5.027898"]]},{"id":"34cb595d.aff816","type":"get-resource","name":"get-resource tenant","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"tenant\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND\n\t\t tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant\"\n pfx='aai.tenant' local-only='false' >\n\n","comments":"","outputs":1,"x":516.6295700073242,"y":382.962947845459,"z":"1a8b5305.c085cd","wires":[["8869ece2.c675b","49964e35.7bcd","f9e58c7b.aacc4"]]},{"id":"8869ece2.c675b","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":737.4909591674805,"y":375.5740623474121,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"49964e35.7bcd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.8239860534668,"y":408.9073762893677,"z":"1a8b5305.c085cd","wires":[["12cdda76.c90c96"]]},{"id":"12cdda76.c90c96","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Tenant not found in AAI\" />\n\n","comments":"","x":933.666633605957,"y":383.6296272277832,"z":"1a8b5305.c085cd","wires":[]},{"id":"4f0e6905.0b7fa8","type":"set","name":"set tmp.network-instance-name","xml":"<set>\n<parameter name='tmp.network-instance-name' value=\"`$network-topology-operation-input.network-request-input.network-name`\" />\n","comments":"","x":1342.3702583312988,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[]},{"id":"e6e8dae5.027898","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1085.7036628723145,"y":520.2962832450867,"z":"1a8b5305.c085cd","wires":[["4f0e6905.0b7fa8"]]},{"id":"aa240c34.3d017","type":"set","name":"set tmp.l3-network","xml":"<set>\n<parameter name='tmp.l3-network.network-id' value=\"`$tmp.return.generate-l3network-network-id.uuid`\" />\n<parameter name='tmp.l3-network.network-name' value=\"`$tmp.network-instance-name`\" />\n<parameter name='tmp.l3-network.network-type' value=\"`$network-model.network-type`\" />\n<parameter name='tmp.l3-network.network-role' value=\"`$network-model.network-role`\" />\n<parameter name='tmp.l3-network.network-technology' value=\"`$network-model.network-technology`\" />\n<parameter name='tmp.l3-network.is-bound-to-vpn' value=\"`$network-model.is-bound-to-vpn`\" />\n<parameter name='tmp.l3-network.orchestration-status' value=\"PendingCreate\" />\n<parameter name='tmp.l3-network.model-invariant-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`\" />\n<parameter name='tmp.l3-network.model-version-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-version`\" />\n<parameter name='tmp.l3-network.model-customization-id' value=\"`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`\" />\n<parameter name='tmp.l3-network.is-provider-network' value=\"`$network-model.is-provider-network`\" />\n<parameter name='tmp.l3-network.is-shared-network' value=\"`$network-model.is-shared-network`\" />\n<parameter name='tmp.l3-network.is-external-network' value=\"`$network-model.is-external-network`\" />\n<parameter name='tmp.l3-network.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.l3-network.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.l3-network.service-id' value=\"`$service-data.service-information.service-id`\" />\n<parameter name='tmp.l3-network.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $tmp.l3-network.network-id\n + '/network-data/network-topology/'` \" />\n","comments":"","x":509.244140625,"y":653.2910766601562,"z":"1a8b5305.c085cd","wires":[]},{"id":"a5f2c0c4.2e002","type":"call","name":"call generate-l3network-network-id","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-l3network-network-id' mode='sync' >\n","comments":"","outputs":1,"x":556.3866653442383,"y":605.7196311950684,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"cae13e62.0dbe2","type":"switchNode","name":"switch network--model.is-provider-network","xml":"<switch test='`$network-model.is-provider-network`'>\n","comments":"","outputs":1,"x":582.7352676391602,"y":694.5768089294434,"z":"1a8b5305.c085cd","wires":[["89c6a854.601f48","7724a3fb.17a6ec"]]},{"id":"89c6a854.601f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":882.8784408569336,"y":679.402265548706,"z":"1a8b5305.c085cd","wires":[["602f391.030b8c8"]]},{"id":"602f391.030b8c8","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"`$network-model.physical-network-name`\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='true' />","comments":"","x":1150.8782958984375,"y":676.4022312164307,"z":"1a8b5305.c085cd","wires":[]},{"id":"4728dc8a.76ddd4","type":"set","name":"set tmp.network-topology","xml":"<set>\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-id' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-name' value=\"`$tmp.l3-network.network-name`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-type' value=\"`$tmp.l3-network.network-type`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-role' value=\"`$tmp.l3-network.network-role`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.network-technology' value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v4-address-plan' value=\"`$network-model.eipam-v4-address-plan`\" />\n<parameter name='tmp.network-topology.network-topology-identifier-structure.eipam-v6-address-plan' value=\"`$network-model.eipam-v6-address-plan`\" />\n<parameter name='tmp.network-topology.region-identifier.tenant' value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-cloud-region' value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n<parameter name='tmp.network-topology.region-identifier.aic-clli' value=\"`$network-topology-operation-input.network-request-input.aic-clli`\" />\n<parameter name='tmp.network-topology.onap-model-information.' value=\"`$network-topology-operation-input.network-information.onap-model-information.`\" />\n<parameter name='tmp.network-topology.network-parameters.' value=\"`$network-topology-operation-input.network-request-input.network-input-parameters.`\" />\n","comments":"","x":577.4101905822754,"y":2448.9736881256104,"z":"1a8b5305.c085cd","wires":[]},{"id":"bc4df92.6ad6f08","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (VIPR)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2028.5613021850586,"y":1388.909984588623,"z":"1a8b5305.c085cd","wires":[["5efa60f2.f4a81","464197e1.4cabd8","b87722fe.57e3c","279f950e.baf49a"]]},{"id":"5efa60f2.f4a81","type":"other","name":"AIC_ATM_UNPROTECTED_V4","xml":"<outcome value='AIC_ATM_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2488.560722351074,"y":1357.9098014831543,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"464197e1.4cabd8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2412.2276878356934,"y":1473.2434101104736,"z":"1a8b5305.c085cd","wires":[["54efc2e2.b2c12c"]]},{"id":"797304de.6cccec","type":"save","name":"save relationship: service-instance","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"service-instance\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"customer.global-customer-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.service-information.global-customer-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"service-subscription.service-type\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$service-data.service-information.subscription-service-type`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"service-instance.service-instance-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$service-data.service-information.service-instance-id`\" />","comments":"","outputs":1,"x":617.2711410522461,"y":2710.8468132019043,"z":"1a8b5305.c085cd","wires":[["2f4f1f7c.f19a9","29f88949.932b36"]]},{"id":"b87722fe.57e3c","type":"other","name":"AIC_ATM_PROTECTED_V4","xml":"<outcome value='AIC_ATM_PROTECTED_V4'>","comments":"","outputs":1,"x":2478.449333190918,"y":1395.4656400680542,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"54efc2e2.b2c12c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for VIPR\" />\n","comments":"","x":2583.1158714294434,"y":1474.5766925811768,"z":"1a8b5305.c085cd","wires":[]},{"id":"ccfde65e.e5a838","type":"switchNode","name":"switch network-model.eipam-v4-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v4-address-plan`'>\n","comments":"","outputs":1,"x":2064.2953033447266,"y":1737.5170440673828,"z":"1a8b5305.c085cd","wires":[["7d69ddb.4eb1724","661e7fce.8d3e6","cb5bdfca.b22e2","2a9685d1.8f282a"]]},{"id":"7d69ddb.4eb1724","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_UNPROTECTED_V4'>","comments":"","outputs":1,"x":2531.5452423095703,"y":1736.7669706344604,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"661e7fce.8d3e6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2424.15252494812,"y":1851.588595867157,"z":"1a8b5305.c085cd","wires":[["e08c16f9.560da8"]]},{"id":"cb5bdfca.b22e2","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V4","xml":"<outcome value='AIC_DATA_PLANE_PROTECTED_V4'>","comments":"","outputs":1,"x":2527.9339141845703,"y":1773.5725135803223,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"e08c16f9.560da8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid address plan for SRIOV\" />\n","comments":"","x":2570.0407104492188,"y":1854.1718482971191,"z":"1a8b5305.c085cd","wires":[]},{"id":"2a9685d1.8f282a","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V4","xml":"<outcome value='AIC_DATA_PLANE_PRIVATE_V4'>","comments":"","outputs":1,"x":2510.1525268554688,"y":1812.3384685516357,"z":"1a8b5305.c085cd","wires":[["dd3a41a3.fce13"]]},{"id":"14bf4e76.feb402","type":"switchNode","name":"switch network-model.eipam-v6-address-plan","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2008.493263244629,"y":1556.5017204284668,"z":"1a8b5305.c085cd","wires":[["24428acd.934a56","a8641e83.b8db7","95022c2.dc0f4d","e1a0deaa.2971a"]]},{"id":"a2da1074.b277a","type":"save","name":"save AnAI - l3-network","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"network-name\" value=\"`$tmp.l3-network.network-name`\" />\n<parameter name=\"network-type\" value=\"`$tmp.l3-network.network-type`\" />\n<parameter name=\"network-role\" value=\"`$tmp.l3-network.network-role`\" />\n<parameter name=\"network-technology\" value=\"`$tmp.l3-network.network-technology`\" />\n<parameter name=\"is-bound-to-vpn\" value=\"`$tmp.l3-network.is-bound-to-vpn`\" />\n<parameter name=\"service-id\" value=\"`$tmp.l3-network.service-id`\" />\n<parameter name=\"tenant-id\" value=\"`$network-topology-operation-input.network-request-information.tenant`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />\n<parameter name=\"persona-model-id\" value=\"`$tmp.l3-network.persona-model-id`\" />\n<parameter name=\"persona-model-version\" value=\"`$tmp.l3-network.persona-model-version`\" />\n<parameter name=\"persona-model-customization-id\" value=\"`$tmp.l3-network.persona-model-customization-id`\" />\n<parameter name=\"physical-network-name\" value=\"`$tmp.l3-network.physical-network-name`\" />\n<parameter name=\"is-provider-network\" value=\"`$tmp.l3-network.is-provider-network-boolean`\" />\n<parameter name=\"is-shared-network\" value=\"`$tmp.l3-network.is-shared-network-boolean`\" />\n<parameter name=\"is-external-network\" value=\"`$tmp.l3-network.is-external-network-boolean`\" />\n<parameter name=\"selflink\" value=\"`$tmp.l3-network.self-link`\" />\n","comments":"","outputs":1,"x":560.1203231811523,"y":2508.6126823425293,"z":"1a8b5305.c085cd","wires":[["c40893c5.bed6a","cc2e1488.ed29e8"]]},{"id":"a3b08dd5.410cf","type":"switchNode","name":"switch network-model.eipam-v6-address-plan (SRIOV)","xml":"<switch test='`$network-model.eipam-v6-address-plan`'>\n","comments":"","outputs":1,"x":2100.3426971435547,"y":1955.7078790664673,"z":"1a8b5305.c085cd","wires":[["9370dcee.b1658","230c5ba9.b8ec14","8421ed93.f98dc","d1efeef1.782e5","c7ab8d9a.6efc4","4e216a04.bdc844"]]},{"id":"9370dcee.b1658","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2434.770872116089,"y":2150.6365903019905,"z":"1a8b5305.c085cd","wires":[["e7e4c219.08456"]]},{"id":"e7e4c219.08456","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid ipv6 address plan for SRIOV\" />\n","comments":"","x":2600.6589279174805,"y":2149.6485112309456,"z":"1a8b5305.c085cd","wires":[]},{"id":"230c5ba9.b8ec14","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value=\"AIC_ATM_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2503.6082305908203,"y":1956.9102249145508,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"8421ed93.f98dc","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value=\"AIC_ATM_PROTECTED_V6\">","comments":"","outputs":1,"x":2498.893585205078,"y":1998.9102478027344,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"d1efeef1.782e5","type":"other","name":"AIC_DATA_PLANE_UNPROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_UNPROTECTED_V6\">","comments":"","outputs":1,"x":2538.795234680176,"y":2037.0531024932861,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"4e216a04.bdc844","type":"other","name":"AIC_DATA_PLANE_PROTECTED_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PROTECTED_V6\">","comments":"","outputs":1,"x":2527.509864807129,"y":2104.4815190434456,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"c7ab8d9a.6efc4","type":"other","name":"AIC_DATA_PLANE_PRIVATE_V6","xml":"<outcome value=\"AIC_DATA_PLANE_PRIVATE_V6\">","comments":"","outputs":1,"x":2515.795440673828,"y":2071.910224914551,"z":"1a8b5305.c085cd","wires":[["403ea448.83caac"]]},{"id":"7724a3fb.17a6ec","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":870.2434997558594,"y":710.2752866744995,"z":"1a8b5305.c085cd","wires":[["e943ec69.aeaf6"]]},{"id":"e943ec69.aeaf6","type":"set","name":"set tmp.l3-network.physical-network-name","xml":"<set>\n<parameter name='tmp.l3-network.physical-network-name' value=\"\" />\n<parameter name='tmp.l3-network.is-provider-network-boolean' value='false' />","comments":"","x":1154.5294570922852,"y":708.8467178344727,"z":"1a8b5305.c085cd","wires":[]},{"id":"b7ab3890.826f88","type":"switchNode","name":"switch network--model.is-shared-network","xml":"<switch test='`$network-model.is-shared-network`'>\n","comments":"","outputs":1,"x":583.7351722717285,"y":741.878303527832,"z":"1a8b5305.c085cd","wires":[["ddbe6021.0df94","43db457d.275bfc"]]},{"id":"ddbe6021.0df94","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":881.0210113525391,"y":745.2752389907837,"z":"1a8b5305.c085cd","wires":[["dfdc8285.e2d84"]]},{"id":"dfdc8285.e2d84","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='true' />","comments":"","x":1173.3067245483398,"y":745.2750864028931,"z":"1a8b5305.c085cd","wires":[]},{"id":"43db457d.275bfc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":869.8150367736816,"y":780.5767459869385,"z":"1a8b5305.c085cd","wires":[["48fd2235.78fcdc"]]},{"id":"48fd2235.78fcdc","type":"set","name":"set tmp.l3-network.is-shared-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-shared-network-boolean' value='false' />","comments":"","x":1174.1009559631348,"y":780.4339237213135,"z":"1a8b5305.c085cd","wires":[]},{"id":"a6f05dc6.5396f","type":"switchNode","name":"switch network--model.is-external-network","xml":"<switch test='`$network-model.is-external-network`'>\n","comments":"","outputs":1,"x":586.7517318725586,"y":810.5926513671875,"z":"1a8b5305.c085cd","wires":[["dde6ab06.666f48","3f618dc2.181b72"]]},{"id":"dde6ab06.666f48","type":"other","name":"outcome Y","xml":"<outcome value='Y'>\n","comments":"","outputs":1,"x":884.0375709533691,"y":813.9895868301392,"z":"1a8b5305.c085cd","wires":[["fa82ba7a.274818"]]},{"id":"fa82ba7a.274818","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='true' />","comments":"","x":1176.32328414917,"y":813.9894342422485,"z":"1a8b5305.c085cd","wires":[]},{"id":"3f618dc2.181b72","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":872.8315963745117,"y":849.291093826294,"z":"1a8b5305.c085cd","wires":[["1d5e084a.a29b78"]]},{"id":"1d5e084a.a29b78","type":"set","name":"set tmp.l3-network.is-external-network-boolean","xml":"<set>\n<parameter name='tmp.l3-network.is-external-network-boolean' value='false' />","comments":"","x":1177.1175155639648,"y":849.148271560669,"z":"1a8b5305.c085cd","wires":[]},{"id":"3837a2bc.6e158e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Failed to save l3-network in AAI for network-id = ' + $tmp.l3-network.network-id`\" />\n","comments":"","x":1023.7992134094238,"y":2491.6560916900635,"z":"1a8b5305.c085cd","wires":[]},{"id":"c40893c5.bed6a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":795.2278213500977,"y":2490.671829223633,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"8d2ed5fd.a2be38","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.6559104919434,"y":2591.67188167572,"z":"1a8b5305.c085cd","wires":[["10173bcb.62db54","304a38c0.5ac098"]]},{"id":"e495d7bf.6827a8","type":"for","name":"for 0..subnet_length","xml":"<for index='sidx' start='0' end='`$tmp.l3-network.subnet_length`' >\n","comments":"","outputs":1,"x":562.2121324539185,"y":2569.6719675064087,"z":"1a8b5305.c085cd","wires":[["9a14be8b.c4dce"]]},{"id":"9a14be8b.c4dce","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":789.3548126220703,"y":2568.5609188079834,"z":"1a8b5305.c085cd","wires":[["113cc2e1.6bb4ed","cb48f70c.4ee7f8"]]},{"id":"10173bcb.62db54","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1934.4962425231934,"y":2548.1478338241577,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"ed1fbf08.fa0f9","type":"save","name":"save relationship: tenant and cloud-region","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network:relationship-list\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\" \n\tforce=\"true\" \n\tlocal-only=\"false\">\n\t<!-- create relationship-list -->\n\t<parameter name=\"relationship-list.relationship[0].related-to\" value=\"tenant\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"Rackspace\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"tenant.tenant-id\" />\n\t<parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.tenant`\" />\n\t<parameter name=\"relationship-list.relationship[1].related-to\" value=\"cloud-region\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"Rackspace\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n\t<parameter name=\"relationship-list.relationship[1].relationship-data[1].relationship-value\" value=\"`$network-topology-operation-input.network-request-input.aic-cloud-region`\" />\n\t\n\t","comments":"","outputs":1,"x":617.9264144897461,"y":2846.2435417175293,"z":"1a8b5305.c085cd","wires":[["f876d5b8.4f26c8","9ea6263d.2cf398"]]},{"id":"f876d5b8.4f26c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":865.9264183044434,"y":2846.243532180786,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"e0ef3b91.882348","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1054.3192462921143,"y":2845.879650115967,"z":"1a8b5305.c085cd","wires":[["74512067.32d89","21428fc3.65275"]]},{"id":"74512067.32d89","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 tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1300.0851249694824,"y":2836.5820569992065,"z":"1a8b5305.c085cd","wires":[]},{"id":"304a38c0.5ac098","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1943.2193870544434,"y":2585.79102230072,"z":"1a8b5305.c085cd","wires":[["e72b852c.6da448"]]},{"id":"9ea6263d.2cf398","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":873.9342613220215,"y":2888.0768547058105,"z":"1a8b5305.c085cd","wires":[["e0ef3b91.882348"]]},{"id":"2f4f1f7c.f19a9","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":853.4181060791016,"y":2709.989246368408,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"29f88949.932b36","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":864.1411399841309,"y":2743.632335662842,"z":"1a8b5305.c085cd","wires":[["10d1d9fc.30afb6"]]},{"id":"48994ca2.f68244","type":"delete","name":"delete l3-network","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"l3-network\" \n\tkey=\"l3-network.network-id = $tmp.l3-network.network-id\">","comments":"","outputs":1,"x":1814.7355880737305,"y":3411.2118644714355,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca9121d3.7a07d","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 writing to l3-network - ' + $tmp.error-message`\"/>","comments":"","x":1803.3397216796875,"y":3454.407875061035,"z":"1a8b5305.c085cd","wires":[]},{"id":"21428fc3.65275","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1624.911849975586,"y":3411.4634532928467,"z":"1a8b5305.c085cd","wires":[["48994ca2.f68244","ca9121d3.7a07d"]]},{"id":"dc5a36f4.8bbba8","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 subnet relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2374.3692893981934,"y":2563.0052556991577,"z":"1a8b5305.c085cd","wires":[]},{"id":"e72b852c.6da448","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":2119.2267112731934,"y":2562.4337224960327,"z":"1a8b5305.c085cd","wires":[["dc5a36f4.8bbba8","21428fc3.65275"]]},{"id":"cc2e1488.ed29e8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":799.0373191833496,"y":2520.1482458114624,"z":"1a8b5305.c085cd","wires":[["3837a2bc.6e158e"]]},{"id":"113cc2e1.6bb4ed","type":"set","name":"set: tmp.subnet-id","xml":"<set>\n<parameter name=\"tmp.subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\"/>\n\t","comments":"","x":1015.4183883666992,"y":2528.8146476745605,"z":"1a8b5305.c085cd","wires":[]},{"id":"cb48f70c.4ee7f8","type":"switchNode","name":"switch dhcp-enabled","xml":"<switch test='`$tmp.l3-network.subnet[$sidx].dhcp-enabled`'>\n","comments":"","outputs":1,"x":1018.7674827575684,"y":2573.683539390564,"z":"1a8b5305.c085cd","wires":[["332a0d9a.2096e2","37b18102.98d6ce"]]},{"id":"37b18102.98d6ce","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1252.7674827575684,"y":2549.6836614608765,"z":"1a8b5305.c085cd","wires":[["bbfc739f.96b1"]]},{"id":"332a0d9a.2096e2","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1250.7674827575684,"y":2585.6836614608765,"z":"1a8b5305.c085cd","wires":[["4c50ff55.54e58"]]},{"id":"412912ba.445eac","type":"save","name":"save AnAI - l3-network.subnets","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"subnet\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND subnet.subnet-id = $tmp.subnet-id\" >\n<!-- Create l3-network object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"subnet-id\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-id`\" />\n<parameter name=\"subnet-name\" value=\"`$tmp.l3-network.subnet[$sidx].subnet-name`\" />\n<parameter name=\"gateway-address\" value=\"`$tmp.l3-network.subnet[$sidx].gateway-address`\" />\n<parameter name=\"network-start-address\" value=\"`$tmp.l3-network.subnet[$sidx].network-start-address`\" />\n<parameter name=\"cidr-mask\" value=\"`$tmp.l3-network.subnet[$sidx].cidr-mask`\" />\n<parameter name=\"ip-version\" value=\"`$tmp.l3-network.subnet[$sidx].ip-version`\" />\n<parameter name=\"dhcp-start\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-start`\" />\n<parameter name=\"dhcp-end\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-end`\" />\n<parameter name=\"dhcp-enabled\" value=\"`$tmp.l3-network.subnet[$sidx].dhcp-enabled`\" />\n<parameter name=\"orchestration-status\" value=\"PendingCreate\" />","comments":"","outputs":1,"x":1678.7672386169434,"y":2547.68360042572,"z":"1a8b5305.c085cd","wires":[["304a38c0.5ac098","10173bcb.62db54"]]},{"id":"bbfc739f.96b1","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6559104919434,"y":2549.906012535095,"z":"1a8b5305.c085cd","wires":[["412912ba.445eac"]]},{"id":"4c50ff55.54e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1443.6561546325684,"y":2589.906012535095,"z":"1a8b5305.c085cd","wires":[["8d2ed5fd.a2be38"]]},{"id":"3917cd9.7ed7c32","type":"for","name":"for 0..vpn-bindings_length","xml":"<for index='vidx' start='0' end='`$vpn-bindings_length`' >\n","comments":"","outputs":1,"x":1144.9518966674805,"y":2649.239086151123,"z":"1a8b5305.c085cd","wires":[["7c900881.645018"]]},{"id":"cb2ae5c7.b8f7a8","type":"switchNode","name":"switch hasVpnBindings","xml":"<switch test='`$hasVpnBindings`'>\n","comments":"","outputs":1,"x":585.6190299987793,"y":2650.202492713928,"z":"1a8b5305.c085cd","wires":[["8207c0b3.22e3f"]]},{"id":"6cf30f85.f2632","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":946.285758972168,"y":2651.535472869873,"z":"1a8b5305.c085cd","wires":[["3917cd9.7ed7c32"]]},{"id":"5f2018d1.a1d508","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.l3-network.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=\"`$vpn-bindings[$vidx].binding-uuid`\" />","comments":"","outputs":1,"x":1606.285514831543,"y":2649.202220916748,"z":"1a8b5305.c085cd","wires":[["c08b58ea.2e93c8","6ffa9708.073958"]]},{"id":"c08b58ea.2e93c8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1838.0251121520996,"y":2648.0110969543457,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"a8bf5972.afc6a8","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1994.9179916381836,"y":2647.647204399109,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","55da40d2.2f072"]]},{"id":"6ffa9708.073958","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1847.0555114746094,"y":2682.289525985718,"z":"1a8b5305.c085cd","wires":[["a8bf5972.afc6a8"]]},{"id":"7c900881.645018","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1362.6186447143555,"y":2651.201976776123,"z":"1a8b5305.c085cd","wires":[["5f2018d1.a1d508"]]},{"id":"10d1d9fc.30afb6","type":"block","name":"block","xml":"<block>","atomic":"false","outputs":1,"x":1045.581932067871,"y":2709.5356254577637,"z":"1a8b5305.c085cd","wires":[["21428fc3.65275","fd152d37.d5acd"]]},{"id":"fd152d37.d5acd","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 service instance relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1270.581932067871,"y":2708.202251434326,"z":"1a8b5305.c085cd","wires":[]},{"id":"55da40d2.2f072","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 vpn binding relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2222.581886291504,"y":2646.8689556121826,"z":"1a8b5305.c085cd","wires":[]},{"id":"b629208a.09c27","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":546.1110458374023,"y":1389.4443473815918,"z":"1a8b5305.c085cd","wires":[["5d98c991.20e8f8","9d4e2f0d.1638","bcb49c2d.d02b3"]]},{"id":"a9dd6669.a72c38","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND \n\t\t depth = '0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.444450378418,"y":982.4443778991699,"z":"1a8b5305.c085cd","wires":[["b1b41c5c.6ac73","b1eb8b68.e93818"]]},{"id":"b1eb8b68.e93818","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":765.8335571289062,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[["358bf8ac.301e38"]]},{"id":"358bf8ac.301e38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":944.1192016601562,"y":1019.1665458679199,"z":"1a8b5305.c085cd","wires":[]},{"id":"b1b41c5c.6ac73","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":772.333553314209,"y":983.1666069030762,"z":"1a8b5305.c085cd","wires":[["cccc3223.636ff"]]},{"id":"cccc3223.636ff","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":940.1113891601562,"y":982.4721488952637,"z":"1a8b5305.c085cd","wires":[]},{"id":"9de966ff.c0be48","type":"comment","name":"Per test failure in IT, need to throw error if relationships don't exist","info":"","comments":"","x":661.6946868896484,"y":939.5276851654053,"z":"1a8b5305.c085cd","wires":[]},{"id":"2fbd77c1.048628","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='false' />\n\n","comments":"","x":529.8890609741211,"y":882.8332328796387,"z":"1a8b5305.c085cd","wires":[]},{"id":"93a30dfc.d4482","type":"get-resource","name":"get-resource complex","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"complex\" \n\t\tkey=\"complex.physical-location-id = $aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value\"\n pfx='aai.complex' local-only='false' >\n \n\n\n","comments":"","outputs":1,"x":1634.999870300293,"y":1202.4444198608398,"z":"1a8b5305.c085cd","wires":[["4044fb25.8ce8c4","898fafd9.df1f5","9249c225.c0f71"]]},{"id":"898fafd9.df1f5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1866.6391830444336,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[["97d0bcc0.ddc29"]]},{"id":"97d0bcc0.ddc29","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving complex from AAI\" />\n","comments":"","x":2040.9248275756836,"y":1261.916404724121,"z":"1a8b5305.c085cd","wires":[]},{"id":"4044fb25.8ce8c4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1869.1391792297363,"y":1221.9164657592773,"z":"1a8b5305.c085cd","wires":[["b737ddd0.c8ed4"]]},{"id":"b737ddd0.c8ed4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":2036.917106628418,"y":1221.2218132019043,"z":"1a8b5305.c085cd","wires":[]},{"id":"5b1e35b2.5ea92c","type":"for","name":"for relationship list","xml":"<for silentFailure='false' index='ridx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship_length`\" >\n","comments":"","outputs":1,"x":509.86153411865234,"y":1158.6747665405273,"z":"1a8b5305.c085cd","wires":[["6b0ad57f.0fe9cc"]]},{"id":"862e6c4c.7a97","type":"switchNode","name":"switch","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>\n","comments":"","outputs":1,"x":915.361198425293,"y":1162.3888778686523,"z":"1a8b5305.c085cd","wires":[["5eb1534d.ddb1fc"]]},{"id":"6b0ad57f.0fe9cc","type":"for","name":"for relationship data","xml":"<for silentFailure='false' index='rdidx' start='0' end=\"`$aai.cloud-region.relationship-list.relationship[$ridx].relationship-data_length`\" >\n","comments":"","outputs":1,"x":732.7779769897461,"y":1159.6389999389648,"z":"1a8b5305.c085cd","wires":[["862e6c4c.7a97"]]},{"id":"5eb1534d.ddb1fc","type":"other","name":"complex.physical-location-id","xml":"<outcome value='complex.physical-location-id'>\n","comments":"","outputs":1,"x":1137.8612594604492,"y":1160.8055038452148,"z":"1a8b5305.c085cd","wires":[["ec522bfd.604bd8"]]},{"id":"ec522bfd.604bd8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.2775802612305,"y":1158.5556259155273,"z":"1a8b5305.c085cd","wires":[["93a30dfc.d4482","a0b8ae7e.73db","1478ab7a.138b25"]]},{"id":"9249c225.c0f71","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1861.6669752332891,"y":1175.9721787770586,"z":"1a8b5305.c085cd","wires":[["73c62e58.62479"]]},{"id":"73c62e58.62479","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2038.8098449707031,"y":1177.222131729126,"z":"1a8b5305.c085cd","wires":[["97a332a5.2b6c9"]]},{"id":"a0b8ae7e.73db","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.network-request-input.aic-clli' value='`$aai.complex.physical-location-id`' />\n\n","comments":"","x":1601.7781372070312,"y":1165.5000114440918,"z":"1a8b5305.c085cd","wires":[]},{"id":"7a1a7c2.ce09484","type":"switchNode","name":"switch relationship_length","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship_length`'>\n","comments":"","outputs":1,"x":539.8889694213867,"y":1081.7221908569336,"z":"1a8b5305.c085cd","wires":[["727319e3.8edd98","26c69776.80cfa8"]]},{"id":"727319e3.8edd98","type":"other","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":733.8890414767793,"y":1080.7222796546089,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"26c69776.80cfa8","type":"other","name":"null","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":735.8890380859375,"y":1119.7223110198975,"z":"1a8b5305.c085cd","wires":[["6823a93b.07df48"]]},{"id":"6823a93b.07df48","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region missing relationships in AAI\" />\n","comments":"","x":919.8890380859375,"y":1085.7223110198975,"z":"1a8b5305.c085cd","wires":[]},{"id":"1478ab7a.138b25","type":"set","name":"set tmp.complex-found","xml":"<set>\n<parameter name='tmp.complex-found' value='true' />\n\n","comments":"","x":1640.1111450195312,"y":1133.8333854675293,"z":"1a8b5305.c085cd","wires":[]},{"id":"60381262.576cfc","type":"switchNode","name":"switch tmp.complex-found","xml":"<switch test='`$tmp.complex-found`'>\n","comments":"","outputs":1,"x":537.8890914916992,"y":1241.9444198608398,"z":"1a8b5305.c085cd","wires":[["5a328de2.03b8b4"]]},{"id":"5a328de2.03b8b4","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":755.3890914916992,"y":1241.3055038452148,"z":"1a8b5305.c085cd","wires":[["e8bfbba2.de15b8"]]},{"id":"e8bfbba2.de15b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex not found in AAI\" />\n","comments":"","x":912.889030456543,"y":1242.8056259155273,"z":"1a8b5305.c085cd","wires":[]},{"id":"5d98c991.20e8f8","type":"outcome","name":"outcome Contrail","xml":"<outcome value='Contrail'>\n","comments":"","outputs":1,"x":788.9999618530273,"y":1389.8886833190918,"z":"1a8b5305.c085cd","wires":[["f6f1d63d.fe27e8"]]},{"id":"9d4e2f0d.1638","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":822.9999923706055,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["46abce7a.44c39"]]},{"id":"97a332a5.2b6c9","type":"switchNode","name":"switch region","xml":"<switch test='`$aai.complex.region`'>\n","comments":"","outputs":1,"x":2241.4445724487305,"y":1176.8888053894043,"z":"1a8b5305.c085cd","wires":[["38bf1673.6311ca","961953ad.504c8","5a180df4.7bc884","f16470ad.05b77","7e5b906f.9202a","5490bc7c.7aca24"]]},{"id":"38bf1673.6311ca","type":"other","name":"USA","xml":"<outcome value='USA'>\n","comments":"","outputs":1,"x":2475.9447729322637,"y":1120.1388247807818,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"961953ad.504c8","type":"other","name":"US","xml":"<outcome value='US'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1151.3888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5a180df4.7bc884","type":"other","name":"CALA","xml":"<outcome value='CALA'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1183.8888368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"f16470ad.05b77","type":"other","name":"EMEA","xml":"<outcome value='EMEA'>\n","comments":"","outputs":1,"x":2475.9446601867676,"y":1215.1388368606567,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"7e5b906f.9202a","type":"other","name":"AP","xml":"<outcome value='AP'>\n","comments":"","outputs":1,"x":2477.1946601867676,"y":1248.8887758255005,"z":"1a8b5305.c085cd","wires":[["b368b63c.3dd7a8"]]},{"id":"5490bc7c.7aca24","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2477.1945152282715,"y":1280.1387453079224,"z":"1a8b5305.c085cd","wires":[["e44c109d.dc45c"]]},{"id":"e44c109d.dc45c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Complex.region unknown\" />\n","comments":"","x":2645.9446601867676,"y":1278.8887758255005,"z":"1a8b5305.c085cd","wires":[]},{"id":"b368b63c.3dd7a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2634.888779110379,"y":1145.3889084921943,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"bcb49c2d.d02b3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":773.0000076293945,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[["939bed8f.13cae"]]},{"id":"939bed8f.13cae","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Invalid network-technology. Only AIC_SR_IOV and Contrail are supported\" />\n","comments":"","x":1000.9999465942383,"y":2019.3336906433105,"z":"1a8b5305.c085cd","wires":[]},{"id":"b8481fbd.f33f6","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2745.9997024536133,"y":1365.1110954284668,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"dd3a41a3.fce13","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2803.000259399414,"y":1745.1110877990723,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"403ea448.83caac","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2844.9997940063477,"y":2003.1112187504768,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"ca6d6436.b4f728","type":"call","name":"call process-eipam-pools","xml":"<call module='GENERIC-RESOURCE-API' rpc='process-eipam-pools' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":570.3022994995117,"y":2234.156078338623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"13db491e.a822c7","type":"call","name":"call GENERIC-RESOURCE-API:create-l3-subnet","xml":"<call module='GENERIC-RESOURCE-API' rpc='create-l3-subnet' mode='sync' >\n","comments":"tmp.level should be set to 1","outputs":1,"x":651.5131759643555,"y":2312.913890838623,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"2709264e.6759fa","type":"set","name":"set process-eipam-action","xml":"<set>\n<parameter name='tmp.process-eipam-action' value='assign' />\n","comments":"","x":573.7677536010742,"y":2195.156322479248,"z":"1a8b5305.c085cd","wires":[]},{"id":"61bb926f.cd7d7c","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.process-eipam-pools:REQID\"/>\n<parameter name=\"field3\" value=\"`$network-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Values after process-eipam\"/>\n<parameter name=\"field5\" value=\"`level1-v4-mask`\"/>\n<parameter name=\"field6\" value=\"`$tmp.l3-network.level1.v4.mask`\"/>\n<parameter name=\"field7\" value=\"`level1-v4-ipprefix`\"/>\n<parameter name=\"field8\" value=\"`$tmp.l3-network.level1.v4.ip-prefix`\"/>\n<parameter name=\"field9\" value=\"`level1-v4-entity-id`\"/>\n<parameter name=\"field10\" value=\"`$tmp.l3-network.level1.v4.entity-id`\"/>\n<parameter name=\"field11\" value=\"`level2-v4-mask`\"/>\n<parameter name=\"field12\" value=\"`$tmp.l3-network.level2.v4.mask`\"/>\n<parameter name=\"field13\" value=\"`level2-v4-ipprefix`\"/>\n<parameter name=\"field14\" value=\"`$tmp.l3-network.level2.v4.ip-prefix`\"/>\n<parameter name=\"field15\" value=\"`level2-v4-entity-id`\"/>\n<parameter name=\"field16\" value=\"`$tmp.l3-network.level2.v4.entity-id`\"/>\n\n\n","comments":"","outputs":1,"x":520.4187545776367,"y":2269.938060760498,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"f6f1d63d.fe27e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1000.9999923706055,"y":1388.8888053894043,"z":"1a8b5305.c085cd","wires":[["d1028c12.c84fc","bade0de.687c6f"]]},{"id":"46abce7a.44c39","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1048.9999313354492,"y":1732.8888053894043,"z":"1a8b5305.c085cd","wires":[["6dc461c1.1dfdf","330b7d34.5dfc22"]]},{"id":"8207c0b3.22e3f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":778.9999923706055,"y":2650.999828338623,"z":"1a8b5305.c085cd","wires":[["6cf30f85.f2632"]]},{"id":"f9e58c7b.aacc4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":732.9999923706055,"y":344.00002670288086,"z":"1a8b5305.c085cd","wires":[["18ec6cc4.a941f3"]]},{"id":"18ec6cc4.a941f3","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":912.9999847412109,"y":342.00000190734863,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"63bb1d97.e60064","type":"switchNode","name":"switch network-technology","xml":"<switch test='`$network-model.network-technology`'>\n","comments":"","outputs":1,"x":574.9999923706055,"y":2927.999828338623,"z":"1a8b5305.c085cd","wires":[["939b5aed.1aae58"]]},{"id":"939b5aed.1aae58","type":"outcome","name":"outcome AIC_SR_IOV","xml":"<outcome value='AIC_SR_IOV'>\n","comments":"","outputs":1,"x":877.8889694213867,"y":2929.444164276123,"z":"1a8b5305.c085cd","wires":[["e82a508a.4229a"]]},{"id":"e82a508a.4229a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1095.8887252807617,"y":2927.4442863464355,"z":"1a8b5305.c085cd","wires":[["aebd7334.b437c","8cea94a0.5581b8"]]},{"id":"aebd7334.b437c","type":"save","name":"save AnAI - segmentation-assignment","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"segmentation-assignment\" \n\t\tkey=\"l3-network.network-id = $tmp.l3-network.network-id \n\t\t\tAND segmentation-assignment.segmentation-id = $tmp.l3-network.segmentation-id\" >\n<!-- Create segmentation-assignment object -->\n<parameter name=\"network-id\" value=\"`$tmp.l3-network.network-id`\" />\n<parameter name=\"segmentation-id\" value=\"`$tmp.l3-network.segmentation-id`\" />\n","comments":"","outputs":1,"x":1374.999870300293,"y":2983.7777824401855,"z":"1a8b5305.c085cd","wires":[["635baecf.da65a","844325db.02e548"]]},{"id":"635baecf.da65a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1643.999870300293,"y":2960.777904510498,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"844325db.02e548","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1652.723014831543,"y":2998.4210929870605,"z":"1a8b5305.c085cd","wires":[["1db9bcd1.f30e23"]]},{"id":"fc0f6851.bec3b8","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 segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":2083.872917175293,"y":2975.635326385498,"z":"1a8b5305.c085cd","wires":[]},{"id":"1db9bcd1.f30e23","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1828.730339050293,"y":2975.063793182373,"z":"1a8b5305.c085cd","wires":[["fc0f6851.bec3b8","21428fc3.65275"]]},{"id":"c2804041.b3c85","type":"execute","name":"execute readProperties","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties'>\n <parameter name='contextPrefix' value='prop'/>\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api.properties'/>\n","comments":"","outputs":1,"x":1342.999984741211,"y":2906.666576385498,"z":"1a8b5305.c085cd","wires":[["5bb8bd75.e7bd04","b6b631b.f63f8d"]]},{"id":"5bb8bd75.e7bd04","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1550.999984741211,"y":2848.666576385498,"z":"1a8b5305.c085cd","wires":[["44e3f917.1e2e28"]]},{"id":"b6b631b.f63f8d","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1544.999984741211,"y":2884.666576385498,"z":"1a8b5305.c085cd","wires":[["4be39f81.4fd4a"]]},{"id":"95dbb3fd.0c1f7","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 reading default segmentation-assignment for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`\"/>","comments":"","x":1952.9999923706055,"y":2868.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"4be39f81.4fd4a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1721.857406616211,"y":2884.095043182373,"z":"1a8b5305.c085cd","wires":[["95dbb3fd.0c1f7","21428fc3.65275"]]},{"id":"e1be1a52.54f3b8","type":"set","name":"set: tmp.l3-network.segmentation-id","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"`$prop.default.segmentation-assignment`\"/>","comments":"","x":1984.9999923706055,"y":2836.666332244873,"z":"1a8b5305.c085cd","wires":[]},{"id":"44e3f917.1e2e28","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1727.857406616211,"y":2848.095043182373,"z":"1a8b5305.c085cd","wires":[["e1be1a52.54f3b8"]]},{"id":"d1028c12.c84fc","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1256.999870300293,"y":1387.4445915222168,"z":"1a8b5305.c085cd","wires":[["2024b896.76a498"]]},{"id":"2024b896.76a498","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1511.9999961853027,"y":1387.8731479644775,"z":"1a8b5305.c085cd","wires":[["27e33253.31496e"]]},{"id":"27e33253.31496e","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1684.5713157653809,"y":1388.301752090454,"z":"1a8b5305.c085cd","wires":[["bc4df92.6ad6f08"]]},{"id":"6dc461c1.1dfdf","type":"switchNode","name":"switch: network-model.use-ipv4","xml":"<switch test=\"`$network-model.use-ipv4`\">","comments":"","outputs":1,"x":1324.1111755371094,"y":1733.4446239471436,"z":"1a8b5305.c085cd","wires":[["140551e2.4f61fe"]]},{"id":"140551e2.4f61fe","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1579.1113014221191,"y":1736.8731803894043,"z":"1a8b5305.c085cd","wires":[["ea5dcb81.6728d8"]]},{"id":"ea5dcb81.6728d8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1751.6826210021973,"y":1737.3017845153809,"z":"1a8b5305.c085cd","wires":[["ccfde65e.e5a838"]]},{"id":"330b7d34.5dfc22","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1344.1111373901367,"y":1954.4445304870605,"z":"1a8b5305.c085cd","wires":[["65a51dc6.c0e5e4"]]},{"id":"65a51dc6.c0e5e4","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1599.1112632751465,"y":1957.8730869293213,"z":"1a8b5305.c085cd","wires":[["9d1d090d.9dc2f8"]]},{"id":"9d1d090d.9dc2f8","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1795.6825942993164,"y":1956.3017692565918,"z":"1a8b5305.c085cd","wires":[["a3b08dd5.410cf"]]},{"id":"bade0de.687c6f","type":"switchNode","name":"switch: network-model.use-ipv6","xml":"<switch test=\"`$network-model.use-ipv6`\">","comments":"","outputs":1,"x":1266.1111373901367,"y":1556.4445304870605,"z":"1a8b5305.c085cd","wires":[["4e4efcc8.51a894"]]},{"id":"4e4efcc8.51a894","type":"other","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1521.1112632751465,"y":1559.8730869293213,"z":"1a8b5305.c085cd","wires":[["26c43fce.b1a9a"]]},{"id":"26c43fce.b1a9a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1717.6825942993164,"y":1558.3017692565918,"z":"1a8b5305.c085cd","wires":[["14bf4e76.feb402"]]},{"id":"8cea94a0.5581b8","type":"set","name":"set: segmentionat-d=1","xml":"<set>\n\t<parameter name=\"tmp.l3-network.segmentation-id\" value=\"1\"/>","comments":"","x":1329.9841690063477,"y":2950.8570852279663,"z":"1a8b5305.c085cd","wires":[]},{"id":"7e62bfac.efaea","type":"comment","name":"future if need from property","info":"","comments":"","x":1348.5556564331055,"y":2871.999828338623,"z":"1a8b5305.c085cd","wires":[]},{"id":"e3a6601d.ee1c2","type":"other","name":"outcome oam_vipr_protected_network","xml":"<outcome value='oam_vipr_protected_network'>\n","comments":"","outputs":1,"x":2609.555305480957,"y":375.50263023376465,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"d21320c7.875be","type":"other","name":"outcome network_without_route_tags_naming_default","xml":"<outcome value='network_without_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2656.2219772338867,"y":412.16929817199707,"z":"1a8b5305.c085cd","wires":[["36f8e62e.3e607a"]]},{"id":"3927bc9.ef1ad44","type":"other","name":"outcome sriov_provider_network","xml":"<outcome value='sriov_provider_network'>\n","comments":"","outputs":1,"x":2587.888801574707,"y":648.8359718322754,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"f545226c.1e1f3","type":"other","name":"outcome oam_atm_u_landing_network","xml":"<outcome value='oam_atm_u_landing_network'>\n","comments":"","outputs":1,"x":2602.888496398926,"y":453.83595752716064,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"983a4aba.12f018","type":"other","name":"outcome oam_atm_p_landing_network","xml":"<outcome value='oam_atm_p_landing_network'>\n","comments":"","outputs":1,"x":2601.2216720581055,"y":488.8359594345093,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"9ac69de3.85dd5","type":"other","name":"outcome oam_aim_landing_network","xml":"<outcome value='oam_aim_landing_network'>\n","comments":"","outputs":1,"x":2594.5555114746094,"y":520.502628326416,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"56b6dcac.c4bfc4","type":"other","name":"outcome network_with_route_tags_naming_default","xml":"<outcome value='network_with_route_tags_naming_default'>\n","comments":"","outputs":1,"x":2639.555595397949,"y":553.8359527587891,"z":"1a8b5305.c085cd","wires":[["9269a69b.c004e8"]]},{"id":"279f950e.baf49a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V4","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V4'>","comments":"","outputs":1,"x":2502.999824523926,"y":1429.9999198913574,"z":"1a8b5305.c085cd","wires":[["b8481fbd.f33f6"]]},{"id":"960cc18d.2fd1b","type":"get-resource","name":"get-resource VPN_BINDINGS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VPN_BINDINGS WHERE network_customization_uuid = $network-topology-operation-input.network-information.onap-model-information.model-customization-uuid'\n pfx='vpn-bindings[]'>\n\n","comments":"","outputs":1,"x":1246.142807006836,"y":264.28571128845215,"z":"1a8b5305.c085cd","wires":[["feb45c91.fd681","d7038114.b2909","7f333885.c94138"]]},{"id":"d7038114.b2909","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1467.5714111328125,"y":296.99999237060547,"z":"1a8b5305.c085cd","wires":[["ef08fa38.9d4078"]]},{"id":"7f333885.c94138","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1462.9044380187988,"y":329.33330631256104,"z":"1a8b5305.c085cd","wires":[["911dd542.ed2ee8"]]},{"id":"feb45c91.fd681","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1463.0804443359375,"y":264.4259567260742,"z":"1a8b5305.c085cd","wires":[["cda800bd.57b12"]]},{"id":"ef08fa38.9d4078","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Network model is_bound_to_vpn=true but no vpn_binding is present\" />\n\n","comments":"","x":1636.1428604125977,"y":297.28572368621826,"z":"1a8b5305.c085cd","wires":[]},{"id":"cda800bd.57b12","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1633.2857666015625,"y":263.99999237060547,"z":"1a8b5305.c085cd","wires":[["32d5ba47.7aac96","2dde48f4.4544e8"]]},{"id":"43007d32.9c93f4","type":"comment","name":"Changelog","info":"1707: Change vpn binding from field to table selection\n1710: Add ipv6 vipr flows","comments":"","x":323.8571472167969,"y":80.00000667572021,"z":"1a8b5305.c085cd","wires":[]},{"id":"a8641e83.b8db7","type":"other","name":"AIC_ATM_UNPROTECTED_V6","xml":"<outcome value='AIC_ATM_UNPROTECTED_V6'>","comments":"","outputs":1,"x":2493.800048828125,"y":1535,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"95022c2.dc0f4d","type":"other","name":"AIC_ATM_PROTECTED_V6","xml":"<outcome value='AIC_ATM_PROTECTED_V6'>","comments":"","outputs":1,"x":2483.6886596679688,"y":1572.5558385849,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"140e9a55.7c9096","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2751.239028930664,"y":1542.2012939453125,"z":"1a8b5305.c085cd","wires":[[]]},{"id":"e1a0deaa.2971a","type":"other","name":"AIC_AIM_LANDING_NETWORK_V6","xml":"<outcome value='AIC_AIM_LANDING_NETWORK_V6'>","comments":"","outputs":1,"x":2508.2391510009766,"y":1607.0901184082031,"z":"1a8b5305.c085cd","wires":[["140e9a55.7c9096"]]},{"id":"24428acd.934a56","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":2414.243480682373,"y":1644.6681156158447,"z":"1a8b5305.c085cd","wires":[["7c564997.04f088"]]},{"id":"7c564997.04f088","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"EIPAM V6 Address plan should be null\" />\n","comments":"","x":2585.131175994873,"y":1643.5013790130615,"z":"1a8b5305.c085cd","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
index e6548a98..5eeab36a 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.json
@@ -1 +1 @@
-[{"id":"ba18c526.d17c78","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":110,"z":"e4baa5a8.a31318","wires":[["8ba9ecd6.6d936"]]},{"id":"8ba9ecd6.6d936","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":243.85713577270508,"y":149.80953788757324,"z":"e4baa5a8.a31318","wires":[["c7127bd0.ef2fd8"]]},{"id":"c7127bd0.ef2fd8","type":"method","name":"method vf-module-topology-operation-assign","xml":"<method rpc='vf-module-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":243.42862701416016,"y":190,"z":"e4baa5a8.a31318","wires":[["79397c09.ed5274"]]},{"id":"21494016.016","type":"comment","name":"vf-module-topology-operation-assign","info":"","comments":"","x":535.3210983276367,"y":52.97569942474365,"z":"e4baa5a8.a31318","wires":[]},{"id":"624fdfec.bf7d8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":535.1905097961426,"y":365.52382230758667,"z":"e4baa5a8.a31318","wires":[["74eeaa1c.be92e4","134c69ff.005316"]]},{"id":"74eeaa1c.be92e4","type":"outcome","name":"CreateVfModuleInstance","xml":"<outcome value='CreateVfModuleInstance'>\n","comments":"","outputs":1,"x":797.2381248474121,"y":342.66670846939087,"z":"e4baa5a8.a31318","wires":[["cb01b9a9.685a48"]]},{"id":"134c69ff.005316","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":740.9047698974609,"y":388.0476975440979,"z":"e4baa5a8.a31318","wires":[["d9c8e7b5.a66ae8"]]},{"id":"cb01b9a9.685a48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":987.0952892303467,"y":342.6667399406433,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"d9c8e7b5.a66ae8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVfModuleInstance'\" />\n","comments":"","x":1005.9047775268555,"y":388.381010055542,"z":"e4baa5a8.a31318","wires":[]},{"id":"76409cce.086344","type":"get-resource","name":"get-resource VF_MODULE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-module-model'>\n\n","comments":"","outputs":1,"x":582.5237770080566,"y":456.66677236557007,"z":"e4baa5a8.a31318","wires":[["dd68463c.c87178","d3cb4517.ac8c08"]]},{"id":"75201e32.0cf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1023.9521980285645,"y":481.09524488449097,"z":"e4baa5a8.a31318","wires":[]},{"id":"dd68463c.c87178","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.3094673156738,"y":437.0476031303406,"z":"e4baa5a8.a31318","wires":[["6f89e52b.bf43cc"]]},{"id":"d3cb4517.ac8c08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":856.8808975219727,"y":481.33331632614136,"z":"e4baa5a8.a31318","wires":[["75201e32.0cf"]]},{"id":"6f89e52b.bf43cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_MODEL table\" />\n","comments":"","x":1023.309398651123,"y":436.1905035972595,"z":"e4baa5a8.a31318","wires":[]},{"id":"f5aeb74d.5bf438","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":577.6190414428711,"y":665.2381076812744,"z":"e4baa5a8.a31318","wires":[["6bb339ec.749948","e28c0952.e044a8"]]},{"id":"6bb339ec.749948","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":818.3333129882812,"y":642.3808479309082,"z":"e4baa5a8.a31318","wires":[["f1f5dab6.570ce8"]]},{"id":"e28c0952.e044a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":818.0951538085938,"y":683.333366394043,"z":"e4baa5a8.a31318","wires":[["ecd3b0db.60645"]]},{"id":"79397c09.ed5274","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.99999237060547,"y":2359.9999599456787,"z":"e4baa5a8.a31318","wires":[["624fdfec.bf7d8","76409cce.086344","f5aeb74d.5bf438","b864bec.d46214","c6d3c332.333ff","5a02ed1a.0ee094","fcb2cab8.814f18","67c44cf7.b6baf4","478f6983.a5e0a8","b69a54c5.a45d58","c2526b9f.9838f8","b384890d.a43ff8","7ee29093.2b4b4","706746b8.19a5e8","21781bbf.a9cfb4","dac77f20.01493","f90accfc.bc38","eab0098.e0d50f8","3ec776dc.c4924a","90e381df.54c71","7d2ca2a2.73c80c","388ab739.6c4fe8","9b75b20e.4510a","e8889dec.9dd74","ac1085e3.f13938","319cf957.f6edb6","c811246.d8ba4d8","efa475b7.980ae8","a247b0d0.a589c","f833ef67.9cf92","95db0874.7fa668","b87f9fec.9ac9e","a03bb466.634808","3c8bd226.36546e","f8307ef3.44142","21f945ed.4703fa","4646e366.6582ec","fc1913b.4d832f"]]},{"id":"f1f5dab6.570ce8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":984.999927520752,"y":641.6666030883789,"z":"e4baa5a8.a31318","wires":[]},{"id":"ecd3b0db.60645","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":980.3332977294922,"y":682.9999847412109,"z":"e4baa5a8.a31318","wires":[["1be32734.9e3679"]]},{"id":"1be32734.9e3679","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1231.6665153503418,"y":682.6666717529297,"z":"e4baa5a8.a31318","wires":[["2c5659ec.ad3dd6"]]},{"id":"2c5659ec.ad3dd6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1461.6666069030762,"y":682.0000257492065,"z":"e4baa5a8.a31318","wires":[["d38d34bf.3a83a8"]]},{"id":"b864bec.d46214","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":526.6666641235352,"y":596.6666069030762,"z":"e4baa5a8.a31318","wires":[]},{"id":"78e4042f.0ca05c","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1783.3332443237305,"y":652.9999837875366,"z":"e4baa5a8.a31318","wires":[]},{"id":"c6d3c332.333ff","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":516.6666717529297,"y":733.3333034515381,"z":"e4baa5a8.a31318","wires":[["1476b5d.81c794a"]]},{"id":"1476b5d.81c794a","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":695.000057220459,"y":732.6666793823242,"z":"e4baa5a8.a31318","wires":[["ae034b1a.ea5ad8"]]},{"id":"ae034b1a.ea5ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":854.9999656677246,"y":731.9999828338623,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a02ed1a.0ee094","type":"switchNode","name":"switch vnf order status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":539.6666946411133,"y":804.6667003631592,"z":"e4baa5a8.a31318","wires":[["6e55331.17400cc","31914e29.080322"]]},{"id":"6e55331.17400cc","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":739.9999961853027,"y":778.3332843780518,"z":"e4baa5a8.a31318","wires":[["efaa33f.0a25bd"]]},{"id":"efaa33f.0a25bd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":880.0000076293945,"y":778.3333263397217,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"31914e29.080322","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":736.666633605957,"y":819.9999618530273,"z":"e4baa5a8.a31318","wires":[["d09d7b5b.818158"]]},{"id":"d09d7b5b.818158","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF order status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status + ' but should be Created'`\" />\n","comments":"","x":896.666633605957,"y":819.6666488647461,"z":"e4baa5a8.a31318","wires":[]},{"id":"fcb2cab8.814f18","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":543.333381652832,"y":896.6666212081909,"z":"e4baa5a8.a31318","wires":[["9263cf35.cb3cc","a2f6c209.2980d"]]},{"id":"9263cf35.cb3cc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":800.7143363952637,"y":863.8093948364258,"z":"e4baa5a8.a31318","wires":[["37fa8c70.964c34"]]},{"id":"37fa8c70.964c34","type":"set","name":"set vf-module-index=0","xml":"<set>\n<parameter name='vf-module-index' value='0' />\n","comments":"","x":988.3333740234375,"y":864.4761695861816,"z":"e4baa5a8.a31318","wires":[]},{"id":"a2f6c209.2980d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.142879486084,"y":928.0952529907227,"z":"e4baa5a8.a31318","wires":[["db5c1b7f.efac08"]]},{"id":"632dd1f4.02485","type":"set","name":"set vf-module-index = vf-module_length","xml":"<set>\n<parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n","comments":"","x":1186.3334197998047,"y":908.2856483459473,"z":"e4baa5a8.a31318","wires":[]},{"id":"82872a13.5fe7f8","type":"for","name":"for each existing VF module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1145.4285125732422,"y":952.3808784484863,"z":"e4baa5a8.a31318","wires":[["79d6fba6.5029b4"]]},{"id":"db5c1b7f.efac08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":937.8571586608887,"y":928.095178604126,"z":"e4baa5a8.a31318","wires":[["632dd1f4.02485","82872a13.5fe7f8"]]},{"id":"79d6fba6.5029b4","type":"switchNode","name":"switch vf-module-information.vf-module-id == service-data.vnfs.vnf[].vf-modules.vf-module[].vf-module-id","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>\n","comments":"","outputs":1,"x":1649.0476150512695,"y":951.9522895812988,"z":"e4baa5a8.a31318","wires":[["5d658a75.3975d4"]]},{"id":"5d658a75.3975d4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2091.666664123535,"y":951.5237407684326,"z":"e4baa5a8.a31318","wires":[["421b0ac1.c08aa4"]]},{"id":"421b0ac1.c08aa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id\n + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`\" />\n","comments":"","x":2243.571544647217,"y":951.5237274169922,"z":"e4baa5a8.a31318","wires":[]},{"id":"2c370c75.fc9a44","type":"comment","name":"make sure this VF module doesn't exist already","info":"","comments":"","x":1675.4999618530273,"y":906.5797815322876,"z":"e4baa5a8.a31318","wires":[]},{"id":"67c44cf7.b6baf4","type":"set","name":"set new vf-module_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />\n","comments":"","x":548.3333206176758,"y":991.6665554046631,"z":"e4baa5a8.a31318","wires":[]},{"id":"478f6983.a5e0a8","type":"set","name":"set vf-module-topology data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />\n<parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />\n<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />\n","comments":"","x":554.8333396911621,"y":1104.1666622161865,"z":"e4baa5a8.a31318","wires":[]},{"id":"9f4a6c82.752a2","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1315.7855987548828,"y":1263.4045886993408,"z":"e4baa5a8.a31318","wires":[]},{"id":"b69a54c5.a45d58","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>\n","comments":"","outputs":1,"x":514.8332595825195,"y":1377.3569288253784,"z":"e4baa5a8.a31318","wires":[["63670893.1e3b68"]]},{"id":"63670893.1e3b68","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":660.1189498901367,"y":1377.3569974899292,"z":"e4baa5a8.a31318","wires":[["d1949d38.26893"]]},{"id":"d1949d38.26893","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`\" />\n","comments":"","x":807.2618103027344,"y":1376.9284315109253,"z":"e4baa5a8.a31318","wires":[]},{"id":"c2526b9f.9838f8","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":553.6904754638672,"y":1177.5002002716064,"z":"e4baa5a8.a31318","wires":[["2e9679c1.dabc26","556ec535.b1abec"]]},{"id":"556ec535.b1abec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9366683959961,"y":1195.6510562896729,"z":"e4baa5a8.a31318","wires":[["59e25d61.85e274"]]},{"id":"59e25d61.85e274","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":942.9366416931152,"y":1195.6510925292969,"z":"e4baa5a8.a31318","wires":[]},{"id":"2e9679c1.dabc26","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.8652648925781,"y":1153.9367895126343,"z":"e4baa5a8.a31318","wires":[["7d7ab12a.70ec1"]]},{"id":"7d7ab12a.70ec1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":943.214542388916,"y":1153.2423667907715,"z":"e4baa5a8.a31318","wires":[]},{"id":"b384890d.a43ff8","type":"set","name":"set vf-module-parameters","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-parameters.'\n value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />\n","comments":"","x":550.595287322998,"y":1826.7860202789307,"z":"e4baa5a8.a31318","wires":[]},{"id":"7ee29093.2b4b4","type":"set","name":"set order-status to PendingCreate","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'\n value='PendingCreate' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'\n value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'\n value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n","comments":"","x":574.9762725830078,"y":4824.6424016952515,"z":"e4baa5a8.a31318","wires":[]},{"id":"706746b8.19a5e8","type":"get-resource","name":"get-resource VF_MODULE_TO_VFC_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODULE_TO_VFC_MAPPING WHERE vf_module_customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-module-to-vfc-mapping[]'>\n\n","comments":"","outputs":1,"x":623.9286880493164,"y":1880.642807006836,"z":"e4baa5a8.a31318","wires":[["c1f20ca7.f60de","10a18f7e.33e891"]]},{"id":"c1f20ca7.f60de","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":889.7143783569336,"y":1861.0236377716064,"z":"e4baa5a8.a31318","wires":[["4ecc9002.756aa"]]},{"id":"10a18f7e.33e891","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":898.2858085632324,"y":1905.3093509674072,"z":"e4baa5a8.a31318","wires":[["45ef9bd1.40c894"]]},{"id":"4ecc9002.756aa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_TO_VFC_MAPPING table\" />\n","comments":"","x":1064.7143096923828,"y":1860.1665382385254,"z":"e4baa5a8.a31318","wires":[]},{"id":"21781bbf.a9cfb4","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$db.vf-module-to-vfc-mapping_length`' >\n","comments":"","outputs":1,"x":524.0476989746094,"y":2509.6430587768555,"z":"e4baa5a8.a31318","wires":[["cabbea55.2886f8"]]},{"id":"d0795bff.bc69c8","type":"get-resource","name":"get-resource VFC_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_MODEL WHERE customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-model'>\n\n","comments":"","outputs":1,"x":965.9524993896484,"y":2001.5477199554443,"z":"e4baa5a8.a31318","wires":[["9c63e2cb.97fb5","8d0e208f.5920d"]]},{"id":"c84a73cd.c4e67","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in VFC_MODEL table for customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1336.3808479309082,"y":2025.9761123657227,"z":"e4baa5a8.a31318","wires":[]},{"id":"9c63e2cb.97fb5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1161.7381172180176,"y":1981.9284706115723,"z":"e4baa5a8.a31318","wires":[["28822387.baf9cc"]]},{"id":"8d0e208f.5920d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1170.3095474243164,"y":2026.214183807373,"z":"e4baa5a8.a31318","wires":[["c84a73cd.c4e67"]]},{"id":"28822387.baf9cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_MODEL table\" />\n","comments":"","x":1336.7380485534668,"y":1981.0713710784912,"z":"e4baa5a8.a31318","wires":[]},{"id":"cabbea55.2886f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":715.9524917602539,"y":2508.214427947998,"z":"e4baa5a8.a31318","wires":[["d0795bff.bc69c8","eca0516a.3fa5d","f1ac110f.7a32d","1d9d491.32bd1b7","7518d7bc.8082b8","d99614b2.38ddf8","79dd1a08.432464","141da799.5b84c8"]]},{"id":"7d2ca2a2.73c80c","type":"set","name":"set vm_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm_length'\n value='`$db.vf-module-to-vfc-mapping_length`' />\n","comments":"","x":515.833366394043,"y":1940.8334846496582,"z":"e4baa5a8.a31318","wires":[]},{"id":"eca0516a.3fa5d","type":"set","name":"set vm data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-type`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code'\n value='`$db.vfc-model.nfc-naming-code`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type-tag'\n value='`$db.vfc-model.vm-type-tag`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":916.6667518615723,"y":2127.5001974105835,"z":"e4baa5a8.a31318","wires":[]},{"id":"d38d34bf.3a83a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1610.0000686645508,"y":680.9197244644165,"z":"e4baa5a8.a31318","wires":[["78e4042f.0ca05c","a7ac7b7.2ad2e88"]]},{"id":"a7ac7b7.2ad2e88","type":"break","name":"break","xml":"<break>\n","comments":"","x":1745.0000343322754,"y":702.5863103866577,"z":"e4baa5a8.a31318","wires":[]},{"id":"50cfe9ae.372c38","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n value='`$db.vf-module-model.invariant-uuid`' />\n","comments":"","x":929.1665992736816,"y":1418.7529220581055,"z":"e4baa5a8.a31318","wires":[]},{"id":"dac77f20.01493","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":573.0236740112305,"y":1441.5773658752441,"z":"e4baa5a8.a31318","wires":[["659c77e9.7f4f18","74de5833.fee938"]]},{"id":"659c77e9.7f4f18","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":778.6903457641602,"y":1418.720329284668,"z":"e4baa5a8.a31318","wires":[["50cfe9ae.372c38"]]},{"id":"74de5833.fee938","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":780.1189422607422,"y":1463.0059204101562,"z":"e4baa5a8.a31318","wires":[["a1fe0326.3a53b"]]},{"id":"a1fe0326.3a53b","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n","comments":"","x":934.4046783447266,"y":1462.4344925880432,"z":"e4baa5a8.a31318","wires":[]},{"id":"2dd9c208.718fae","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n value='`$db.vf-module-model.uuid`' />\n","comments":"","x":930.1188697814941,"y":1507.2915983200073,"z":"e4baa5a8.a31318","wires":[]},{"id":"f90accfc.bc38","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":545.642692565918,"y":1530.1161031723022,"z":"e4baa5a8.a31318","wires":[["51f29715.20d0f8","d6f024f9.949348"]]},{"id":"51f29715.20d0f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":779.6426658630371,"y":1507.2590351104736,"z":"e4baa5a8.a31318","wires":[["2dd9c208.718fae"]]},{"id":"d6f024f9.949348","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":781.0712623596191,"y":1551.544626235962,"z":"e4baa5a8.a31318","wires":[["62042fb1.77272"]]},{"id":"62042fb1.77272","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />\n","comments":"","x":935.3569984436035,"y":1550.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"a6bf8c48.b281b","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n value='`$db.vf-module-model.version`' />\n","comments":"","x":927.2618026733398,"y":1596.1488056182861,"z":"e4baa5a8.a31318","wires":[]},{"id":"eab0098.e0d50f8","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>\n","comments":"","outputs":1,"x":553.7855644226074,"y":1618.9732503890991,"z":"e4baa5a8.a31318","wires":[["4ccd7.162a832a","518ded3e.75ca04"]]},{"id":"4ccd7.162a832a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1596.1162128448486,"z":"e4baa5a8.a31318","wires":[["a6bf8c48.b281b"]]},{"id":"518ded3e.75ca04","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1640.401803970337,"z":"e4baa5a8.a31318","wires":[["638ada17.7c2584"]]},{"id":"638ada17.7c2584","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />\n","comments":"","x":932.4998817443848,"y":1639.8303761482239,"z":"e4baa5a8.a31318","wires":[]},{"id":"f4c6962e.75c988","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n value='`$db.vf-module-model.name`' />\n","comments":"","x":927.2618026733398,"y":1683.2916278839111,"z":"e4baa5a8.a31318","wires":[]},{"id":"3ec776dc.c4924a","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>\n","comments":"","outputs":1,"x":548.7855644226074,"y":1706.1160726547241,"z":"e4baa5a8.a31318","wires":[["7600c1a1.34774","dd561948.d52d48"]]},{"id":"7600c1a1.34774","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1683.2590351104736,"z":"e4baa5a8.a31318","wires":[["f4c6962e.75c988"]]},{"id":"dd561948.d52d48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1727.544626235962,"z":"e4baa5a8.a31318","wires":[["5381543.b5468ac"]]},{"id":"5381543.b5468ac","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />\n","comments":"","x":932.4998817443848,"y":1726.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"90e381df.54c71","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n","comments":"","x":563.2378997802734,"y":1778.6250619888306,"z":"e4baa5a8.a31318","wires":[]},{"id":"f1ac110f.7a32d","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":918.3332405090332,"y":2236.7531156539917,"z":"e4baa5a8.a31318","wires":[["8e6b243f.583508"]]},{"id":"1d9d491.32bd1b7","type":"set","name":"set vm-name-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":941.6666946411133,"y":2171.753373146057,"z":"e4baa5a8.a31318","wires":[]},{"id":"18165004.df83","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1384.761863708496,"y":2259.3722620010376,"z":"e4baa5a8.a31318","wires":[["e76d3ba1.b484f8","2a1c5abf.cc7856"]]},{"id":"e76d3ba1.b484f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1680.4761517842617,"y":2232.2295246124268,"z":"e4baa5a8.a31318","wires":[["4baa2d79.9b13e4"]]},{"id":"2a1c5abf.cc7856","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1683.8095016479492,"y":2283.896167755127,"z":"e4baa5a8.a31318","wires":[["8626bbb.4150148"]]},{"id":"1575979f.adc098","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VM_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vm_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VM_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-name + $db.vfc-model.nfc-naming-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='3' />\n","comments":"","x":1341.4285774230957,"y":2207.7055883407593,"z":"e4baa5a8.a31318","wires":[]},{"id":"8626bbb.4150148","type":"set","name":"set generated name","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1868.3332176208496,"y":2283.3721857070923,"z":"e4baa5a8.a31318","wires":[]},{"id":"4baa2d79.9b13e4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1848.3332646687832,"y":2231.6580362319946,"z":"e4baa5a8.a31318","wires":[]},{"id":"388ab739.6c4fe8","type":"set","name":"set vf-module-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'\n value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n","comments":"","x":516.4285469055176,"y":1047.348237991333,"z":"e4baa5a8.a31318","wires":[]},{"id":"8e6b243f.583508","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1082.738182067871,"y":2236.396019935608,"z":"e4baa5a8.a31318","wires":[["1575979f.adc098","18165004.df83"]]},{"id":"7518d7bc.8082b8","type":"get-resource","name":"get-resource VFC_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_TO_NETWORK_ROLE_MAPPING WHERE vfc_customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-to-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":1045.595329284668,"y":2359.253088951111,"z":"e4baa5a8.a31318","wires":[["71a08ee7.14c92","7a73e707.b51298"]]},{"id":"71a08ee7.14c92","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1332.8095321655273,"y":2339.6339359283447,"z":"e4baa5a8.a31318","wires":[["42a3db7c.c4bde4"]]},{"id":"7a73e707.b51298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1341.3809623718262,"y":2383.9196491241455,"z":"e4baa5a8.a31318","wires":[["d5efedb2.7d60c"]]},{"id":"42a3db7c.c4bde4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1507.8094635009766,"y":2338.7768363952637,"z":"e4baa5a8.a31318","wires":[]},{"id":"d99614b2.38ddf8","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$db.vfc-to-network-role-mapping_length`' >\n","comments":"","outputs":1,"x":938.6906204223633,"y":2670.4439306259155,"z":"e4baa5a8.a31318","wires":[["4bcabc98.ea4e24"]]},{"id":"4bcabc98.ea4e24","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1145.1190719604492,"y":2667.11043548584,"z":"e4baa5a8.a31318","wires":[["36a6c86d.097308","837f1dbf.dff44","35c5bc83.48f7c4","65409122.eeca2","da28f677.f45f78","231dd30.999172e","bdd6810f.244ea","47edc8c7.d583e8"]]},{"id":"36a6c86d.097308","type":"for","name":"for each network","xml":"<for silentFailure='true' index='idx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1354.166633605957,"y":2499.253191947937,"z":"e4baa5a8.a31318","wires":[["89e2ef85.52c62"]]},{"id":"837f1dbf.dff44","type":"set","name":"set network-index to -1","xml":"<set>\n<parameter name='network-index' value='-1' />\n","comments":"","x":1374.1667022705078,"y":2456.396188735962,"z":"e4baa5a8.a31318","wires":[]},{"id":"89e2ef85.52c62","type":"switchNode","name":"switch network-role matches","xml":"<switch test='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-role == $db.vfc-to-network-role-mapping[$network-role-index].network-role`'>\n","comments":"","outputs":1,"x":1582.737907409668,"y":2497.824381828308,"z":"e4baa5a8.a31318","wires":[["16b2e9a3.043416"]]},{"id":"16b2e9a3.043416","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1781.3095741271973,"y":2497.824585914612,"z":"e4baa5a8.a31318","wires":[["db944d5d.b6668"]]},{"id":"db944d5d.b6668","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1922.7381420135498,"y":2496.396014213562,"z":"e4baa5a8.a31318","wires":[["67f3ef04.c0a6c","18ca7106.b738af"]]},{"id":"67f3ef04.c0a6c","type":"set","name":"set network-index to idx","xml":"<set>\n<parameter name='network-index' value='`$idx`' />\n","comments":"","x":2101.30965423584,"y":2473.5390100479126,"z":"e4baa5a8.a31318","wires":[]},{"id":"18ca7106.b738af","type":"break","name":"break","xml":"<break>\n","comments":"","x":2049.8808937072754,"y":2519.2531900405884,"z":"e4baa5a8.a31318","wires":[]},{"id":"35c5bc83.48f7c4","type":"switchNode","name":"switch network-index","xml":"<switch test='`$network-index`'>\n","comments":"","outputs":1,"x":1366.0714721679688,"y":2548.062829017639,"z":"e4baa5a8.a31318","wires":[["170e8f83.a9e23"]]},{"id":"170e8f83.a9e23","type":"outcomeTrue","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1560.3571968078613,"y":2548.062726020813,"z":"e4baa5a8.a31318","wires":[["a6e6e9d9.38e488"]]},{"id":"a6e6e9d9.38e488","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No network found in MD-SAL with network-role ' + $db.vfc-to-network-role-mapping[$network-role-index].network-role`\" />\n","comments":"","x":1717.5000457763672,"y":2546.634196281433,"z":"e4baa5a8.a31318","wires":[]},{"id":"9b75b20e.4510a","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":575.9442901611328,"y":1266.0068836212158,"z":"e4baa5a8.a31318","wires":[["1b8a998c.af1726"]]},{"id":"1b8a998c.af1726","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":823.6228332519531,"y":1265.7568130493164,"z":"e4baa5a8.a31318","wires":[["8a817450.4b3f18"]]},{"id":"8a817450.4b3f18","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":993.0871543884277,"y":1265.1496353149414,"z":"e4baa5a8.a31318","wires":[["30bd9ac8.a95e36"]]},{"id":"5de7c2d5.2e20dc","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1333.1823120117188,"y":1219.5782108306885,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"30bd9ac8.a95e36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1152.8490142822266,"y":1266.2449989318848,"z":"e4baa5a8.a31318","wires":[["5de7c2d5.2e20dc","e5801a20.119d08","9f4a6c82.752a2"]]},{"id":"e5801a20.119d08","type":"break","name":"break","xml":"<break>\n","comments":"","x":1302.848976135254,"y":1309.5782957077026,"z":"e4baa5a8.a31318","wires":[]},{"id":"65409122.eeca2","type":"set","name":"set network-role and tag","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role-tag'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role-tag`' />\n","comments":"","x":1375.8333549499512,"y":2644.2530155181885,"z":"e4baa5a8.a31318","wires":[]},{"id":"79dd1a08.432464","type":"set","name":"set vm-network-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length'\n value='`$db.vfc-to-network-role-mapping_length`' />\n","comments":"","x":932.4999465942383,"y":3059.2532806396484,"z":"e4baa5a8.a31318","wires":[]},{"id":"da28f677.f45f78","type":"switchNode","name":"switch ipv4-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-ip-version`'>\n","comments":"","outputs":1,"x":1368.452407836914,"y":2727.5863428115845,"z":"e4baa5a8.a31318","wires":[["ba64a787.ba4118","2e9fc1a3.0b9b9e"]]},{"id":"d7307d95.7b8c5","type":"set","name":"set network-information-index to -1","xml":"<set>\n<parameter name='network-information-index' value='-1' />\n\n","comments":"","x":1777.97603225708,"y":2692.5864477157593,"z":"e4baa5a8.a31318","wires":[]},{"id":"ba64a787.ba4118","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1545.1189270019531,"y":2692.586483001709,"z":"e4baa5a8.a31318","wires":[["d7307d95.7b8c5"]]},{"id":"2e9fc1a3.0b9b9e","type":"other","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1543.8808784484863,"y":2758.538625717163,"z":"e4baa5a8.a31318","wires":[["8dd043b4.688fd"]]},{"id":"e6d285da.6bc2f8","type":"set","name":"set network-information-index to 0","xml":"<set>\n<parameter name='network-information-index' value='0' />\n","comments":"","x":1948.4521408081055,"y":2733.0624866485596,"z":"e4baa5a8.a31318","wires":[]},{"id":"8dd043b4.688fd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1711.0713539123535,"y":2757.872091293335,"z":"e4baa5a8.a31318","wires":[["e6d285da.6bc2f8","909b57b.c66aea8"]]},{"id":"909b57b.c66aea8","type":"set","name":"set ip-version 4, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n value='4' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-count`' />\n","comments":"","x":1965.4047241210938,"y":2779.7294425964355,"z":"e4baa5a8.a31318","wires":[]},{"id":"231dd30.999172e","type":"switchNode","name":"switch ipv6-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-ip-version`'>\n","comments":"","outputs":1,"x":1368.9286041259766,"y":2854.4911251068115,"z":"e4baa5a8.a31318","wires":[["a42f90da.1aa4c","95f6b1ee.0f4d1"]]},{"id":"a42f90da.1aa4c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1547.7380981445312,"y":2824.728937149048,"z":"e4baa5a8.a31318","wires":[["8ebef5b1.d07e78"]]},{"id":"95f6b1ee.0f4d1","type":"other","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":1549.1666526794434,"y":2889.0144939422607,"z":"e4baa5a8.a31318","wires":[["2ae9d1a1.54891e"]]},{"id":"71edbafa.5f48b4","type":"set","name":"increment network-information-index","xml":"<set>\n<parameter name='network-information-index' value='`$network-information-index + 1`' />\n","comments":"","x":1954.880744934082,"y":2863.5385236740112,"z":"e4baa5a8.a31318","wires":[]},{"id":"2ae9d1a1.54891e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1704.4048118591309,"y":2888.0622329711914,"z":"e4baa5a8.a31318","wires":[["71edbafa.5f48b4","a89d1a7f.ee0778"]]},{"id":"8ebef5b1.d07e78","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1690.404727935791,"y":2824.0625553131104,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"bdd6810f.244ea","type":"switchNode","name":"switch network-information-index","xml":"<switch test='`$network-information-index`'>\n","comments":"","outputs":1,"x":1404.166618347168,"y":2990.919370651245,"z":"e4baa5a8.a31318","wires":[["b53bbeec.db42f","b1edd581.077538"]]},{"id":"b53bbeec.db42f","type":"outcome","name":"-1","xml":"<outcome value='-1'>","comments":"","outputs":1,"x":1622.4999752044678,"y":2967.5861167907715,"z":"e4baa5a8.a31318","wires":[["ba350989.b70fd8"]]},{"id":"b1edd581.077538","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1622.2619380950928,"y":3013.5384311676025,"z":"e4baa5a8.a31318","wires":[["9b9cf9cc.6a7228"]]},{"id":"ba350989.b70fd8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1759.166690826416,"y":2965.919776916504,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"9b9cf9cc.6a7228","type":"set","name":"set network-information-item_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length'\n value='`$network-information-index + 1`' />\n","comments":"","x":1850.8333053588867,"y":3010.919569015503,"z":"e4baa5a8.a31318","wires":[]},{"id":"e8889dec.9dd74","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":531,"y":3157.9194660186768,"z":"e4baa5a8.a31318","wires":[["8b116d7c.65c33"]]},{"id":"8b116d7c.65c33","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":734.5715255737305,"y":3158.1576709747314,"z":"e4baa5a8.a31318","wires":[["7e90f983.18fa18"]]},{"id":"47edc8c7.d583e8","type":"set","name":"save network-id","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id'\n value='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-id`' />\n","comments":"This isn't a node in MD-SAL, but we need to save this for later when we are doing EIPAM processing","x":1347.9761810302734,"y":2594.253023147583,"z":"e4baa5a8.a31318","wires":[]},{"id":"7e90f983.18fa18","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":935.999885559082,"y":3157.252721786499,"z":"e4baa5a8.a31318","wires":[["a533571e.4db208"]]},{"id":"a533571e.4db208","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1137.9047012329102,"y":3156.490758895874,"z":"e4baa5a8.a31318","wires":[["92a08557.b354a8"]]},{"id":"92a08557.b354a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":1382.6665725708008,"y":3156.0151510238647,"z":"e4baa5a8.a31318","wires":[["1eb5f5e8.6678ba"]]},{"id":"b1e701d0.c2cbd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":627.666633605957,"y":3361.9195766448975,"z":"e4baa5a8.a31318","wires":[["a3c5a1c.0beeb6","d65acdc0.dafd8","c7baae79.a8d3a","1445f578.93789b","c5ac535a.19e0c"]]},{"id":"a3c5a1c.0beeb6","type":"get-resource","name":"get-resource EIPAM_IP_SUBNETS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNETS WHERE network_id = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n AND address_family = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version'\n pfx='db.eipam-ip-subnets[]'>\n\n","comments":"","outputs":1,"x":1007.6666564941406,"y":3323.586072921753,"z":"e4baa5a8.a31318","wires":[["3976fb7d.92d3d4","959768c3.a1d588"]]},{"id":"39fae58.e71ee1a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNETS table for network ID '\n + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n + ' and address family ' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`\" />\n","comments":"","x":1397.6665954589844,"y":3345.2528343200684,"z":"e4baa5a8.a31318","wires":[]},{"id":"3976fb7d.92d3d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1223.0238647460938,"y":3301.205192565918,"z":"e4baa5a8.a31318","wires":[["c635b53c.368758"]]},{"id":"959768c3.a1d588","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1231.5952949523926,"y":3345.4909057617188,"z":"e4baa5a8.a31318","wires":[["39fae58.e71ee1a"]]},{"id":"c635b53c.368758","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNETS table\" />\n","comments":"","x":1398.023796081543,"y":3300.348093032837,"z":"e4baa5a8.a31318","wires":[]},{"id":"d65acdc0.dafd8","type":"for","name":"for each record in EIPAM_IP_SUBNETS","xml":"<for index='subnets-index' start='0' end='`$db.eipam-ip-subnets_length`' >\n","comments":"","outputs":1,"x":1026.9524688720703,"y":3628.82426071167,"z":"e4baa5a8.a31318","wires":[["ff66bf7.47f1b4"]]},{"id":"ff66bf7.47f1b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1283.3810195922852,"y":3629.77654838562,"z":"e4baa5a8.a31318","wires":[["367ad5cc.c5a3fa","77c765bc.e6637c","91e102ce.d36e8","3d0c6fc4.e325","82b00d4f.93cbf"]]},{"id":"367ad5cc.c5a3fa","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $db.eipam-ip-subnets[$subnets-index].entity-id'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1594.809585571289,"y":3466.205156326294,"z":"e4baa5a8.a31318","wires":[["6870a9ce.b3eae8","f0e997ff.17eb08"]]},{"id":"7945f51f.9f762c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $db.eipam-ip-subnets[$subnets-index].entity-id`\" />","comments":"","x":2009.809585571289,"y":3486.205156326294,"z":"e4baa5a8.a31318","wires":[]},{"id":"6870a9ce.b3eae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1835.1668548583984,"y":3442.1575145721436,"z":"e4baa5a8.a31318","wires":[["ed0022b6.a92c"]]},{"id":"f0e997ff.17eb08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1843.7382850646973,"y":3486.4432277679443,"z":"e4baa5a8.a31318","wires":[["7945f51f.9f762c"]]},{"id":"ed0022b6.a92c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2010.1667861938477,"y":3441.3004150390625,"z":"e4baa5a8.a31318","wires":[]},{"id":"c7baae79.a8d3a","type":"set","name":"set max-level to -1","xml":"<set>\n<parameter name='max-level' value='-1' />\n","comments":"","x":955.7619323730469,"y":3389.538688659668,"z":"e4baa5a8.a31318","wires":[]},{"id":"77c765bc.e6637c","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='keys-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":1609.3334045410156,"y":3535.2529106140137,"z":"e4baa5a8.a31318","wires":[["263bb568.7e1d3a"]]},{"id":"263bb568.7e1d3a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1896.0000534057617,"y":3533.586248397827,"z":"e4baa5a8.a31318","wires":[["57db1b51.bf7814"]]},{"id":"57db1b51.bf7814","type":"switchNode","name":"switch level > max-level?","xml":"<switch test='`$db.eipam-ip-subnet-keys[$keys-index].level &gt; $max-level`'>\n","comments":"","outputs":1,"x":2112.6666717529297,"y":3533.586166381836,"z":"e4baa5a8.a31318","wires":[["d90f79d9.b32da8"]]},{"id":"d90f79d9.b32da8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2304.333599090576,"y":3533.58616065979,"z":"e4baa5a8.a31318","wires":[["743cc06c.51758"]]},{"id":"743cc06c.51758","type":"set","name":"set max-level, selected-entity-id, selected-plan-name","xml":"<set>\n<parameter name='max-level' value='`$db.eipam-ip-subnet-keys[$keys-index].level`' />\n<parameter name='selected-entity-id' value='`$db.eipam-ip-subnet-keys[$keys-index].entity-id`' />\n<parameter name='selected-plan-name' value='`$db.eipam-ip-subnets[$subnets-index].plan-name`' />\n","comments":"","x":2596.0001068115234,"y":3531.9194173812866,"z":"e4baa5a8.a31318","wires":[]},{"id":"91e102ce.d36e8","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $selected-entity-id order by level'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1596.000015258789,"y":3607.157615661621,"z":"e4baa5a8.a31318","wires":[["b2349884.088788","f1532f86.e76dd"]]},{"id":"7f0c353a.7f913c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $selected-entity-id`\" />","comments":"","x":2011.000015258789,"y":3627.157615661621,"z":"e4baa5a8.a31318","wires":[]},{"id":"b2349884.088788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1836.3572845458984,"y":3583.1099739074707,"z":"e4baa5a8.a31318","wires":[["70f90568.aa118c"]]},{"id":"f1532f86.e76dd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1844.9287147521973,"y":3627.3956871032715,"z":"e4baa5a8.a31318","wires":[["7f0c353a.7f913c"]]},{"id":"70f90568.aa118c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2011.3572158813477,"y":3582.2528743743896,"z":"e4baa5a8.a31318","wires":[]},{"id":"c8da1d6e.45a7a","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='level-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":2041.9523620605469,"y":3675.729072570801,"z":"e4baa5a8.a31318","wires":[["23e299e.e960066"]]},{"id":"2364c25f.16e04e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1734.8093643188477,"y":3759.5385093688965,"z":"e4baa5a8.a31318","wires":[["c8da1d6e.45a7a","5a2be208.b22a9c","deb2167.63080e8","f568d578.388128","7ead2109.820b4"]]},{"id":"3d0c6fc4.e325","type":"for","name":"for each ip in ip-count","xml":"<for index='request-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' >\n","comments":"","outputs":1,"x":1533.142807006836,"y":3759.5401363372803,"z":"e4baa5a8.a31318","wires":[["2364c25f.16e04e"]]},{"id":"23e299e.e960066","type":"set","name":"set eipam data for level","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-name'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-value'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-value`' />\n","comments":"","x":2348.8571243286133,"y":3675.4918384552,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a2be208.b22a9c","type":"set","name":"set eipam data pools_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools_length'\n value='`$db.eipam-ip-subnet-keys_length`' />\n","comments":"","x":1988.142677307129,"y":3721.2054557800293,"z":"e4baa5a8.a31318","wires":[]},{"id":"ac1085e3.f13938","type":"set","name":"set plans-index to 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":539.7619171142578,"y":3101.8717365264893,"z":"e4baa5a8.a31318","wires":[]},{"id":"1445f578.93789b","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":971.0952224731445,"y":4020.871983528137,"z":"e4baa5a8.a31318","wires":[]},{"id":"82b00d4f.93cbf","type":"set","name":"set eipam requests_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests_length'\n value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' />\n","comments":"","x":1543.6191711425781,"y":3901.2055082321167,"z":"e4baa5a8.a31318","wires":[]},{"id":"c5ac535a.19e0c","type":"set","name":"set eipam plan-name, address-family","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].plan-name' value='`$selected-plan-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].address-family'\n value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`' />\n","comments":"","x":1019.6666564941406,"y":3973.7284650802612,"z":"e4baa5a8.a31318","wires":[]},{"id":"319cf957.f6edb6","type":"set","name":"set eipam plans_length","xml":"<set>\n<parameter name='eipam-ip-block.plans_length' value='`$plans-index`' />\n","comments":"","x":543.4285697937012,"y":4045.919857978821,"z":"e4baa5a8.a31318","wires":[]},{"id":"c811246.d8ba4d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":511.5475769042969,"y":4917.2607316970825,"z":"e4baa5a8.a31318","wires":[]},{"id":"efa475b7.980ae8","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n","comments":"","x":515.8332824707031,"y":4776.990706443787,"z":"e4baa5a8.a31318","wires":[]},{"id":"a247b0d0.a589c","type":"set","name":"copy vf-module-topology data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />\n","comments":"","x":560.7142868041992,"y":4728.776218414307,"z":"e4baa5a8.a31318","wires":[]},{"id":"f833ef67.9cf92","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />\n","comments":"","outputs":1,"x":506.42852783203125,"y":4869.49054813385,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"77ad7e3d.8e3ec","type":"execute","name":"call EIPAM assignIPAddress","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"assignIPAddress\">","comments":"","outputs":1,"x":923.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["9e574032.fe3cb"]]},{"id":"9e574032.fe3cb","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1137.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["6086477b.665d78"]]},{"id":"6086477b.665d78","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"ack-final\" value=\"Y\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while obtaining new address blocks from EIPAM.\" />\n","comments":"","x":1276.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[]},{"id":"deb2167.63080e8","type":"set","name":"set eipam client-key, mask","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].client-key'\n value='`$generate-unique-name-output.generated-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].info'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].mask'\n value='32' />\n","comments":"","x":1985.2857284545898,"y":3855.015483856201,"z":"e4baa5a8.a31318","wires":[]},{"id":"b87f9fec.9ac9e","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":523,"y":4244.252558708191,"z":"e4baa5a8.a31318","wires":[["9092afca.a3962"]]},{"id":"9092afca.a3962","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":731.6666831970215,"y":4244.252884864807,"z":"e4baa5a8.a31318","wires":[["6b702819.1ea7a8"]]},{"id":"6b702819.1ea7a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":996.6666717529297,"y":4245.919226646423,"z":"e4baa5a8.a31318","wires":[["83b69613.7b8da8"]]},{"id":"95db0874.7fa668","type":"set","name":"set plans-index = 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":529.9999923706055,"y":4189.252646446228,"z":"e4baa5a8.a31318","wires":[]},{"id":"98047ce0.4a6e9","type":"for","name":"for each eipam request","xml":"<for index='ip-index' start='0' end='`$eipam-ip-block.plans[$plans-index].requests_length`' >\n","comments":"","outputs":1,"x":1766.6666259765625,"y":4217.586531639099,"z":"e4baa5a8.a31318","wires":[["6f14c8cc.226b88"]]},{"id":"6f14c8cc.226b88","type":"set","name":"set ip address","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].network-ips.network-ip[$ip-index]'\n value='`$eipam-ip-block.plans[$plans-index].requests[$ip-index].ip-prefix`' />\n","comments":"","x":1978.3332633972168,"y":4215.919702529907,"z":"e4baa5a8.a31318","wires":[]},{"id":"5aeee902.7037a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1566.6664581298828,"y":4242.586045265198,"z":"e4baa5a8.a31318","wires":[["98047ce0.4a6e9","a26fc3b8.56c3c"]]},{"id":"a26fc3b8.56c3c","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":1761.66650390625,"y":4264.252387046814,"z":"e4baa5a8.a31318","wires":[]},{"id":"3c8bd226.36546e","type":"save","name":"update vf-module","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vf-module-name\" value=\"`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`\" />\n<parameter name=\"model-invariant-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vf-module-object-path`\" />\n","comments":"","outputs":1,"x":524.9999694824219,"y":4389.252729415894,"z":"e4baa5a8.a31318","wires":[["fb5d5bb7.763c78","e4f07aae.f62f88"]]},{"id":"d2a1fc69.961af","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\" />\n","comments":"","x":1018.3333969116211,"y":4442.585899353027,"z":"e4baa5a8.a31318","wires":[]},{"id":"fb5d5bb7.763c78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.3573303222656,"y":4356.204874038696,"z":"e4baa5a8.a31318","wires":[["383193dd.97ea3c"]]},{"id":"e4f07aae.f62f88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":702.9286842346191,"y":4418.823854446411,"z":"e4baa5a8.a31318","wires":[["bcf4c9e0.38f9c8"]]},{"id":"4c9452bf.c4605c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module in AAI\" />\n","comments":"","x":1029.3572845458984,"y":4374.348430633545,"z":"e4baa5a8.a31318","wires":[]},{"id":"a03bb466.634808","type":"set","name":"set vf-module-object-path","xml":"<set>\n<parameter name='vf-module-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-data.service-topology.service-topology-identifier.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n + '/vf-module-data/vf-module-topology/'`\"/>\n\n","comments":"","x":551.666633605957,"y":4314.252715110779,"z":"e4baa5a8.a31318","wires":[]},{"id":"c4679f1a.0f0a2","type":"save","name":"save vf-module relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module:relationship-list\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`\" />\n","comments":"","outputs":1,"x":984.3094787597656,"y":4517.975717544556,"z":"e4baa5a8.a31318","wires":[["adfe5f0b.ad89b","8c43d965.e517d8"]]},{"id":"adfe5f0b.ad89b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1209.1428108215332,"y":4478.847640037537,"z":"e4baa5a8.a31318","wires":[["be7ce494.4af018"]]},{"id":"8c43d965.e517d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1217.7142639160156,"y":4556.466782569885,"z":"e4baa5a8.a31318","wires":[["1b7e23d5.510b0c"]]},{"id":"fcd02140.3442a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module relationships in AAI\" />\n","comments":"","x":1544.1429443359375,"y":4498.657536506653,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8307ef3.44142","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":525.3095092773438,"y":4519.642220497131,"z":"e4baa5a8.a31318","wires":[["51e803ad.53b7ac"]]},{"id":"51e803ad.53b7ac","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":735.9761867523193,"y":4517.976043701172,"z":"e4baa5a8.a31318","wires":[["c4679f1a.0f0a2"]]},{"id":"b89ddb3d.45f568","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\" />\n","comments":"","x":1545.9762382507324,"y":4573.642075538635,"z":"e4baa5a8.a31318","wires":[]},{"id":"a89d1a7f.ee0778","type":"set","name":"set ip-version 6, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n value='6' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-count`' />\n","comments":"","x":1964.7857208251953,"y":2908.213849067688,"z":"e4baa5a8.a31318","wires":[]},{"id":"1eb5f5e8.6678ba","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1630.500114440918,"y":3155.356598854065,"z":"e4baa5a8.a31318","wires":[["565e7fcb.5478a"]]},{"id":"565e7fcb.5478a","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1800.5000267028809,"y":3153.928201675415,"z":"e4baa5a8.a31318","wires":[["b1e701d0.c2cbd"]]},{"id":"83b69613.7b8da8","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1237.642837524414,"y":4244.642521858215,"z":"e4baa5a8.a31318","wires":[["9fada909.4d9ca8"]]},{"id":"9fada909.4d9ca8","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1407.642749786377,"y":4243.214124679565,"z":"e4baa5a8.a31318","wires":[["5aeee902.7037a8"]]},{"id":"21f945ed.4703fa","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":524.309455871582,"y":4649.642714500427,"z":"e4baa5a8.a31318","wires":[["76ad141b.68002c"]]},{"id":"76ad141b.68002c","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":719.3094863891602,"y":4648.975722312927,"z":"e4baa5a8.a31318","wires":[["5ad6102c.c24c4"]]},{"id":"87d443e8.e1d8d","type":"save","name":"save VIPR_CONFIGURATION","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'att-aic')\" >","comments":"","outputs":1,"x":1110.976188659668,"y":4671.643372535706,"z":"e4baa5a8.a31318","wires":[["87ac107d.fb4e7"]]},{"id":"cc126082.cba77","type":"comment","name":"Not a failure","info":"","comments":"","x":1630.976089477539,"y":4671.643377304077,"z":"e4baa5a8.a31318","wires":[]},{"id":"87ac107d.fb4e7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1320.976173400879,"y":4671.643522262573,"z":"e4baa5a8.a31318","wires":[["84e3208f.2bb34"]]},{"id":"84e3208f.2bb34","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1464.3096160888672,"y":4671.643360137939,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"7ead2109.820b4","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2074.3094940185547,"y":3809.641947746277,"z":"e4baa5a8.a31318","wires":[["b9a9e488.2e3ce8"]]},{"id":"b9a9e488.2e3ce8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2361.6905364990234,"y":3807.4993686676025,"z":"e4baa5a8.a31318","wires":[["f309c868.34d8b8"]]},{"id":"f568d578.388128","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='EIPAM_CLIENT_KEY_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CLIENT_KEY' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version + ':'`\" />\n<parameter name='generate-unique-name-input.index-length' value='' />\n","comments":"","x":2027.6428260803223,"y":3764.6421089172363,"z":"e4baa5a8.a31318","wires":[]},{"id":"f309c868.34d8b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2529.547649383545,"y":3806.9278802871704,"z":"e4baa5a8.a31318","wires":[]},{"id":"141da799.5b84c8","type":"switchNode","name":"switch ecomp-generated-naming == 'Y'","xml":"<switch test=\"$db.vfc-model.ecomp-generated-naming == 'Y'\">\n","comments":"","outputs":1,"x":1004.3095626831055,"y":2071.309280395508,"z":"e4baa5a8.a31318","wires":[["72f4c09e.079ae"]]},{"id":"72f4c09e.079ae","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1235.976173400879,"y":2070.3089113235474,"z":"e4baa5a8.a31318","wires":[["677921a6.61315"]]},{"id":"677921a6.61315","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'ECOMP generated naming is not Y for VFC customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1382.6429138183594,"y":2069.6423664093018,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8d62ff8.4b7f3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.3097381591797,"y":4622.975073814392,"z":"e4baa5a8.a31318","wires":[["9399828b.9d988"]]},{"id":"4f27d06f.de235","type":"comment","name":"Not a failure","info":"","comments":"","x":1817.6427917480469,"y":4621.308896064758,"z":"e4baa5a8.a31318","wires":[]},{"id":"9399828b.9d988","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1640.3096733093262,"y":4622.975707054138,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"5ad6102c.c24c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":887.642879486084,"y":4647.975566864014,"z":"e4baa5a8.a31318","wires":[["d3772815.3ee328","87d443e8.e1d8d"]]},{"id":"d3772815.3ee328","type":"delete","name":"delete any pre-existing records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >","comments":"","outputs":1,"x":1200.976203918457,"y":4623.309706687927,"z":"e4baa5a8.a31318","wires":[["f8d62ff8.4b7f3"]]},{"id":"5ded3d38.0d3994","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id\" >","comments":"","outputs":1,"x":2907.6429481506348,"y":4259.64261007309,"z":"e4baa5a8.a31318","wires":[["da3d0ab5.9d7b78"]]},{"id":"e1b11e58.18b71","type":"set","name":"set status variable","xml":"<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`\" />\n","comments":"","x":2777.642910003662,"y":4212.9759821891785,"z":"e4baa5a8.a31318","wires":[]},{"id":"da3d0ab5.9d7b78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3212.6428565979004,"y":4257.97590970993,"z":"e4baa5a8.a31318","wires":[["9eddaf67.b6c3a"]]},{"id":"9eddaf67.b6c3a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating EIPAM_IP_ASSIGNMENTS table on rollback\" />\n","comments":"","x":3402.6428833007812,"y":4257.785645008087,"z":"e4baa5a8.a31318","wires":[]},{"id":"1f0f2297.a80cad","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":2842.6429176330566,"y":4304.642653942108,"z":"e4baa5a8.a31318","wires":[["764dc213.434fec"]]},{"id":"764dc213.434fec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3079.309543609619,"y":4304.642596721649,"z":"e4baa5a8.a31318","wires":[["d9d39111.ef82b"]]},{"id":"d9d39111.ef82b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in EIPAM unassign IP address on rollback\" />\n","comments":"","x":3269.3095703125,"y":4304.452332019806,"z":"e4baa5a8.a31318","wires":[]},{"id":"3972c7d8.e4e1b8","type":"comment","name":"roll back EIPAM","info":"","comments":"","x":2752.6429481506348,"y":4159.642935593923,"z":"e4baa5a8.a31318","wires":[]},{"id":"663bcdf3.7476b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2584.3095741271973,"y":4262.97610616684,"z":"e4baa5a8.a31318","wires":[["e1b11e58.18b71","5ded3d38.0d3994","1f0f2297.a80cad"]]},{"id":"383193dd.97ea3c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":852.6428985595703,"y":4355.975544929504,"z":"e4baa5a8.a31318","wires":[["4c9452bf.c4605c","f9222e19.45f49"]]},{"id":"bcf4c9e0.38f9c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":857.6428375244141,"y":4418.641888618469,"z":"e4baa5a8.a31318","wires":[["d2a1fc69.961af","f9222e19.45f49"]]},{"id":"be7ce494.4af018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.6428146362305,"y":4478.641909599304,"z":"e4baa5a8.a31318","wires":[["fcd02140.3442a","f9222e19.45f49"]]},{"id":"1b7e23d5.510b0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1372.642734527588,"y":4556.641750335693,"z":"e4baa5a8.a31318","wires":[["b89ddb3d.45f568","f9222e19.45f49"]]},{"id":"45ef9bd1.40c894","type":"set","name":"set vf-module-to-vfc-mapping length to 0","xml":"<set>\n<parameter name='db.vf-module-to-vfc-mapping_length' value='0' />\n","comments":"","x":1151.500099182129,"y":1904.9280138015747,"z":"e4baa5a8.a31318","wires":[]},{"id":"d5efedb2.7d60c","type":"set","name":"set vfc-to-network-role-mapping length to 0","xml":"<set>\n<parameter name='db.vfc-to-network-role-mapping_length' value='0' />\n","comments":"","x":1604.7857818603516,"y":2383.9280395507812,"z":"e4baa5a8.a31318","wires":[]},{"id":"4646e366.6582ec","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":540.5000762939453,"y":4135.356512069702,"z":"e4baa5a8.a31318","wires":[["aa74ce89.4fd3e"]]},{"id":"aa74ce89.4fd3e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":723.3572158813477,"y":4135.356721878052,"z":"e4baa5a8.a31318","wires":[["77ad7e3d.8e3ec"]]},{"id":"f9222e19.45f49","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":2231.6665000915527,"y":4262.261742115021,"z":"e4baa5a8.a31318","wires":[["2a6bae2e.123432"]]},{"id":"2a6bae2e.123432","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2414.523639678955,"y":4262.26195192337,"z":"e4baa5a8.a31318","wires":[["663bcdf3.7476b4"]]},{"id":"fc1913b.4d832f","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":520.6666145324707,"y":4088.92791557312,"z":"e4baa5a8.a31318","wires":[]}]
+[{"id":"ba18c526.d17c78","type":"dgstart","name":"DGSTART","outputs":1,"x":130,"y":110,"z":"e4baa5a8.a31318","wires":[["8ba9ecd6.6d936"]]},{"id":"8ba9ecd6.6d936","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":243.85713577270508,"y":149.80953788757324,"z":"e4baa5a8.a31318","wires":[["c7127bd0.ef2fd8"]]},{"id":"c7127bd0.ef2fd8","type":"method","name":"method vf-module-topology-operation-assign","xml":"<method rpc='vf-module-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":243.42862701416016,"y":190,"z":"e4baa5a8.a31318","wires":[["79397c09.ed5274"]]},{"id":"21494016.016","type":"comment","name":"vf-module-topology-operation-assign","info":"","comments":"","x":535.3210983276367,"y":52.97569942474365,"z":"e4baa5a8.a31318","wires":[]},{"id":"624fdfec.bf7d8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":535.1905097961426,"y":365.52382230758667,"z":"e4baa5a8.a31318","wires":[["74eeaa1c.be92e4","134c69ff.005316"]]},{"id":"74eeaa1c.be92e4","type":"outcome","name":"CreateVfModuleInstance","xml":"<outcome value='CreateVfModuleInstance'>\n","comments":"","outputs":1,"x":797.2381248474121,"y":342.66670846939087,"z":"e4baa5a8.a31318","wires":[["cb01b9a9.685a48"]]},{"id":"134c69ff.005316","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":740.9047698974609,"y":388.0476975440979,"z":"e4baa5a8.a31318","wires":[["d9c8e7b5.a66ae8"]]},{"id":"cb01b9a9.685a48","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":987.0952892303467,"y":342.6667399406433,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"d9c8e7b5.a66ae8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVfModuleInstance'\" />\n","comments":"","x":1005.9047775268555,"y":388.381010055542,"z":"e4baa5a8.a31318","wires":[]},{"id":"76409cce.086344","type":"get-resource","name":"get-resource VF_MODULE_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-module-model'>\n\n","comments":"","outputs":1,"x":582.5237770080566,"y":456.66677236557007,"z":"e4baa5a8.a31318","wires":[["dd68463c.c87178","d3cb4517.ac8c08"]]},{"id":"75201e32.0cf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1023.9521980285645,"y":481.09524488449097,"z":"e4baa5a8.a31318","wires":[]},{"id":"dd68463c.c87178","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":848.3094673156738,"y":437.0476031303406,"z":"e4baa5a8.a31318","wires":[["6f89e52b.bf43cc"]]},{"id":"d3cb4517.ac8c08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":856.8808975219727,"y":481.33331632614136,"z":"e4baa5a8.a31318","wires":[["75201e32.0cf"]]},{"id":"6f89e52b.bf43cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_MODEL table\" />\n","comments":"","x":1023.309398651123,"y":436.1905035972595,"z":"e4baa5a8.a31318","wires":[]},{"id":"f5aeb74d.5bf438","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":577.6190414428711,"y":665.2381076812744,"z":"e4baa5a8.a31318","wires":[["6bb339ec.749948","e28c0952.e044a8"]]},{"id":"6bb339ec.749948","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":818.3333129882812,"y":642.3808479309082,"z":"e4baa5a8.a31318","wires":[["f1f5dab6.570ce8"]]},{"id":"e28c0952.e044a8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":818.0951538085938,"y":683.333366394043,"z":"e4baa5a8.a31318","wires":[["ecd3b0db.60645"]]},{"id":"79397c09.ed5274","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":184.99999237060547,"y":2359.9999599456787,"z":"e4baa5a8.a31318","wires":[["624fdfec.bf7d8","76409cce.086344","f5aeb74d.5bf438","b864bec.d46214","c6d3c332.333ff","5a02ed1a.0ee094","fcb2cab8.814f18","67c44cf7.b6baf4","478f6983.a5e0a8","b69a54c5.a45d58","c2526b9f.9838f8","b384890d.a43ff8","7ee29093.2b4b4","706746b8.19a5e8","21781bbf.a9cfb4","dac77f20.01493","f90accfc.bc38","eab0098.e0d50f8","3ec776dc.c4924a","90e381df.54c71","7d2ca2a2.73c80c","388ab739.6c4fe8","9b75b20e.4510a","e8889dec.9dd74","ac1085e3.f13938","319cf957.f6edb6","c811246.d8ba4d8","efa475b7.980ae8","a247b0d0.a589c","f833ef67.9cf92","95db0874.7fa668","b87f9fec.9ac9e","a03bb466.634808","3c8bd226.36546e","f8307ef3.44142","21f945ed.4703fa","4646e366.6582ec","fc1913b.4d832f"]]},{"id":"f1f5dab6.570ce8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":984.999927520752,"y":641.6666030883789,"z":"e4baa5a8.a31318","wires":[]},{"id":"ecd3b0db.60645","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":980.3332977294922,"y":682.9999847412109,"z":"e4baa5a8.a31318","wires":[["1be32734.9e3679"]]},{"id":"1be32734.9e3679","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1231.6665153503418,"y":682.6666717529297,"z":"e4baa5a8.a31318","wires":[["2c5659ec.ad3dd6"]]},{"id":"2c5659ec.ad3dd6","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1461.6666069030762,"y":682.0000257492065,"z":"e4baa5a8.a31318","wires":[["d38d34bf.3a83a8"]]},{"id":"b864bec.d46214","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":526.6666641235352,"y":596.6666069030762,"z":"e4baa5a8.a31318","wires":[]},{"id":"78e4042f.0ca05c","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1783.3332443237305,"y":652.9999837875366,"z":"e4baa5a8.a31318","wires":[]},{"id":"c6d3c332.333ff","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":516.6666717529297,"y":733.3333034515381,"z":"e4baa5a8.a31318","wires":[["1476b5d.81c794a"]]},{"id":"1476b5d.81c794a","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":695.000057220459,"y":732.6666793823242,"z":"e4baa5a8.a31318","wires":[["ae034b1a.ea5ad8"]]},{"id":"ae034b1a.ea5ad8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":854.9999656677246,"y":731.9999828338623,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a02ed1a.0ee094","type":"switchNode","name":"switch vnf order status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":539.6666946411133,"y":804.6667003631592,"z":"e4baa5a8.a31318","wires":[["6e55331.17400cc","31914e29.080322"]]},{"id":"6e55331.17400cc","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":739.9999961853027,"y":778.3332843780518,"z":"e4baa5a8.a31318","wires":[["efaa33f.0a25bd"]]},{"id":"efaa33f.0a25bd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":880.0000076293945,"y":778.3333263397217,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"31914e29.080322","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":736.666633605957,"y":819.9999618530273,"z":"e4baa5a8.a31318","wires":[["d09d7b5b.818158"]]},{"id":"d09d7b5b.818158","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF order status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status + ' but should be Created'`\" />\n","comments":"","x":896.666633605957,"y":819.6666488647461,"z":"e4baa5a8.a31318","wires":[]},{"id":"fcb2cab8.814f18","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":543.333381652832,"y":896.6666212081909,"z":"e4baa5a8.a31318","wires":[["9263cf35.cb3cc","a2f6c209.2980d"]]},{"id":"9263cf35.cb3cc","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":800.7143363952637,"y":863.8093948364258,"z":"e4baa5a8.a31318","wires":[["37fa8c70.964c34"]]},{"id":"37fa8c70.964c34","type":"set","name":"set vf-module-index=0","xml":"<set>\n<parameter name='vf-module-index' value='0' />\n","comments":"","x":988.3333740234375,"y":864.4761695861816,"z":"e4baa5a8.a31318","wires":[]},{"id":"a2f6c209.2980d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":801.142879486084,"y":928.0952529907227,"z":"e4baa5a8.a31318","wires":[["db5c1b7f.efac08"]]},{"id":"632dd1f4.02485","type":"set","name":"set vf-module-index = vf-module_length","xml":"<set>\n<parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />\n","comments":"","x":1186.3334197998047,"y":908.2856483459473,"z":"e4baa5a8.a31318","wires":[]},{"id":"82872a13.5fe7f8","type":"for","name":"for each existing VF module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1145.4285125732422,"y":952.3808784484863,"z":"e4baa5a8.a31318","wires":[["79d6fba6.5029b4"]]},{"id":"db5c1b7f.efac08","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":937.8571586608887,"y":928.095178604126,"z":"e4baa5a8.a31318","wires":[["632dd1f4.02485","82872a13.5fe7f8"]]},{"id":"79d6fba6.5029b4","type":"switchNode","name":"switch vf-module-information.vf-module-id == service-data.vnfs.vnf[].vf-modules.vf-module[].vf-module-id","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>\n","comments":"","outputs":1,"x":1649.0476150512695,"y":951.9522895812988,"z":"e4baa5a8.a31318","wires":[["5d658a75.3975d4"]]},{"id":"5d658a75.3975d4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2091.666664123535,"y":951.5237407684326,"z":"e4baa5a8.a31318","wires":[["421b0ac1.c08aa4"]]},{"id":"421b0ac1.c08aa4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id\n + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`\" />\n","comments":"","x":2243.571544647217,"y":951.5237274169922,"z":"e4baa5a8.a31318","wires":[]},{"id":"2c370c75.fc9a44","type":"comment","name":"make sure this VF module doesn't exist already","info":"","comments":"","x":1675.4999618530273,"y":906.5797815322876,"z":"e4baa5a8.a31318","wires":[]},{"id":"67c44cf7.b6baf4","type":"set","name":"set new vf-module_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />\n","comments":"","x":548.3333206176758,"y":991.6665554046631,"z":"e4baa5a8.a31318","wires":[]},{"id":"478f6983.a5e0a8","type":"set","name":"set vf-module-topology data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />\n<parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />\n<parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />\n<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />\n","comments":"","x":554.8333396911621,"y":1104.1666622161865,"z":"e4baa5a8.a31318","wires":[]},{"id":"9f4a6c82.752a2","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1315.7855987548828,"y":1263.4045886993408,"z":"e4baa5a8.a31318","wires":[]},{"id":"b69a54c5.a45d58","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>\n","comments":"","outputs":1,"x":514.8332595825195,"y":1377.3569288253784,"z":"e4baa5a8.a31318","wires":[["63670893.1e3b68"]]},{"id":"63670893.1e3b68","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":660.1189498901367,"y":1377.3569974899292,"z":"e4baa5a8.a31318","wires":[["d1949d38.26893"]]},{"id":"d1949d38.26893","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`\" />\n","comments":"","x":807.2618103027344,"y":1376.9284315109253,"z":"e4baa5a8.a31318","wires":[]},{"id":"c2526b9f.9838f8","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":553.6904754638672,"y":1177.5002002716064,"z":"e4baa5a8.a31318","wires":[["2e9679c1.dabc26","556ec535.b1abec"]]},{"id":"556ec535.b1abec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":767.9366683959961,"y":1195.6510562896729,"z":"e4baa5a8.a31318","wires":[["59e25d61.85e274"]]},{"id":"59e25d61.85e274","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":942.9366416931152,"y":1195.6510925292969,"z":"e4baa5a8.a31318","wires":[]},{"id":"2e9679c1.dabc26","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":776.8652648925781,"y":1153.9367895126343,"z":"e4baa5a8.a31318","wires":[["7d7ab12a.70ec1"]]},{"id":"7d7ab12a.70ec1","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":943.214542388916,"y":1153.2423667907715,"z":"e4baa5a8.a31318","wires":[]},{"id":"b384890d.a43ff8","type":"set","name":"set vf-module-parameters","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-parameters.'\n value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />\n","comments":"","x":550.595287322998,"y":1826.7860202789307,"z":"e4baa5a8.a31318","wires":[]},{"id":"7ee29093.2b4b4","type":"set","name":"set order-status to PendingCreate","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'\n value='PendingCreate' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'\n value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'\n value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />\n","comments":"","x":574.9762725830078,"y":4824.6424016952515,"z":"e4baa5a8.a31318","wires":[]},{"id":"706746b8.19a5e8","type":"get-resource","name":"get-resource VF_MODULE_TO_VFC_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODULE_TO_VFC_MAPPING WHERE vf_module_customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-module-to-vfc-mapping[]'>\n\n","comments":"","outputs":1,"x":623.9286880493164,"y":1880.642807006836,"z":"e4baa5a8.a31318","wires":[["c1f20ca7.f60de","10a18f7e.33e891"]]},{"id":"c1f20ca7.f60de","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":889.7143783569336,"y":1861.0236377716064,"z":"e4baa5a8.a31318","wires":[["4ecc9002.756aa"]]},{"id":"10a18f7e.33e891","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":898.2858085632324,"y":1905.3093509674072,"z":"e4baa5a8.a31318","wires":[["45ef9bd1.40c894"]]},{"id":"4ecc9002.756aa","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODULE_TO_VFC_MAPPING table\" />\n","comments":"","x":1064.7143096923828,"y":1860.1665382385254,"z":"e4baa5a8.a31318","wires":[]},{"id":"21781bbf.a9cfb4","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$db.vf-module-to-vfc-mapping_length`' >\n","comments":"","outputs":1,"x":524.0476989746094,"y":2509.6430587768555,"z":"e4baa5a8.a31318","wires":[["cabbea55.2886f8"]]},{"id":"d0795bff.bc69c8","type":"get-resource","name":"get-resource VFC_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_MODEL WHERE customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-model'>\n\n","comments":"","outputs":1,"x":965.9524993896484,"y":2001.5477199554443,"z":"e4baa5a8.a31318","wires":[["9c63e2cb.97fb5","8d0e208f.5920d"]]},{"id":"c84a73cd.c4e67","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in VFC_MODEL table for customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1336.3808479309082,"y":2025.9761123657227,"z":"e4baa5a8.a31318","wires":[]},{"id":"9c63e2cb.97fb5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1161.7381172180176,"y":1981.9284706115723,"z":"e4baa5a8.a31318","wires":[["28822387.baf9cc"]]},{"id":"8d0e208f.5920d","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1170.3095474243164,"y":2026.214183807373,"z":"e4baa5a8.a31318","wires":[["c84a73cd.c4e67"]]},{"id":"28822387.baf9cc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_MODEL table\" />\n","comments":"","x":1336.7380485534668,"y":1981.0713710784912,"z":"e4baa5a8.a31318","wires":[]},{"id":"cabbea55.2886f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":715.9524917602539,"y":2508.214427947998,"z":"e4baa5a8.a31318","wires":[["d0795bff.bc69c8","eca0516a.3fa5d","f1ac110f.7a32d","1d9d491.32bd1b7","7518d7bc.8082b8","d99614b2.38ddf8","79dd1a08.432464","141da799.5b84c8"]]},{"id":"7d2ca2a2.73c80c","type":"set","name":"set vm_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm_length'\n value='`$db.vf-module-to-vfc-mapping_length`' />\n","comments":"","x":515.833366394043,"y":1940.8334846496582,"z":"e4baa5a8.a31318","wires":[]},{"id":"eca0516a.3fa5d","type":"set","name":"set vm data","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-type`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code'\n value='`$db.vfc-model.nfc-naming-code`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-type-tag'\n value='`$db.vfc-model.vm-type-tag`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":916.6667518615723,"y":2127.5001974105835,"z":"e4baa5a8.a31318","wires":[]},{"id":"d38d34bf.3a83a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1610.0000686645508,"y":680.9197244644165,"z":"e4baa5a8.a31318","wires":[["78e4042f.0ca05c","a7ac7b7.2ad2e88"]]},{"id":"a7ac7b7.2ad2e88","type":"break","name":"break","xml":"<break>\n","comments":"","x":1745.0000343322754,"y":702.5863103866577,"z":"e4baa5a8.a31318","wires":[]},{"id":"50cfe9ae.372c38","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n value='`$db.vf-module-model.invariant-uuid`' />\n","comments":"","x":929.1665992736816,"y":1418.7529220581055,"z":"e4baa5a8.a31318","wires":[]},{"id":"dac77f20.01493","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":573.0236740112305,"y":1441.5773658752441,"z":"e4baa5a8.a31318","wires":[["659c77e9.7f4f18","74de5833.fee938"]]},{"id":"659c77e9.7f4f18","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":778.6903457641602,"y":1418.720329284668,"z":"e4baa5a8.a31318","wires":[["50cfe9ae.372c38"]]},{"id":"74de5833.fee938","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":780.1189422607422,"y":1463.0059204101562,"z":"e4baa5a8.a31318","wires":[["a1fe0326.3a53b"]]},{"id":"a1fe0326.3a53b","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />\n","comments":"","x":934.4046783447266,"y":1462.4344925880432,"z":"e4baa5a8.a31318","wires":[]},{"id":"2dd9c208.718fae","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n value='`$db.vf-module-model.uuid`' />\n","comments":"","x":930.1188697814941,"y":1507.2915983200073,"z":"e4baa5a8.a31318","wires":[]},{"id":"f90accfc.bc38","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":545.642692565918,"y":1530.1161031723022,"z":"e4baa5a8.a31318","wires":[["51f29715.20d0f8","d6f024f9.949348"]]},{"id":"51f29715.20d0f8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":779.6426658630371,"y":1507.2590351104736,"z":"e4baa5a8.a31318","wires":[["2dd9c208.718fae"]]},{"id":"d6f024f9.949348","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":781.0712623596191,"y":1551.544626235962,"z":"e4baa5a8.a31318","wires":[["62042fb1.77272"]]},{"id":"62042fb1.77272","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />\n","comments":"","x":935.3569984436035,"y":1550.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"a6bf8c48.b281b","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n value='`$db.vf-module-model.version`' />\n","comments":"","x":927.2618026733398,"y":1596.1488056182861,"z":"e4baa5a8.a31318","wires":[]},{"id":"eab0098.e0d50f8","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>\n","comments":"","outputs":1,"x":553.7855644226074,"y":1618.9732503890991,"z":"e4baa5a8.a31318","wires":[["4ccd7.162a832a","518ded3e.75ca04"]]},{"id":"4ccd7.162a832a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1596.1162128448486,"z":"e4baa5a8.a31318","wires":[["a6bf8c48.b281b"]]},{"id":"518ded3e.75ca04","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1640.401803970337,"z":"e4baa5a8.a31318","wires":[["638ada17.7c2584"]]},{"id":"638ada17.7c2584","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-version'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />\n","comments":"","x":932.4998817443848,"y":1639.8303761482239,"z":"e4baa5a8.a31318","wires":[]},{"id":"f4c6962e.75c988","type":"set","name":"set from DB","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n value='`$db.vf-module-model.name`' />\n","comments":"","x":927.2618026733398,"y":1683.2916278839111,"z":"e4baa5a8.a31318","wires":[]},{"id":"3ec776dc.c4924a","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>\n","comments":"","outputs":1,"x":548.7855644226074,"y":1706.1160726547241,"z":"e4baa5a8.a31318","wires":[["7600c1a1.34774","dd561948.d52d48"]]},{"id":"7600c1a1.34774","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":776.7855491638184,"y":1683.2590351104736,"z":"e4baa5a8.a31318","wires":[["f4c6962e.75c988"]]},{"id":"dd561948.d52d48","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":778.2141456604004,"y":1727.544626235962,"z":"e4baa5a8.a31318","wires":[["5381543.b5468ac"]]},{"id":"5381543.b5468ac","type":"set","name":"set from input","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-name'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />\n","comments":"","x":932.4998817443848,"y":1726.9731984138489,"z":"e4baa5a8.a31318","wires":[]},{"id":"90e381df.54c71","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'\n value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />\n","comments":"","x":563.2378997802734,"y":1778.6250619888306,"z":"e4baa5a8.a31318","wires":[]},{"id":"f1ac110f.7a32d","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":918.3332405090332,"y":2236.7531156539917,"z":"e4baa5a8.a31318","wires":[["8e6b243f.583508"]]},{"id":"1d9d491.32bd1b7","type":"set","name":"set vm-name-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length'\n value='`$db.vf-module-to-vfc-mapping[$vm-type-index].vm-count`' />\n","comments":"","x":941.6666946411133,"y":2171.753373146057,"z":"e4baa5a8.a31318","wires":[]},{"id":"18165004.df83","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1384.761863708496,"y":2259.3722620010376,"z":"e4baa5a8.a31318","wires":[["e76d3ba1.b484f8","2a1c5abf.cc7856"]]},{"id":"e76d3ba1.b484f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1680.4761517842617,"y":2232.2295246124268,"z":"e4baa5a8.a31318","wires":[["4baa2d79.9b13e4"]]},{"id":"2a1c5abf.cc7856","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1683.8095016479492,"y":2283.896167755127,"z":"e4baa5a8.a31318","wires":[["8626bbb.4150148"]]},{"id":"1575979f.adc098","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VM_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vm_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VM_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-name + $db.vfc-model.nfc-naming-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='3' />\n","comments":"","x":1341.4285774230957,"y":2207.7055883407593,"z":"e4baa5a8.a31318","wires":[]},{"id":"8626bbb.4150148","type":"set","name":"set generated name","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1868.3332176208496,"y":2283.3721857070923,"z":"e4baa5a8.a31318","wires":[]},{"id":"4baa2d79.9b13e4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1848.3332646687832,"y":2231.6580362319946,"z":"e4baa5a8.a31318","wires":[]},{"id":"388ab739.6c4fe8","type":"set","name":"set vf-module-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'\n value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />\n","comments":"","x":516.4285469055176,"y":1047.348237991333,"z":"e4baa5a8.a31318","wires":[]},{"id":"8e6b243f.583508","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1082.738182067871,"y":2236.396019935608,"z":"e4baa5a8.a31318","wires":[["1575979f.adc098","18165004.df83"]]},{"id":"7518d7bc.8082b8","type":"get-resource","name":"get-resource VFC_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VFC_TO_NETWORK_ROLE_MAPPING WHERE vfc_customization_uuid = $db.vf-module-to-vfc-mapping[$vm-type-index].vfc-customization-uuid'\n pfx='db.vfc-to-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":1045.595329284668,"y":2359.253088951111,"z":"e4baa5a8.a31318","wires":[["71a08ee7.14c92","7a73e707.b51298"]]},{"id":"71a08ee7.14c92","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1332.8095321655273,"y":2339.6339359283447,"z":"e4baa5a8.a31318","wires":[["42a3db7c.c4bde4"]]},{"id":"7a73e707.b51298","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1341.3809623718262,"y":2383.9196491241455,"z":"e4baa5a8.a31318","wires":[["d5efedb2.7d60c"]]},{"id":"42a3db7c.c4bde4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VFC_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1507.8094635009766,"y":2338.7768363952637,"z":"e4baa5a8.a31318","wires":[]},{"id":"d99614b2.38ddf8","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$db.vfc-to-network-role-mapping_length`' >\n","comments":"","outputs":1,"x":938.6906204223633,"y":2670.4439306259155,"z":"e4baa5a8.a31318","wires":[["4bcabc98.ea4e24"]]},{"id":"4bcabc98.ea4e24","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1145.1190719604492,"y":2667.11043548584,"z":"e4baa5a8.a31318","wires":[["36a6c86d.097308","837f1dbf.dff44","35c5bc83.48f7c4","65409122.eeca2","da28f677.f45f78","231dd30.999172e","bdd6810f.244ea","47edc8c7.d583e8"]]},{"id":"36a6c86d.097308","type":"for","name":"for each network","xml":"<for silentFailure='true' index='idx' start='0' end='`$service-data.networks.network_length`' >\n","comments":"","outputs":1,"x":1354.166633605957,"y":2499.253191947937,"z":"e4baa5a8.a31318","wires":[["89e2ef85.52c62"]]},{"id":"837f1dbf.dff44","type":"set","name":"set network-index to -1","xml":"<set>\n<parameter name='network-index' value='-1' />\n","comments":"","x":1374.1667022705078,"y":2456.396188735962,"z":"e4baa5a8.a31318","wires":[]},{"id":"89e2ef85.52c62","type":"switchNode","name":"switch network-role matches","xml":"<switch test='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-role == $db.vfc-to-network-role-mapping[$network-role-index].network-role`'>\n","comments":"","outputs":1,"x":1582.737907409668,"y":2497.824381828308,"z":"e4baa5a8.a31318","wires":[["16b2e9a3.043416"]]},{"id":"16b2e9a3.043416","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1781.3095741271973,"y":2497.824585914612,"z":"e4baa5a8.a31318","wires":[["db944d5d.b6668"]]},{"id":"db944d5d.b6668","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1922.7381420135498,"y":2496.396014213562,"z":"e4baa5a8.a31318","wires":[["67f3ef04.c0a6c","18ca7106.b738af"]]},{"id":"67f3ef04.c0a6c","type":"set","name":"set network-index to idx","xml":"<set>\n<parameter name='network-index' value='`$idx`' />\n","comments":"","x":2101.30965423584,"y":2473.5390100479126,"z":"e4baa5a8.a31318","wires":[]},{"id":"18ca7106.b738af","type":"break","name":"break","xml":"<break>\n","comments":"","x":2049.8808937072754,"y":2519.2531900405884,"z":"e4baa5a8.a31318","wires":[]},{"id":"35c5bc83.48f7c4","type":"switchNode","name":"switch network-index","xml":"<switch test='`$network-index`'>\n","comments":"","outputs":1,"x":1366.0714721679688,"y":2548.062829017639,"z":"e4baa5a8.a31318","wires":[["170e8f83.a9e23"]]},{"id":"170e8f83.a9e23","type":"outcomeTrue","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1560.3571968078613,"y":2548.062726020813,"z":"e4baa5a8.a31318","wires":[["a6e6e9d9.38e488"]]},{"id":"a6e6e9d9.38e488","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No network found in MD-SAL with network-role ' + $db.vfc-to-network-role-mapping[$network-role-index].network-role`\" />\n","comments":"","x":1717.5000457763672,"y":2546.634196281433,"z":"e4baa5a8.a31318","wires":[]},{"id":"9b75b20e.4510a","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":575.9442901611328,"y":1266.0068836212158,"z":"e4baa5a8.a31318","wires":[["1b8a998c.af1726"]]},{"id":"1b8a998c.af1726","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":823.6228332519531,"y":1265.7568130493164,"z":"e4baa5a8.a31318","wires":[["8a817450.4b3f18"]]},{"id":"8a817450.4b3f18","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":993.0871543884277,"y":1265.1496353149414,"z":"e4baa5a8.a31318","wires":[["30bd9ac8.a95e36"]]},{"id":"5de7c2d5.2e20dc","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1333.1823120117188,"y":1219.5782108306885,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"30bd9ac8.a95e36","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1152.8490142822266,"y":1266.2449989318848,"z":"e4baa5a8.a31318","wires":[["5de7c2d5.2e20dc","e5801a20.119d08","9f4a6c82.752a2"]]},{"id":"e5801a20.119d08","type":"break","name":"break","xml":"<break>\n","comments":"","x":1302.848976135254,"y":1309.5782957077026,"z":"e4baa5a8.a31318","wires":[]},{"id":"65409122.eeca2","type":"set","name":"set network-role and tag","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role-tag'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].network-role-tag`' />\n","comments":"","x":1375.8333549499512,"y":2644.2530155181885,"z":"e4baa5a8.a31318","wires":[]},{"id":"79dd1a08.432464","type":"set","name":"set vm-network-length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length'\n value='`$db.vfc-to-network-role-mapping_length`' />\n","comments":"","x":932.4999465942383,"y":3059.2532806396484,"z":"e4baa5a8.a31318","wires":[]},{"id":"da28f677.f45f78","type":"switchNode","name":"switch ipv4-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-ip-version`'>\n","comments":"","outputs":1,"x":1368.452407836914,"y":2727.5863428115845,"z":"e4baa5a8.a31318","wires":[["ba64a787.ba4118","2e9fc1a3.0b9b9e"]]},{"id":"d7307d95.7b8c5","type":"set","name":"set network-information-index to -1","xml":"<set>\n<parameter name='network-information-index' value='-1' />\n\n","comments":"","x":1777.97603225708,"y":2692.5864477157593,"z":"e4baa5a8.a31318","wires":[]},{"id":"ba64a787.ba4118","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1545.1189270019531,"y":2692.586483001709,"z":"e4baa5a8.a31318","wires":[["d7307d95.7b8c5"]]},{"id":"2e9fc1a3.0b9b9e","type":"other","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1543.8808784484863,"y":2758.538625717163,"z":"e4baa5a8.a31318","wires":[["8dd043b4.688fd"]]},{"id":"e6d285da.6bc2f8","type":"set","name":"set network-information-index to 0","xml":"<set>\n<parameter name='network-information-index' value='0' />\n","comments":"","x":1948.4521408081055,"y":2733.0624866485596,"z":"e4baa5a8.a31318","wires":[]},{"id":"8dd043b4.688fd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1711.0713539123535,"y":2757.872091293335,"z":"e4baa5a8.a31318","wires":[["e6d285da.6bc2f8","909b57b.c66aea8"]]},{"id":"909b57b.c66aea8","type":"set","name":"set ip-version 4, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n value='4' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv4-count`' />\n","comments":"","x":1965.4047241210938,"y":2779.7294425964355,"z":"e4baa5a8.a31318","wires":[]},{"id":"231dd30.999172e","type":"switchNode","name":"switch ipv6-ip-version","xml":"<switch test='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-ip-version`'>\n","comments":"","outputs":1,"x":1368.9286041259766,"y":2854.4911251068115,"z":"e4baa5a8.a31318","wires":[["a42f90da.1aa4c","95f6b1ee.0f4d1"]]},{"id":"a42f90da.1aa4c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1547.7380981445312,"y":2824.728937149048,"z":"e4baa5a8.a31318","wires":[["8ebef5b1.d07e78"]]},{"id":"95f6b1ee.0f4d1","type":"other","name":"6","xml":"<outcome value='6'>\n","comments":"","outputs":1,"x":1549.1666526794434,"y":2889.0144939422607,"z":"e4baa5a8.a31318","wires":[["2ae9d1a1.54891e"]]},{"id":"71edbafa.5f48b4","type":"set","name":"increment network-information-index","xml":"<set>\n<parameter name='network-information-index' value='`$network-information-index + 1`' />\n","comments":"","x":1954.880744934082,"y":2863.5385236740112,"z":"e4baa5a8.a31318","wires":[]},{"id":"2ae9d1a1.54891e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1704.4048118591309,"y":2888.0622329711914,"z":"e4baa5a8.a31318","wires":[["71edbafa.5f48b4","a89d1a7f.ee0778"]]},{"id":"8ebef5b1.d07e78","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1690.404727935791,"y":2824.0625553131104,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"bdd6810f.244ea","type":"switchNode","name":"switch network-information-index","xml":"<switch test='`$network-information-index`'>\n","comments":"","outputs":1,"x":1404.166618347168,"y":2990.919370651245,"z":"e4baa5a8.a31318","wires":[["b53bbeec.db42f","b1edd581.077538"]]},{"id":"b53bbeec.db42f","type":"outcome","name":"-1","xml":"<outcome value='-1'>","comments":"","outputs":1,"x":1622.4999752044678,"y":2967.5861167907715,"z":"e4baa5a8.a31318","wires":[["ba350989.b70fd8"]]},{"id":"b1edd581.077538","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1622.2619380950928,"y":3013.5384311676025,"z":"e4baa5a8.a31318","wires":[["9b9cf9cc.6a7228"]]},{"id":"ba350989.b70fd8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1759.166690826416,"y":2965.919776916504,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"9b9cf9cc.6a7228","type":"set","name":"set network-information-item_length","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length'\n value='`$network-information-index + 1`' />\n","comments":"","x":1850.8333053588867,"y":3010.919569015503,"z":"e4baa5a8.a31318","wires":[]},{"id":"e8889dec.9dd74","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":531,"y":3157.9194660186768,"z":"e4baa5a8.a31318","wires":[["8b116d7c.65c33"]]},{"id":"8b116d7c.65c33","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":734.5715255737305,"y":3158.1576709747314,"z":"e4baa5a8.a31318","wires":[["7e90f983.18fa18"]]},{"id":"47edc8c7.d583e8","type":"set","name":"save network-id","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id'\n value='`$service-data.networks.network[$idx].network-data.network-topology.network-topology-identifier-structure.network-id`' />\n","comments":"This isn't a node in MD-SAL, but we need to save this for later when we are doing EIPAM processing","x":1347.9761810302734,"y":2594.253023147583,"z":"e4baa5a8.a31318","wires":[]},{"id":"7e90f983.18fa18","type":"for","name":"for each network-role","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":935.999885559082,"y":3157.252721786499,"z":"e4baa5a8.a31318","wires":[["a533571e.4db208"]]},{"id":"a533571e.4db208","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1137.9047012329102,"y":3156.490758895874,"z":"e4baa5a8.a31318","wires":[["92a08557.b354a8"]]},{"id":"92a08557.b354a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":1382.6665725708008,"y":3156.0151510238647,"z":"e4baa5a8.a31318","wires":[["1eb5f5e8.6678ba"]]},{"id":"b1e701d0.c2cbd","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":627.666633605957,"y":3361.9195766448975,"z":"e4baa5a8.a31318","wires":[["a3c5a1c.0beeb6","d65acdc0.dafd8","c7baae79.a8d3a","1445f578.93789b","c5ac535a.19e0c"]]},{"id":"a3c5a1c.0beeb6","type":"get-resource","name":"get-resource EIPAM_IP_SUBNETS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNETS WHERE network_id = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n AND address_family = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version'\n pfx='db.eipam-ip-subnets[]'>\n\n","comments":"","outputs":1,"x":1007.6666564941406,"y":3323.586072921753,"z":"e4baa5a8.a31318","wires":[["3976fb7d.92d3d4","959768c3.a1d588"]]},{"id":"39fae58.e71ee1a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNETS table for network ID '\n + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id\n + ' and address family ' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`\" />\n","comments":"","x":1397.6665954589844,"y":3345.2528343200684,"z":"e4baa5a8.a31318","wires":[]},{"id":"3976fb7d.92d3d4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1223.0238647460938,"y":3301.205192565918,"z":"e4baa5a8.a31318","wires":[["c635b53c.368758"]]},{"id":"959768c3.a1d588","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1231.5952949523926,"y":3345.4909057617188,"z":"e4baa5a8.a31318","wires":[["39fae58.e71ee1a"]]},{"id":"c635b53c.368758","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNETS table\" />\n","comments":"","x":1398.023796081543,"y":3300.348093032837,"z":"e4baa5a8.a31318","wires":[]},{"id":"d65acdc0.dafd8","type":"for","name":"for each record in EIPAM_IP_SUBNETS","xml":"<for index='subnets-index' start='0' end='`$db.eipam-ip-subnets_length`' >\n","comments":"","outputs":1,"x":1026.9524688720703,"y":3628.82426071167,"z":"e4baa5a8.a31318","wires":[["ff66bf7.47f1b4"]]},{"id":"ff66bf7.47f1b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1283.3810195922852,"y":3629.77654838562,"z":"e4baa5a8.a31318","wires":[["367ad5cc.c5a3fa","77c765bc.e6637c","91e102ce.d36e8","3d0c6fc4.e325","82b00d4f.93cbf"]]},{"id":"367ad5cc.c5a3fa","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $db.eipam-ip-subnets[$subnets-index].entity-id'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1594.809585571289,"y":3466.205156326294,"z":"e4baa5a8.a31318","wires":[["6870a9ce.b3eae8","f0e997ff.17eb08"]]},{"id":"7945f51f.9f762c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $db.eipam-ip-subnets[$subnets-index].entity-id`\" />","comments":"","x":2009.809585571289,"y":3486.205156326294,"z":"e4baa5a8.a31318","wires":[]},{"id":"6870a9ce.b3eae8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1835.1668548583984,"y":3442.1575145721436,"z":"e4baa5a8.a31318","wires":[["ed0022b6.a92c"]]},{"id":"f0e997ff.17eb08","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1843.7382850646973,"y":3486.4432277679443,"z":"e4baa5a8.a31318","wires":[["7945f51f.9f762c"]]},{"id":"ed0022b6.a92c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2010.1667861938477,"y":3441.3004150390625,"z":"e4baa5a8.a31318","wires":[]},{"id":"c7baae79.a8d3a","type":"set","name":"set max-level to -1","xml":"<set>\n<parameter name='max-level' value='-1' />\n","comments":"","x":955.7619323730469,"y":3389.538688659668,"z":"e4baa5a8.a31318","wires":[]},{"id":"77c765bc.e6637c","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='keys-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":1609.3334045410156,"y":3535.2529106140137,"z":"e4baa5a8.a31318","wires":[["263bb568.7e1d3a"]]},{"id":"263bb568.7e1d3a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1896.0000534057617,"y":3533.586248397827,"z":"e4baa5a8.a31318","wires":[["57db1b51.bf7814"]]},{"id":"57db1b51.bf7814","type":"switchNode","name":"switch level > max-level?","xml":"<switch test='`$db.eipam-ip-subnet-keys[$keys-index].level &gt; $max-level`'>\n","comments":"","outputs":1,"x":2112.6666717529297,"y":3533.586166381836,"z":"e4baa5a8.a31318","wires":[["d90f79d9.b32da8"]]},{"id":"d90f79d9.b32da8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2304.333599090576,"y":3533.58616065979,"z":"e4baa5a8.a31318","wires":[["743cc06c.51758"]]},{"id":"743cc06c.51758","type":"set","name":"set max-level, selected-entity-id, selected-plan-name","xml":"<set>\n<parameter name='max-level' value='`$db.eipam-ip-subnet-keys[$keys-index].level`' />\n<parameter name='selected-entity-id' value='`$db.eipam-ip-subnet-keys[$keys-index].entity-id`' />\n<parameter name='selected-plan-name' value='`$db.eipam-ip-subnets[$subnets-index].plan-name`' />\n","comments":"","x":2596.0001068115234,"y":3531.9194173812866,"z":"e4baa5a8.a31318","wires":[]},{"id":"91e102ce.d36e8","type":"get-resource","name":"get-resource EIPAM_IP_SUBNET_KEYS","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from EIPAM_IP_SUBNET_KEYS WHERE entity_id = $selected-entity-id order by level'\n pfx='db.eipam-ip-subnet-keys[]'>\n\n","comments":"","outputs":1,"x":1596.000015258789,"y":3607.157615661621,"z":"e4baa5a8.a31318","wires":[["b2349884.088788","f1532f86.e76dd"]]},{"id":"7f0c353a.7f913c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in EIPAM_IP_SUBNET_KEYS table for entity ID '\n + $selected-entity-id`\" />","comments":"","x":2011.000015258789,"y":3627.157615661621,"z":"e4baa5a8.a31318","wires":[]},{"id":"b2349884.088788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1836.3572845458984,"y":3583.1099739074707,"z":"e4baa5a8.a31318","wires":[["70f90568.aa118c"]]},{"id":"f1532f86.e76dd","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1844.9287147521973,"y":3627.3956871032715,"z":"e4baa5a8.a31318","wires":[["7f0c353a.7f913c"]]},{"id":"70f90568.aa118c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading EIPAM_IP_SUBNET_KEYS table\" />\n","comments":"","x":2011.3572158813477,"y":3582.2528743743896,"z":"e4baa5a8.a31318","wires":[]},{"id":"c8da1d6e.45a7a","type":"for","name":"for each record in EIPAM_IP_SUBNET_KEYS","xml":"<for index='level-index' start='0' end='`$db.eipam-ip-subnet-keys_length`' >\n","comments":"","outputs":1,"x":2041.9523620605469,"y":3675.729072570801,"z":"e4baa5a8.a31318","wires":[["23e299e.e960066"]]},{"id":"2364c25f.16e04e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1734.8093643188477,"y":3759.5385093688965,"z":"e4baa5a8.a31318","wires":[["c8da1d6e.45a7a","5a2be208.b22a9c","deb2167.63080e8","f568d578.388128","7ead2109.820b4"]]},{"id":"3d0c6fc4.e325","type":"for","name":"for each ip in ip-count","xml":"<for index='request-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' >\n","comments":"","outputs":1,"x":1533.142807006836,"y":3759.5401363372803,"z":"e4baa5a8.a31318","wires":[["2364c25f.16e04e"]]},{"id":"23e299e.e960066","type":"set","name":"set eipam data for level","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-name'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools[$level-index].key-value'\n value='`$db.eipam-ip-subnet-keys[$level-index].key-value`' />\n","comments":"","x":2348.8571243286133,"y":3675.4918384552,"z":"e4baa5a8.a31318","wires":[]},{"id":"5a2be208.b22a9c","type":"set","name":"set eipam data pools_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].pools_length'\n value='`$db.eipam-ip-subnet-keys_length`' />\n","comments":"","x":1988.142677307129,"y":3721.2054557800293,"z":"e4baa5a8.a31318","wires":[]},{"id":"ac1085e3.f13938","type":"set","name":"set plans-index to 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":539.7619171142578,"y":3101.8717365264893,"z":"e4baa5a8.a31318","wires":[]},{"id":"1445f578.93789b","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":971.0952224731445,"y":4020.871983528137,"z":"e4baa5a8.a31318","wires":[]},{"id":"82b00d4f.93cbf","type":"set","name":"set eipam requests_length","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests_length'\n value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-count`' />\n","comments":"","x":1543.6191711425781,"y":3901.2055082321167,"z":"e4baa5a8.a31318","wires":[]},{"id":"c5ac535a.19e0c","type":"set","name":"set eipam plan-name, address-family","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].plan-name' value='`$selected-plan-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].address-family'\n value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version`' />\n","comments":"","x":1019.6666564941406,"y":3973.7284650802612,"z":"e4baa5a8.a31318","wires":[]},{"id":"319cf957.f6edb6","type":"set","name":"set eipam plans_length","xml":"<set>\n<parameter name='eipam-ip-block.plans_length' value='`$plans-index`' />\n","comments":"","x":543.4285697937012,"y":4045.919857978821,"z":"e4baa5a8.a31318","wires":[]},{"id":"c811246.d8ba4d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":511.5475769042969,"y":4917.2607316970825,"z":"e4baa5a8.a31318","wires":[]},{"id":"efa475b7.980ae8","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'\n value='$vf-module-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'\n value='$vf-module-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'\n value='$vf-module-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'\n value='$vf-module-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'\n value='$vf-module-topology-operation-input.vf-module-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'\n value='$vf-module-topology-operation-input.vf-module-request-input.' />\n\n","comments":"","x":515.8332824707031,"y":4776.990706443787,"z":"e4baa5a8.a31318","wires":[]},{"id":"a247b0d0.a589c","type":"set","name":"copy vf-module-topology data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />\n","comments":"","x":560.7142868041992,"y":4728.776218414307,"z":"e4baa5a8.a31318","wires":[]},{"id":"f833ef67.9cf92","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />\n","comments":"","outputs":1,"x":506.42852783203125,"y":4869.49054813385,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"77ad7e3d.8e3ec","type":"execute","name":"call EIPAM assignIPAddress","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"assignIPAddress\">","comments":"","outputs":1,"x":923.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["9e574032.fe3cb"]]},{"id":"9e574032.fe3cb","type":"failure","name":"failure","xml":"<outcome value='failure'>","outputs":1,"x":1137.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[["6086477b.665d78"]]},{"id":"6086477b.665d78","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"ack-final\" value=\"Y\" />\n\t<parameter name=\"error-code\" value=\"500\"/>\n\t<parameter name=\"error-message\" value=\"An error occured while obtaining new address blocks from EIPAM.\" />\n","comments":"","x":1276.5952911376953,"y":4134.880926132202,"z":"e4baa5a8.a31318","wires":[]},{"id":"deb2167.63080e8","type":"set","name":"set eipam client-key, mask","xml":"<set>\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].client-key'\n value='`$generate-unique-name-output.generated-name`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].info'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='eipam-ip-block.plans[$plans-index].requests[$request-index].mask'\n value='32' />\n","comments":"","x":1985.2857284545898,"y":3855.015483856201,"z":"e4baa5a8.a31318","wires":[]},{"id":"b87f9fec.9ac9e","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":523,"y":4244.252558708191,"z":"e4baa5a8.a31318","wires":[["9092afca.a3962"]]},{"id":"9092afca.a3962","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":731.6666831970215,"y":4244.252884864807,"z":"e4baa5a8.a31318","wires":[["6b702819.1ea7a8"]]},{"id":"6b702819.1ea7a8","type":"for","name":"for each network-information-item","xml":"<for index='ip-version-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item_length`' >\n","comments":"","outputs":1,"x":996.6666717529297,"y":4245.919226646423,"z":"e4baa5a8.a31318","wires":[["83b69613.7b8da8"]]},{"id":"95db0874.7fa668","type":"set","name":"set plans-index = 0","xml":"<set>\n<parameter name='plans-index' value='0' />\n","comments":"","x":529.9999923706055,"y":4189.252646446228,"z":"e4baa5a8.a31318","wires":[]},{"id":"98047ce0.4a6e9","type":"for","name":"for each eipam request","xml":"<for index='ip-index' start='0' end='`$eipam-ip-block.plans[$plans-index].requests_length`' >\n","comments":"","outputs":1,"x":1766.6666259765625,"y":4217.586531639099,"z":"e4baa5a8.a31318","wires":[["6f14c8cc.226b88"]]},{"id":"6f14c8cc.226b88","type":"set","name":"set ip address","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].network-ips.network-ip[$ip-index]'\n value='`$eipam-ip-block.plans[$plans-index].requests[$ip-index].ip-prefix`' />\n","comments":"","x":1978.3332633972168,"y":4215.919702529907,"z":"e4baa5a8.a31318","wires":[]},{"id":"5aeee902.7037a8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1566.6664581298828,"y":4242.586045265198,"z":"e4baa5a8.a31318","wires":[["98047ce0.4a6e9","a26fc3b8.56c3c"]]},{"id":"a26fc3b8.56c3c","type":"set","name":"increment plans-index","xml":"<set>\n<parameter name='plans-index' value='`$plans-index + 1`' />\n","comments":"","x":1761.66650390625,"y":4264.252387046814,"z":"e4baa5a8.a31318","wires":[]},{"id":"3c8bd226.36546e","type":"save","name":"update vf-module","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vf-module-name\" value=\"`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`\" />\n<parameter name=\"model-invariant-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vf-module-object-path`\" />\n","comments":"","outputs":1,"x":524.9999694824219,"y":4389.252729415894,"z":"e4baa5a8.a31318","wires":[["fb5d5bb7.763c78","e4f07aae.f62f88"]]},{"id":"d2a1fc69.961af","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\" />\n","comments":"","x":1018.3333969116211,"y":4442.585899353027,"z":"e4baa5a8.a31318","wires":[]},{"id":"fb5d5bb7.763c78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":694.3573303222656,"y":4356.204874038696,"z":"e4baa5a8.a31318","wires":[["383193dd.97ea3c"]]},{"id":"e4f07aae.f62f88","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":702.9286842346191,"y":4418.823854446411,"z":"e4baa5a8.a31318","wires":[["bcf4c9e0.38f9c8"]]},{"id":"4c9452bf.c4605c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module in AAI\" />\n","comments":"","x":1029.3572845458984,"y":4374.348430633545,"z":"e4baa5a8.a31318","wires":[]},{"id":"a03bb466.634808","type":"set","name":"set vf-module-object-path","xml":"<set>\n<parameter name='vf-module-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-data.service-topology.service-topology-identifier.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vf-modules/vf-module/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n + '/vf-module-data/vf-module-topology/'`\"/>\n\n","comments":"","x":551.666633605957,"y":4314.252715110779,"z":"e4baa5a8.a31318","wires":[]},{"id":"c4679f1a.0f0a2","type":"save","name":"save vf-module relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vf-module:relationship-list\"\n key=\"vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id\n AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`\" />\n","comments":"","outputs":1,"x":984.3094787597656,"y":4517.975717544556,"z":"e4baa5a8.a31318","wires":[["adfe5f0b.ad89b","8c43d965.e517d8"]]},{"id":"adfe5f0b.ad89b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1209.1428108215332,"y":4478.847640037537,"z":"e4baa5a8.a31318","wires":[["be7ce494.4af018"]]},{"id":"8c43d965.e517d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1217.7142639160156,"y":4556.466782569885,"z":"e4baa5a8.a31318","wires":[["1b7e23d5.510b0c"]]},{"id":"fcd02140.3442a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating vf-module relationships in AAI\" />\n","comments":"","x":1544.1429443359375,"y":4498.657536506653,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8307ef3.44142","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":525.3095092773438,"y":4519.642220497131,"z":"e4baa5a8.a31318","wires":[["51e803ad.53b7ac"]]},{"id":"51e803ad.53b7ac","type":"for","name":"for each vm-network","xml":"<for index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":735.9761867523193,"y":4517.976043701172,"z":"e4baa5a8.a31318","wires":[["c4679f1a.0f0a2"]]},{"id":"b89ddb3d.45f568","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\" />\n","comments":"","x":1545.9762382507324,"y":4573.642075538635,"z":"e4baa5a8.a31318","wires":[]},{"id":"a89d1a7f.ee0778","type":"set","name":"set ip-version 6, use-dhcp, and ip-count","xml":"<set>\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-version'\n value='6' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].use-dhcp'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-use-dhcp`' />\n<parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$network-information-index].ip-count'\n value='`$db.vfc-to-network-role-mapping[$network-role-index].ipv6-count`' />\n","comments":"","x":1964.7857208251953,"y":2908.213849067688,"z":"e4baa5a8.a31318","wires":[]},{"id":"1eb5f5e8.6678ba","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1630.500114440918,"y":3155.356598854065,"z":"e4baa5a8.a31318","wires":[["565e7fcb.5478a"]]},{"id":"565e7fcb.5478a","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1800.5000267028809,"y":3153.928201675415,"z":"e4baa5a8.a31318","wires":[["b1e701d0.c2cbd"]]},{"id":"83b69613.7b8da8","type":"switchNode","name":"switch use-dhcp","xml":"<switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].use-dhcp`'>\n","comments":"","outputs":1,"x":1237.642837524414,"y":4244.642521858215,"z":"e4baa5a8.a31318","wires":[["9fada909.4d9ca8"]]},{"id":"9fada909.4d9ca8","type":"outcome","name":"N","xml":"<outcome value='N'>\n","comments":"","outputs":1,"x":1407.642749786377,"y":4243.214124679565,"z":"e4baa5a8.a31318","wires":[["5aeee902.7037a8"]]},{"id":"21f945ed.4703fa","type":"for","name":"for each vm-type","xml":"<for index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":524.309455871582,"y":4649.642714500427,"z":"e4baa5a8.a31318","wires":[["76ad141b.68002c"]]},{"id":"76ad141b.68002c","type":"for","name":"for each vm","xml":"<for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":719.3094863891602,"y":4648.975722312927,"z":"e4baa5a8.a31318","wires":[["5ad6102c.c24c4"]]},{"id":"87d443e8.e1d8d","type":"save","name":"save VIPR_CONFIGURATION","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'Rackspace')\" >","comments":"","outputs":1,"x":1110.976188659668,"y":4671.643372535706,"z":"e4baa5a8.a31318","wires":[["87ac107d.fb4e7"]]},{"id":"cc126082.cba77","type":"comment","name":"Not a failure","info":"","comments":"","x":1630.976089477539,"y":4671.643377304077,"z":"e4baa5a8.a31318","wires":[]},{"id":"87ac107d.fb4e7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1320.976173400879,"y":4671.643522262573,"z":"e4baa5a8.a31318","wires":[["84e3208f.2bb34"]]},{"id":"84e3208f.2bb34","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1464.3096160888672,"y":4671.643360137939,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"7ead2109.820b4","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":2074.3094940185547,"y":3809.641947746277,"z":"e4baa5a8.a31318","wires":[["b9a9e488.2e3ce8"]]},{"id":"b9a9e488.2e3ce8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2361.6905364990234,"y":3807.4993686676025,"z":"e4baa5a8.a31318","wires":[["f309c868.34d8b8"]]},{"id":"f568d578.388128","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='EIPAM_CLIENT_KEY_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='CLIENT_KEY' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id + ':' + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-information-items.network-information-item[$ip-version-index].ip-version + ':'`\" />\n<parameter name='generate-unique-name-input.index-length' value='' />\n","comments":"","x":2027.6428260803223,"y":3764.6421089172363,"z":"e4baa5a8.a31318","wires":[]},{"id":"f309c868.34d8b8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":2529.547649383545,"y":3806.9278802871704,"z":"e4baa5a8.a31318","wires":[]},{"id":"141da799.5b84c8","type":"switchNode","name":"switch ecomp-generated-naming == 'Y'","xml":"<switch test=\"$db.vfc-model.ecomp-generated-naming == 'Y'\">\n","comments":"","outputs":1,"x":1004.3095626831055,"y":2071.309280395508,"z":"e4baa5a8.a31318","wires":[["72f4c09e.079ae"]]},{"id":"72f4c09e.079ae","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1235.976173400879,"y":2070.3089113235474,"z":"e4baa5a8.a31318","wires":[["677921a6.61315"]]},{"id":"677921a6.61315","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'ECOMP generated naming is not Y for VFC customization UUID ' + $db.vf-module-to-vfc-mapping[$db-vm-index].vfc_customization_uuid`\" />\n","comments":"","x":1382.6429138183594,"y":2069.6423664093018,"z":"e4baa5a8.a31318","wires":[]},{"id":"f8d62ff8.4b7f3","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1494.3097381591797,"y":4622.975073814392,"z":"e4baa5a8.a31318","wires":[["9399828b.9d988"]]},{"id":"4f27d06f.de235","type":"comment","name":"Not a failure","info":"","comments":"","x":1817.6427917480469,"y":4621.308896064758,"z":"e4baa5a8.a31318","wires":[]},{"id":"9399828b.9d988","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1640.3096733093262,"y":4622.975707054138,"z":"e4baa5a8.a31318","wires":[[]]},{"id":"5ad6102c.c24c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":887.642879486084,"y":4647.975566864014,"z":"e4baa5a8.a31318","wires":[["d3772815.3ee328","87d443e8.e1d8d"]]},{"id":"d3772815.3ee328","type":"delete","name":"delete any pre-existing records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >","comments":"","outputs":1,"x":1200.976203918457,"y":4623.309706687927,"z":"e4baa5a8.a31318","wires":[["f8d62ff8.4b7f3"]]},{"id":"5ded3d38.0d3994","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id\" >","comments":"","outputs":1,"x":2907.6429481506348,"y":4259.64261007309,"z":"e4baa5a8.a31318","wires":[["da3d0ab5.9d7b78"]]},{"id":"e1b11e58.18b71","type":"set","name":"set status variable","xml":"<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`\" />\n","comments":"","x":2777.642910003662,"y":4212.9759821891785,"z":"e4baa5a8.a31318","wires":[]},{"id":"da3d0ab5.9d7b78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3212.6428565979004,"y":4257.97590970993,"z":"e4baa5a8.a31318","wires":[["9eddaf67.b6c3a"]]},{"id":"9eddaf67.b6c3a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating EIPAM_IP_ASSIGNMENTS table on rollback\" />\n","comments":"","x":3402.6428833007812,"y":4257.785645008087,"z":"e4baa5a8.a31318","wires":[]},{"id":"1f0f2297.a80cad","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":2842.6429176330566,"y":4304.642653942108,"z":"e4baa5a8.a31318","wires":[["764dc213.434fec"]]},{"id":"764dc213.434fec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":3079.309543609619,"y":4304.642596721649,"z":"e4baa5a8.a31318","wires":[["d9d39111.ef82b"]]},{"id":"d9d39111.ef82b","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error in EIPAM unassign IP address on rollback\" />\n","comments":"","x":3269.3095703125,"y":4304.452332019806,"z":"e4baa5a8.a31318","wires":[]},{"id":"3972c7d8.e4e1b8","type":"comment","name":"roll back EIPAM","info":"","comments":"","x":2752.6429481506348,"y":4159.642935593923,"z":"e4baa5a8.a31318","wires":[]},{"id":"663bcdf3.7476b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2584.3095741271973,"y":4262.97610616684,"z":"e4baa5a8.a31318","wires":[["e1b11e58.18b71","5ded3d38.0d3994","1f0f2297.a80cad"]]},{"id":"383193dd.97ea3c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":852.6428985595703,"y":4355.975544929504,"z":"e4baa5a8.a31318","wires":[["4c9452bf.c4605c","f9222e19.45f49"]]},{"id":"bcf4c9e0.38f9c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":857.6428375244141,"y":4418.641888618469,"z":"e4baa5a8.a31318","wires":[["d2a1fc69.961af","f9222e19.45f49"]]},{"id":"be7ce494.4af018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1377.6428146362305,"y":4478.641909599304,"z":"e4baa5a8.a31318","wires":[["fcd02140.3442a","f9222e19.45f49"]]},{"id":"1b7e23d5.510b0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1372.642734527588,"y":4556.641750335693,"z":"e4baa5a8.a31318","wires":[["b89ddb3d.45f568","f9222e19.45f49"]]},{"id":"45ef9bd1.40c894","type":"set","name":"set vf-module-to-vfc-mapping length to 0","xml":"<set>\n<parameter name='db.vf-module-to-vfc-mapping_length' value='0' />\n","comments":"","x":1151.500099182129,"y":1904.9280138015747,"z":"e4baa5a8.a31318","wires":[]},{"id":"d5efedb2.7d60c","type":"set","name":"set vfc-to-network-role-mapping length to 0","xml":"<set>\n<parameter name='db.vfc-to-network-role-mapping_length' value='0' />\n","comments":"","x":1604.7857818603516,"y":2383.9280395507812,"z":"e4baa5a8.a31318","wires":[]},{"id":"4646e366.6582ec","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":540.5000762939453,"y":4135.356512069702,"z":"e4baa5a8.a31318","wires":[["aa74ce89.4fd3e"]]},{"id":"aa74ce89.4fd3e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":723.3572158813477,"y":4135.356721878052,"z":"e4baa5a8.a31318","wires":[["77ad7e3d.8e3ec"]]},{"id":"f9222e19.45f49","type":"switchNode","name":"switch plans-index > 0","xml":"<switch test='`$plans-index &gt; 0`'>\n","comments":"","outputs":1,"x":2231.6665000915527,"y":4262.261742115021,"z":"e4baa5a8.a31318","wires":[["2a6bae2e.123432"]]},{"id":"2a6bae2e.123432","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2414.523639678955,"y":4262.26195192337,"z":"e4baa5a8.a31318","wires":[["663bcdf3.7476b4"]]},{"id":"fc1913b.4d832f","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":520.6666145324707,"y":4088.92791557312,"z":"e4baa5a8.a31318","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json
index 6b7f7f29..7686d921 100755
--- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-assign.json
@@ -1 +1 @@
-[{"id":"8241aacb.08cdd8","type":"dgstart","name":"DGSTART","outputs":1,"x":115,"y":90,"z":"5083bb91.cbb384","wires":[["6555006a.2f30f"]]},{"id":"6555006a.2f30f","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":228.61902618408203,"y":130.2381134033203,"z":"5083bb91.cbb384","wires":[["eeb39a2.ad04a68"]]},{"id":"eeb39a2.ad04a68","type":"method","name":"method vnf-topology-operation-assign","xml":"<method rpc='vnf-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":206.42862701416016,"y":170,"z":"5083bb91.cbb384","wires":[["6a42140c.de8f7c"]]},{"id":"34ceabd.5e7b554","type":"comment","name":"vnf-topology-operation-assign","info":"","comments":"","x":509.34485626220703,"y":37.58634376525879,"z":"5083bb91.cbb384","wires":[]},{"id":"77d708f5.8001e8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":516.8571395874023,"y":367.19043922424316,"z":"5083bb91.cbb384","wires":[["b5d89b76.8690d8","3602a403.88e53c"]]},{"id":"b5d89b76.8690d8","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":770.5714340209961,"y":344.3333206176758,"z":"5083bb91.cbb384","wires":[["2f2a6b54.bc4ad4"]]},{"id":"3602a403.88e53c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.5713996887207,"y":390.0476484298706,"z":"5083bb91.cbb384","wires":[["9d45573f.a70cf8"]]},{"id":"2f2a6b54.bc4ad4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":955.4285621643066,"y":344.3333501815796,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9d45573f.a70cf8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVnfInstance'\" />\n","comments":"","x":972.5714073181152,"y":390.0476064682007,"z":"5083bb91.cbb384","wires":[]},{"id":"6a42140c.de8f7c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":145.11905670166016,"y":1701.7857055664062,"z":"5083bb91.cbb384","wires":[["77d708f5.8001e8","aa948e3b.dc6f4","70905004.44daf","db6678a0.606738","a8c695f6.0babf8","b4d76448.66e818","d6dc9daa.dab27","d09af1c.f6ecc1","59e68b20.a9f1d4","ee6fbe81.c9b8d","e15d873e.f3a578","859c6fc2.42cc1","161882c2.0524bd","e0aec656.73c228","fb26450c.7d69d8","8fe9a7cd.91ae28","92cd0a7d.aee888","b405840f.b908e8","555188e7.5bae08","c7f99789.bdf418","ed2bee8b.f19af","10b2b5e7.5b556a","b6894e3b.427f7","7eb11b41.3e53d4","76228b8.6690274","bf0a4f73.3427c","780bff7b.fe23","b4297c00.0fc6b8","74cb887a.748ed8","83344e86.aa812","a6739756.d975f8","b3f8a06f.e304d"]]},{"id":"aa948e3b.dc6f4","type":"get-resource","name":"get-resource VF_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-model'>\n\n","comments":"","outputs":1,"x":529.1904449462891,"y":458.333309173584,"z":"5083bb91.cbb384","wires":[["fd105869.f2cd08","af0a7eb5.ee8e2"]]},{"id":"ec0cf350.8477c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":970.6189231872559,"y":481.7617950439453,"z":"5083bb91.cbb384","wires":[]},{"id":"fd105869.f2cd08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":729.9761428833008,"y":438.7141466140747,"z":"5083bb91.cbb384","wires":[["12a688b3.3440a7"]]},{"id":"af0a7eb5.ee8e2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":738.5475730895996,"y":482.9998598098755,"z":"5083bb91.cbb384","wires":[["ec0cf350.8477c"]]},{"id":"12a688b3.3440a7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODEL table\" />\n","comments":"","x":969.9761238098145,"y":436.85705375671387,"z":"5083bb91.cbb384","wires":[]},{"id":"70905004.44daf","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":559.2857131958008,"y":648.5714282989502,"z":"5083bb91.cbb384","wires":[["84321624.bc90b8","e6e198eb.7d5308"]]},{"id":"84321624.bc90b8","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":785.0000419616699,"y":615.7142162322998,"z":"5083bb91.cbb384","wires":[["df34205c.2330c"]]},{"id":"df34205c.2330c","type":"set","name":"set vnf-index=0","xml":"<set>\n<parameter name='vnf-index' value='0' />\n","comments":"","x":949.2857627868652,"y":614.7142944335938,"z":"5083bb91.cbb384","wires":[]},{"id":"e6e198eb.7d5308","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":786.4286041259766,"y":680.0000343322754,"z":"5083bb91.cbb384","wires":[["910f819c.16efe"]]},{"id":"e34a45aa.608f38","type":"set","name":"set vnf-index = vnf_length","xml":"<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n","comments":"","x":1125.285758972168,"y":658.285722732544,"z":"5083bb91.cbb384","wires":[]},{"id":"4446fa6b.76c4b4","type":"for","name":"for each existing VNF","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1110.7142715454102,"y":704.2856616973877,"z":"5083bb91.cbb384","wires":[["9e71792a.51a8b8"]]},{"id":"910f819c.16efe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":922.1428642272949,"y":680,"z":"5083bb91.cbb384","wires":[["e34a45aa.608f38","4446fa6b.76c4b4"]]},{"id":"9e71792a.51a8b8","type":"switchNode","name":"switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n","comments":"","outputs":1,"x":1465.0000381469727,"y":703.857141494751,"z":"5083bb91.cbb384","wires":[["ca44cc94.301af"]]},{"id":"ca44cc94.301af","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1759.2857475280762,"y":703.4286136627197,"z":"5083bb91.cbb384","wires":[["e7127b80.39ffd8"]]},{"id":"e7127b80.39ffd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n","comments":"","x":1907.8571548461914,"y":703.4285736083984,"z":"5083bb91.cbb384","wires":[]},{"id":"2ca7efa9.3b66e","type":"comment","name":"make sure this VNF doesn't exist already","info":"","comments":"","x":1452.1427688598633,"y":661.4285717010498,"z":"5083bb91.cbb384","wires":[]},{"id":"db6678a0.606738","type":"set","name":"set vnf-topology data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'\n value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'\n value='`$db.vf-model.nf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'\n value='`$db.vf-model.nf-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'\n value='`$db.vf-model.nf-function`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'\n value='`$db.vf-model.nf-code`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'\n value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'\n value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />\n \n","comments":"","x":514.9999694824219,"y":810.238115310669,"z":"5083bb91.cbb384","wires":[]},{"id":"a8c695f6.0babf8","type":"switchNode","name":"switch input vnf-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>\n","comments":"","outputs":1,"x":521.4285507202148,"y":1052.8571615219116,"z":"5083bb91.cbb384","wires":[["487e7f2b.8ad47","68310aa2.d2de84"]]},{"id":"487e7f2b.8ad47","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":789.6427726745605,"y":975.8333864212036,"z":"5083bb91.cbb384","wires":[["c340356a.783268"]]},{"id":"429caac2.6d56a4","type":"switchNode","name":"switch ecomp-generated-naming","xml":"<switch test='`$db.vf-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1206.071662902832,"y":882.5002059936523,"z":"5083bb91.cbb384","wires":[["2e7aef6.82a371","9b8210cc.7778e","8ab384c2.20be78"]]},{"id":"c340356a.783268","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":935.3572692871094,"y":975.833498954773,"z":"5083bb91.cbb384","wires":[["9fd7e5b5.625518","ed228289.17a95","429caac2.6d56a4"]]},{"id":"9b8210cc.7778e","type":"outcome","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1455.357322692871,"y":884.404914855957,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"1d994a90.016b85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"No vnf-name was received but ecomp-generated-naming is not Y\" />\n","comments":"","x":1609.64310836792,"y":902.9763593673706,"z":"5083bb91.cbb384","wires":[]},{"id":"2e7aef6.82a371","type":"outcome","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1455.3572883605957,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[["45a6a073.f42c1"]]},{"id":"8ab384c2.20be78","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1455.357250213623,"y":930.119234085083,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"45a6a073.f42c1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1592.5002326965332,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[[]]},{"id":"68310aa2.d2de84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":792.2144546508789,"y":1122.119125366211,"z":"5083bb91.cbb384","wires":[["e79898f0.209a58"]]},{"id":"9ffe9f0c.29d4f","type":"set","name":"set tmp.vnf-name","xml":"<set>\n<parameter name='tmp.vnf-name' value=\"`$vnf-topology-operation-input.vnf-request-input.vnf-name`\" />\n","comments":"","x":1751.0715306599936,"y":1189.5476417541504,"z":"5083bb91.cbb384","wires":[]},{"id":"9fd7e5b5.625518","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1274.4763259887695,"y":1048.8333959579468,"z":"5083bb91.cbb384","wires":[["d8e6a254.be4f7","6860527.6c3eeac"]]},{"id":"d8e6a254.be4f7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1570.1906140645347,"y":1021.6906585693359,"z":"5083bb91.cbb384","wires":[["6bce88ea.dd4c08"]]},{"id":"6860527.6c3eeac","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1573.5239639282227,"y":1073.3573017120361,"z":"5083bb91.cbb384","wires":[["ec3565fb.6ebb98"]]},{"id":"ed228289.17a95","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":1231.1430130004883,"y":997.1668043136597,"z":"5083bb91.cbb384","wires":[]},{"id":"ec3565fb.6ebb98","type":"set","name":"set tmp.vnf-name to generated name","xml":"<set>\n<parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1814.7143491109214,"y":1073.8333930969238,"z":"5083bb91.cbb384","wires":[]},{"id":"6bce88ea.dd4c08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1738.0477269490561,"y":1021.1191701889038,"z":"5083bb91.cbb384","wires":[]},{"id":"e79898f0.209a58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":940.1429824829102,"y":1120.7858123779297,"z":"5083bb91.cbb384","wires":[["1af0159f.6f1e5a","5ec1ca2.9ad0934"]]},{"id":"5ec1ca2.9ad0934","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1270.1429824829102,"y":1168.7858123779297,"z":"5083bb91.cbb384","wires":[["2aa25520.67d72a","37668d9a.952f52"]]},{"id":"2aa25520.67d72a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1568.7143987019858,"y":1138.785837173462,"z":"5083bb91.cbb384","wires":[["ab10d68f.515008"]]},{"id":"37668d9a.952f52","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1572.0477485656738,"y":1190.452480316162,"z":"5083bb91.cbb384","wires":[["9ffe9f0c.29d4f"]]},{"id":"1af0159f.6f1e5a","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-name`' />\n","comments":"","x":1226.8096542358398,"y":1117.1191844940186,"z":"5083bb91.cbb384","wires":[]},{"id":"ab10d68f.515008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1736.5715115865073,"y":1138.2143487930298,"z":"5083bb91.cbb384","wires":[]},{"id":"b4d76448.66e818","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.5714492797852,"y":1730.8569984436035,"z":"5083bb91.cbb384","wires":[["63136ca0.2aa6a4","38b39166.261e2e"]]},{"id":"38b39166.261e2e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":768.8176422119141,"y":1749.00785446167,"z":"5083bb91.cbb384","wires":[["c8785277.db74c"]]},{"id":"c8785277.db74c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":943.8176155090332,"y":1749.007890701294,"z":"5083bb91.cbb384","wires":[]},{"id":"63136ca0.2aa6a4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":777.7462387084961,"y":1707.2935876846313,"z":"5083bb91.cbb384","wires":[["734e45d0.a54dbc"]]},{"id":"734e45d0.a54dbc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":944.095516204834,"y":1706.5991649627686,"z":"5083bb91.cbb384","wires":[]},{"id":"d6dc9daa.dab27","type":"get-resource","name":"get-resource VF_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":608.8095321655273,"y":2041.9045181274414,"z":"5083bb91.cbb384","wires":[["fb8ff7f3.9c6578","21c9fd46.cdb8b2"]]},{"id":"2a8c3297.b95dbe","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in VF_TO_NETWORK_ROLE_MAPPING for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1344.5237121582031,"y":2059.618698120117,"z":"5083bb91.cbb384","wires":[]},{"id":"fb8ff7f3.9c6578","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":904.5952033996582,"y":2020.6186828613281,"z":"5083bb91.cbb384","wires":[["3531361a.0233ba"]]},{"id":"21c9fd46.cdb8b2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":913.166633605957,"y":2064.904396057129,"z":"5083bb91.cbb384","wires":[["bf344dbf.57e7d"]]},{"id":"3531361a.0233ba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1079.5951843261719,"y":2020.4283332824707,"z":"5083bb91.cbb384","wires":[]},{"id":"e1fffb5d.139e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":709.5715866088867,"y":2490.71391582489,"z":"5083bb91.cbb384","wires":[["611b38f2.51f0b8","37408b0a.59aa74","8956c374.edb43","fbd0fea8.b0301","dd0ec04d.0901","c56cd3a7.e3e8d","8d1a1df.f9acde","1905c415.59545c"]]},{"id":"8956c374.edb43","type":"get-resource","name":"get-resource l3-network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"l3-networks\" \n\t\tkey=\"l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role\"\n pfx='aai.l3-network' local-only='false'\n>\n","comments":"","outputs":1,"x":942.4286041259766,"y":2169.999779701233,"z":"5083bb91.cbb384","wires":[["c79e82cf.08146","59d32d05.f01e74"]]},{"id":"59d32d05.f01e74","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1146.476318359375,"y":2192.1426191329956,"z":"5083bb91.cbb384","wires":[["7d74e0ae.ec3dc"]]},{"id":"7d74e0ae.ec3dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving l3-network from AAI\" />\n","comments":"","x":1321.4762916564941,"y":2192.1426553726196,"z":"5083bb91.cbb384","wires":[]},{"id":"c79e82cf.08146","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1155.404914855957,"y":2150.428352355957,"z":"5083bb91.cbb384","wires":[["a3dc9d39.f743"]]},{"id":"a3dc9d39.f743","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No active l3-network found in AAI with cloud_region_id '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '\n + $db.vf-network-role-mapping[$network-index].network-role`\" />\n","comments":"","x":1321.754192352295,"y":2149.7339296340942,"z":"5083bb91.cbb384","wires":[]},{"id":"611b38f2.51f0b8","type":"set","name":"set vnf-network data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'\n value='`$db.vf-network-role-mapping[$role-index].network-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'\n value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'\n value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'\n value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'\n value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />\n","comments":"","x":931.6191940307617,"y":2657.0000228881836,"z":"5083bb91.cbb384","wires":[]},{"id":"e15d873e.f3a578","type":"for","name":"for each cloud-region availability zone","xml":"<for index='idx' start='0' end='`$aai.az.availability-zone_length`' >\n","comments":"","outputs":1,"x":543.3335571289062,"y":3071.618803024292,"z":"5083bb91.cbb384","wires":[["e9252ccb.d2705"]]},{"id":"b1db1f98.d448e","type":"set","name":"set availability-zone","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'\n value='`$aai.az.availability-zone[$idx].availability-zone-name`' />\n","comments":"","x":1005.0002403259277,"y":3040.952217102051,"z":"5083bb91.cbb384","wires":[]},{"id":"859c6fc2.42cc1","type":"set","name":"set vnf-parameters-data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'\n value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />\n","comments":"","x":502.9524841308594,"y":2921.5711631774902,"z":"5083bb91.cbb384","wires":[]},{"id":"15c078e.5c6e387","type":"save","name":"save generic-vnf l3-network relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`\" />\n","comments":"","outputs":1,"x":969.5240173339844,"y":3215.381015777588,"z":"5083bb91.cbb384","wires":[["8c9a1ab5.ce5b08","e70903d4.4bb15"]]},{"id":"fb26450c.7d69d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":466.0953674316406,"y":3602.1901140213013,"z":"5083bb91.cbb384","wires":[]},{"id":"e0aec656.73c228","type":"set","name":"set vnf-level-oper-status to PendingCreate","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n","comments":"","x":555.9088134765625,"y":3504.527594566345,"z":"5083bb91.cbb384","wires":[]},{"id":"59e68b20.a9f1d4","type":"for","name":"for each network-role","xml":"<for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>","comments":"","outputs":1,"x":492.90489196777344,"y":2490.7141189575195,"z":"5083bb91.cbb384","wires":[["e1fffb5d.139e58"]]},{"id":"d09af1c.f6ecc1","type":"set","name":"set network-index = 0","xml":"<set>\n<parameter name='network-index' value='0' />\n","comments":"","x":511.2380676269531,"y":2108.8094577789307,"z":"5083bb91.cbb384","wires":[]},{"id":"37408b0a.59aa74","type":"set","name":"increment network-index","xml":"<set>\n<parameter name='network-index' value='`$network-index + 1`' />\n","comments":"","x":941.9525146484375,"y":2794.6189250946045,"z":"5083bb91.cbb384","wires":[]},{"id":"ee6fbe81.c9b8d","type":"set","name":"set vnf-network_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'\n value='`$network-index`' />\n","comments":"","x":501.8095703125,"y":2871.571207046509,"z":"5083bb91.cbb384","wires":[]},{"id":"161882c2.0524bd","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n","comments":"","x":471.4286422729492,"y":3452.1904258728027,"z":"5083bb91.cbb384","wires":[]},{"id":"8fe9a7cd.91ae28","type":"for","name":"for each vnf-network","xml":"<for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >\n","comments":"","outputs":1,"x":492.52392578125,"y":3214.380931854248,"z":"5083bb91.cbb384","wires":[["e79df5e2.3bfb98"]]},{"id":"e79df5e2.3bfb98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":696.1905670166016,"y":3214.380892753601,"z":"5083bb91.cbb384","wires":[["15c078e.5c6e387"]]},{"id":"92cd0a7d.aee888","type":"set","name":"set new vnf_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n","comments":"","x":507.0952491760254,"y":764.7619781494141,"z":"5083bb91.cbb384","wires":[]},{"id":"b405840f.b908e8","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":556.4285736083984,"y":1818.0951700210571,"z":"5083bb91.cbb384","wires":[["c203a95d.692928"]]},{"id":"c203a95d.692928","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":804.1071166992188,"y":1817.8450994491577,"z":"5083bb91.cbb384","wires":[["f1cc745c.42f608"]]},{"id":"f1cc745c.42f608","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":973.5714378356934,"y":1817.2379217147827,"z":"5083bb91.cbb384","wires":[["7ed2b7fb.548078"]]},{"id":"d747b0d7.af821","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1294.2857360839844,"y":1816.9045791625977,"z":"5083bb91.cbb384","wires":[]},{"id":"555188e7.5bae08","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>\n","comments":"","outputs":1,"x":492.3333511352539,"y":1974.0474872589111,"z":"5083bb91.cbb384","wires":[["20f33836.314ae8"]]},{"id":"20f33836.314ae8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":640.4761848449707,"y":1974.0474700927734,"z":"5083bb91.cbb384","wires":[["dd195a67.9e4528"]]},{"id":"dd195a67.9e4528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n","comments":"","x":787.6190452575684,"y":1973.6189041137695,"z":"5083bb91.cbb384","wires":[]},{"id":"3b4ed31b.2aa0ec","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'\n value='`$db.vf-model.invariant-uuid`' />\n","comments":"","x":915.9287452697754,"y":1290.0475587844849,"z":"5083bb91.cbb384","wires":[]},{"id":"84e4b6d4.cddc08","type":"for","name":"for each l3-network","xml":"<for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >\n","comments":"","outputs":1,"x":1049.8811492919922,"y":2413.571388244629,"z":"5083bb91.cbb384","wires":[["6477f1c9.11cbd"]]},{"id":"6477f1c9.11cbd","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>\n","comments":"","outputs":1,"x":1278.452350616455,"y":2412.142815589905,"z":"5083bb91.cbb384","wires":[["2d02e762.92bf68","a48ca1a4.9260d","b6321bf9.9a57b8","a22ac71b.7c92f8","f6d8dcbb.95d7e"]]},{"id":"2d02e762.92bf68","type":"outcome","name":"Pending Delete","xml":"<outcome value='Pending Delete'>\n","comments":"","outputs":1,"x":1515.1192626953125,"y":2457.8095235824585,"z":"5083bb91.cbb384","wires":[["a5e2243e.79eec8"]]},{"id":"a48ca1a4.9260d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1487.9764022827148,"y":2508.809504508972,"z":"5083bb91.cbb384","wires":[["6842d9dd.26f8c8"]]},{"id":"1bfffb3d.8635e5","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>\n","comments":"","outputs":1,"x":1853.6907539367676,"y":2507.3808450698853,"z":"5083bb91.cbb384","wires":[["105409f.8c324f6"]]},{"id":"6842d9dd.26f8c8","type":"for","name":"for each relationship","xml":"<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":1657.9763145446777,"y":2508.3808813095093,"z":"5083bb91.cbb384","wires":[["1bfffb3d.8635e5"]]},{"id":"105409f.8c324f6","type":"outcome","name":"cloud-region","xml":"<outcome value='cloud-region'>\n","comments":"","outputs":1,"x":2027.9763946533203,"y":2506.9522914886475,"z":"5083bb91.cbb384","wires":[["8c0fac20.7b6d4"]]},{"id":"8c0fac20.7b6d4","type":"for","name":"for each relationship data","xml":"<for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >\n","comments":"","outputs":1,"x":2225.119094848633,"y":2507.380759239197,"z":"5083bb91.cbb384","wires":[["23b4c525.ad999a"]]},{"id":"23b4c525.ad999a","type":"switchNode","name":"switch relationship-key","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>\n","comments":"","outputs":1,"x":2456.547695159912,"y":2506.9521341323853,"z":"5083bb91.cbb384","wires":[["ad4b7c5c.5ff53"]]},{"id":"ad4b7c5c.5ff53","type":"outcome","name":"cloud-region.cloud-region-id","xml":"<outcome value='cloud-region.cloud-region-id'>\n","comments":"","outputs":1,"x":2697.9762268066406,"y":2506.95223903656,"z":"5083bb91.cbb384","wires":[["8b527005.34699"]]},{"id":"8b527005.34699","type":"switchNode","name":"switch relationship-value == cloud-region-id","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>\n","comments":"","outputs":1,"x":3002.2621459960938,"y":2506.8092947006226,"z":"5083bb91.cbb384","wires":[["1ee4a77a.9542e9"]]},{"id":"1ee4a77a.9542e9","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3242.262176513672,"y":2506.9522399902344,"z":"5083bb91.cbb384","wires":[["ea9b8e4a.f0362"]]},{"id":"fbd0fea8.b0301","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":888.0953330993652,"y":2481.4284858703613,"z":"5083bb91.cbb384","wires":[["84e4b6d4.cddc08","640fc2e9.3ee98c"]]},{"id":"640fc2e9.3ee98c","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1039.4287414550781,"y":2554.7617197036743,"z":"5083bb91.cbb384","wires":[]},{"id":"c702789.b589088","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":3543.095157623291,"y":2524.761643409729,"z":"5083bb91.cbb384","wires":[]},{"id":"dd0ec04d.0901","type":"set","name":"set l3-network-id = -1","xml":"<set>\n<parameter name='l3-network-id' value='-1' />\n","comments":"","x":932.4287033081055,"y":2284.7616996765137,"z":"5083bb91.cbb384","wires":[]},{"id":"ea9b8e4a.f0362","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3388.0951538085938,"y":2506.4283485412598,"z":"5083bb91.cbb384","wires":[["d78ad9d8.5d8c78","c702789.b589088"]]},{"id":"d78ad9d8.5d8c78","type":"set","name":"set l3-network-id = this l3-network","xml":"<set>\n<parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n","comments":"","x":3624.7618255615234,"y":2481.4283475875854,"z":"5083bb91.cbb384","wires":[]},{"id":"c56cd3a7.e3e8d","type":"switchNode","name":"switch l3-network-id","xml":"<switch test='`$l3-network-id`'>\n","comments":"","outputs":1,"x":929.4286270141602,"y":2608.428741455078,"z":"5083bb91.cbb384","wires":[["36280e92.ad7cb2"]]},{"id":"36280e92.ad7cb2","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1099.4285774230957,"y":2608.428497314453,"z":"5083bb91.cbb384","wires":[["3be921aa.df808e"]]},{"id":"3be921aa.df808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`\" />\n","comments":"","x":1247.7619400024414,"y":2608.4286346435547,"z":"5083bb91.cbb384","wires":[]},{"id":"c7f99789.bdf418","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":559.7858200073242,"y":1312.8720026016235,"z":"5083bb91.cbb384","wires":[["47b49582.d69f7c","c9c231d.a31acd"]]},{"id":"47b49582.d69f7c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":765.4524917602539,"y":1290.0149660110474,"z":"5083bb91.cbb384","wires":[["3b4ed31b.2aa0ec"]]},{"id":"c9c231d.a31acd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":766.8810882568359,"y":1334.3005571365356,"z":"5083bb91.cbb384","wires":[["d6283c1d.df5e5"]]},{"id":"d6283c1d.df5e5","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n","comments":"","x":921.1668243408203,"y":1333.7291293144226,"z":"5083bb91.cbb384","wires":[]},{"id":"1204474.d3b3db9","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'\n value='`$db.vf-model.uuid`' />\n","comments":"","x":916.8810157775879,"y":1378.5862350463867,"z":"5083bb91.cbb384","wires":[]},{"id":"ed2bee8b.f19af","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":532.4048385620117,"y":1401.4107398986816,"z":"5083bb91.cbb384","wires":[["2399ff70.6432c","2e93ac0a.a66e94"]]},{"id":"2399ff70.6432c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":766.4048118591309,"y":1378.553671836853,"z":"5083bb91.cbb384","wires":[["1204474.d3b3db9"]]},{"id":"2e93ac0a.a66e94","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":767.8334083557129,"y":1422.8392629623413,"z":"5083bb91.cbb384","wires":[["79226175.2b687"]]},{"id":"79226175.2b687","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n","comments":"","x":922.1191444396973,"y":1422.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"83a56bac.491658","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'\n value='`$db.vf-model.version`' />\n","comments":"","x":914.0239486694336,"y":1467.4434423446655,"z":"5083bb91.cbb384","wires":[]},{"id":"10b2b5e7.5b556a","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`'>\n","comments":"","outputs":1,"x":540.5477104187012,"y":1490.2678871154785,"z":"5083bb91.cbb384","wires":[["2f9db03f.c491c","1978d9cb.d98de6"]]},{"id":"2f9db03f.c491c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1467.410849571228,"z":"5083bb91.cbb384","wires":[["83a56bac.491658"]]},{"id":"1978d9cb.d98de6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1511.6964406967163,"z":"5083bb91.cbb384","wires":[["7d30ca25.4b3c44"]]},{"id":"7d30ca25.4b3c44","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`' />\n","comments":"","x":919.2620277404785,"y":1511.1250128746033,"z":"5083bb91.cbb384","wires":[]},{"id":"30711380.8e3a9c","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'\n value='`$db.vf-model.name`' />\n","comments":"","x":914.0239486694336,"y":1554.5862646102905,"z":"5083bb91.cbb384","wires":[]},{"id":"b6894e3b.427f7","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`'>\n","comments":"","outputs":1,"x":535.5477104187012,"y":1577.4107093811035,"z":"5083bb91.cbb384","wires":[["d278d695.c74378","48c0ba5a.c19a64"]]},{"id":"d278d695.c74378","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1554.553671836853,"z":"5083bb91.cbb384","wires":[["30711380.8e3a9c"]]},{"id":"48c0ba5a.c19a64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1598.8392629623413,"z":"5083bb91.cbb384","wires":[["a7528ae.1a9da78"]]},{"id":"a7528ae.1a9da78","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`' />\n","comments":"","x":919.2620277404785,"y":1598.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"a5e2243e.79eec8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.3333549499512,"y":2458.586400985718,"z":"5083bb91.cbb384","wires":[[]]},{"id":"f6d8dcbb.95d7e","type":"outcome","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":1512.9999961853027,"y":2413.5863151550293,"z":"5083bb91.cbb384","wires":[["9951c6e.9aa9138"]]},{"id":"9951c6e.9aa9138","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2414.3631925582886,"z":"5083bb91.cbb384","wires":[[]]},{"id":"a22ac71b.7c92f8","type":"outcome","name":"Pending Create","xml":"<outcome value='Pending Create'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2370.2528190612793,"z":"5083bb91.cbb384","wires":[["6fce3bd5.f4e834"]]},{"id":"6fce3bd5.f4e834","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2371.0296964645386,"z":"5083bb91.cbb384","wires":[[]]},{"id":"b6321bf9.9a57b8","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2326.9195671081543,"z":"5083bb91.cbb384","wires":[["b2172720.159c18"]]},{"id":"b2172720.159c18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2327.6964445114136,"z":"5083bb91.cbb384","wires":[[]]},{"id":"8d1a1df.f9acde","type":"for","name":"for each A&AI subnet","xml":"<for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >\n","comments":"","outputs":1,"x":931.6667633056641,"y":2701.919626235962,"z":"5083bb91.cbb384","wires":[["38d73ded.fd6fe2"]]},{"id":"38d73ded.fd6fe2","type":"set","name":"set subnet data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />\n","comments":"","x":1129.9999389648438,"y":2700.2532052993774,"z":"5083bb91.cbb384","wires":[]},{"id":"1905c415.59545c","type":"set","name":"set subnet_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'\n value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />\n","comments":"","x":920.3333282470703,"y":2746.919708251953,"z":"5083bb91.cbb384","wires":[]},{"id":"7eb11b41.3e53d4","type":"set","name":"set availability-zones.max-count and length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'\n value='`$db.vf-model.avail-zone-max-count`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'\n value='`$aai.az.availability-zone_length`' />\n","comments":"","x":563.0000610351562,"y":3159.6342582702637,"z":"5083bb91.cbb384","wires":[]},{"id":"76228b8.6690274","type":"set","name":"set vnf-name","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'\n value='`$tmp.vnf-name`' />\n","comments":"","x":496.66663360595703,"y":1246.9197664260864,"z":"5083bb91.cbb384","wires":[]},{"id":"bf0a4f73.3427c","type":"save","name":"update generic-vnf","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vnf-name\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`\" />\n<parameter name=\"prov-status\" value=\"PREPROV\" />\n<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n<parameter name=\"equipment-role\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`\" />\n<parameter name=\"model-invariant-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vnf-object-path`\" />\n","comments":"","outputs":1,"x":483.3333282470703,"y":3369.300033569336,"z":"5083bb91.cbb384","wires":[["69da107b.fb799","7a401d78.a37844"]]},{"id":"780bff7b.fe23","type":"set","name":"set vnf-object-path","xml":"<set>\n<parameter name='vnf-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vnf-topology'`\"/>\n\n","comments":"","x":483.33336639404297,"y":3299.30051612854,"z":"5083bb91.cbb384","wires":[]},{"id":"b4297c00.0fc6b8","type":"set","name":"set vnf-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n","comments":"","x":484.9999771118164,"y":1198.5863094329834,"z":"5083bb91.cbb384","wires":[]},{"id":"74cb887a.748ed8","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-viprend.log' />\n","comments":"","outputs":1,"x":461.00009536743164,"y":3550.967363357544,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9b1367c3.3e1fd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1406.666805267334,"y":3235.9671211242676,"z":"5083bb91.cbb384","wires":[]},{"id":"8c9a1ab5.ce5b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1219.3573722839355,"y":3192.919590950012,"z":"5083bb91.cbb384","wires":[["3dcbea4.1096316"]]},{"id":"e70903d4.4bb15","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1227.9288024902344,"y":3237.205304145813,"z":"5083bb91.cbb384","wires":[["9b1367c3.3e1fd8"]]},{"id":"3dcbea4.1096316","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1409.3573989868164,"y":3192.729326248169,"z":"5083bb91.cbb384","wires":[]},{"id":"31bdedf0.2bef82","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":886.6667442321777,"y":3390.967043876648,"z":"5083bb91.cbb384","wires":[]},{"id":"69da107b.fb799","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":699.3573112487793,"y":3347.9195137023926,"z":"5083bb91.cbb384","wires":[["b5e15cb2.cab62"]]},{"id":"7a401d78.a37844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":707.9287414550781,"y":3392.2052268981934,"z":"5083bb91.cbb384","wires":[["31bdedf0.2bef82"]]},{"id":"b5e15cb2.cab62","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating selflink in generic-vnf in AAI\" />\n","comments":"","x":889.3573379516602,"y":3347.7292490005493,"z":"5083bb91.cbb384","wires":[]},{"id":"83344e86.aa812","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n","comments":"","x":548.3332977294922,"y":1650.2529134750366,"z":"5083bb91.cbb384","wires":[]},{"id":"f66871af.e5692","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1313.6665954589844,"y":1771.6664972305298,"z":"5083bb91.cbb384","wires":[[]]},{"id":"7ed2b7fb.548078","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1133.3332977294922,"y":1818.333285331726,"z":"5083bb91.cbb384","wires":[["f66871af.e5692","d747b0d7.af821","399a4263.6a360e"]]},{"id":"399a4263.6a360e","type":"break","name":"break","xml":"<break>\n","comments":"","x":1283.3332595825195,"y":1861.666582107544,"z":"5083bb91.cbb384","wires":[]},{"id":"e9252ccb.d2705","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":795,"y":3070.7143869400024,"z":"5083bb91.cbb384","wires":[["b1db1f98.d448e","d45ddc40.768c2"]]},{"id":"d45ddc40.768c2","type":"save","name":"save generic-vnf availability-zone relationship","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"availability-zone\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"att-aic\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"availability-zone.availability-zone-name\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$aai.az.availability-zone[$idx].availability-zone-name`\" />\n","comments":"","outputs":1,"x":1086.9048156738281,"y":3094.0478343963623,"z":"5083bb91.cbb384","wires":[["a2d3128e.390bf","8b3808e2.f32948"]]},{"id":"a97c0980.2d72a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1540.47607421875,"y":3117.9671936035156,"z":"5083bb91.cbb384","wires":[]},{"id":"a2d3128e.390bf","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1353.1666412353516,"y":3074.9196634292603,"z":"5083bb91.cbb384","wires":[["e7b70608.415b38"]]},{"id":"8b3808e2.f32948","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1361.7380714416504,"y":3119.205376625061,"z":"5083bb91.cbb384","wires":[["a97c0980.2d72a8"]]},{"id":"e7b70608.415b38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1543.1666679382324,"y":3074.729398727417,"z":"5083bb91.cbb384","wires":[]},{"id":"bf344dbf.57e7d","type":"set","name":"set mapping rows to 0","xml":"<set>\n<parameter name='db.vf-network-role-mapping_length' value='0' />\n","comments":"","x":1107.1427688598633,"y":2064.52388381958,"z":"5083bb91.cbb384","wires":[]},{"id":"a6739756.d975f8","type":"switchNode","name":"switch AAI availability-zone_length","xml":"<switch test='`$aai.az.availability-zone_length`'>\n","comments":"","outputs":1,"x":535.7142868041992,"y":2974.523973464966,"z":"5083bb91.cbb384","wires":[["2876e97f.ae3916"]]},{"id":"2876e97f.ae3916","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":754.2857055664062,"y":2974.0953826904297,"z":"5083bb91.cbb384","wires":[["32c7e4de.36637c"]]},{"id":"ea591bcc.24cec8","type":"set","name":"set availability-zone_length to 0","xml":"<set>\n<parameter name='aai.az.availability-zone_length' value='0' />\n","comments":"","x":1355.7143478393555,"y":2992.6666202545166,"z":"5083bb91.cbb384","wires":[]},{"id":"32c7e4de.36637c","type":"switchNode","name":"switch AZ max count > 0","xml":"<switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>\n","comments":"","outputs":1,"x":942.857177734375,"y":2974.5236945152283,"z":"5083bb91.cbb384","wires":[["a4226dd4.17547","29731a8a.ed2356"]]},{"id":"a4226dd4.17547","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1145.7142848968506,"y":2948.8094444274902,"z":"5083bb91.cbb384","wires":[["7e365163.fc36a"]]},{"id":"29731a8a.ed2356","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1147.1429061889648,"y":2993.0951919555664,"z":"5083bb91.cbb384","wires":[["ea591bcc.24cec8"]]},{"id":"7e365163.fc36a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No availability zones found in AAI for cloud region '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n","comments":"","x":1297.142822265625,"y":2948.5238494873047,"z":"5083bb91.cbb384","wires":[]},{"id":"b3f8a06f.e304d","type":"get-resource","name":"get-resource availability zones","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"availability-zones\" \n\t\tkey=\"cloud-region.cloud-owner = 'att-aic' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.az' local-only='false' >\n\n","comments":"","outputs":1,"x":545.7143096923828,"y":1901.4286441802979,"z":"5083bb91.cbb384","wires":[["c6cdd578.1d9f88"]]},{"id":"c6cdd578.1d9f88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":770.9605255126953,"y":1900.829496383667,"z":"5083bb91.cbb384","wires":[["450c32ab.82b7bc"]]},{"id":"450c32ab.82b7bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving availability zones from AAI\" />\n","comments":"","x":944.7104644775391,"y":1899.5796184539795,"z":"5083bb91.cbb384","wires":[]}]
+[{"id":"8241aacb.08cdd8","type":"dgstart","name":"DGSTART","outputs":1,"x":115,"y":90,"z":"5083bb91.cbb384","wires":[["6555006a.2f30f"]]},{"id":"6555006a.2f30f","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":228.61902618408203,"y":130.2381134033203,"z":"5083bb91.cbb384","wires":[["eeb39a2.ad04a68"]]},{"id":"eeb39a2.ad04a68","type":"method","name":"method vnf-topology-operation-assign","xml":"<method rpc='vnf-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":206.42862701416016,"y":170,"z":"5083bb91.cbb384","wires":[["6a42140c.de8f7c"]]},{"id":"34ceabd.5e7b554","type":"comment","name":"vnf-topology-operation-assign","info":"","comments":"","x":509.34485626220703,"y":37.58634376525879,"z":"5083bb91.cbb384","wires":[]},{"id":"77d708f5.8001e8","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":516.8571395874023,"y":367.19043922424316,"z":"5083bb91.cbb384","wires":[["b5d89b76.8690d8","3602a403.88e53c"]]},{"id":"b5d89b76.8690d8","type":"outcome","name":"CreateVnfInstance","xml":"<outcome value='CreateVnfInstance'>\n","comments":"","outputs":1,"x":770.5714340209961,"y":344.3333206176758,"z":"5083bb91.cbb384","wires":[["2f2a6b54.bc4ad4"]]},{"id":"3602a403.88e53c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.5713996887207,"y":390.0476484298706,"z":"5083bb91.cbb384","wires":[["9d45573f.a70cf8"]]},{"id":"2f2a6b54.bc4ad4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":955.4285621643066,"y":344.3333501815796,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9d45573f.a70cf8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateVnfInstance'\" />\n","comments":"","x":972.5714073181152,"y":390.0476064682007,"z":"5083bb91.cbb384","wires":[]},{"id":"6a42140c.de8f7c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":145.11905670166016,"y":1701.7857055664062,"z":"5083bb91.cbb384","wires":[["77d708f5.8001e8","aa948e3b.dc6f4","70905004.44daf","db6678a0.606738","a8c695f6.0babf8","b4d76448.66e818","d6dc9daa.dab27","d09af1c.f6ecc1","59e68b20.a9f1d4","ee6fbe81.c9b8d","e15d873e.f3a578","859c6fc2.42cc1","161882c2.0524bd","e0aec656.73c228","fb26450c.7d69d8","8fe9a7cd.91ae28","92cd0a7d.aee888","b405840f.b908e8","555188e7.5bae08","c7f99789.bdf418","ed2bee8b.f19af","10b2b5e7.5b556a","b6894e3b.427f7","7eb11b41.3e53d4","76228b8.6690274","bf0a4f73.3427c","780bff7b.fe23","b4297c00.0fc6b8","74cb887a.748ed8","83344e86.aa812","a6739756.d975f8","b3f8a06f.e304d"]]},{"id":"aa948e3b.dc6f4","type":"get-resource","name":"get-resource VF_MODEL","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-model'>\n\n","comments":"","outputs":1,"x":529.1904449462891,"y":458.333309173584,"z":"5083bb91.cbb384","wires":[["fd105869.f2cd08","af0a7eb5.ee8e2"]]},{"id":"ec0cf350.8477c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":970.6189231872559,"y":481.7617950439453,"z":"5083bb91.cbb384","wires":[]},{"id":"fd105869.f2cd08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":729.9761428833008,"y":438.7141466140747,"z":"5083bb91.cbb384","wires":[["12a688b3.3440a7"]]},{"id":"af0a7eb5.ee8e2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":738.5475730895996,"y":482.9998598098755,"z":"5083bb91.cbb384","wires":[["ec0cf350.8477c"]]},{"id":"12a688b3.3440a7","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_MODEL table\" />\n","comments":"","x":969.9761238098145,"y":436.85705375671387,"z":"5083bb91.cbb384","wires":[]},{"id":"70905004.44daf","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":559.2857131958008,"y":648.5714282989502,"z":"5083bb91.cbb384","wires":[["84321624.bc90b8","e6e198eb.7d5308"]]},{"id":"84321624.bc90b8","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":785.0000419616699,"y":615.7142162322998,"z":"5083bb91.cbb384","wires":[["df34205c.2330c"]]},{"id":"df34205c.2330c","type":"set","name":"set vnf-index=0","xml":"<set>\n<parameter name='vnf-index' value='0' />\n","comments":"","x":949.2857627868652,"y":614.7142944335938,"z":"5083bb91.cbb384","wires":[]},{"id":"e6e198eb.7d5308","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":786.4286041259766,"y":680.0000343322754,"z":"5083bb91.cbb384","wires":[["910f819c.16efe"]]},{"id":"e34a45aa.608f38","type":"set","name":"set vnf-index = vnf_length","xml":"<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n","comments":"","x":1125.285758972168,"y":658.285722732544,"z":"5083bb91.cbb384","wires":[]},{"id":"4446fa6b.76c4b4","type":"for","name":"for each existing VNF","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":1110.7142715454102,"y":704.2856616973877,"z":"5083bb91.cbb384","wires":[["9e71792a.51a8b8"]]},{"id":"910f819c.16efe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":922.1428642272949,"y":680,"z":"5083bb91.cbb384","wires":[["e34a45aa.608f38","4446fa6b.76c4b4"]]},{"id":"9e71792a.51a8b8","type":"switchNode","name":"switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n","comments":"","outputs":1,"x":1465.0000381469727,"y":703.857141494751,"z":"5083bb91.cbb384","wires":[["ca44cc94.301af"]]},{"id":"ca44cc94.301af","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1759.2857475280762,"y":703.4286136627197,"z":"5083bb91.cbb384","wires":[["e7127b80.39ffd8"]]},{"id":"e7127b80.39ffd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n","comments":"","x":1907.8571548461914,"y":703.4285736083984,"z":"5083bb91.cbb384","wires":[]},{"id":"2ca7efa9.3b66e","type":"comment","name":"make sure this VNF doesn't exist already","info":"","comments":"","x":1452.1427688598633,"y":661.4285717010498,"z":"5083bb91.cbb384","wires":[]},{"id":"db6678a0.606738","type":"set","name":"set vnf-topology data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'\n value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'\n value='`$db.vf-model.nf-type`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'\n value='`$db.vf-model.nf-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'\n value='`$db.vf-model.nf-function`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'\n value='`$db.vf-model.nf-code`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'\n value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'\n value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />\n \n","comments":"","x":514.9999694824219,"y":810.238115310669,"z":"5083bb91.cbb384","wires":[]},{"id":"a8c695f6.0babf8","type":"switchNode","name":"switch input vnf-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>\n","comments":"","outputs":1,"x":521.4285507202148,"y":1052.8571615219116,"z":"5083bb91.cbb384","wires":[["487e7f2b.8ad47","68310aa2.d2de84"]]},{"id":"487e7f2b.8ad47","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":789.6427726745605,"y":975.8333864212036,"z":"5083bb91.cbb384","wires":[["c340356a.783268"]]},{"id":"429caac2.6d56a4","type":"switchNode","name":"switch ecomp-generated-naming","xml":"<switch test='`$db.vf-model.ecomp-generated-naming`'>\n","comments":"","outputs":1,"x":1206.071662902832,"y":882.5002059936523,"z":"5083bb91.cbb384","wires":[["2e7aef6.82a371","9b8210cc.7778e","8ab384c2.20be78"]]},{"id":"c340356a.783268","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":935.3572692871094,"y":975.833498954773,"z":"5083bb91.cbb384","wires":[["9fd7e5b5.625518","ed228289.17a95","429caac2.6d56a4"]]},{"id":"9b8210cc.7778e","type":"outcome","name":"N","xml":"<outcome value='N'>","comments":"","outputs":1,"x":1455.357322692871,"y":884.404914855957,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"1d994a90.016b85","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"No vnf-name was received but ecomp-generated-naming is not Y\" />\n","comments":"","x":1609.64310836792,"y":902.9763593673706,"z":"5083bb91.cbb384","wires":[]},{"id":"2e7aef6.82a371","type":"outcome","name":"Y","xml":"<outcome value='Y'>","comments":"","outputs":1,"x":1455.3572883605957,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[["45a6a073.f42c1"]]},{"id":"8ab384c2.20be78","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1455.357250213623,"y":930.119234085083,"z":"5083bb91.cbb384","wires":[["1d994a90.016b85"]]},{"id":"45a6a073.f42c1","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1592.5002326965332,"y":840.1192359924316,"z":"5083bb91.cbb384","wires":[[]]},{"id":"68310aa2.d2de84","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":792.2144546508789,"y":1122.119125366211,"z":"5083bb91.cbb384","wires":[["e79898f0.209a58"]]},{"id":"9ffe9f0c.29d4f","type":"set","name":"set tmp.vnf-name","xml":"<set>\n<parameter name='tmp.vnf-name' value=\"`$vnf-topology-operation-input.vnf-request-input.vnf-name`\" />\n","comments":"","x":1751.0715306599936,"y":1189.5476417541504,"z":"5083bb91.cbb384","wires":[]},{"id":"9fd7e5b5.625518","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1274.4763259887695,"y":1048.8333959579468,"z":"5083bb91.cbb384","wires":[["d8e6a254.be4f7","6860527.6c3eeac"]]},{"id":"d8e6a254.be4f7","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1570.1906140645347,"y":1021.6906585693359,"z":"5083bb91.cbb384","wires":[["6bce88ea.dd4c08"]]},{"id":"6860527.6c3eeac","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1573.5239639282227,"y":1073.3573017120361,"z":"5083bb91.cbb384","wires":[["ec3565fb.6ebb98"]]},{"id":"ed228289.17a95","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`\" />\n<parameter name='generate-unique-name-input.index-length' value='2' />\n","comments":"","x":1231.1430130004883,"y":997.1668043136597,"z":"5083bb91.cbb384","wires":[]},{"id":"ec3565fb.6ebb98","type":"set","name":"set tmp.vnf-name to generated name","xml":"<set>\n<parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1814.7143491109214,"y":1073.8333930969238,"z":"5083bb91.cbb384","wires":[]},{"id":"6bce88ea.dd4c08","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1738.0477269490561,"y":1021.1191701889038,"z":"5083bb91.cbb384","wires":[]},{"id":"e79898f0.209a58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":940.1429824829102,"y":1120.7858123779297,"z":"5083bb91.cbb384","wires":[["1af0159f.6f1e5a","5ec1ca2.9ad0934"]]},{"id":"5ec1ca2.9ad0934","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1270.1429824829102,"y":1168.7858123779297,"z":"5083bb91.cbb384","wires":[["2aa25520.67d72a","37668d9a.952f52"]]},{"id":"2aa25520.67d72a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1568.7143987019858,"y":1138.785837173462,"z":"5083bb91.cbb384","wires":[["ab10d68f.515008"]]},{"id":"37668d9a.952f52","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1572.0477485656738,"y":1190.452480316162,"z":"5083bb91.cbb384","wires":[["9ffe9f0c.29d4f"]]},{"id":"1af0159f.6f1e5a","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-name`' />\n","comments":"","x":1226.8096542358398,"y":1117.1191844940186,"z":"5083bb91.cbb384","wires":[]},{"id":"ab10d68f.515008","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1736.5715115865073,"y":1138.2143487930298,"z":"5083bb91.cbb384","wires":[]},{"id":"b4d76448.66e818","type":"get-resource","name":"get-resource cloud region","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"cloud-region\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.cloud-region' local-only='false' >\n\n","comments":"","outputs":1,"x":543.5714492797852,"y":1730.8569984436035,"z":"5083bb91.cbb384","wires":[["63136ca0.2aa6a4","38b39166.261e2e"]]},{"id":"38b39166.261e2e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":768.8176422119141,"y":1749.00785446167,"z":"5083bb91.cbb384","wires":[["c8785277.db74c"]]},{"id":"c8785277.db74c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving cloud region from AAI\" />\n","comments":"","x":943.8176155090332,"y":1749.007890701294,"z":"5083bb91.cbb384","wires":[]},{"id":"63136ca0.2aa6a4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":777.7462387084961,"y":1707.2935876846313,"z":"5083bb91.cbb384","wires":[["734e45d0.a54dbc"]]},{"id":"734e45d0.a54dbc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Cloud region not found in AAI\" />\n","comments":"","x":944.095516204834,"y":1706.5991649627686,"z":"5083bb91.cbb384","wires":[]},{"id":"d6dc9daa.dab27","type":"get-resource","name":"get-resource VF_TO_NETWORK_ROLE_MAPPING","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'\n pfx='db.vf-network-role-mapping[]'>\n\n","comments":"","outputs":1,"x":608.8095321655273,"y":2041.9045181274414,"z":"5083bb91.cbb384","wires":[["fb8ff7f3.9c6578","21c9fd46.cdb8b2"]]},{"id":"2a8c3297.b95dbe","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No entries found in VF_TO_NETWORK_ROLE_MAPPING for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`\" />\n","comments":"","x":1344.5237121582031,"y":2059.618698120117,"z":"5083bb91.cbb384","wires":[]},{"id":"fb8ff7f3.9c6578","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":904.5952033996582,"y":2020.6186828613281,"z":"5083bb91.cbb384","wires":[["3531361a.0233ba"]]},{"id":"21c9fd46.cdb8b2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":913.166633605957,"y":2064.904396057129,"z":"5083bb91.cbb384","wires":[["bf344dbf.57e7d"]]},{"id":"3531361a.0233ba","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error reading VF_TO_NETWORK_ROLE_MAPPING table\" />\n","comments":"","x":1079.5951843261719,"y":2020.4283332824707,"z":"5083bb91.cbb384","wires":[]},{"id":"e1fffb5d.139e58","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":709.5715866088867,"y":2490.71391582489,"z":"5083bb91.cbb384","wires":[["611b38f2.51f0b8","37408b0a.59aa74","8956c374.edb43","fbd0fea8.b0301","dd0ec04d.0901","c56cd3a7.e3e8d","8d1a1df.f9acde","1905c415.59545c"]]},{"id":"8956c374.edb43","type":"get-resource","name":"get-resource l3-network","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"l3-networks\" \n\t\tkey=\"l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role\"\n pfx='aai.l3-network' local-only='false'\n>\n","comments":"","outputs":1,"x":942.4286041259766,"y":2169.999779701233,"z":"5083bb91.cbb384","wires":[["c79e82cf.08146","59d32d05.f01e74"]]},{"id":"59d32d05.f01e74","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1146.476318359375,"y":2192.1426191329956,"z":"5083bb91.cbb384","wires":[["7d74e0ae.ec3dc"]]},{"id":"7d74e0ae.ec3dc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving l3-network from AAI\" />\n","comments":"","x":1321.4762916564941,"y":2192.1426553726196,"z":"5083bb91.cbb384","wires":[]},{"id":"c79e82cf.08146","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1155.404914855957,"y":2150.428352355957,"z":"5083bb91.cbb384","wires":[["a3dc9d39.f743"]]},{"id":"a3dc9d39.f743","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No active l3-network found in AAI with cloud_region_id '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '\n + $db.vf-network-role-mapping[$network-index].network-role`\" />\n","comments":"","x":1321.754192352295,"y":2149.7339296340942,"z":"5083bb91.cbb384","wires":[]},{"id":"611b38f2.51f0b8","type":"set","name":"set vnf-network data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'\n value='`$db.vf-network-role-mapping[$role-index].network-role`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'\n value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'\n value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'\n value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'\n value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />\n","comments":"","x":931.6191940307617,"y":2657.0000228881836,"z":"5083bb91.cbb384","wires":[]},{"id":"e15d873e.f3a578","type":"for","name":"for each cloud-region availability zone","xml":"<for index='idx' start='0' end='`$aai.az.availability-zone_length`' >\n","comments":"","outputs":1,"x":543.3335571289062,"y":3071.618803024292,"z":"5083bb91.cbb384","wires":[["e9252ccb.d2705"]]},{"id":"b1db1f98.d448e","type":"set","name":"set availability-zone","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'\n value='`$aai.az.availability-zone[$idx].availability-zone-name`' />\n","comments":"","x":1005.0002403259277,"y":3040.952217102051,"z":"5083bb91.cbb384","wires":[]},{"id":"859c6fc2.42cc1","type":"set","name":"set vnf-parameters-data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'\n value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />\n","comments":"","x":502.9524841308594,"y":2921.5711631774902,"z":"5083bb91.cbb384","wires":[]},{"id":"15c078e.5c6e387","type":"save","name":"save generic-vnf l3-network relationships","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"l3-network\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"l3-network.network-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`\" />\n","comments":"","outputs":1,"x":969.5240173339844,"y":3215.381015777588,"z":"5083bb91.cbb384","wires":[["8c9a1ab5.ce5b08","e70903d4.4bb15"]]},{"id":"fb26450c.7d69d8","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":466.0953674316406,"y":3602.1901140213013,"z":"5083bb91.cbb384","wires":[]},{"id":"e0aec656.73c228","type":"set","name":"set vnf-level-oper-status to PendingCreate","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n","comments":"","x":555.9088134765625,"y":3504.527594566345,"z":"5083bb91.cbb384","wires":[]},{"id":"59e68b20.a9f1d4","type":"for","name":"for each network-role","xml":"<for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>","comments":"","outputs":1,"x":492.90489196777344,"y":2490.7141189575195,"z":"5083bb91.cbb384","wires":[["e1fffb5d.139e58"]]},{"id":"d09af1c.f6ecc1","type":"set","name":"set network-index = 0","xml":"<set>\n<parameter name='network-index' value='0' />\n","comments":"","x":511.2380676269531,"y":2108.8094577789307,"z":"5083bb91.cbb384","wires":[]},{"id":"37408b0a.59aa74","type":"set","name":"increment network-index","xml":"<set>\n<parameter name='network-index' value='`$network-index + 1`' />\n","comments":"","x":941.9525146484375,"y":2794.6189250946045,"z":"5083bb91.cbb384","wires":[]},{"id":"ee6fbe81.c9b8d","type":"set","name":"set vnf-network_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'\n value='`$network-index`' />\n","comments":"","x":501.8095703125,"y":2871.571207046509,"z":"5083bb91.cbb384","wires":[]},{"id":"161882c2.0524bd","type":"set","name":"copy input data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n","comments":"","x":471.4286422729492,"y":3452.1904258728027,"z":"5083bb91.cbb384","wires":[]},{"id":"8fe9a7cd.91ae28","type":"for","name":"for each vnf-network","xml":"<for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >\n","comments":"","outputs":1,"x":492.52392578125,"y":3214.380931854248,"z":"5083bb91.cbb384","wires":[["e79df5e2.3bfb98"]]},{"id":"e79df5e2.3bfb98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":696.1905670166016,"y":3214.380892753601,"z":"5083bb91.cbb384","wires":[["15c078e.5c6e387"]]},{"id":"92cd0a7d.aee888","type":"set","name":"set new vnf_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n","comments":"","x":507.0952491760254,"y":764.7619781494141,"z":"5083bb91.cbb384","wires":[]},{"id":"b405840f.b908e8","type":"for","name":"for each cloud-region relationship","xml":"<for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":556.4285736083984,"y":1818.0951700210571,"z":"5083bb91.cbb384","wires":[["c203a95d.692928"]]},{"id":"c203a95d.692928","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>\n","comments":"","outputs":1,"x":804.1071166992188,"y":1817.8450994491577,"z":"5083bb91.cbb384","wires":[["f1cc745c.42f608"]]},{"id":"f1cc745c.42f608","type":"outcome","name":"complex","xml":"<outcome value='complex'>\n","comments":"","outputs":1,"x":973.5714378356934,"y":1817.2379217147827,"z":"5083bb91.cbb384","wires":[["7ed2b7fb.548078"]]},{"id":"d747b0d7.af821","type":"set","name":"set aic-clli","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'\n value='`$aai-uid-split[$aai-uid-split_length - 1]`' />\n","comments":"","x":1294.2857360839844,"y":1816.9045791625977,"z":"5083bb91.cbb384","wires":[]},{"id":"555188e7.5bae08","type":"switchNode","name":"switch aic-clli","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>\n","comments":"","outputs":1,"x":492.3333511352539,"y":1974.0474872589111,"z":"5083bb91.cbb384","wires":[["20f33836.314ae8"]]},{"id":"20f33836.314ae8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":640.4761848449707,"y":1974.0474700927734,"z":"5083bb91.cbb384","wires":[["dd195a67.9e4528"]]},{"id":"dd195a67.9e4528","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n","comments":"","x":787.6190452575684,"y":1973.6189041137695,"z":"5083bb91.cbb384","wires":[]},{"id":"3b4ed31b.2aa0ec","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'\n value='`$db.vf-model.invariant-uuid`' />\n","comments":"","x":915.9287452697754,"y":1290.0475587844849,"z":"5083bb91.cbb384","wires":[]},{"id":"84e4b6d4.cddc08","type":"for","name":"for each l3-network","xml":"<for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >\n","comments":"","outputs":1,"x":1049.8811492919922,"y":2413.571388244629,"z":"5083bb91.cbb384","wires":[["6477f1c9.11cbd"]]},{"id":"6477f1c9.11cbd","type":"switchNode","name":"switch orchestration-status","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>\n","comments":"","outputs":1,"x":1278.452350616455,"y":2412.142815589905,"z":"5083bb91.cbb384","wires":[["2d02e762.92bf68","a48ca1a4.9260d","b6321bf9.9a57b8","a22ac71b.7c92f8","f6d8dcbb.95d7e"]]},{"id":"2d02e762.92bf68","type":"outcome","name":"Pending Delete","xml":"<outcome value='Pending Delete'>\n","comments":"","outputs":1,"x":1515.1192626953125,"y":2457.8095235824585,"z":"5083bb91.cbb384","wires":[["a5e2243e.79eec8"]]},{"id":"a48ca1a4.9260d","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1487.9764022827148,"y":2508.809504508972,"z":"5083bb91.cbb384","wires":[["6842d9dd.26f8c8"]]},{"id":"1bfffb3d.8635e5","type":"switchNode","name":"switch related-to","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>\n","comments":"","outputs":1,"x":1853.6907539367676,"y":2507.3808450698853,"z":"5083bb91.cbb384","wires":[["105409f.8c324f6"]]},{"id":"6842d9dd.26f8c8","type":"for","name":"for each relationship","xml":"<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":1657.9763145446777,"y":2508.3808813095093,"z":"5083bb91.cbb384","wires":[["1bfffb3d.8635e5"]]},{"id":"105409f.8c324f6","type":"outcome","name":"cloud-region","xml":"<outcome value='cloud-region'>\n","comments":"","outputs":1,"x":2027.9763946533203,"y":2506.9522914886475,"z":"5083bb91.cbb384","wires":[["8c0fac20.7b6d4"]]},{"id":"8c0fac20.7b6d4","type":"for","name":"for each relationship data","xml":"<for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >\n","comments":"","outputs":1,"x":2225.119094848633,"y":2507.380759239197,"z":"5083bb91.cbb384","wires":[["23b4c525.ad999a"]]},{"id":"23b4c525.ad999a","type":"switchNode","name":"switch relationship-key","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>\n","comments":"","outputs":1,"x":2456.547695159912,"y":2506.9521341323853,"z":"5083bb91.cbb384","wires":[["ad4b7c5c.5ff53"]]},{"id":"ad4b7c5c.5ff53","type":"outcome","name":"cloud-region.cloud-region-id","xml":"<outcome value='cloud-region.cloud-region-id'>\n","comments":"","outputs":1,"x":2697.9762268066406,"y":2506.95223903656,"z":"5083bb91.cbb384","wires":[["8b527005.34699"]]},{"id":"8b527005.34699","type":"switchNode","name":"switch relationship-value == cloud-region-id","xml":"<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>\n","comments":"","outputs":1,"x":3002.2621459960938,"y":2506.8092947006226,"z":"5083bb91.cbb384","wires":[["1ee4a77a.9542e9"]]},{"id":"1ee4a77a.9542e9","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3242.262176513672,"y":2506.9522399902344,"z":"5083bb91.cbb384","wires":[["ea9b8e4a.f0362"]]},{"id":"fbd0fea8.b0301","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":888.0953330993652,"y":2481.4284858703613,"z":"5083bb91.cbb384","wires":[["84e4b6d4.cddc08","640fc2e9.3ee98c"]]},{"id":"640fc2e9.3ee98c","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1039.4287414550781,"y":2554.7617197036743,"z":"5083bb91.cbb384","wires":[]},{"id":"c702789.b589088","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":3543.095157623291,"y":2524.761643409729,"z":"5083bb91.cbb384","wires":[]},{"id":"dd0ec04d.0901","type":"set","name":"set l3-network-id = -1","xml":"<set>\n<parameter name='l3-network-id' value='-1' />\n","comments":"","x":932.4287033081055,"y":2284.7616996765137,"z":"5083bb91.cbb384","wires":[]},{"id":"ea9b8e4a.f0362","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":3388.0951538085938,"y":2506.4283485412598,"z":"5083bb91.cbb384","wires":[["d78ad9d8.5d8c78","c702789.b589088"]]},{"id":"d78ad9d8.5d8c78","type":"set","name":"set l3-network-id = this l3-network","xml":"<set>\n<parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />\n","comments":"","x":3624.7618255615234,"y":2481.4283475875854,"z":"5083bb91.cbb384","wires":[]},{"id":"c56cd3a7.e3e8d","type":"switchNode","name":"switch l3-network-id","xml":"<switch test='`$l3-network-id`'>\n","comments":"","outputs":1,"x":929.4286270141602,"y":2608.428741455078,"z":"5083bb91.cbb384","wires":[["36280e92.ad7cb2"]]},{"id":"36280e92.ad7cb2","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":1099.4285774230957,"y":2608.428497314453,"z":"5083bb91.cbb384","wires":[["3be921aa.df808e"]]},{"id":"3be921aa.df808e","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`\" />\n","comments":"","x":1247.7619400024414,"y":2608.4286346435547,"z":"5083bb91.cbb384","wires":[]},{"id":"c7f99789.bdf418","type":"switchNode","name":"switch input model-invariant-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":559.7858200073242,"y":1312.8720026016235,"z":"5083bb91.cbb384","wires":[["47b49582.d69f7c","c9c231d.a31acd"]]},{"id":"47b49582.d69f7c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":765.4524917602539,"y":1290.0149660110474,"z":"5083bb91.cbb384","wires":[["3b4ed31b.2aa0ec"]]},{"id":"c9c231d.a31acd","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":766.8810882568359,"y":1334.3005571365356,"z":"5083bb91.cbb384","wires":[["d6283c1d.df5e5"]]},{"id":"d6283c1d.df5e5","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />\n","comments":"","x":921.1668243408203,"y":1333.7291293144226,"z":"5083bb91.cbb384","wires":[]},{"id":"1204474.d3b3db9","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'\n value='`$db.vf-model.uuid`' />\n","comments":"","x":916.8810157775879,"y":1378.5862350463867,"z":"5083bb91.cbb384","wires":[]},{"id":"ed2bee8b.f19af","type":"switchNode","name":"switch input model-uuid","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":532.4048385620117,"y":1401.4107398986816,"z":"5083bb91.cbb384","wires":[["2399ff70.6432c","2e93ac0a.a66e94"]]},{"id":"2399ff70.6432c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":766.4048118591309,"y":1378.553671836853,"z":"5083bb91.cbb384","wires":[["1204474.d3b3db9"]]},{"id":"2e93ac0a.a66e94","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":767.8334083557129,"y":1422.8392629623413,"z":"5083bb91.cbb384","wires":[["79226175.2b687"]]},{"id":"79226175.2b687","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />\n","comments":"","x":922.1191444396973,"y":1422.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"83a56bac.491658","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'\n value='`$db.vf-model.version`' />\n","comments":"","x":914.0239486694336,"y":1467.4434423446655,"z":"5083bb91.cbb384","wires":[]},{"id":"10b2b5e7.5b556a","type":"switchNode","name":"switch input model-version","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`'>\n","comments":"","outputs":1,"x":540.5477104187012,"y":1490.2678871154785,"z":"5083bb91.cbb384","wires":[["2f9db03f.c491c","1978d9cb.d98de6"]]},{"id":"2f9db03f.c491c","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1467.410849571228,"z":"5083bb91.cbb384","wires":[["83a56bac.491658"]]},{"id":"1978d9cb.d98de6","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1511.6964406967163,"z":"5083bb91.cbb384","wires":[["7d30ca25.4b3c44"]]},{"id":"7d30ca25.4b3c44","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`' />\n","comments":"","x":919.2620277404785,"y":1511.1250128746033,"z":"5083bb91.cbb384","wires":[]},{"id":"30711380.8e3a9c","type":"set","name":"set from DB","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'\n value='`$db.vf-model.name`' />\n","comments":"","x":914.0239486694336,"y":1554.5862646102905,"z":"5083bb91.cbb384","wires":[]},{"id":"b6894e3b.427f7","type":"switchNode","name":"switch input model-name","xml":"<switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`'>\n","comments":"","outputs":1,"x":535.5477104187012,"y":1577.4107093811035,"z":"5083bb91.cbb384","wires":[["d278d695.c74378","48c0ba5a.c19a64"]]},{"id":"d278d695.c74378","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":763.5476951599121,"y":1554.553671836853,"z":"5083bb91.cbb384","wires":[["30711380.8e3a9c"]]},{"id":"48c0ba5a.c19a64","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":764.9762916564941,"y":1598.8392629623413,"z":"5083bb91.cbb384","wires":[["a7528ae.1a9da78"]]},{"id":"a7528ae.1a9da78","type":"set","name":"set from input","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`' />\n","comments":"","x":919.2620277404785,"y":1598.2678351402283,"z":"5083bb91.cbb384","wires":[]},{"id":"a5e2243e.79eec8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.3333549499512,"y":2458.586400985718,"z":"5083bb91.cbb384","wires":[[]]},{"id":"f6d8dcbb.95d7e","type":"outcome","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":1512.9999961853027,"y":2413.5863151550293,"z":"5083bb91.cbb384","wires":[["9951c6e.9aa9138"]]},{"id":"9951c6e.9aa9138","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2414.3631925582886,"z":"5083bb91.cbb384","wires":[[]]},{"id":"a22ac71b.7c92f8","type":"outcome","name":"Pending Create","xml":"<outcome value='Pending Create'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2370.2528190612793,"z":"5083bb91.cbb384","wires":[["6fce3bd5.f4e834"]]},{"id":"6fce3bd5.f4e834","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2371.0296964645386,"z":"5083bb91.cbb384","wires":[[]]},{"id":"b6321bf9.9a57b8","type":"outcome","name":"PendingCreate","xml":"<outcome value='PendingCreate'>\n","comments":"","outputs":1,"x":1514.9999961853027,"y":2326.9195671081543,"z":"5083bb91.cbb384","wires":[["b2172720.159c18"]]},{"id":"b2172720.159c18","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1668.2140884399414,"y":2327.6964445114136,"z":"5083bb91.cbb384","wires":[[]]},{"id":"8d1a1df.f9acde","type":"for","name":"for each A&AI subnet","xml":"<for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >\n","comments":"","outputs":1,"x":931.6667633056641,"y":2701.919626235962,"z":"5083bb91.cbb384","wires":[["38d73ded.fd6fe2"]]},{"id":"38d73ded.fd6fe2","type":"set","name":"set subnet data","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'\n value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />\n","comments":"","x":1129.9999389648438,"y":2700.2532052993774,"z":"5083bb91.cbb384","wires":[]},{"id":"1905c415.59545c","type":"set","name":"set subnet_length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'\n value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />\n","comments":"","x":920.3333282470703,"y":2746.919708251953,"z":"5083bb91.cbb384","wires":[]},{"id":"7eb11b41.3e53d4","type":"set","name":"set availability-zones.max-count and length","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'\n value='`$db.vf-model.avail-zone-max-count`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'\n value='`$aai.az.availability-zone_length`' />\n","comments":"","x":563.0000610351562,"y":3159.6342582702637,"z":"5083bb91.cbb384","wires":[]},{"id":"76228b8.6690274","type":"set","name":"set vnf-name","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'\n value='`$tmp.vnf-name`' />\n","comments":"","x":496.66663360595703,"y":1246.9197664260864,"z":"5083bb91.cbb384","wires":[]},{"id":"bf0a4f73.3427c","type":"save","name":"update generic-vnf","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"vnf-name\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`\" />\n<parameter name=\"prov-status\" value=\"PREPROV\" />\n<parameter name=\"operational-status\" value=\"out-of-service-path\" />\n<parameter name=\"equipment-role\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`\" />\n<parameter name=\"model-invariant-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`\" />\n<parameter name=\"model-version-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`\" />\n<parameter name=\"model-customization-id\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`\" />\n<parameter name=\"selflink\" value=\"`$vnf-object-path`\" />\n","comments":"","outputs":1,"x":483.3333282470703,"y":3369.300033569336,"z":"5083bb91.cbb384","wires":[["69da107b.fb799","7a401d78.a37844"]]},{"id":"780bff7b.fe23","type":"set","name":"set vnf-object-path","xml":"<set>\n<parameter name='vnf-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/vnfs/vnf/'\n + $service-data.vnfs.vnf[$vnf-index].vnf-id\n + '/vnf-data/vnf-topology'`\"/>\n\n","comments":"","x":483.33336639404297,"y":3299.30051612854,"z":"5083bb91.cbb384","wires":[]},{"id":"b4297c00.0fc6b8","type":"set","name":"set vnf-id","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'\n value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n","comments":"","x":484.9999771118164,"y":1198.5863094329834,"z":"5083bb91.cbb384","wires":[]},{"id":"74cb887a.748ed8","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/bgb-viprend.log' />\n","comments":"","outputs":1,"x":461.00009536743164,"y":3550.967363357544,"z":"5083bb91.cbb384","wires":[[]]},{"id":"9b1367c3.3e1fd8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1406.666805267334,"y":3235.9671211242676,"z":"5083bb91.cbb384","wires":[]},{"id":"8c9a1ab5.ce5b08","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1219.3573722839355,"y":3192.919590950012,"z":"5083bb91.cbb384","wires":[["3dcbea4.1096316"]]},{"id":"e70903d4.4bb15","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1227.9288024902344,"y":3237.205304145813,"z":"5083bb91.cbb384","wires":[["9b1367c3.3e1fd8"]]},{"id":"3dcbea4.1096316","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1409.3573989868164,"y":3192.729326248169,"z":"5083bb91.cbb384","wires":[]},{"id":"31bdedf0.2bef82","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":886.6667442321777,"y":3390.967043876648,"z":"5083bb91.cbb384","wires":[]},{"id":"69da107b.fb799","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":699.3573112487793,"y":3347.9195137023926,"z":"5083bb91.cbb384","wires":[["b5e15cb2.cab62"]]},{"id":"7a401d78.a37844","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":707.9287414550781,"y":3392.2052268981934,"z":"5083bb91.cbb384","wires":[["31bdedf0.2bef82"]]},{"id":"b5e15cb2.cab62","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating selflink in generic-vnf in AAI\" />\n","comments":"","x":889.3573379516602,"y":3347.7292490005493,"z":"5083bb91.cbb384","wires":[]},{"id":"83344e86.aa812","type":"set","name":"set model-customization-uuid","xml":"<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'\n value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />\n","comments":"","x":548.3332977294922,"y":1650.2529134750366,"z":"5083bb91.cbb384","wires":[]},{"id":"f66871af.e5692","type":"execute","name":"split related-link","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>\n <parameter name='ctx_memory_result_key' value='aai-uid-split' />\n <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />\n <parameter name='regex' value='/' />\n","comments":"","outputs":1,"x":1313.6665954589844,"y":1771.6664972305298,"z":"5083bb91.cbb384","wires":[[]]},{"id":"7ed2b7fb.548078","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1133.3332977294922,"y":1818.333285331726,"z":"5083bb91.cbb384","wires":[["f66871af.e5692","d747b0d7.af821","399a4263.6a360e"]]},{"id":"399a4263.6a360e","type":"break","name":"break","xml":"<break>\n","comments":"","x":1283.3332595825195,"y":1861.666582107544,"z":"5083bb91.cbb384","wires":[]},{"id":"e9252ccb.d2705","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":795,"y":3070.7143869400024,"z":"5083bb91.cbb384","wires":[["b1db1f98.d448e","d45ddc40.768c2"]]},{"id":"d45ddc40.768c2","type":"save","name":"save generic-vnf availability-zone relationship","xml":"<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"generic-vnf:relationship-list\"\n key=\"generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id\"\n force=\"true\" pfx=\"tmp.AnAI-data\">\n <parameter name=\"relationship-list.relationship[0].related-to\" value=\"availability-zone\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"cloud-region.cloud-owner\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"Rackspace\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-key\" value=\"cloud-region.cloud-region-id\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[1].relationship-value\" value=\"`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-key\" value=\"availability-zone.availability-zone-name\" />\n <parameter name=\"relationship-list.relationship[0].relationship-data[2].relationship-value\" value=\"`$aai.az.availability-zone[$idx].availability-zone-name`\" />\n","comments":"","outputs":1,"x":1086.9048156738281,"y":3094.0478343963623,"z":"5083bb91.cbb384","wires":[["a2d3128e.390bf","8b3808e2.f32948"]]},{"id":"a97c0980.2d72a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`\" />\n","comments":"","x":1540.47607421875,"y":3117.9671936035156,"z":"5083bb91.cbb384","wires":[]},{"id":"a2d3128e.390bf","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1353.1666412353516,"y":3074.9196634292603,"z":"5083bb91.cbb384","wires":[["e7b70608.415b38"]]},{"id":"8b3808e2.f32948","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1361.7380714416504,"y":3119.205376625061,"z":"5083bb91.cbb384","wires":[["a97c0980.2d72a8"]]},{"id":"e7b70608.415b38","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error updating generic-vnf in AAI\" />\n","comments":"","x":1543.1666679382324,"y":3074.729398727417,"z":"5083bb91.cbb384","wires":[]},{"id":"bf344dbf.57e7d","type":"set","name":"set mapping rows to 0","xml":"<set>\n<parameter name='db.vf-network-role-mapping_length' value='0' />\n","comments":"","x":1107.1427688598633,"y":2064.52388381958,"z":"5083bb91.cbb384","wires":[]},{"id":"a6739756.d975f8","type":"switchNode","name":"switch AAI availability-zone_length","xml":"<switch test='`$aai.az.availability-zone_length`'>\n","comments":"","outputs":1,"x":535.7142868041992,"y":2974.523973464966,"z":"5083bb91.cbb384","wires":[["2876e97f.ae3916"]]},{"id":"2876e97f.ae3916","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":754.2857055664062,"y":2974.0953826904297,"z":"5083bb91.cbb384","wires":[["32c7e4de.36637c"]]},{"id":"ea591bcc.24cec8","type":"set","name":"set availability-zone_length to 0","xml":"<set>\n<parameter name='aai.az.availability-zone_length' value='0' />\n","comments":"","x":1355.7143478393555,"y":2992.6666202545166,"z":"5083bb91.cbb384","wires":[]},{"id":"32c7e4de.36637c","type":"switchNode","name":"switch AZ max count > 0","xml":"<switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>\n","comments":"","outputs":1,"x":942.857177734375,"y":2974.5236945152283,"z":"5083bb91.cbb384","wires":[["a4226dd4.17547","29731a8a.ed2356"]]},{"id":"a4226dd4.17547","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1145.7142848968506,"y":2948.8094444274902,"z":"5083bb91.cbb384","wires":[["7e365163.fc36a"]]},{"id":"29731a8a.ed2356","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1147.1429061889648,"y":2993.0951919555664,"z":"5083bb91.cbb384","wires":[["ea591bcc.24cec8"]]},{"id":"7e365163.fc36a","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'No availability zones found in AAI for cloud region '\n + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`\" />\n","comments":"","x":1297.142822265625,"y":2948.5238494873047,"z":"5083bb91.cbb384","wires":[]},{"id":"b3f8a06f.e304d","type":"get-resource","name":"get-resource availability zones","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"availability-zones\" \n\t\tkey=\"cloud-region.cloud-owner = 'Rackspace' AND \n\t\t cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND\n\t\t depth='0'\"\n pfx='aai.az' local-only='false' >\n\n","comments":"","outputs":1,"x":545.7143096923828,"y":1901.4286441802979,"z":"5083bb91.cbb384","wires":[["c6cdd578.1d9f88"]]},{"id":"c6cdd578.1d9f88","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":770.9605255126953,"y":1900.829496383667,"z":"5083bb91.cbb384","wires":[["450c32ab.82b7bc"]]},{"id":"450c32ab.82b7bc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error retrieving availability zones from AAI\" />\n","comments":"","x":944.7104644775391,"y":1899.5796184539795,"z":"5083bb91.cbb384","wires":[]}]
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml
index 0d099265..54bd6953 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-activate.xml
@@ -103,7 +103,7 @@
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
tenant.tenant-id = $tmp.ar.tenant-id"
pfx='aai.tenant' local-only='false' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml
index 40309750..ce866701 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-assign.xml
@@ -169,7 +169,7 @@ value="`$ar-model.version`" />
</set>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
tenant.tenant-id = $tmp.ar.tenant-id"
pfx='aai.tenant' local-only='false' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml
index 1eb00a55..401fb1d1 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-create.xml
@@ -89,7 +89,7 @@
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
tenant.tenant-id = $tmp.ar.tenant-id"
pfx='aai.tenant' local-only='false' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml
index 01c01749..52d4a302 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-deactivate.xml
@@ -94,7 +94,7 @@
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
tenant.tenant-id = $tmp.ar.tenant-id"
pfx='aai.tenant' local-only='false' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml
index 147aa608..7ee7deee 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_contrail-route-topology-operation-delete.xml
@@ -103,7 +103,7 @@
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $tmp.ar.cloud-region-id AND
tenant.tenant-id = $tmp.ar.tenant-id"
pfx='aai.tenant' local-only='false' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml
index 39db7c06..6f03a145 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign.xml
@@ -45,7 +45,7 @@
</return></outcome></get-resource></block></outcome></switch><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="tenant"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND
tenant.tenant-id = $network-topology-operation-input.network-request-input.tenant"
pfx='aai.tenant' local-only='false' >
@@ -385,7 +385,7 @@
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $network-topology-operation-input.network-request-input.aic-cloud-region AND
depth = '0'"
pfx='aai.cloud-region' local-only='false' >
@@ -690,14 +690,14 @@
<!-- create relationship-list -->
<parameter name="relationship-list.relationship[0].related-to" value="tenant" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="Rackspace" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="tenant.tenant-id" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.network-request-input.tenant`" />
<parameter name="relationship-list.relationship[1].related-to" value="cloud-region" />
<parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
- <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="Rackspace" />
<parameter name="relationship-list.relationship[1].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
<parameter name="relationship-list.relationship[1].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
index be6432f0..a2c19632 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
@@ -79,7 +79,7 @@
<parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
pfx='aai.cloud-region' local-only='false' >
@@ -534,7 +534,7 @@ key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-
<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
</record></outcome></delete><save plugin="org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource" resource="SQL"
-key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'att-aic')" ><outcome value='failure'>
+key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , 'Rackspace')" ><outcome value='failure'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="__TIMESTAMP__"/>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
index 828a4bb7..73291628 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
@@ -140,7 +140,7 @@
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
depth='0'"
pfx='aai.cloud-region' local-only='false' >
@@ -167,7 +167,7 @@
value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
</set><break/></block></outcome></switch></for><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="availability-zones"
- key="cloud-region.cloud-owner = 'att-aic' AND
+ key="cloud-region.cloud-owner = 'Rackspace' AND
cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
depth='0'"
pfx='aai.az' local-only='false' >
@@ -295,7 +295,7 @@
force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[0].related-to" value="availability-zone" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="att-aic" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="Rackspace" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="availability-zone.availability-zone-name" />